scc-firewall-manager-sdk 1.13.665__py3-none-any.whl → 1.13.666__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 scc-firewall-manager-sdk might be problematic. Click here for more details.
- scc_firewall_manager_sdk/__init__.py +23 -1
- scc_firewall_manager_sdk/api/__init__.py +1 -0
- scc_firewall_manager_sdk/api/asa_interfaces_api.py +6565 -0
- scc_firewall_manager_sdk/api_client.py +1 -1
- scc_firewall_manager_sdk/configuration.py +1 -1
- scc_firewall_manager_sdk/models/__init__.py +21 -0
- scc_firewall_manager_sdk/models/asa_interface.py +184 -0
- scc_firewall_manager_sdk/models/asa_interface_page.py +102 -0
- scc_firewall_manager_sdk/models/duplex_type.py +39 -0
- scc_firewall_manager_sdk/models/ether_channel_interface_create_input.py +132 -0
- scc_firewall_manager_sdk/models/ether_channel_interface_patch_input.py +130 -0
- scc_firewall_manager_sdk/models/interface_ip_address.py +94 -0
- scc_firewall_manager_sdk/models/interface_ipv4_address.py +95 -0
- scc_firewall_manager_sdk/models/interface_ipv6_address.py +109 -0
- scc_firewall_manager_sdk/models/interface_mode.py +39 -0
- scc_firewall_manager_sdk/models/interface_runtime_data.py +101 -0
- scc_firewall_manager_sdk/models/interface_type.py +41 -0
- scc_firewall_manager_sdk/models/ip_type.py +39 -0
- scc_firewall_manager_sdk/models/link_state.py +38 -0
- scc_firewall_manager_sdk/models/physical_interface_patch_input.py +125 -0
- scc_firewall_manager_sdk/models/speed_type.py +41 -0
- scc_firewall_manager_sdk/models/sub_interface_create_input.py +130 -0
- scc_firewall_manager_sdk/models/sub_interface_patch_input.py +116 -0
- scc_firewall_manager_sdk/models/switch_port_config.py +94 -0
- scc_firewall_manager_sdk/models/vlan_id_range.py +90 -0
- scc_firewall_manager_sdk/models/vlan_interface_create_input.py +120 -0
- scc_firewall_manager_sdk/models/vlan_interface_patch_input.py +118 -0
- {scc_firewall_manager_sdk-1.13.665.dist-info → scc_firewall_manager_sdk-1.13.666.dist-info}/METADATA +1 -1
- {scc_firewall_manager_sdk-1.13.665.dist-info → scc_firewall_manager_sdk-1.13.666.dist-info}/RECORD +31 -9
- {scc_firewall_manager_sdk-1.13.665.dist-info → scc_firewall_manager_sdk-1.13.666.dist-info}/WHEEL +0 -0
- {scc_firewall_manager_sdk-1.13.665.dist-info → scc_firewall_manager_sdk-1.13.666.dist-info}/top_level.txt +0 -0
|
@@ -88,7 +88,7 @@ class ApiClient:
|
|
|
88
88
|
self.default_headers[header_name] = header_value
|
|
89
89
|
self.cookie = cookie
|
|
90
90
|
# Set default User-Agent.
|
|
91
|
-
self.user_agent = 'OpenAPI-Generator/1.13.
|
|
91
|
+
self.user_agent = 'OpenAPI-Generator/1.13.666/python'
|
|
92
92
|
self.client_side_validation = configuration.client_side_validation
|
|
93
93
|
|
|
94
94
|
def __enter__(self):
|
|
@@ -380,7 +380,7 @@ class Configuration:
|
|
|
380
380
|
"OS: {env}\n"\
|
|
381
381
|
"Python Version: {pyversion}\n"\
|
|
382
382
|
"Version of the API: 1.13.0\n"\
|
|
383
|
-
"SDK Package Version: 1.13.
|
|
383
|
+
"SDK Package Version: 1.13.666".\
|
|
384
384
|
format(env=sys.platform, pyversion=sys.version)
|
|
385
385
|
|
|
386
386
|
def get_host_settings(self):
|
|
@@ -39,6 +39,8 @@ from scc_firewall_manager_sdk.models.asa_config import AsaConfig
|
|
|
39
39
|
from scc_firewall_manager_sdk.models.asa_create_or_update_input import AsaCreateOrUpdateInput
|
|
40
40
|
from scc_firewall_manager_sdk.models.asa_failover_mate import AsaFailoverMate
|
|
41
41
|
from scc_firewall_manager_sdk.models.asa_failover_mode import AsaFailoverMode
|
|
42
|
+
from scc_firewall_manager_sdk.models.asa_interface import AsaInterface
|
|
43
|
+
from scc_firewall_manager_sdk.models.asa_interface_page import AsaInterfacePage
|
|
42
44
|
from scc_firewall_manager_sdk.models.audit_log import AuditLog
|
|
43
45
|
from scc_firewall_manager_sdk.models.audit_log_page import AuditLogPage
|
|
44
46
|
from scc_firewall_manager_sdk.models.authentication_error import AuthenticationError
|
|
@@ -93,9 +95,12 @@ from scc_firewall_manager_sdk.models.devices_patch_input import DevicesPatchInpu
|
|
|
93
95
|
from scc_firewall_manager_sdk.models.disk_health_metrics import DiskHealthMetrics
|
|
94
96
|
from scc_firewall_manager_sdk.models.domain_settings import DomainSettings
|
|
95
97
|
from scc_firewall_manager_sdk.models.duo_admin_panel_create_or_update_input import DuoAdminPanelCreateOrUpdateInput
|
|
98
|
+
from scc_firewall_manager_sdk.models.duplex_type import DuplexType
|
|
96
99
|
from scc_firewall_manager_sdk.models.duplicate_group_dto import DuplicateGroupDto
|
|
97
100
|
from scc_firewall_manager_sdk.models.entity import Entity
|
|
98
101
|
from scc_firewall_manager_sdk.models.entity_type import EntityType
|
|
102
|
+
from scc_firewall_manager_sdk.models.ether_channel_interface_create_input import EtherChannelInterfaceCreateInput
|
|
103
|
+
from scc_firewall_manager_sdk.models.ether_channel_interface_patch_input import EtherChannelInterfacePatchInput
|
|
99
104
|
from scc_firewall_manager_sdk.models.event import Event
|
|
100
105
|
from scc_firewall_manager_sdk.models.fmc_access_policy_reference import FmcAccessPolicyReference
|
|
101
106
|
from scc_firewall_manager_sdk.models.fmc_device_record import FmcDeviceRecord
|
|
@@ -120,13 +125,21 @@ from scc_firewall_manager_sdk.models.ha_node import HaNode
|
|
|
120
125
|
from scc_firewall_manager_sdk.models.icmp4_value import Icmp4Value
|
|
121
126
|
from scc_firewall_manager_sdk.models.icmp6_value import Icmp6Value
|
|
122
127
|
from scc_firewall_manager_sdk.models.interface_health_metrics import InterfaceHealthMetrics
|
|
128
|
+
from scc_firewall_manager_sdk.models.interface_ip_address import InterfaceIpAddress
|
|
129
|
+
from scc_firewall_manager_sdk.models.interface_ipv4_address import InterfaceIpv4Address
|
|
130
|
+
from scc_firewall_manager_sdk.models.interface_ipv6_address import InterfaceIpv6Address
|
|
131
|
+
from scc_firewall_manager_sdk.models.interface_mode import InterfaceMode
|
|
132
|
+
from scc_firewall_manager_sdk.models.interface_runtime_data import InterfaceRuntimeData
|
|
133
|
+
from scc_firewall_manager_sdk.models.interface_type import InterfaceType
|
|
123
134
|
from scc_firewall_manager_sdk.models.inventory import Inventory
|
|
124
135
|
from scc_firewall_manager_sdk.models.ios_create_or_update_input import IosCreateOrUpdateInput
|
|
136
|
+
from scc_firewall_manager_sdk.models.ip_type import IpType
|
|
125
137
|
from scc_firewall_manager_sdk.models.issues_count import IssuesCount
|
|
126
138
|
from scc_firewall_manager_sdk.models.issues_dto import IssuesDto
|
|
127
139
|
from scc_firewall_manager_sdk.models.json_web_key import JsonWebKey
|
|
128
140
|
from scc_firewall_manager_sdk.models.jwk_set import JwkSet
|
|
129
141
|
from scc_firewall_manager_sdk.models.labels import Labels
|
|
142
|
+
from scc_firewall_manager_sdk.models.link_state import LinkState
|
|
130
143
|
from scc_firewall_manager_sdk.models.list_object_response import ListObjectResponse
|
|
131
144
|
from scc_firewall_manager_sdk.models.location import Location
|
|
132
145
|
from scc_firewall_manager_sdk.models.log_settings import LogSettings
|
|
@@ -164,6 +177,7 @@ from scc_firewall_manager_sdk.models.object_content import ObjectContent
|
|
|
164
177
|
from scc_firewall_manager_sdk.models.object_response import ObjectResponse
|
|
165
178
|
from scc_firewall_manager_sdk.models.on_prem_fmc_info import OnPremFmcInfo
|
|
166
179
|
from scc_firewall_manager_sdk.models.override import Override
|
|
180
|
+
from scc_firewall_manager_sdk.models.physical_interface_patch_input import PhysicalInterfacePatchInput
|
|
167
181
|
from scc_firewall_manager_sdk.models.policy import Policy
|
|
168
182
|
from scc_firewall_manager_sdk.models.ports_value import PortsValue
|
|
169
183
|
from scc_firewall_manager_sdk.models.protocol_content import ProtocolContent
|
|
@@ -190,13 +204,17 @@ from scc_firewall_manager_sdk.models.source_destination_ports_value import Sourc
|
|
|
190
204
|
from scc_firewall_manager_sdk.models.source_dynamic_object_content import SourceDynamicObjectContent
|
|
191
205
|
from scc_firewall_manager_sdk.models.source_network_content import SourceNetworkContent
|
|
192
206
|
from scc_firewall_manager_sdk.models.source_port_content import SourcePortContent
|
|
207
|
+
from scc_firewall_manager_sdk.models.speed_type import SpeedType
|
|
193
208
|
from scc_firewall_manager_sdk.models.sse_device_data import SseDeviceData
|
|
194
209
|
from scc_firewall_manager_sdk.models.staged import Staged
|
|
195
210
|
from scc_firewall_manager_sdk.models.state_machine_details import StateMachineDetails
|
|
196
211
|
from scc_firewall_manager_sdk.models.state_machine_error import StateMachineError
|
|
197
212
|
from scc_firewall_manager_sdk.models.status import Status
|
|
198
213
|
from scc_firewall_manager_sdk.models.status_info import StatusInfo
|
|
214
|
+
from scc_firewall_manager_sdk.models.sub_interface_create_input import SubInterfaceCreateInput
|
|
215
|
+
from scc_firewall_manager_sdk.models.sub_interface_patch_input import SubInterfacePatchInput
|
|
199
216
|
from scc_firewall_manager_sdk.models.summary import Summary
|
|
217
|
+
from scc_firewall_manager_sdk.models.switch_port_config import SwitchPortConfig
|
|
200
218
|
from scc_firewall_manager_sdk.models.target import Target
|
|
201
219
|
from scc_firewall_manager_sdk.models.targets_request import TargetsRequest
|
|
202
220
|
from scc_firewall_manager_sdk.models.tenant import Tenant
|
|
@@ -214,5 +232,8 @@ from scc_firewall_manager_sdk.models.user_create_or_update_input import UserCrea
|
|
|
214
232
|
from scc_firewall_manager_sdk.models.user_input import UserInput
|
|
215
233
|
from scc_firewall_manager_sdk.models.user_page import UserPage
|
|
216
234
|
from scc_firewall_manager_sdk.models.user_role import UserRole
|
|
235
|
+
from scc_firewall_manager_sdk.models.vlan_id_range import VlanIdRange
|
|
236
|
+
from scc_firewall_manager_sdk.models.vlan_interface_create_input import VlanInterfaceCreateInput
|
|
237
|
+
from scc_firewall_manager_sdk.models.vlan_interface_patch_input import VlanInterfacePatchInput
|
|
217
238
|
from scc_firewall_manager_sdk.models.ztp_onboarding_input import ZtpOnboardingInput
|
|
218
239
|
from scc_firewall_manager_sdk.models.ztp_onboarding_template_configuration import ZtpOnboardingTemplateConfiguration
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cisco Security Cloud Control Firewall Manager API
|
|
5
|
+
|
|
6
|
+
Use the documentation to explore the endpoints Security Cloud Control Firewall Manager has to offer
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.13.0
|
|
9
|
+
Contact: cdo.tac@cisco.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from scc_firewall_manager_sdk.models.duplex_type import DuplexType
|
|
24
|
+
from scc_firewall_manager_sdk.models.interface_ipv4_address import InterfaceIpv4Address
|
|
25
|
+
from scc_firewall_manager_sdk.models.interface_ipv6_address import InterfaceIpv6Address
|
|
26
|
+
from scc_firewall_manager_sdk.models.interface_mode import InterfaceMode
|
|
27
|
+
from scc_firewall_manager_sdk.models.interface_runtime_data import InterfaceRuntimeData
|
|
28
|
+
from scc_firewall_manager_sdk.models.interface_type import InterfaceType
|
|
29
|
+
from scc_firewall_manager_sdk.models.speed_type import SpeedType
|
|
30
|
+
from scc_firewall_manager_sdk.models.switch_port_config import SwitchPortConfig
|
|
31
|
+
from scc_firewall_manager_sdk.models.vlan_id_range import VlanIdRange
|
|
32
|
+
from typing import Optional, Set
|
|
33
|
+
from typing_extensions import Self
|
|
34
|
+
|
|
35
|
+
class AsaInterface(BaseModel):
|
|
36
|
+
"""
|
|
37
|
+
AsaInterface
|
|
38
|
+
""" # noqa: E501
|
|
39
|
+
description: Optional[StrictStr] = Field(default=None, description="The description of the interface.")
|
|
40
|
+
device_uid: Optional[StrictStr] = Field(default=None, description="The unique identifier, represented as a UUID, of the device associated with the interface.", alias="deviceUid")
|
|
41
|
+
duplex_type: Optional[DuplexType] = Field(default=None, alias="duplexType")
|
|
42
|
+
enabled: Optional[StrictBool] = Field(default=None, description="Indicates whether the interface is enabled.")
|
|
43
|
+
ether_channel_group_uid: Optional[StrictStr] = Field(default=None, description="The unique identifier, represented as a UUID, of the EtherChannel group this interface belong to.", alias="etherChannelGroupUid")
|
|
44
|
+
ether_channel_id: Optional[StrictInt] = Field(default=None, description="The identifier of the EtherChannel interface in the scope of the device.", alias="etherChannelId")
|
|
45
|
+
hardware_name: Optional[StrictStr] = Field(default=None, description="The interface hardware name. It is usually structured from the type, speed, slot and port number.", alias="hardwareName")
|
|
46
|
+
interface_type: Optional[InterfaceType] = Field(default=None, alias="interfaceType")
|
|
47
|
+
ipv4: Optional[InterfaceIpv4Address] = None
|
|
48
|
+
ipv6: Optional[InterfaceIpv6Address] = None
|
|
49
|
+
lacp_mode: Optional[StrictStr] = Field(default=None, description="The Link Aggregation Control Protocol (LACP) mode of the EtherChannel interface.", alias="lacpMode")
|
|
50
|
+
mac_address: Optional[StrictStr] = Field(default=None, description="The interface Media Access Control (MAC) address, a unique hardware identifier assigned to each physical interface. it is used for Layer 2 communication within a network segment.", alias="macAddress")
|
|
51
|
+
management_interface: Optional[StrictBool] = Field(default=None, description="Indicates whether the interface is used for device management purposes.", alias="managementInterface")
|
|
52
|
+
management_only: Optional[StrictBool] = Field(default=None, description="Indicates whether the interface is exclusively used for management traffic and does not carry regular user or data traffic", alias="managementOnly")
|
|
53
|
+
member_interfaces: Optional[List[StrictStr]] = Field(default=None, description="The set of unique identifiers, represented as UUIDs, of the member interfaces that are part of the EtherChannel group.", alias="memberInterfaces")
|
|
54
|
+
mode: Optional[InterfaceMode] = None
|
|
55
|
+
monitor_interface: Optional[StrictBool] = Field(default=None, description="Indicates if the interface is actively monitored for checking its operational status and health as part of an HA setup. It helps determine if the interface is functioning correctly and whether a failover to a standby device should be triggered in case of failure.", alias="monitorInterface")
|
|
56
|
+
mtu: Optional[StrictInt] = Field(default=None, description="The interface MTU (Maximum Transmission Unit), the largest size, in bytes, of a packet or frame that can be sent over a network interface without needing to be fragmented. It defines the maximum payload size that the interface can handle in a single transmission. Range is 64 - 9198.")
|
|
57
|
+
name: Optional[StrictStr] = Field(default=None, description="The logical name of the interface. Interface names are unique in the scope of the device.")
|
|
58
|
+
parent_interface_uid: Optional[StrictStr] = Field(default=None, description="The unique identifier, represented as a UUID, of the parent interface for sub-interfaces.", alias="parentInterfaceUid")
|
|
59
|
+
runtime_data: Optional[InterfaceRuntimeData] = Field(default=None, alias="runtimeData")
|
|
60
|
+
security_level: Optional[StrictInt] = Field(default=None, description="Indicates the interface trust level, ranging from 0 (lowest) to 100 (highest).", alias="securityLevel")
|
|
61
|
+
speed_type: Optional[SpeedType] = Field(default=None, alias="speedType")
|
|
62
|
+
standby_mac_address: Optional[StrictStr] = Field(default=None, description="The standby interface Media Access Control (MAC) address, for use in a high-availability (HA) pair.", alias="standbyMacAddress")
|
|
63
|
+
sub_interface_id: Optional[StrictInt] = Field(default=None, description="The unique identifier of the sub-interface in the scope of the parent interface. It is used to differentiate between multiple sub-interfaces on the same parent interface. Range is 1 - 4294967295.", alias="subInterfaceId")
|
|
64
|
+
switch_port_config: Optional[SwitchPortConfig] = Field(default=None, alias="switchPortConfig")
|
|
65
|
+
uid: Optional[StrictStr] = Field(default=None, description="The unique identifier, represented as a UUID, of the interface in Security Cloud Control.")
|
|
66
|
+
vlan_id: Optional[StrictInt] = Field(default=None, description="The unique identifier of the VLAN associated with the VLAN interface. Range is 1 - 4070.", alias="vlanId")
|
|
67
|
+
vlan_primary_id: Optional[StrictInt] = Field(default=None, description="The primary unique identifier of the VLAN associated with the sub-interface. Range is 1 - 4094.", alias="vlanPrimaryId")
|
|
68
|
+
vlan_secondary_ids: Optional[List[VlanIdRange]] = Field(default=None, description="The secondary identifiers of the VLAN associated with the sub-interface. Each range is defined by a start and end value, allowing for multiple VLANs to be associated with the sub-interface. Ranges are inclusive.", alias="vlanSecondaryIds")
|
|
69
|
+
__properties: ClassVar[List[str]] = ["description", "deviceUid", "duplexType", "enabled", "etherChannelGroupUid", "etherChannelId", "hardwareName", "interfaceType", "ipv4", "ipv6", "lacpMode", "macAddress", "managementInterface", "managementOnly", "memberInterfaces", "mode", "monitorInterface", "mtu", "name", "parentInterfaceUid", "runtimeData", "securityLevel", "speedType", "standbyMacAddress", "subInterfaceId", "switchPortConfig", "uid", "vlanId", "vlanPrimaryId", "vlanSecondaryIds"]
|
|
70
|
+
|
|
71
|
+
@field_validator('lacp_mode')
|
|
72
|
+
def lacp_mode_validate_enum(cls, value):
|
|
73
|
+
"""Validates the enum"""
|
|
74
|
+
if value is None:
|
|
75
|
+
return value
|
|
76
|
+
|
|
77
|
+
if value not in set(['ACTIVE', 'PASSIVE', 'ON']):
|
|
78
|
+
raise ValueError("must be one of enum values ('ACTIVE', 'PASSIVE', 'ON')")
|
|
79
|
+
return value
|
|
80
|
+
|
|
81
|
+
model_config = ConfigDict(
|
|
82
|
+
populate_by_name=True,
|
|
83
|
+
validate_assignment=True,
|
|
84
|
+
protected_namespaces=(),
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def to_str(self) -> str:
|
|
89
|
+
"""Returns the string representation of the model using alias"""
|
|
90
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
91
|
+
|
|
92
|
+
def to_json(self) -> str:
|
|
93
|
+
"""Returns the JSON representation of the model using alias"""
|
|
94
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
95
|
+
return json.dumps(self.to_dict())
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
99
|
+
"""Create an instance of AsaInterface from a JSON string"""
|
|
100
|
+
return cls.from_dict(json.loads(json_str))
|
|
101
|
+
|
|
102
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
103
|
+
"""Return the dictionary representation of the model using alias.
|
|
104
|
+
|
|
105
|
+
This has the following differences from calling pydantic's
|
|
106
|
+
`self.model_dump(by_alias=True)`:
|
|
107
|
+
|
|
108
|
+
* `None` is only added to the output dict for nullable fields that
|
|
109
|
+
were set at model initialization. Other fields with value `None`
|
|
110
|
+
are ignored.
|
|
111
|
+
"""
|
|
112
|
+
excluded_fields: Set[str] = set([
|
|
113
|
+
])
|
|
114
|
+
|
|
115
|
+
_dict = self.model_dump(
|
|
116
|
+
by_alias=True,
|
|
117
|
+
exclude=excluded_fields,
|
|
118
|
+
exclude_none=True,
|
|
119
|
+
)
|
|
120
|
+
# override the default output from pydantic by calling `to_dict()` of ipv4
|
|
121
|
+
if self.ipv4:
|
|
122
|
+
_dict['ipv4'] = self.ipv4.to_dict()
|
|
123
|
+
# override the default output from pydantic by calling `to_dict()` of ipv6
|
|
124
|
+
if self.ipv6:
|
|
125
|
+
_dict['ipv6'] = self.ipv6.to_dict()
|
|
126
|
+
# override the default output from pydantic by calling `to_dict()` of runtime_data
|
|
127
|
+
if self.runtime_data:
|
|
128
|
+
_dict['runtimeData'] = self.runtime_data.to_dict()
|
|
129
|
+
# override the default output from pydantic by calling `to_dict()` of switch_port_config
|
|
130
|
+
if self.switch_port_config:
|
|
131
|
+
_dict['switchPortConfig'] = self.switch_port_config.to_dict()
|
|
132
|
+
# override the default output from pydantic by calling `to_dict()` of each item in vlan_secondary_ids (list)
|
|
133
|
+
_items = []
|
|
134
|
+
if self.vlan_secondary_ids:
|
|
135
|
+
for _item in self.vlan_secondary_ids:
|
|
136
|
+
if _item:
|
|
137
|
+
_items.append(_item.to_dict())
|
|
138
|
+
_dict['vlanSecondaryIds'] = _items
|
|
139
|
+
return _dict
|
|
140
|
+
|
|
141
|
+
@classmethod
|
|
142
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
143
|
+
"""Create an instance of AsaInterface from a dict"""
|
|
144
|
+
if obj is None:
|
|
145
|
+
return None
|
|
146
|
+
|
|
147
|
+
if not isinstance(obj, dict):
|
|
148
|
+
return cls.model_validate(obj)
|
|
149
|
+
|
|
150
|
+
_obj = cls.model_validate({
|
|
151
|
+
"description": obj.get("description"),
|
|
152
|
+
"deviceUid": obj.get("deviceUid"),
|
|
153
|
+
"duplexType": obj.get("duplexType"),
|
|
154
|
+
"enabled": obj.get("enabled"),
|
|
155
|
+
"etherChannelGroupUid": obj.get("etherChannelGroupUid"),
|
|
156
|
+
"etherChannelId": obj.get("etherChannelId"),
|
|
157
|
+
"hardwareName": obj.get("hardwareName"),
|
|
158
|
+
"interfaceType": obj.get("interfaceType"),
|
|
159
|
+
"ipv4": InterfaceIpv4Address.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None,
|
|
160
|
+
"ipv6": InterfaceIpv6Address.from_dict(obj["ipv6"]) if obj.get("ipv6") is not None else None,
|
|
161
|
+
"lacpMode": obj.get("lacpMode"),
|
|
162
|
+
"macAddress": obj.get("macAddress"),
|
|
163
|
+
"managementInterface": obj.get("managementInterface"),
|
|
164
|
+
"managementOnly": obj.get("managementOnly"),
|
|
165
|
+
"memberInterfaces": obj.get("memberInterfaces"),
|
|
166
|
+
"mode": obj.get("mode"),
|
|
167
|
+
"monitorInterface": obj.get("monitorInterface"),
|
|
168
|
+
"mtu": obj.get("mtu"),
|
|
169
|
+
"name": obj.get("name"),
|
|
170
|
+
"parentInterfaceUid": obj.get("parentInterfaceUid"),
|
|
171
|
+
"runtimeData": InterfaceRuntimeData.from_dict(obj["runtimeData"]) if obj.get("runtimeData") is not None else None,
|
|
172
|
+
"securityLevel": obj.get("securityLevel"),
|
|
173
|
+
"speedType": obj.get("speedType"),
|
|
174
|
+
"standbyMacAddress": obj.get("standbyMacAddress"),
|
|
175
|
+
"subInterfaceId": obj.get("subInterfaceId"),
|
|
176
|
+
"switchPortConfig": SwitchPortConfig.from_dict(obj["switchPortConfig"]) if obj.get("switchPortConfig") is not None else None,
|
|
177
|
+
"uid": obj.get("uid"),
|
|
178
|
+
"vlanId": obj.get("vlanId"),
|
|
179
|
+
"vlanPrimaryId": obj.get("vlanPrimaryId"),
|
|
180
|
+
"vlanSecondaryIds": [VlanIdRange.from_dict(_item) for _item in obj["vlanSecondaryIds"]] if obj.get("vlanSecondaryIds") is not None else None
|
|
181
|
+
})
|
|
182
|
+
return _obj
|
|
183
|
+
|
|
184
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cisco Security Cloud Control Firewall Manager API
|
|
5
|
+
|
|
6
|
+
Use the documentation to explore the endpoints Security Cloud Control Firewall Manager has to offer
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.13.0
|
|
9
|
+
Contact: cdo.tac@cisco.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from scc_firewall_manager_sdk.models.asa_interface import AsaInterface
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class AsaInterfacePage(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
AsaInterfacePage
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: Optional[StrictInt] = Field(default=None, description="The total number of results available.")
|
|
32
|
+
items: Optional[List[AsaInterface]] = Field(default=None, description="The list of items retrieved.")
|
|
33
|
+
limit: Optional[StrictInt] = Field(default=None, description="The number of results retrieved.")
|
|
34
|
+
offset: Optional[StrictInt] = Field(default=None, description="The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "items", "limit", "offset"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of AsaInterfacePage from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.items:
|
|
79
|
+
for _item in self.items:
|
|
80
|
+
if _item:
|
|
81
|
+
_items.append(_item.to_dict())
|
|
82
|
+
_dict['items'] = _items
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of AsaInterfacePage from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"count": obj.get("count"),
|
|
96
|
+
"items": [AsaInterface.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
|
97
|
+
"limit": obj.get("limit"),
|
|
98
|
+
"offset": obj.get("offset")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cisco Security Cloud Control Firewall Manager API
|
|
5
|
+
|
|
6
|
+
Use the documentation to explore the endpoints Security Cloud Control Firewall Manager has to offer
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.13.0
|
|
9
|
+
Contact: cdo.tac@cisco.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from typing_extensions import Self
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class DuplexType(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
DuplexType
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
AUTO = 'AUTO'
|
|
31
|
+
FULL = 'FULL'
|
|
32
|
+
HALF = 'HALF'
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of DuplexType from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cisco Security Cloud Control Firewall Manager API
|
|
5
|
+
|
|
6
|
+
Use the documentation to explore the endpoints Security Cloud Control Firewall Manager has to offer
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.13.0
|
|
9
|
+
Contact: cdo.tac@cisco.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from scc_firewall_manager_sdk.models.interface_ipv4_address import InterfaceIpv4Address
|
|
24
|
+
from scc_firewall_manager_sdk.models.interface_ipv6_address import InterfaceIpv6Address
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class EtherChannelInterfaceCreateInput(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
EtherChannelInterfaceCreateInput
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
description: Optional[StrictStr] = Field(default=None, description="The description of the interface.")
|
|
33
|
+
enabled: Optional[StrictBool] = Field(default=None, description="Indicates whether the interface is enabled.")
|
|
34
|
+
ether_channel_id: Optional[StrictInt] = Field(default=None, description="The identifier of the EtherChannel interface in the scope of the device.", alias="etherChannelId")
|
|
35
|
+
ipv4: Optional[InterfaceIpv4Address] = None
|
|
36
|
+
ipv6: Optional[InterfaceIpv6Address] = None
|
|
37
|
+
lacp_mode: Optional[StrictStr] = Field(default=None, description="The Link Aggregation Control Protocol (LACP) mode of the EtherChannel interface.", alias="lacpMode")
|
|
38
|
+
mac_address: Optional[StrictStr] = Field(default=None, description="The interface Media Access Control (MAC) address, a unique hardware identifier assigned to each physical interface. it is used for Layer 2 communication within a network segment.", alias="macAddress")
|
|
39
|
+
management_only: Optional[StrictBool] = Field(default=None, description="Indicates whether the interface is exclusively used for management traffic and does not carry regular user or data traffic", alias="managementOnly")
|
|
40
|
+
member_interfaces: Optional[List[StrictStr]] = Field(default=None, description="The set of unique identifiers, represented as UUIDs, of the member interfaces that are part of the EtherChannel group.", alias="memberInterfaces")
|
|
41
|
+
monitor_interface: Optional[StrictBool] = Field(default=None, description="Indicates if the interface is actively monitored for checking its operational status and health as part of an HA setup. It helps determine if the interface is functioning correctly and whether a failover to a standby device should be triggered in case of failure.", alias="monitorInterface")
|
|
42
|
+
mtu: Optional[StrictInt] = Field(default=None, description="The interface MTU (Maximum Transmission Unit), the largest size, in bytes, of a packet or frame that can be sent over a network interface without needing to be fragmented. It defines the maximum payload size that the interface can handle in a single transmission.")
|
|
43
|
+
name: Optional[StrictStr] = Field(default=None, description="The logical name of the interface. Interface names are unique in the scope of the device.")
|
|
44
|
+
security_level: Optional[StrictInt] = Field(default=None, description="Indicates the interface trust level, ranging from 0 (lowest) to 100 (highest).", alias="securityLevel")
|
|
45
|
+
standby_mac_address: Optional[StrictStr] = Field(default=None, description="The standby interface Media Access Control (MAC) address, for use in a high-availability (HA) pair.", alias="standbyMacAddress")
|
|
46
|
+
__properties: ClassVar[List[str]] = ["description", "enabled", "etherChannelId", "ipv4", "ipv6", "lacpMode", "macAddress", "managementOnly", "memberInterfaces", "monitorInterface", "mtu", "name", "securityLevel", "standbyMacAddress"]
|
|
47
|
+
|
|
48
|
+
@field_validator('lacp_mode')
|
|
49
|
+
def lacp_mode_validate_enum(cls, value):
|
|
50
|
+
"""Validates the enum"""
|
|
51
|
+
if value is None:
|
|
52
|
+
return value
|
|
53
|
+
|
|
54
|
+
if value not in set(['ACTIVE', 'PASSIVE', 'ON']):
|
|
55
|
+
raise ValueError("must be one of enum values ('ACTIVE', 'PASSIVE', 'ON')")
|
|
56
|
+
return value
|
|
57
|
+
|
|
58
|
+
model_config = ConfigDict(
|
|
59
|
+
populate_by_name=True,
|
|
60
|
+
validate_assignment=True,
|
|
61
|
+
protected_namespaces=(),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def to_str(self) -> str:
|
|
66
|
+
"""Returns the string representation of the model using alias"""
|
|
67
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
68
|
+
|
|
69
|
+
def to_json(self) -> str:
|
|
70
|
+
"""Returns the JSON representation of the model using alias"""
|
|
71
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
72
|
+
return json.dumps(self.to_dict())
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of EtherChannelInterfaceCreateInput from a JSON string"""
|
|
77
|
+
return cls.from_dict(json.loads(json_str))
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
80
|
+
"""Return the dictionary representation of the model using alias.
|
|
81
|
+
|
|
82
|
+
This has the following differences from calling pydantic's
|
|
83
|
+
`self.model_dump(by_alias=True)`:
|
|
84
|
+
|
|
85
|
+
* `None` is only added to the output dict for nullable fields that
|
|
86
|
+
were set at model initialization. Other fields with value `None`
|
|
87
|
+
are ignored.
|
|
88
|
+
"""
|
|
89
|
+
excluded_fields: Set[str] = set([
|
|
90
|
+
])
|
|
91
|
+
|
|
92
|
+
_dict = self.model_dump(
|
|
93
|
+
by_alias=True,
|
|
94
|
+
exclude=excluded_fields,
|
|
95
|
+
exclude_none=True,
|
|
96
|
+
)
|
|
97
|
+
# override the default output from pydantic by calling `to_dict()` of ipv4
|
|
98
|
+
if self.ipv4:
|
|
99
|
+
_dict['ipv4'] = self.ipv4.to_dict()
|
|
100
|
+
# override the default output from pydantic by calling `to_dict()` of ipv6
|
|
101
|
+
if self.ipv6:
|
|
102
|
+
_dict['ipv6'] = self.ipv6.to_dict()
|
|
103
|
+
return _dict
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
107
|
+
"""Create an instance of EtherChannelInterfaceCreateInput from a dict"""
|
|
108
|
+
if obj is None:
|
|
109
|
+
return None
|
|
110
|
+
|
|
111
|
+
if not isinstance(obj, dict):
|
|
112
|
+
return cls.model_validate(obj)
|
|
113
|
+
|
|
114
|
+
_obj = cls.model_validate({
|
|
115
|
+
"description": obj.get("description"),
|
|
116
|
+
"enabled": obj.get("enabled"),
|
|
117
|
+
"etherChannelId": obj.get("etherChannelId"),
|
|
118
|
+
"ipv4": InterfaceIpv4Address.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None,
|
|
119
|
+
"ipv6": InterfaceIpv6Address.from_dict(obj["ipv6"]) if obj.get("ipv6") is not None else None,
|
|
120
|
+
"lacpMode": obj.get("lacpMode"),
|
|
121
|
+
"macAddress": obj.get("macAddress"),
|
|
122
|
+
"managementOnly": obj.get("managementOnly"),
|
|
123
|
+
"memberInterfaces": obj.get("memberInterfaces"),
|
|
124
|
+
"monitorInterface": obj.get("monitorInterface"),
|
|
125
|
+
"mtu": obj.get("mtu"),
|
|
126
|
+
"name": obj.get("name"),
|
|
127
|
+
"securityLevel": obj.get("securityLevel"),
|
|
128
|
+
"standbyMacAddress": obj.get("standbyMacAddress")
|
|
129
|
+
})
|
|
130
|
+
return _obj
|
|
131
|
+
|
|
132
|
+
|