waldur-api-client 7.7.5__py3-none-any.whl → 7.7.6__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_offering_users/marketplace_offering_users_checklist_retrieve.py +154 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_review_retrieve.py +154 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_completion_review_status_retrieve.py +154 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_completion_status_retrieve.py +154 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_submit_answers.py +179 -0
- waldur_api_client/api/marketplace_robot_accounts/marketplace_robot_accounts_list.py +23 -0
- waldur_api_client/api/marketplace_robot_accounts/marketplace_robot_accounts_retrieve.py +30 -1
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_service_accounts_list.py +276 -0
- waldur_api_client/api/marketplace_service_providers/service_provider_compliance_overview.py +189 -0
- waldur_api_client/api/marketplace_service_providers/service_provider_offering_users_compliance.py +222 -0
- waldur_api_client/api/public_maintenance_announcements/__init__.py +1 -0
- waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_count.py +325 -0
- waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_list.py +328 -0
- waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_retrieve.py +144 -0
- waldur_api_client/models/__init__.py +56 -4
- waldur_api_client/models/admin_announcement.py +109 -1
- waldur_api_client/models/admin_announcement_maintenance_affected_offerings_item.py +103 -0
- waldur_api_client/models/admin_announcements_list_field_item.py +8 -0
- waldur_api_client/models/admin_announcements_retrieve_field_item.py +8 -0
- waldur_api_client/models/azure_sql_server_create_order_attributes.py +80 -0
- waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +96 -0
- waldur_api_client/models/basic_user.py +30 -21
- waldur_api_client/models/booking_offerings_list_field_item.py +1 -0
- waldur_api_client/models/booking_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/create_router.py +1 -1
- waldur_api_client/models/create_router_request.py +1 -1
- waldur_api_client/models/customer.py +0 -30
- waldur_api_client/models/customers_list_field_item.py +0 -2
- waldur_api_client/models/customers_retrieve_field_item.py +0 -2
- waldur_api_client/models/fingerprint.py +19 -17
- waldur_api_client/models/instance_flavor_change_request.py +1 -1
- waldur_api_client/models/marketplace_managed_rancher_create_order_attributes.py +144 -0
- waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_rancher_create_order_attributes.py +142 -0
- waldur_api_client/models/marketplace_robot_accounts_list_field_item.py +32 -0
- waldur_api_client/models/marketplace_robot_accounts_retrieve_field_item.py +32 -0
- waldur_api_client/models/offering.py +9 -0
- waldur_api_client/models/offering_create.py +8 -0
- waldur_api_client/models/open_stack_backend_instance.py +2 -2
- waldur_api_client/models/open_stack_backend_volumes.py +3 -3
- waldur_api_client/models/open_stack_backup.py +1 -1
- waldur_api_client/models/open_stack_backup_restoration.py +8 -5
- waldur_api_client/models/open_stack_backup_restoration_request.py +28 -3
- waldur_api_client/models/open_stack_fixed_ip.py +2 -2
- waldur_api_client/models/open_stack_fixed_ip_request.py +2 -2
- waldur_api_client/models/open_stack_floating_ip.py +5 -4
- waldur_api_client/models/open_stack_instance.py +17 -15
- waldur_api_client/models/open_stack_instance_allowed_address_pairs_update_request.py +3 -2
- waldur_api_client/models/open_stack_instance_availability_zone.py +1 -1
- waldur_api_client/models/open_stack_instance_create_order_attributes.py +280 -0
- waldur_api_client/models/open_stack_instance_request.py +4 -3
- waldur_api_client/models/open_stack_instance_security_groups_update_request.py +1 -1
- waldur_api_client/models/open_stack_nested_floating_ip.py +3 -3
- waldur_api_client/models/open_stack_nested_instance.py +1 -1
- waldur_api_client/models/open_stack_nested_port.py +5 -5
- waldur_api_client/models/open_stack_nested_port_request.py +1 -1
- waldur_api_client/models/open_stack_nested_security_group.py +1 -53
- waldur_api_client/models/open_stack_nested_security_group_request.py +59 -0
- waldur_api_client/models/open_stack_nested_sub_net.py +4 -4
- waldur_api_client/models/open_stack_nested_sub_net_request.py +4 -4
- waldur_api_client/models/open_stack_nested_volume.py +3 -3
- waldur_api_client/models/open_stack_nested_volume_request.py +3 -3
- waldur_api_client/models/open_stack_network.py +3 -3
- waldur_api_client/models/open_stack_port.py +10 -9
- waldur_api_client/models/open_stack_port_ip_update_request.py +2 -2
- waldur_api_client/models/open_stack_port_request.py +3 -3
- waldur_api_client/models/open_stack_router.py +2 -2
- waldur_api_client/models/open_stack_router_interface_request.py +4 -2
- waldur_api_client/models/open_stack_security_group_rule_create.py +6 -5
- waldur_api_client/models/open_stack_security_group_rule_create_request.py +6 -5
- waldur_api_client/models/open_stack_security_group_rule_update_request.py +6 -5
- waldur_api_client/models/open_stack_server_group.py +2 -1
- waldur_api_client/models/open_stack_server_group_request.py +2 -1
- waldur_api_client/models/open_stack_snapshot.py +2 -2
- waldur_api_client/models/open_stack_snapshot_restoration.py +1 -1
- waldur_api_client/models/open_stack_sub_net.py +5 -5
- waldur_api_client/models/open_stack_sub_net_request.py +2 -2
- waldur_api_client/models/open_stack_tenant.py +3 -3
- waldur_api_client/models/open_stack_tenant_create_order_attributes.py +109 -0
- waldur_api_client/models/open_stack_volume.py +9 -9
- waldur_api_client/models/open_stack_volume_create_order_attributes.py +152 -0
- waldur_api_client/models/open_stack_volume_request.py +1 -1
- waldur_api_client/models/order_create_request.py +165 -4
- waldur_api_client/models/patched_open_stack_instance_request.py +4 -3
- waldur_api_client/models/patched_open_stack_server_group_request.py +2 -1
- waldur_api_client/models/patched_open_stack_sub_net_request.py +2 -2
- waldur_api_client/models/patched_open_stack_volume_request.py +1 -1
- waldur_api_client/models/permission_request.py +2 -2
- waldur_api_client/models/provider_offering_details.py +9 -0
- waldur_api_client/models/public_maintenance_announcement.py +217 -0
- waldur_api_client/models/public_maintenance_announcement_state_enum.py +10 -0
- waldur_api_client/models/public_maintenance_announcements_count_o_item.py +15 -0
- waldur_api_client/models/public_maintenance_announcements_count_state_item.py +12 -0
- waldur_api_client/models/public_maintenance_announcements_list_o_item.py +15 -0
- waldur_api_client/models/public_maintenance_announcements_list_state_item.py +12 -0
- waldur_api_client/models/public_offering_details.py +9 -0
- waldur_api_client/models/rancher_cluster_security_group_rule.py +5 -4
- waldur_api_client/models/rancher_cluster_security_group_rule_request.py +5 -4
- waldur_api_client/models/remote_project_update_request.py +2 -2
- waldur_api_client/models/robot_account_details.py +226 -144
- waldur_api_client/models/service_provider_compliance_overview.py +122 -0
- waldur_api_client/models/service_provider_offering_user_compliance.py +179 -0
- waldur_api_client/models/service_provider_offering_user_compliance_state_enum.py +17 -0
- waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +72 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +225 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_1.py +155 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_2_type_1.py +155 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_3_type_1.py +155 -0
- waldur_api_client/models/volume_attach_request.py +1 -1
- {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.6.dist-info}/METADATA +1 -1
- {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.6.dist-info}/RECORD +120 -85
- waldur_api_client/models/nested_security_group_rule.py +0 -222
- waldur_api_client/models/nested_security_group_rule_request.py +0 -187
- {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.6.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.6.dist-info}/WHEEL +0 -0
|
@@ -1,222 +0,0 @@
|
|
|
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.blank_enum import BlankEnum
|
|
9
|
-
from ..models.direction_enum import DirectionEnum
|
|
10
|
-
from ..models.ethertype_enum import EthertypeEnum
|
|
11
|
-
from ..models.protocol_enum import ProtocolEnum
|
|
12
|
-
from ..types import UNSET, Unset
|
|
13
|
-
|
|
14
|
-
T = TypeVar("T", bound="NestedSecurityGroupRule")
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@_attrs_define
|
|
18
|
-
class NestedSecurityGroupRule:
|
|
19
|
-
"""
|
|
20
|
-
Attributes:
|
|
21
|
-
ethertype (Union[Unset, EthertypeEnum]):
|
|
22
|
-
direction (Union[Unset, DirectionEnum]):
|
|
23
|
-
protocol (Union[BlankEnum, ProtocolEnum, Unset]):
|
|
24
|
-
from_port (Union[None, Unset, int]):
|
|
25
|
-
to_port (Union[None, Unset, int]):
|
|
26
|
-
cidr (Union[None, Unset, str]):
|
|
27
|
-
description (Union[Unset, str]):
|
|
28
|
-
remote_group_name (Union[Unset, str]):
|
|
29
|
-
remote_group_uuid (Union[Unset, UUID]):
|
|
30
|
-
id (Union[Unset, int]):
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
ethertype: Union[Unset, EthertypeEnum] = UNSET
|
|
34
|
-
direction: Union[Unset, DirectionEnum] = UNSET
|
|
35
|
-
protocol: Union[BlankEnum, ProtocolEnum, Unset] = UNSET
|
|
36
|
-
from_port: Union[None, Unset, int] = UNSET
|
|
37
|
-
to_port: Union[None, Unset, int] = UNSET
|
|
38
|
-
cidr: Union[None, Unset, str] = UNSET
|
|
39
|
-
description: Union[Unset, str] = UNSET
|
|
40
|
-
remote_group_name: Union[Unset, str] = UNSET
|
|
41
|
-
remote_group_uuid: Union[Unset, UUID] = UNSET
|
|
42
|
-
id: Union[Unset, int] = UNSET
|
|
43
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
44
|
-
|
|
45
|
-
def to_dict(self) -> dict[str, Any]:
|
|
46
|
-
ethertype: Union[Unset, str] = UNSET
|
|
47
|
-
if not isinstance(self.ethertype, Unset):
|
|
48
|
-
ethertype = self.ethertype.value
|
|
49
|
-
|
|
50
|
-
direction: Union[Unset, str] = UNSET
|
|
51
|
-
if not isinstance(self.direction, Unset):
|
|
52
|
-
direction = self.direction.value
|
|
53
|
-
|
|
54
|
-
protocol: Union[Unset, str]
|
|
55
|
-
if isinstance(self.protocol, Unset):
|
|
56
|
-
protocol = UNSET
|
|
57
|
-
elif isinstance(self.protocol, ProtocolEnum):
|
|
58
|
-
protocol = self.protocol.value
|
|
59
|
-
else:
|
|
60
|
-
protocol = self.protocol.value
|
|
61
|
-
|
|
62
|
-
from_port: Union[None, Unset, int]
|
|
63
|
-
if isinstance(self.from_port, Unset):
|
|
64
|
-
from_port = UNSET
|
|
65
|
-
else:
|
|
66
|
-
from_port = self.from_port
|
|
67
|
-
|
|
68
|
-
to_port: Union[None, Unset, int]
|
|
69
|
-
if isinstance(self.to_port, Unset):
|
|
70
|
-
to_port = UNSET
|
|
71
|
-
else:
|
|
72
|
-
to_port = self.to_port
|
|
73
|
-
|
|
74
|
-
cidr: Union[None, Unset, str]
|
|
75
|
-
if isinstance(self.cidr, Unset):
|
|
76
|
-
cidr = UNSET
|
|
77
|
-
else:
|
|
78
|
-
cidr = self.cidr
|
|
79
|
-
|
|
80
|
-
description = self.description
|
|
81
|
-
|
|
82
|
-
remote_group_name = self.remote_group_name
|
|
83
|
-
|
|
84
|
-
remote_group_uuid: Union[Unset, str] = UNSET
|
|
85
|
-
if not isinstance(self.remote_group_uuid, Unset):
|
|
86
|
-
remote_group_uuid = str(self.remote_group_uuid)
|
|
87
|
-
|
|
88
|
-
id = self.id
|
|
89
|
-
|
|
90
|
-
field_dict: dict[str, Any] = {}
|
|
91
|
-
field_dict.update(self.additional_properties)
|
|
92
|
-
field_dict.update({})
|
|
93
|
-
if ethertype is not UNSET:
|
|
94
|
-
field_dict["ethertype"] = ethertype
|
|
95
|
-
if direction is not UNSET:
|
|
96
|
-
field_dict["direction"] = direction
|
|
97
|
-
if protocol is not UNSET:
|
|
98
|
-
field_dict["protocol"] = protocol
|
|
99
|
-
if from_port is not UNSET:
|
|
100
|
-
field_dict["from_port"] = from_port
|
|
101
|
-
if to_port is not UNSET:
|
|
102
|
-
field_dict["to_port"] = to_port
|
|
103
|
-
if cidr is not UNSET:
|
|
104
|
-
field_dict["cidr"] = cidr
|
|
105
|
-
if description is not UNSET:
|
|
106
|
-
field_dict["description"] = description
|
|
107
|
-
if remote_group_name is not UNSET:
|
|
108
|
-
field_dict["remote_group_name"] = remote_group_name
|
|
109
|
-
if remote_group_uuid is not UNSET:
|
|
110
|
-
field_dict["remote_group_uuid"] = remote_group_uuid
|
|
111
|
-
if id is not UNSET:
|
|
112
|
-
field_dict["id"] = id
|
|
113
|
-
|
|
114
|
-
return field_dict
|
|
115
|
-
|
|
116
|
-
@classmethod
|
|
117
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
118
|
-
d = dict(src_dict)
|
|
119
|
-
_ethertype = d.pop("ethertype", UNSET)
|
|
120
|
-
ethertype: Union[Unset, EthertypeEnum]
|
|
121
|
-
if isinstance(_ethertype, Unset):
|
|
122
|
-
ethertype = UNSET
|
|
123
|
-
else:
|
|
124
|
-
ethertype = EthertypeEnum(_ethertype)
|
|
125
|
-
|
|
126
|
-
_direction = d.pop("direction", UNSET)
|
|
127
|
-
direction: Union[Unset, DirectionEnum]
|
|
128
|
-
if isinstance(_direction, Unset):
|
|
129
|
-
direction = UNSET
|
|
130
|
-
else:
|
|
131
|
-
direction = DirectionEnum(_direction)
|
|
132
|
-
|
|
133
|
-
def _parse_protocol(data: object) -> Union[BlankEnum, ProtocolEnum, Unset]:
|
|
134
|
-
if isinstance(data, Unset):
|
|
135
|
-
return data
|
|
136
|
-
try:
|
|
137
|
-
if not isinstance(data, str):
|
|
138
|
-
raise TypeError()
|
|
139
|
-
protocol_type_0 = ProtocolEnum(data)
|
|
140
|
-
|
|
141
|
-
return protocol_type_0
|
|
142
|
-
except: # noqa: E722
|
|
143
|
-
pass
|
|
144
|
-
if not isinstance(data, str):
|
|
145
|
-
raise TypeError()
|
|
146
|
-
protocol_type_1 = BlankEnum(data)
|
|
147
|
-
|
|
148
|
-
return protocol_type_1
|
|
149
|
-
|
|
150
|
-
protocol = _parse_protocol(d.pop("protocol", UNSET))
|
|
151
|
-
|
|
152
|
-
def _parse_from_port(data: object) -> Union[None, Unset, int]:
|
|
153
|
-
if data is None:
|
|
154
|
-
return data
|
|
155
|
-
if isinstance(data, Unset):
|
|
156
|
-
return data
|
|
157
|
-
return cast(Union[None, Unset, int], data)
|
|
158
|
-
|
|
159
|
-
from_port = _parse_from_port(d.pop("from_port", UNSET))
|
|
160
|
-
|
|
161
|
-
def _parse_to_port(data: object) -> Union[None, Unset, int]:
|
|
162
|
-
if data is None:
|
|
163
|
-
return data
|
|
164
|
-
if isinstance(data, Unset):
|
|
165
|
-
return data
|
|
166
|
-
return cast(Union[None, Unset, int], data)
|
|
167
|
-
|
|
168
|
-
to_port = _parse_to_port(d.pop("to_port", UNSET))
|
|
169
|
-
|
|
170
|
-
def _parse_cidr(data: object) -> Union[None, Unset, str]:
|
|
171
|
-
if data is None:
|
|
172
|
-
return data
|
|
173
|
-
if isinstance(data, Unset):
|
|
174
|
-
return data
|
|
175
|
-
return cast(Union[None, Unset, str], data)
|
|
176
|
-
|
|
177
|
-
cidr = _parse_cidr(d.pop("cidr", UNSET))
|
|
178
|
-
|
|
179
|
-
description = d.pop("description", UNSET)
|
|
180
|
-
|
|
181
|
-
remote_group_name = d.pop("remote_group_name", UNSET)
|
|
182
|
-
|
|
183
|
-
_remote_group_uuid = d.pop("remote_group_uuid", UNSET)
|
|
184
|
-
remote_group_uuid: Union[Unset, UUID]
|
|
185
|
-
if isinstance(_remote_group_uuid, Unset):
|
|
186
|
-
remote_group_uuid = UNSET
|
|
187
|
-
else:
|
|
188
|
-
remote_group_uuid = UUID(_remote_group_uuid)
|
|
189
|
-
|
|
190
|
-
id = d.pop("id", UNSET)
|
|
191
|
-
|
|
192
|
-
nested_security_group_rule = cls(
|
|
193
|
-
ethertype=ethertype,
|
|
194
|
-
direction=direction,
|
|
195
|
-
protocol=protocol,
|
|
196
|
-
from_port=from_port,
|
|
197
|
-
to_port=to_port,
|
|
198
|
-
cidr=cidr,
|
|
199
|
-
description=description,
|
|
200
|
-
remote_group_name=remote_group_name,
|
|
201
|
-
remote_group_uuid=remote_group_uuid,
|
|
202
|
-
id=id,
|
|
203
|
-
)
|
|
204
|
-
|
|
205
|
-
nested_security_group_rule.additional_properties = d
|
|
206
|
-
return nested_security_group_rule
|
|
207
|
-
|
|
208
|
-
@property
|
|
209
|
-
def additional_keys(self) -> list[str]:
|
|
210
|
-
return list(self.additional_properties.keys())
|
|
211
|
-
|
|
212
|
-
def __getitem__(self, key: str) -> Any:
|
|
213
|
-
return self.additional_properties[key]
|
|
214
|
-
|
|
215
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
216
|
-
self.additional_properties[key] = value
|
|
217
|
-
|
|
218
|
-
def __delitem__(self, key: str) -> None:
|
|
219
|
-
del self.additional_properties[key]
|
|
220
|
-
|
|
221
|
-
def __contains__(self, key: str) -> bool:
|
|
222
|
-
return key in self.additional_properties
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union, cast
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
from ..models.blank_enum import BlankEnum
|
|
8
|
-
from ..models.direction_enum import DirectionEnum
|
|
9
|
-
from ..models.ethertype_enum import EthertypeEnum
|
|
10
|
-
from ..models.protocol_enum import ProtocolEnum
|
|
11
|
-
from ..types import UNSET, Unset
|
|
12
|
-
|
|
13
|
-
T = TypeVar("T", bound="NestedSecurityGroupRuleRequest")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@_attrs_define
|
|
17
|
-
class NestedSecurityGroupRuleRequest:
|
|
18
|
-
"""
|
|
19
|
-
Attributes:
|
|
20
|
-
ethertype (Union[Unset, EthertypeEnum]):
|
|
21
|
-
direction (Union[Unset, DirectionEnum]):
|
|
22
|
-
protocol (Union[BlankEnum, ProtocolEnum, Unset]):
|
|
23
|
-
from_port (Union[None, Unset, int]):
|
|
24
|
-
to_port (Union[None, Unset, int]):
|
|
25
|
-
cidr (Union[None, Unset, str]):
|
|
26
|
-
description (Union[Unset, str]):
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
ethertype: Union[Unset, EthertypeEnum] = UNSET
|
|
30
|
-
direction: Union[Unset, DirectionEnum] = UNSET
|
|
31
|
-
protocol: Union[BlankEnum, ProtocolEnum, Unset] = UNSET
|
|
32
|
-
from_port: Union[None, Unset, int] = UNSET
|
|
33
|
-
to_port: Union[None, Unset, int] = UNSET
|
|
34
|
-
cidr: Union[None, Unset, str] = UNSET
|
|
35
|
-
description: Union[Unset, str] = UNSET
|
|
36
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
|
-
|
|
38
|
-
def to_dict(self) -> dict[str, Any]:
|
|
39
|
-
ethertype: Union[Unset, str] = UNSET
|
|
40
|
-
if not isinstance(self.ethertype, Unset):
|
|
41
|
-
ethertype = self.ethertype.value
|
|
42
|
-
|
|
43
|
-
direction: Union[Unset, str] = UNSET
|
|
44
|
-
if not isinstance(self.direction, Unset):
|
|
45
|
-
direction = self.direction.value
|
|
46
|
-
|
|
47
|
-
protocol: Union[Unset, str]
|
|
48
|
-
if isinstance(self.protocol, Unset):
|
|
49
|
-
protocol = UNSET
|
|
50
|
-
elif isinstance(self.protocol, ProtocolEnum):
|
|
51
|
-
protocol = self.protocol.value
|
|
52
|
-
else:
|
|
53
|
-
protocol = self.protocol.value
|
|
54
|
-
|
|
55
|
-
from_port: Union[None, Unset, int]
|
|
56
|
-
if isinstance(self.from_port, Unset):
|
|
57
|
-
from_port = UNSET
|
|
58
|
-
else:
|
|
59
|
-
from_port = self.from_port
|
|
60
|
-
|
|
61
|
-
to_port: Union[None, Unset, int]
|
|
62
|
-
if isinstance(self.to_port, Unset):
|
|
63
|
-
to_port = UNSET
|
|
64
|
-
else:
|
|
65
|
-
to_port = self.to_port
|
|
66
|
-
|
|
67
|
-
cidr: Union[None, Unset, str]
|
|
68
|
-
if isinstance(self.cidr, Unset):
|
|
69
|
-
cidr = UNSET
|
|
70
|
-
else:
|
|
71
|
-
cidr = self.cidr
|
|
72
|
-
|
|
73
|
-
description = self.description
|
|
74
|
-
|
|
75
|
-
field_dict: dict[str, Any] = {}
|
|
76
|
-
field_dict.update(self.additional_properties)
|
|
77
|
-
field_dict.update({})
|
|
78
|
-
if ethertype is not UNSET:
|
|
79
|
-
field_dict["ethertype"] = ethertype
|
|
80
|
-
if direction is not UNSET:
|
|
81
|
-
field_dict["direction"] = direction
|
|
82
|
-
if protocol is not UNSET:
|
|
83
|
-
field_dict["protocol"] = protocol
|
|
84
|
-
if from_port is not UNSET:
|
|
85
|
-
field_dict["from_port"] = from_port
|
|
86
|
-
if to_port is not UNSET:
|
|
87
|
-
field_dict["to_port"] = to_port
|
|
88
|
-
if cidr is not UNSET:
|
|
89
|
-
field_dict["cidr"] = cidr
|
|
90
|
-
if description is not UNSET:
|
|
91
|
-
field_dict["description"] = description
|
|
92
|
-
|
|
93
|
-
return field_dict
|
|
94
|
-
|
|
95
|
-
@classmethod
|
|
96
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
-
d = dict(src_dict)
|
|
98
|
-
_ethertype = d.pop("ethertype", UNSET)
|
|
99
|
-
ethertype: Union[Unset, EthertypeEnum]
|
|
100
|
-
if isinstance(_ethertype, Unset):
|
|
101
|
-
ethertype = UNSET
|
|
102
|
-
else:
|
|
103
|
-
ethertype = EthertypeEnum(_ethertype)
|
|
104
|
-
|
|
105
|
-
_direction = d.pop("direction", UNSET)
|
|
106
|
-
direction: Union[Unset, DirectionEnum]
|
|
107
|
-
if isinstance(_direction, Unset):
|
|
108
|
-
direction = UNSET
|
|
109
|
-
else:
|
|
110
|
-
direction = DirectionEnum(_direction)
|
|
111
|
-
|
|
112
|
-
def _parse_protocol(data: object) -> Union[BlankEnum, ProtocolEnum, Unset]:
|
|
113
|
-
if isinstance(data, Unset):
|
|
114
|
-
return data
|
|
115
|
-
try:
|
|
116
|
-
if not isinstance(data, str):
|
|
117
|
-
raise TypeError()
|
|
118
|
-
protocol_type_0 = ProtocolEnum(data)
|
|
119
|
-
|
|
120
|
-
return protocol_type_0
|
|
121
|
-
except: # noqa: E722
|
|
122
|
-
pass
|
|
123
|
-
if not isinstance(data, str):
|
|
124
|
-
raise TypeError()
|
|
125
|
-
protocol_type_1 = BlankEnum(data)
|
|
126
|
-
|
|
127
|
-
return protocol_type_1
|
|
128
|
-
|
|
129
|
-
protocol = _parse_protocol(d.pop("protocol", UNSET))
|
|
130
|
-
|
|
131
|
-
def _parse_from_port(data: object) -> Union[None, Unset, int]:
|
|
132
|
-
if data is None:
|
|
133
|
-
return data
|
|
134
|
-
if isinstance(data, Unset):
|
|
135
|
-
return data
|
|
136
|
-
return cast(Union[None, Unset, int], data)
|
|
137
|
-
|
|
138
|
-
from_port = _parse_from_port(d.pop("from_port", UNSET))
|
|
139
|
-
|
|
140
|
-
def _parse_to_port(data: object) -> Union[None, Unset, int]:
|
|
141
|
-
if data is None:
|
|
142
|
-
return data
|
|
143
|
-
if isinstance(data, Unset):
|
|
144
|
-
return data
|
|
145
|
-
return cast(Union[None, Unset, int], data)
|
|
146
|
-
|
|
147
|
-
to_port = _parse_to_port(d.pop("to_port", UNSET))
|
|
148
|
-
|
|
149
|
-
def _parse_cidr(data: object) -> Union[None, Unset, str]:
|
|
150
|
-
if data is None:
|
|
151
|
-
return data
|
|
152
|
-
if isinstance(data, Unset):
|
|
153
|
-
return data
|
|
154
|
-
return cast(Union[None, Unset, str], data)
|
|
155
|
-
|
|
156
|
-
cidr = _parse_cidr(d.pop("cidr", UNSET))
|
|
157
|
-
|
|
158
|
-
description = d.pop("description", UNSET)
|
|
159
|
-
|
|
160
|
-
nested_security_group_rule_request = cls(
|
|
161
|
-
ethertype=ethertype,
|
|
162
|
-
direction=direction,
|
|
163
|
-
protocol=protocol,
|
|
164
|
-
from_port=from_port,
|
|
165
|
-
to_port=to_port,
|
|
166
|
-
cidr=cidr,
|
|
167
|
-
description=description,
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
nested_security_group_rule_request.additional_properties = d
|
|
171
|
-
return nested_security_group_rule_request
|
|
172
|
-
|
|
173
|
-
@property
|
|
174
|
-
def additional_keys(self) -> list[str]:
|
|
175
|
-
return list(self.additional_properties.keys())
|
|
176
|
-
|
|
177
|
-
def __getitem__(self, key: str) -> Any:
|
|
178
|
-
return self.additional_properties[key]
|
|
179
|
-
|
|
180
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
181
|
-
self.additional_properties[key] = value
|
|
182
|
-
|
|
183
|
-
def __delitem__(self, key: str) -> None:
|
|
184
|
-
del self.additional_properties[key]
|
|
185
|
-
|
|
186
|
-
def __contains__(self, key: str) -> bool:
|
|
187
|
-
return key in self.additional_properties
|
|
File without changes
|
|
File without changes
|