waldur-api-client 7.8.2__py3-none-any.whl → 7.8.3__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/marketplace_project_update_requests/marketplace_project_update_requests_count.py +18 -18
- waldur_api_client/api/marketplace_project_update_requests/marketplace_project_update_requests_list.py +18 -18
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_move_resource.py +22 -0
- waldur_api_client/api/marketplace_resources/marketplace_resources_move_resource.py +22 -0
- waldur_api_client/api/openstack_backups/openstack_backups_restore.py +10 -10
- waldur_api_client/api/rancher_services/rancher_services_create.py +22 -22
- waldur_api_client/models/__init__.py +26 -6
- waldur_api_client/models/azure_sql_server_create_order_attributes.py +5 -10
- waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +7 -12
- waldur_api_client/models/booking_resource.py +16 -34
- waldur_api_client/models/booking_resources_list_field_item.py +1 -3
- waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -3
- waldur_api_client/models/constance_settings.py +9 -0
- waldur_api_client/models/constance_settings_request.py +9 -0
- waldur_api_client/models/constance_settings_request_form.py +9 -0
- waldur_api_client/models/constance_settings_request_multipart.py +14 -0
- waldur_api_client/models/event_groups_enum.py +1 -0
- waldur_api_client/models/event_types_enum.py +2 -0
- waldur_api_client/models/generic_order_attributes.py +1 -2
- waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +1 -3
- waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_orders_list_field_item.py +1 -3
- waldur_api_client/models/marketplace_orders_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -3
- waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_resources_list_field_item.py +1 -3
- waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_robot_accounts_list_field_item.py +2 -1
- waldur_api_client/models/marketplace_robot_accounts_retrieve_field_item.py +2 -1
- waldur_api_client/models/merged_plugin_options.py +9 -0
- waldur_api_client/models/merged_plugin_options_request.py +9 -0
- waldur_api_client/models/move_resource_request.py +65 -0
- waldur_api_client/models/open_stack_backup_restoration.py +3 -5
- waldur_api_client/models/open_stack_backup_restoration_create_request.py +141 -0
- waldur_api_client/models/open_stack_backup_restoration_request.py +22 -30
- waldur_api_client/models/{open_stack_nested_security_group_request.py → open_stack_create_floating_ip_request.py} +17 -6
- waldur_api_client/models/open_stack_create_port_request.py +104 -0
- waldur_api_client/models/open_stack_instance.py +13 -29
- waldur_api_client/models/open_stack_instance_create_order_attributes.py +67 -54
- waldur_api_client/models/open_stack_instance_floating_i_ps_update_request.py +5 -5
- waldur_api_client/models/open_stack_instance_ports_update_request.py +5 -5
- waldur_api_client/models/open_stack_instance_request.py +1 -67
- waldur_api_client/models/open_stack_nested_port_request.py +0 -9
- waldur_api_client/models/open_stack_security_group_hyperlink_request.py +59 -0
- waldur_api_client/models/open_stack_server_group_hyperlink_request.py +59 -0
- waldur_api_client/models/open_stack_tenant_create_order_attributes.py +9 -14
- waldur_api_client/models/open_stack_volume_create_order_attributes.py +8 -13
- waldur_api_client/models/openstack_instances_list_field_item.py +0 -7
- waldur_api_client/models/openstack_instances_retrieve_field_item.py +0 -7
- waldur_api_client/models/order_create.py +8 -0
- waldur_api_client/models/order_details.py +16 -34
- waldur_api_client/models/patched_open_stack_instance_request.py +1 -67
- waldur_api_client/models/{rancher_nested_security_group.py → project_hyperlink_request.py} +5 -5
- waldur_api_client/models/rancher_clusters_list_field_item.py +0 -1
- waldur_api_client/models/rancher_clusters_retrieve_field_item.py +0 -1
- waldur_api_client/models/rancher_service_create.py +508 -0
- waldur_api_client/models/rancher_service_create_marketplace_offering_plugin_options_type_0.py +44 -0
- waldur_api_client/models/rancher_service_create_request.py +185 -0
- waldur_api_client/models/rancher_service_request.py +16 -19
- waldur_api_client/models/rancher_workload_create.py +59 -0
- waldur_api_client/models/rancher_workload_create_request.py +59 -0
- waldur_api_client/models/resource.py +16 -34
- waldur_api_client/models/robot_account_details.py +22 -13
- waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +4 -9
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +11 -16
- waldur_api_client/models/vmware_nested_network.py +0 -25
- waldur_api_client/models/vmware_nested_network_request.py +6 -14
- {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.3.dist-info}/METADATA +1 -1
- {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.3.dist-info}/RECORD +73 -64
- waldur_api_client/models/open_stack_data_volume.py +0 -81
- {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.3.dist-info}/WHEEL +0 -0
- {waldur_api_client-7.8.2.dist-info → waldur_api_client-7.8.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
|
-
if TYPE_CHECKING:
|
|
10
|
-
from ..models.open_stack_data_volume_request import OpenStackDataVolumeRequest
|
|
11
|
-
|
|
12
|
-
|
|
13
9
|
T = TypeVar("T", bound="PatchedOpenStackInstanceRequest")
|
|
14
10
|
|
|
15
11
|
|
|
@@ -19,17 +15,10 @@ class PatchedOpenStackInstanceRequest:
|
|
|
19
15
|
Attributes:
|
|
20
16
|
name (Union[Unset, str]):
|
|
21
17
|
description (Union[Unset, str]):
|
|
22
|
-
system_volume_type (Union[None, Unset, str]): Volume type for the system volume
|
|
23
|
-
data_volume_type (Union[None, Unset, str]): Volume type for the data volume
|
|
24
|
-
data_volumes (Union[Unset, list['OpenStackDataVolumeRequest']]): Additional data volumes to attach to the
|
|
25
|
-
instance
|
|
26
18
|
"""
|
|
27
19
|
|
|
28
20
|
name: Union[Unset, str] = UNSET
|
|
29
21
|
description: Union[Unset, str] = UNSET
|
|
30
|
-
system_volume_type: Union[None, Unset, str] = UNSET
|
|
31
|
-
data_volume_type: Union[None, Unset, str] = UNSET
|
|
32
|
-
data_volumes: Union[Unset, list["OpenStackDataVolumeRequest"]] = UNSET
|
|
33
22
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
23
|
|
|
35
24
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -37,25 +26,6 @@ class PatchedOpenStackInstanceRequest:
|
|
|
37
26
|
|
|
38
27
|
description = self.description
|
|
39
28
|
|
|
40
|
-
system_volume_type: Union[None, Unset, str]
|
|
41
|
-
if isinstance(self.system_volume_type, Unset):
|
|
42
|
-
system_volume_type = UNSET
|
|
43
|
-
else:
|
|
44
|
-
system_volume_type = self.system_volume_type
|
|
45
|
-
|
|
46
|
-
data_volume_type: Union[None, Unset, str]
|
|
47
|
-
if isinstance(self.data_volume_type, Unset):
|
|
48
|
-
data_volume_type = UNSET
|
|
49
|
-
else:
|
|
50
|
-
data_volume_type = self.data_volume_type
|
|
51
|
-
|
|
52
|
-
data_volumes: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
53
|
-
if not isinstance(self.data_volumes, Unset):
|
|
54
|
-
data_volumes = []
|
|
55
|
-
for data_volumes_item_data in self.data_volumes:
|
|
56
|
-
data_volumes_item = data_volumes_item_data.to_dict()
|
|
57
|
-
data_volumes.append(data_volumes_item)
|
|
58
|
-
|
|
59
29
|
field_dict: dict[str, Any] = {}
|
|
60
30
|
field_dict.update(self.additional_properties)
|
|
61
31
|
field_dict.update({})
|
|
@@ -63,55 +33,19 @@ class PatchedOpenStackInstanceRequest:
|
|
|
63
33
|
field_dict["name"] = name
|
|
64
34
|
if description is not UNSET:
|
|
65
35
|
field_dict["description"] = description
|
|
66
|
-
if system_volume_type is not UNSET:
|
|
67
|
-
field_dict["system_volume_type"] = system_volume_type
|
|
68
|
-
if data_volume_type is not UNSET:
|
|
69
|
-
field_dict["data_volume_type"] = data_volume_type
|
|
70
|
-
if data_volumes is not UNSET:
|
|
71
|
-
field_dict["data_volumes"] = data_volumes
|
|
72
36
|
|
|
73
37
|
return field_dict
|
|
74
38
|
|
|
75
39
|
@classmethod
|
|
76
40
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
|
-
from ..models.open_stack_data_volume_request import OpenStackDataVolumeRequest
|
|
78
|
-
|
|
79
41
|
d = dict(src_dict)
|
|
80
42
|
name = d.pop("name", UNSET)
|
|
81
43
|
|
|
82
44
|
description = d.pop("description", UNSET)
|
|
83
45
|
|
|
84
|
-
def _parse_system_volume_type(data: object) -> Union[None, Unset, str]:
|
|
85
|
-
if data is None:
|
|
86
|
-
return data
|
|
87
|
-
if isinstance(data, Unset):
|
|
88
|
-
return data
|
|
89
|
-
return cast(Union[None, Unset, str], data)
|
|
90
|
-
|
|
91
|
-
system_volume_type = _parse_system_volume_type(d.pop("system_volume_type", UNSET))
|
|
92
|
-
|
|
93
|
-
def _parse_data_volume_type(data: object) -> Union[None, Unset, str]:
|
|
94
|
-
if data is None:
|
|
95
|
-
return data
|
|
96
|
-
if isinstance(data, Unset):
|
|
97
|
-
return data
|
|
98
|
-
return cast(Union[None, Unset, str], data)
|
|
99
|
-
|
|
100
|
-
data_volume_type = _parse_data_volume_type(d.pop("data_volume_type", UNSET))
|
|
101
|
-
|
|
102
|
-
data_volumes = []
|
|
103
|
-
_data_volumes = d.pop("data_volumes", UNSET)
|
|
104
|
-
for data_volumes_item_data in _data_volumes or []:
|
|
105
|
-
data_volumes_item = OpenStackDataVolumeRequest.from_dict(data_volumes_item_data)
|
|
106
|
-
|
|
107
|
-
data_volumes.append(data_volumes_item)
|
|
108
|
-
|
|
109
46
|
patched_open_stack_instance_request = cls(
|
|
110
47
|
name=name,
|
|
111
48
|
description=description,
|
|
112
|
-
system_volume_type=system_volume_type,
|
|
113
|
-
data_volume_type=data_volume_type,
|
|
114
|
-
data_volumes=data_volumes,
|
|
115
49
|
)
|
|
116
50
|
|
|
117
51
|
patched_open_stack_instance_request.additional_properties = d
|
|
@@ -4,11 +4,11 @@ from typing import Any, TypeVar
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
T = TypeVar("T", bound="
|
|
7
|
+
T = TypeVar("T", bound="ProjectHyperlinkRequest")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@_attrs_define
|
|
11
|
-
class
|
|
11
|
+
class ProjectHyperlinkRequest:
|
|
12
12
|
"""
|
|
13
13
|
Attributes:
|
|
14
14
|
url (str):
|
|
@@ -35,12 +35,12 @@ class RancherNestedSecurityGroup:
|
|
|
35
35
|
d = dict(src_dict)
|
|
36
36
|
url = d.pop("url")
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
project_hyperlink_request = cls(
|
|
39
39
|
url=url,
|
|
40
40
|
)
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
return
|
|
42
|
+
project_hyperlink_request.additional_properties = d
|
|
43
|
+
return project_hyperlink_request
|
|
44
44
|
|
|
45
45
|
@property
|
|
46
46
|
def additional_keys(self) -> list[str]:
|
|
@@ -37,7 +37,6 @@ class RancherClustersListFieldItem(str, Enum):
|
|
|
37
37
|
RESOURCE_TYPE = "resource_type"
|
|
38
38
|
ROUTER_IPS = "router_ips"
|
|
39
39
|
RUNTIME_STATE = "runtime_state"
|
|
40
|
-
SECURITY_GROUPS = "security_groups"
|
|
41
40
|
SERVICE_NAME = "service_name"
|
|
42
41
|
SERVICE_SETTINGS = "service_settings"
|
|
43
42
|
SERVICE_SETTINGS_ERROR_MESSAGE = "service_settings_error_message"
|
|
@@ -37,7 +37,6 @@ class RancherClustersRetrieveFieldItem(str, Enum):
|
|
|
37
37
|
RESOURCE_TYPE = "resource_type"
|
|
38
38
|
ROUTER_IPS = "router_ips"
|
|
39
39
|
RUNTIME_STATE = "runtime_state"
|
|
40
|
-
SECURITY_GROUPS = "security_groups"
|
|
41
40
|
SERVICE_NAME = "service_name"
|
|
42
41
|
SERVICE_SETTINGS = "service_settings"
|
|
43
42
|
SERVICE_SETTINGS_ERROR_MESSAGE = "service_settings_error_message"
|
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from ..models.core_states import CoreStates
|
|
11
|
+
from ..types import UNSET, Unset
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.rancher_service_create_marketplace_offering_plugin_options_type_0 import (
|
|
15
|
+
RancherServiceCreateMarketplaceOfferingPluginOptionsType0,
|
|
16
|
+
)
|
|
17
|
+
from ..models.rancher_workload_create import RancherWorkloadCreate
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
T = TypeVar("T", bound="RancherServiceCreate")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@_attrs_define
|
|
24
|
+
class RancherServiceCreate:
|
|
25
|
+
"""
|
|
26
|
+
Attributes:
|
|
27
|
+
url (str):
|
|
28
|
+
uuid (UUID):
|
|
29
|
+
name (str):
|
|
30
|
+
service_name (str):
|
|
31
|
+
service_settings (str):
|
|
32
|
+
service_settings_uuid (UUID):
|
|
33
|
+
service_settings_state (str):
|
|
34
|
+
service_settings_error_message (str):
|
|
35
|
+
project (str):
|
|
36
|
+
project_name (str):
|
|
37
|
+
project_uuid (UUID):
|
|
38
|
+
customer (str):
|
|
39
|
+
customer_name (str):
|
|
40
|
+
customer_native_name (str):
|
|
41
|
+
customer_abbreviation (str):
|
|
42
|
+
resource_type (str):
|
|
43
|
+
state (CoreStates):
|
|
44
|
+
created (datetime.datetime):
|
|
45
|
+
modified (datetime.datetime):
|
|
46
|
+
access_url (Union[None, str]):
|
|
47
|
+
namespace_name (str):
|
|
48
|
+
marketplace_offering_uuid (Union[None, str]):
|
|
49
|
+
marketplace_offering_name (Union[None, str]):
|
|
50
|
+
marketplace_offering_plugin_options (Union['RancherServiceCreateMarketplaceOfferingPluginOptionsType0', None]):
|
|
51
|
+
marketplace_category_uuid (Union[None, str]):
|
|
52
|
+
marketplace_category_name (Union[None, str]):
|
|
53
|
+
marketplace_resource_uuid (Union[None, str]):
|
|
54
|
+
marketplace_plan_uuid (Union[None, str]):
|
|
55
|
+
marketplace_resource_state (Union[None, str]):
|
|
56
|
+
is_usage_based (Union[None, bool]):
|
|
57
|
+
is_limit_based (Union[None, bool]):
|
|
58
|
+
description (Union[Unset, str]):
|
|
59
|
+
error_message (Union[Unset, str]):
|
|
60
|
+
error_traceback (Union[Unset, str]):
|
|
61
|
+
backend_id (Union[Unset, str]):
|
|
62
|
+
runtime_state (Union[Unset, str]):
|
|
63
|
+
namespace (Union[Unset, str]):
|
|
64
|
+
cluster_ip (Union[None, Unset, str]): An IPv4 or IPv6 address.
|
|
65
|
+
selector (Union[Unset, Any]):
|
|
66
|
+
target_workloads (Union[Unset, list['RancherWorkloadCreate']]):
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
url: str
|
|
70
|
+
uuid: UUID
|
|
71
|
+
name: str
|
|
72
|
+
service_name: str
|
|
73
|
+
service_settings: str
|
|
74
|
+
service_settings_uuid: UUID
|
|
75
|
+
service_settings_state: str
|
|
76
|
+
service_settings_error_message: str
|
|
77
|
+
project: str
|
|
78
|
+
project_name: str
|
|
79
|
+
project_uuid: UUID
|
|
80
|
+
customer: str
|
|
81
|
+
customer_name: str
|
|
82
|
+
customer_native_name: str
|
|
83
|
+
customer_abbreviation: str
|
|
84
|
+
resource_type: str
|
|
85
|
+
state: CoreStates
|
|
86
|
+
created: datetime.datetime
|
|
87
|
+
modified: datetime.datetime
|
|
88
|
+
access_url: Union[None, str]
|
|
89
|
+
namespace_name: str
|
|
90
|
+
marketplace_offering_uuid: Union[None, str]
|
|
91
|
+
marketplace_offering_name: Union[None, str]
|
|
92
|
+
marketplace_offering_plugin_options: Union["RancherServiceCreateMarketplaceOfferingPluginOptionsType0", None]
|
|
93
|
+
marketplace_category_uuid: Union[None, str]
|
|
94
|
+
marketplace_category_name: Union[None, str]
|
|
95
|
+
marketplace_resource_uuid: Union[None, str]
|
|
96
|
+
marketplace_plan_uuid: Union[None, str]
|
|
97
|
+
marketplace_resource_state: Union[None, str]
|
|
98
|
+
is_usage_based: Union[None, bool]
|
|
99
|
+
is_limit_based: Union[None, bool]
|
|
100
|
+
description: Union[Unset, str] = UNSET
|
|
101
|
+
error_message: Union[Unset, str] = UNSET
|
|
102
|
+
error_traceback: Union[Unset, str] = UNSET
|
|
103
|
+
backend_id: Union[Unset, str] = UNSET
|
|
104
|
+
runtime_state: Union[Unset, str] = UNSET
|
|
105
|
+
namespace: Union[Unset, str] = UNSET
|
|
106
|
+
cluster_ip: Union[None, Unset, str] = UNSET
|
|
107
|
+
selector: Union[Unset, Any] = UNSET
|
|
108
|
+
target_workloads: Union[Unset, list["RancherWorkloadCreate"]] = UNSET
|
|
109
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
110
|
+
|
|
111
|
+
def to_dict(self) -> dict[str, Any]:
|
|
112
|
+
from ..models.rancher_service_create_marketplace_offering_plugin_options_type_0 import (
|
|
113
|
+
RancherServiceCreateMarketplaceOfferingPluginOptionsType0,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
url = self.url
|
|
117
|
+
|
|
118
|
+
uuid = str(self.uuid)
|
|
119
|
+
|
|
120
|
+
name = self.name
|
|
121
|
+
|
|
122
|
+
service_name = self.service_name
|
|
123
|
+
|
|
124
|
+
service_settings = self.service_settings
|
|
125
|
+
|
|
126
|
+
service_settings_uuid = str(self.service_settings_uuid)
|
|
127
|
+
|
|
128
|
+
service_settings_state = self.service_settings_state
|
|
129
|
+
|
|
130
|
+
service_settings_error_message = self.service_settings_error_message
|
|
131
|
+
|
|
132
|
+
project = self.project
|
|
133
|
+
|
|
134
|
+
project_name = self.project_name
|
|
135
|
+
|
|
136
|
+
project_uuid = str(self.project_uuid)
|
|
137
|
+
|
|
138
|
+
customer = self.customer
|
|
139
|
+
|
|
140
|
+
customer_name = self.customer_name
|
|
141
|
+
|
|
142
|
+
customer_native_name = self.customer_native_name
|
|
143
|
+
|
|
144
|
+
customer_abbreviation = self.customer_abbreviation
|
|
145
|
+
|
|
146
|
+
resource_type = self.resource_type
|
|
147
|
+
|
|
148
|
+
state = self.state.value
|
|
149
|
+
|
|
150
|
+
created = self.created.isoformat()
|
|
151
|
+
|
|
152
|
+
modified = self.modified.isoformat()
|
|
153
|
+
|
|
154
|
+
access_url: Union[None, str]
|
|
155
|
+
access_url = self.access_url
|
|
156
|
+
|
|
157
|
+
namespace_name = self.namespace_name
|
|
158
|
+
|
|
159
|
+
marketplace_offering_uuid: Union[None, str]
|
|
160
|
+
marketplace_offering_uuid = self.marketplace_offering_uuid
|
|
161
|
+
|
|
162
|
+
marketplace_offering_name: Union[None, str]
|
|
163
|
+
marketplace_offering_name = self.marketplace_offering_name
|
|
164
|
+
|
|
165
|
+
marketplace_offering_plugin_options: Union[None, dict[str, Any]]
|
|
166
|
+
if isinstance(
|
|
167
|
+
self.marketplace_offering_plugin_options, RancherServiceCreateMarketplaceOfferingPluginOptionsType0
|
|
168
|
+
):
|
|
169
|
+
marketplace_offering_plugin_options = self.marketplace_offering_plugin_options.to_dict()
|
|
170
|
+
else:
|
|
171
|
+
marketplace_offering_plugin_options = self.marketplace_offering_plugin_options
|
|
172
|
+
|
|
173
|
+
marketplace_category_uuid: Union[None, str]
|
|
174
|
+
marketplace_category_uuid = self.marketplace_category_uuid
|
|
175
|
+
|
|
176
|
+
marketplace_category_name: Union[None, str]
|
|
177
|
+
marketplace_category_name = self.marketplace_category_name
|
|
178
|
+
|
|
179
|
+
marketplace_resource_uuid: Union[None, str]
|
|
180
|
+
marketplace_resource_uuid = self.marketplace_resource_uuid
|
|
181
|
+
|
|
182
|
+
marketplace_plan_uuid: Union[None, str]
|
|
183
|
+
marketplace_plan_uuid = self.marketplace_plan_uuid
|
|
184
|
+
|
|
185
|
+
marketplace_resource_state: Union[None, str]
|
|
186
|
+
marketplace_resource_state = self.marketplace_resource_state
|
|
187
|
+
|
|
188
|
+
is_usage_based: Union[None, bool]
|
|
189
|
+
is_usage_based = self.is_usage_based
|
|
190
|
+
|
|
191
|
+
is_limit_based: Union[None, bool]
|
|
192
|
+
is_limit_based = self.is_limit_based
|
|
193
|
+
|
|
194
|
+
description = self.description
|
|
195
|
+
|
|
196
|
+
error_message = self.error_message
|
|
197
|
+
|
|
198
|
+
error_traceback = self.error_traceback
|
|
199
|
+
|
|
200
|
+
backend_id = self.backend_id
|
|
201
|
+
|
|
202
|
+
runtime_state = self.runtime_state
|
|
203
|
+
|
|
204
|
+
namespace = self.namespace
|
|
205
|
+
|
|
206
|
+
cluster_ip: Union[None, Unset, str]
|
|
207
|
+
if isinstance(self.cluster_ip, Unset):
|
|
208
|
+
cluster_ip = UNSET
|
|
209
|
+
else:
|
|
210
|
+
cluster_ip = self.cluster_ip
|
|
211
|
+
|
|
212
|
+
selector = self.selector
|
|
213
|
+
|
|
214
|
+
target_workloads: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
215
|
+
if not isinstance(self.target_workloads, Unset):
|
|
216
|
+
target_workloads = []
|
|
217
|
+
for target_workloads_item_data in self.target_workloads:
|
|
218
|
+
target_workloads_item = target_workloads_item_data.to_dict()
|
|
219
|
+
target_workloads.append(target_workloads_item)
|
|
220
|
+
|
|
221
|
+
field_dict: dict[str, Any] = {}
|
|
222
|
+
field_dict.update(self.additional_properties)
|
|
223
|
+
field_dict.update(
|
|
224
|
+
{
|
|
225
|
+
"url": url,
|
|
226
|
+
"uuid": uuid,
|
|
227
|
+
"name": name,
|
|
228
|
+
"service_name": service_name,
|
|
229
|
+
"service_settings": service_settings,
|
|
230
|
+
"service_settings_uuid": service_settings_uuid,
|
|
231
|
+
"service_settings_state": service_settings_state,
|
|
232
|
+
"service_settings_error_message": service_settings_error_message,
|
|
233
|
+
"project": project,
|
|
234
|
+
"project_name": project_name,
|
|
235
|
+
"project_uuid": project_uuid,
|
|
236
|
+
"customer": customer,
|
|
237
|
+
"customer_name": customer_name,
|
|
238
|
+
"customer_native_name": customer_native_name,
|
|
239
|
+
"customer_abbreviation": customer_abbreviation,
|
|
240
|
+
"resource_type": resource_type,
|
|
241
|
+
"state": state,
|
|
242
|
+
"created": created,
|
|
243
|
+
"modified": modified,
|
|
244
|
+
"access_url": access_url,
|
|
245
|
+
"namespace_name": namespace_name,
|
|
246
|
+
"marketplace_offering_uuid": marketplace_offering_uuid,
|
|
247
|
+
"marketplace_offering_name": marketplace_offering_name,
|
|
248
|
+
"marketplace_offering_plugin_options": marketplace_offering_plugin_options,
|
|
249
|
+
"marketplace_category_uuid": marketplace_category_uuid,
|
|
250
|
+
"marketplace_category_name": marketplace_category_name,
|
|
251
|
+
"marketplace_resource_uuid": marketplace_resource_uuid,
|
|
252
|
+
"marketplace_plan_uuid": marketplace_plan_uuid,
|
|
253
|
+
"marketplace_resource_state": marketplace_resource_state,
|
|
254
|
+
"is_usage_based": is_usage_based,
|
|
255
|
+
"is_limit_based": is_limit_based,
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
if description is not UNSET:
|
|
259
|
+
field_dict["description"] = description
|
|
260
|
+
if error_message is not UNSET:
|
|
261
|
+
field_dict["error_message"] = error_message
|
|
262
|
+
if error_traceback is not UNSET:
|
|
263
|
+
field_dict["error_traceback"] = error_traceback
|
|
264
|
+
if backend_id is not UNSET:
|
|
265
|
+
field_dict["backend_id"] = backend_id
|
|
266
|
+
if runtime_state is not UNSET:
|
|
267
|
+
field_dict["runtime_state"] = runtime_state
|
|
268
|
+
if namespace is not UNSET:
|
|
269
|
+
field_dict["namespace"] = namespace
|
|
270
|
+
if cluster_ip is not UNSET:
|
|
271
|
+
field_dict["cluster_ip"] = cluster_ip
|
|
272
|
+
if selector is not UNSET:
|
|
273
|
+
field_dict["selector"] = selector
|
|
274
|
+
if target_workloads is not UNSET:
|
|
275
|
+
field_dict["target_workloads"] = target_workloads
|
|
276
|
+
|
|
277
|
+
return field_dict
|
|
278
|
+
|
|
279
|
+
@classmethod
|
|
280
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
281
|
+
from ..models.rancher_service_create_marketplace_offering_plugin_options_type_0 import (
|
|
282
|
+
RancherServiceCreateMarketplaceOfferingPluginOptionsType0,
|
|
283
|
+
)
|
|
284
|
+
from ..models.rancher_workload_create import RancherWorkloadCreate
|
|
285
|
+
|
|
286
|
+
d = dict(src_dict)
|
|
287
|
+
url = d.pop("url")
|
|
288
|
+
|
|
289
|
+
uuid = UUID(d.pop("uuid"))
|
|
290
|
+
|
|
291
|
+
name = d.pop("name")
|
|
292
|
+
|
|
293
|
+
service_name = d.pop("service_name")
|
|
294
|
+
|
|
295
|
+
service_settings = d.pop("service_settings")
|
|
296
|
+
|
|
297
|
+
service_settings_uuid = UUID(d.pop("service_settings_uuid"))
|
|
298
|
+
|
|
299
|
+
service_settings_state = d.pop("service_settings_state")
|
|
300
|
+
|
|
301
|
+
service_settings_error_message = d.pop("service_settings_error_message")
|
|
302
|
+
|
|
303
|
+
project = d.pop("project")
|
|
304
|
+
|
|
305
|
+
project_name = d.pop("project_name")
|
|
306
|
+
|
|
307
|
+
project_uuid = UUID(d.pop("project_uuid"))
|
|
308
|
+
|
|
309
|
+
customer = d.pop("customer")
|
|
310
|
+
|
|
311
|
+
customer_name = d.pop("customer_name")
|
|
312
|
+
|
|
313
|
+
customer_native_name = d.pop("customer_native_name")
|
|
314
|
+
|
|
315
|
+
customer_abbreviation = d.pop("customer_abbreviation")
|
|
316
|
+
|
|
317
|
+
resource_type = d.pop("resource_type")
|
|
318
|
+
|
|
319
|
+
state = CoreStates(d.pop("state"))
|
|
320
|
+
|
|
321
|
+
created = isoparse(d.pop("created"))
|
|
322
|
+
|
|
323
|
+
modified = isoparse(d.pop("modified"))
|
|
324
|
+
|
|
325
|
+
def _parse_access_url(data: object) -> Union[None, str]:
|
|
326
|
+
if data is None:
|
|
327
|
+
return data
|
|
328
|
+
return cast(Union[None, str], data)
|
|
329
|
+
|
|
330
|
+
access_url = _parse_access_url(d.pop("access_url"))
|
|
331
|
+
|
|
332
|
+
namespace_name = d.pop("namespace_name")
|
|
333
|
+
|
|
334
|
+
def _parse_marketplace_offering_uuid(data: object) -> Union[None, str]:
|
|
335
|
+
if data is None:
|
|
336
|
+
return data
|
|
337
|
+
return cast(Union[None, str], data)
|
|
338
|
+
|
|
339
|
+
marketplace_offering_uuid = _parse_marketplace_offering_uuid(d.pop("marketplace_offering_uuid"))
|
|
340
|
+
|
|
341
|
+
def _parse_marketplace_offering_name(data: object) -> Union[None, str]:
|
|
342
|
+
if data is None:
|
|
343
|
+
return data
|
|
344
|
+
return cast(Union[None, str], data)
|
|
345
|
+
|
|
346
|
+
marketplace_offering_name = _parse_marketplace_offering_name(d.pop("marketplace_offering_name"))
|
|
347
|
+
|
|
348
|
+
def _parse_marketplace_offering_plugin_options(
|
|
349
|
+
data: object,
|
|
350
|
+
) -> Union["RancherServiceCreateMarketplaceOfferingPluginOptionsType0", None]:
|
|
351
|
+
if data is None:
|
|
352
|
+
return data
|
|
353
|
+
try:
|
|
354
|
+
if not isinstance(data, dict):
|
|
355
|
+
raise TypeError()
|
|
356
|
+
marketplace_offering_plugin_options_type_0 = (
|
|
357
|
+
RancherServiceCreateMarketplaceOfferingPluginOptionsType0.from_dict(data)
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
return marketplace_offering_plugin_options_type_0
|
|
361
|
+
except: # noqa: E722
|
|
362
|
+
pass
|
|
363
|
+
return cast(Union["RancherServiceCreateMarketplaceOfferingPluginOptionsType0", None], data)
|
|
364
|
+
|
|
365
|
+
marketplace_offering_plugin_options = _parse_marketplace_offering_plugin_options(
|
|
366
|
+
d.pop("marketplace_offering_plugin_options")
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
def _parse_marketplace_category_uuid(data: object) -> Union[None, str]:
|
|
370
|
+
if data is None:
|
|
371
|
+
return data
|
|
372
|
+
return cast(Union[None, str], data)
|
|
373
|
+
|
|
374
|
+
marketplace_category_uuid = _parse_marketplace_category_uuid(d.pop("marketplace_category_uuid"))
|
|
375
|
+
|
|
376
|
+
def _parse_marketplace_category_name(data: object) -> Union[None, str]:
|
|
377
|
+
if data is None:
|
|
378
|
+
return data
|
|
379
|
+
return cast(Union[None, str], data)
|
|
380
|
+
|
|
381
|
+
marketplace_category_name = _parse_marketplace_category_name(d.pop("marketplace_category_name"))
|
|
382
|
+
|
|
383
|
+
def _parse_marketplace_resource_uuid(data: object) -> Union[None, str]:
|
|
384
|
+
if data is None:
|
|
385
|
+
return data
|
|
386
|
+
return cast(Union[None, str], data)
|
|
387
|
+
|
|
388
|
+
marketplace_resource_uuid = _parse_marketplace_resource_uuid(d.pop("marketplace_resource_uuid"))
|
|
389
|
+
|
|
390
|
+
def _parse_marketplace_plan_uuid(data: object) -> Union[None, str]:
|
|
391
|
+
if data is None:
|
|
392
|
+
return data
|
|
393
|
+
return cast(Union[None, str], data)
|
|
394
|
+
|
|
395
|
+
marketplace_plan_uuid = _parse_marketplace_plan_uuid(d.pop("marketplace_plan_uuid"))
|
|
396
|
+
|
|
397
|
+
def _parse_marketplace_resource_state(data: object) -> Union[None, str]:
|
|
398
|
+
if data is None:
|
|
399
|
+
return data
|
|
400
|
+
return cast(Union[None, str], data)
|
|
401
|
+
|
|
402
|
+
marketplace_resource_state = _parse_marketplace_resource_state(d.pop("marketplace_resource_state"))
|
|
403
|
+
|
|
404
|
+
def _parse_is_usage_based(data: object) -> Union[None, bool]:
|
|
405
|
+
if data is None:
|
|
406
|
+
return data
|
|
407
|
+
return cast(Union[None, bool], data)
|
|
408
|
+
|
|
409
|
+
is_usage_based = _parse_is_usage_based(d.pop("is_usage_based"))
|
|
410
|
+
|
|
411
|
+
def _parse_is_limit_based(data: object) -> Union[None, bool]:
|
|
412
|
+
if data is None:
|
|
413
|
+
return data
|
|
414
|
+
return cast(Union[None, bool], data)
|
|
415
|
+
|
|
416
|
+
is_limit_based = _parse_is_limit_based(d.pop("is_limit_based"))
|
|
417
|
+
|
|
418
|
+
description = d.pop("description", UNSET)
|
|
419
|
+
|
|
420
|
+
error_message = d.pop("error_message", UNSET)
|
|
421
|
+
|
|
422
|
+
error_traceback = d.pop("error_traceback", UNSET)
|
|
423
|
+
|
|
424
|
+
backend_id = d.pop("backend_id", UNSET)
|
|
425
|
+
|
|
426
|
+
runtime_state = d.pop("runtime_state", UNSET)
|
|
427
|
+
|
|
428
|
+
namespace = d.pop("namespace", UNSET)
|
|
429
|
+
|
|
430
|
+
def _parse_cluster_ip(data: object) -> Union[None, Unset, str]:
|
|
431
|
+
if data is None:
|
|
432
|
+
return data
|
|
433
|
+
if isinstance(data, Unset):
|
|
434
|
+
return data
|
|
435
|
+
return cast(Union[None, Unset, str], data)
|
|
436
|
+
|
|
437
|
+
cluster_ip = _parse_cluster_ip(d.pop("cluster_ip", UNSET))
|
|
438
|
+
|
|
439
|
+
selector = d.pop("selector", UNSET)
|
|
440
|
+
|
|
441
|
+
target_workloads = []
|
|
442
|
+
_target_workloads = d.pop("target_workloads", UNSET)
|
|
443
|
+
for target_workloads_item_data in _target_workloads or []:
|
|
444
|
+
target_workloads_item = RancherWorkloadCreate.from_dict(target_workloads_item_data)
|
|
445
|
+
|
|
446
|
+
target_workloads.append(target_workloads_item)
|
|
447
|
+
|
|
448
|
+
rancher_service_create = cls(
|
|
449
|
+
url=url,
|
|
450
|
+
uuid=uuid,
|
|
451
|
+
name=name,
|
|
452
|
+
service_name=service_name,
|
|
453
|
+
service_settings=service_settings,
|
|
454
|
+
service_settings_uuid=service_settings_uuid,
|
|
455
|
+
service_settings_state=service_settings_state,
|
|
456
|
+
service_settings_error_message=service_settings_error_message,
|
|
457
|
+
project=project,
|
|
458
|
+
project_name=project_name,
|
|
459
|
+
project_uuid=project_uuid,
|
|
460
|
+
customer=customer,
|
|
461
|
+
customer_name=customer_name,
|
|
462
|
+
customer_native_name=customer_native_name,
|
|
463
|
+
customer_abbreviation=customer_abbreviation,
|
|
464
|
+
resource_type=resource_type,
|
|
465
|
+
state=state,
|
|
466
|
+
created=created,
|
|
467
|
+
modified=modified,
|
|
468
|
+
access_url=access_url,
|
|
469
|
+
namespace_name=namespace_name,
|
|
470
|
+
marketplace_offering_uuid=marketplace_offering_uuid,
|
|
471
|
+
marketplace_offering_name=marketplace_offering_name,
|
|
472
|
+
marketplace_offering_plugin_options=marketplace_offering_plugin_options,
|
|
473
|
+
marketplace_category_uuid=marketplace_category_uuid,
|
|
474
|
+
marketplace_category_name=marketplace_category_name,
|
|
475
|
+
marketplace_resource_uuid=marketplace_resource_uuid,
|
|
476
|
+
marketplace_plan_uuid=marketplace_plan_uuid,
|
|
477
|
+
marketplace_resource_state=marketplace_resource_state,
|
|
478
|
+
is_usage_based=is_usage_based,
|
|
479
|
+
is_limit_based=is_limit_based,
|
|
480
|
+
description=description,
|
|
481
|
+
error_message=error_message,
|
|
482
|
+
error_traceback=error_traceback,
|
|
483
|
+
backend_id=backend_id,
|
|
484
|
+
runtime_state=runtime_state,
|
|
485
|
+
namespace=namespace,
|
|
486
|
+
cluster_ip=cluster_ip,
|
|
487
|
+
selector=selector,
|
|
488
|
+
target_workloads=target_workloads,
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
rancher_service_create.additional_properties = d
|
|
492
|
+
return rancher_service_create
|
|
493
|
+
|
|
494
|
+
@property
|
|
495
|
+
def additional_keys(self) -> list[str]:
|
|
496
|
+
return list(self.additional_properties.keys())
|
|
497
|
+
|
|
498
|
+
def __getitem__(self, key: str) -> Any:
|
|
499
|
+
return self.additional_properties[key]
|
|
500
|
+
|
|
501
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
502
|
+
self.additional_properties[key] = value
|
|
503
|
+
|
|
504
|
+
def __delitem__(self, key: str) -> None:
|
|
505
|
+
del self.additional_properties[key]
|
|
506
|
+
|
|
507
|
+
def __contains__(self, key: str) -> bool:
|
|
508
|
+
return key in self.additional_properties
|