"""Response schemas for switch endpoints.

This module is automatically @generated from the Meraki API specification.
Do not edit this file manually.
"""

from __future__ import annotations

from datetime import datetime
from typing import Any

from pydantic import Field, RootModel

from meraki_client.schemas._base import _BaseSchema


class AddNetworkSwitchStackResponse(_BaseSchema):
    """Response for addNetworkSwitchStack operation."""

    id: str | None = None
    name: str | None = None
    serials: list[str] | None = None
    is_monitor_only: bool | None = Field(default=None, alias="isMonitorOnly")
    virtual_mac: str | None = Field(default=None, alias="virtualMac")
    members: list[SwitchMembersItem] | None = None


class CloneOrganizationSwitchDevicesResponse(_BaseSchema):
    """Response for cloneOrganizationSwitchDevices operation."""

    source_serial: str | None = Field(default=None, alias="sourceSerial")
    target_serials: list[str] | None = Field(default=None, alias="targetSerials")


class CreateDeviceSwitchRoutingInterfaceIpv6(_BaseSchema):
    """The IPv6 settings of the interface."""

    assignment_mode: str | None = Field(default=None, alias="assignmentMode")
    prefix: str | None = None
    address: str | None = None
    gateway: str | None = None


class CreateDeviceSwitchRoutingInterfaceOspfSettings(_BaseSchema):
    """The OSPF routing settings of the interface."""

    area: str | None = None
    cost: int | None = None
    is_passive_enabled: bool | None = Field(default=None, alias="isPassiveEnabled")
    network_type: str | None = Field(default=None, alias="networkType")


class CreateDeviceSwitchRoutingInterfaceResponse(_BaseSchema):
    """Response for createDeviceSwitchRoutingInterface operation."""

    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    mode: str | None = None
    subnet: str | None = None
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    serial: str | None = None
    switch_port_id: str | None = Field(default=None, alias="switchPortId")
    multicast_routing: str | None = Field(default=None, alias="multicastRouting")
    vlan_id: int | None = Field(default=None, alias="vlanId")
    uplink_v4: bool | None = Field(default=None, alias="uplinkV4")
    uplink_v6: bool | None = Field(default=None, alias="uplinkV6")
    ospf_settings: SwitchOspfSettings | None = Field(default=None, alias="ospfSettings")
    ospf_v3: SwitchOspfSettings | None = Field(default=None, alias="ospfV3")
    ipv6: SwitchIpv6 | None = None
    vrf: SwitchVrf | None = None
    loopback: dict[str, Any] | None = None
    default_gateway: str | None = Field(default=None, alias="defaultGateway")


class CreateDeviceSwitchRoutingInterfaceVrf(_BaseSchema):
    """The VRF settings of the interface. Requires IOS XE 17.18 or higher."""

    name: str | None = None


class CreateDeviceSwitchRoutingStaticRouteResponse(_BaseSchema):
    """Response for createDeviceSwitchRoutingStaticRoute operation."""

    static_route_id: str = Field(alias="staticRouteId")
    name: str | None = None
    subnet: str
    next_hop_ip: str = Field(alias="nextHopIp")
    management_next_hop: str | None = Field(default=None, alias="managementNextHop")
    vrf: SwitchVrf2 | None = None
    advertise_via_ospf_enabled: bool | None = Field(default=None, alias="advertiseViaOspfEnabled")
    prefer_over_ospf_routes_enabled: bool | None = Field(
        default=None, alias="preferOverOspfRoutesEnabled"
    )


class CreateDeviceSwitchRoutingStaticRouteVrf(_BaseSchema):
    """The VRF settings of the interface. Requires IOS XE 17.18 or higher."""

    name: str | None = None
    leak_route_to_default_vrf: bool | None = Field(default=None, alias="leakRouteToDefaultVrf")


class CreateNetworkSwitchAccessPolicyDot1x(_BaseSchema):
    """802.1x Settings."""

    control_direction: str | None = Field(default=None, alias="controlDirection")


class CreateNetworkSwitchAccessPolicyRadius(_BaseSchema):
    """Object for RADIUS Settings."""

    critical_auth: SwitchCriticalAuth | None = Field(default=None, alias="criticalAuth")
    failed_auth_vlan_id: int | None = Field(default=None, alias="failedAuthVlanId")
    failed_auth_group_policy_id: str | None = Field(default=None, alias="failedAuthGroupPolicyId")
    failed_auth_sgt_id: int | None = Field(default=None, alias="failedAuthSgtId")
    re_authentication_interval: int | None = Field(default=None, alias="reAuthenticationInterval")
    cache: SwitchCache | None = None
    authentication: CreateNetworkSwitchAccessPolicyRadiusAuthentication | None = None
    pre_authentication_group_policy_id: str | None = Field(
        default=None, alias="preAuthenticationGroupPolicyId"
    )


class CreateNetworkSwitchAccessPolicyRadiusAccountingServersItem(_BaseSchema):
    """Item schema for radiusAccountingServers."""

    organization_radius_server_id: str | None = Field(
        default=None, alias="organizationRadiusServerId"
    )
    host: str | None = None
    port: int | None = None
    secret: str | None = None


class CreateNetworkSwitchAccessPolicyRadiusAuthentication(_BaseSchema):
    """Object for authentication mode settings."""

    mode: str | None = None


class CreateNetworkSwitchAccessPolicyRadiusServersItem(_BaseSchema):
    """Item schema for radiusServers."""

    organization_radius_server_id: str | None = Field(
        default=None, alias="organizationRadiusServerId"
    )
    host: str | None = None
    port: int | None = None
    secret: str | None = None


class CreateNetworkSwitchAccessPolicyResponse(_BaseSchema):
    """Response for createNetworkSwitchAccessPolicy operation."""

    access_policy_number: str | None = Field(default=None, alias="accessPolicyNumber")
    name: str | None = None
    radius_servers: list[SwitchRadiusServersItem] | None = Field(
        default=None, alias="radiusServers"
    )
    radius: SwitchRadius | None = None
    enforce_radius_monitoring: bool | None = Field(default=None, alias="enforceRadiusMonitoring")
    guest_port_bouncing: bool | None = Field(default=None, alias="guestPortBouncing")
    radius_testing_enabled: bool | None = Field(default=None, alias="radiusTestingEnabled")
    radius_coa_support_enabled: bool | None = Field(default=None, alias="radiusCoaSupportEnabled")
    radius_accounting_enabled: bool | None = Field(default=None, alias="radiusAccountingEnabled")
    radius_accounting_servers: list[SwitchRadiusServersItem] | None = Field(
        default=None, alias="radiusAccountingServers"
    )
    radius_group_attribute: str | None = Field(default=None, alias="radiusGroupAttribute")
    host_mode: str | None = Field(default=None, alias="hostMode")
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    increase_access_speed: bool | None = Field(default=None, alias="increaseAccessSpeed")
    guest_vlan_id: int | None = Field(default=None, alias="guestVlanId")
    dot1x: SwitchDot1x | None = None
    voice_vlan_clients: bool | None = Field(default=None, alias="voiceVlanClients")
    url_redirect_walled_garden_enabled: bool | None = Field(
        default=None, alias="urlRedirectWalledGardenEnabled"
    )
    url_redirect_walled_garden_ranges: list[str] | None = Field(
        default=None, alias="urlRedirectWalledGardenRanges"
    )
    counts: SwitchCounts | None = None
    guest_group_policy_id: str | None = Field(default=None, alias="guestGroupPolicyId")
    guest_sgt_id: int | None = Field(default=None, alias="guestSgtId")


class CreateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServerIpv4(_BaseSchema):
    """The IPv4 attributes of the trusted server being added."""

    address: str | None = None


class CreateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServerResponse(_BaseSchema):
    """Response for createNetworkSwitchDhcpServerPolicyArpInspectionTrustedServer operation."""

    trusted_server_id: str | None = Field(default=None, alias="trustedServerId")
    mac: str | None = None
    vlan: int | None = None
    ipv4: SwitchIpv42 | None = None


class CreateNetworkSwitchLinkAggregationResponse(_BaseSchema):
    """Response for createNetworkSwitchLinkAggregation operation."""

    id: str | None = None
    switch_ports: list[SwitchSwitchPortsItem] | None = Field(default=None, alias="switchPorts")


class CreateNetworkSwitchLinkAggregationSwitchPortsItem(_BaseSchema):
    """Item schema for switchPorts."""

    serial: str
    port_id: str = Field(alias="portId")


class CreateNetworkSwitchLinkAggregationSwitchProfilePortsItem(_BaseSchema):
    """Item schema for switchProfilePorts."""

    profile: str
    port_id: str = Field(alias="portId")


class CreateNetworkSwitchPortSchedulePortSchedule(_BaseSchema):
    """The schedule for switch port scheduling. Schedules are applied to days of the week. When
    it's empty, default schedule with all days of a week are configured. Any unspecified day in
    the schedule is added as a default schedule configuration of the day.
    """

    monday: SwitchMonday | None = None
    tuesday: SwitchMonday | None = None
    wednesday: SwitchMonday | None = None
    thursday: SwitchMonday | None = None
    friday: SwitchMonday | None = None
    saturday: SwitchMonday | None = None
    sunday: SwitchMonday | None = None


class CreateNetworkSwitchPortScheduleResponse(_BaseSchema):
    """Response for createNetworkSwitchPortSchedule operation."""

    id: str | None = None
    network_id: str | None = Field(default=None, alias="networkId")
    name: str | None = None
    port_schedule: SwitchPortSchedule | None = Field(default=None, alias="portSchedule")


class CreateNetworkSwitchQosRuleResponse(_BaseSchema):
    """Response for createNetworkSwitchQosRule operation."""

    id: str | None = None
    vlan: int | None = None
    protocol: str | None = None
    src_port: int | None = Field(default=None, alias="srcPort")
    src_port_range: str | None = Field(default=None, alias="srcPortRange")
    dst_port: int | None = Field(default=None, alias="dstPort")
    dst_port_range: str | None = Field(default=None, alias="dstPortRange")
    dscp: int | None = None


class CreateNetworkSwitchRoutingMulticastRendezvousPointResponse(_BaseSchema):
    """Response for createNetworkSwitchRoutingMulticastRendezvousPoint operation."""

    rendezvous_point_id: str | None = Field(default=None, alias="rendezvousPointId")
    serial: str | None = None
    interface_name: str | None = Field(default=None, alias="interfaceName")
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    multicast_group: str | None = Field(default=None, alias="multicastGroup")


class CreateNetworkSwitchRoutingMulticastRendezvousPointVrf(_BaseSchema):
    """The VRF with PIM enabled L3 interface."""

    name: str | None = None


class CreateNetworkSwitchStackResponse(_BaseSchema):
    """Response for createNetworkSwitchStack operation."""

    id: str | None = None
    name: str | None = None
    serials: list[str] | None = None
    workflow_id: str | None = Field(default=None, alias="workflowId")


class CreateNetworkSwitchStackRoutingInterfaceIpv6(_BaseSchema):
    """The IPv6 settings of the interface."""

    assignment_mode: str | None = Field(default=None, alias="assignmentMode")
    prefix: str | None = None
    address: str | None = None
    gateway: str | None = None


class CreateNetworkSwitchStackRoutingInterfaceOspfSettings(_BaseSchema):
    """The OSPF routing settings of the interface."""

    area: str | None = None
    cost: int | None = None
    is_passive_enabled: bool | None = Field(default=None, alias="isPassiveEnabled")
    network_type: str | None = Field(default=None, alias="networkType")


class CreateNetworkSwitchStackRoutingInterfaceResponse(_BaseSchema):
    """Response for createNetworkSwitchStackRoutingInterface operation."""

    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    mode: str | None = None
    subnet: str | None = None
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    serial: str | None = None
    switch_port_id: str | None = Field(default=None, alias="switchPortId")
    multicast_routing: str | None = Field(default=None, alias="multicastRouting")
    vlan_id: int | None = Field(default=None, alias="vlanId")
    uplink_v4: bool | None = Field(default=None, alias="uplinkV4")
    uplink_v6: bool | None = Field(default=None, alias="uplinkV6")
    ospf_settings: SwitchOspfSettings | None = Field(default=None, alias="ospfSettings")
    ospf_v3: SwitchOspfSettings | None = Field(default=None, alias="ospfV3")
    ipv6: SwitchIpv6 | None = None
    vrf: SwitchVrf | None = None
    loopback: dict[str, Any] | None = None
    default_gateway: str | None = Field(default=None, alias="defaultGateway")


class CreateNetworkSwitchStackRoutingInterfaceVrf(_BaseSchema):
    """The VRF settings of the interface. Requires IOS XE 17.18 or higher."""

    name: str | None = None


class CreateNetworkSwitchStackRoutingStaticRouteResponse(_BaseSchema):
    """Response for createNetworkSwitchStackRoutingStaticRoute operation."""

    static_route_id: str = Field(alias="staticRouteId")
    name: str | None = None
    subnet: str
    next_hop_ip: str = Field(alias="nextHopIp")
    management_next_hop: str | None = Field(default=None, alias="managementNextHop")
    vrf: SwitchVrf2 | None = None
    advertise_via_ospf_enabled: bool | None = Field(default=None, alias="advertiseViaOspfEnabled")
    prefer_over_ospf_routes_enabled: bool | None = Field(
        default=None, alias="preferOverOspfRoutesEnabled"
    )


class CreateNetworkSwitchStackRoutingStaticRouteVrf(_BaseSchema):
    """The VRF settings of the interface. Requires IOS XE 17.18 or higher."""

    name: str | None = None
    leak_route_to_default_vrf: bool | None = Field(default=None, alias="leakRouteToDefaultVrf")


class CycleDeviceSwitchPortsResponse(_BaseSchema):
    """Response for cycleDeviceSwitchPorts operation."""

    ports: list[str] | None = None


class GetDeviceSwitchPortResponse(_BaseSchema):
    """Response for getDeviceSwitchPort operation."""

    port_id: str | None = Field(default=None, alias="portId")
    name: str | None = None
    tags: list[str] | None = None
    enabled: bool | None = None
    poe_enabled: bool | None = Field(default=None, alias="poeEnabled")
    type_: str | None = Field(default=None, alias="type")
    vlan: int | None = None
    voice_vlan: int | None = Field(default=None, alias="voiceVlan")
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    isolation_enabled: bool | None = Field(default=None, alias="isolationEnabled")
    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_guard: str | None = Field(default=None, alias="stpGuard")
    stp_port_fast_trunk: bool | None = Field(default=None, alias="stpPortFastTrunk")
    link_negotiation: str | None = Field(default=None, alias="linkNegotiation")
    link_negotiation_capabilities: list[str] | None = Field(
        default=None, alias="linkNegotiationCapabilities"
    )
    port_schedule_id: str | None = Field(default=None, alias="portScheduleId")
    schedule: SwitchSchedule | None = None
    udld: str | None = None
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    access_policy_number: int | None = Field(default=None, alias="accessPolicyNumber")
    mac_allow_list: list[str] | None = Field(default=None, alias="macAllowList")
    mac_whitelist_limit: int | None = Field(default=None, alias="macWhitelistLimit")
    sticky_mac_allow_list: list[str] | None = Field(default=None, alias="stickyMacAllowList")
    sticky_mac_allow_list_limit: int | None = Field(default=None, alias="stickyMacAllowListLimit")
    storm_control_enabled: bool | None = Field(default=None, alias="stormControlEnabled")
    adaptive_policy_group_id: str | None = Field(default=None, alias="adaptivePolicyGroupId")
    adaptive_policy_group: SwitchSchedule | None = Field(default=None, alias="adaptivePolicyGroup")
    peer_sgt_capable: bool | None = Field(default=None, alias="peerSgtCapable")
    flexible_stacking_enabled: bool | None = Field(default=None, alias="flexibleStackingEnabled")
    dai_trusted: bool | None = Field(default=None, alias="daiTrusted")
    profile: SwitchProfile | None = None
    module: SwitchModule | None = None
    mirror: SwitchMirror | None = None
    dot3az: SwitchDot3az | None = None
    high_speed: SwitchDot3az | None = Field(default=None, alias="highSpeed")


class GetDeviceSwitchPortsResponse(RootModel[list["GetDeviceSwitchPortsResponseItem"]]):
    """Response for getDeviceSwitchPorts operation."""


class GetDeviceSwitchPortsResponseItem(_BaseSchema):
    """Schema for GetDeviceSwitchPortsResponseItem."""

    port_id: str | None = Field(default=None, alias="portId")
    name: str | None = None
    tags: list[str] | None = None
    enabled: bool | None = None
    poe_enabled: bool | None = Field(default=None, alias="poeEnabled")
    type_: str | None = Field(default=None, alias="type")
    vlan: int | None = None
    voice_vlan: int | None = Field(default=None, alias="voiceVlan")
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    isolation_enabled: bool | None = Field(default=None, alias="isolationEnabled")
    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_guard: str | None = Field(default=None, alias="stpGuard")
    stp_port_fast_trunk: bool | None = Field(default=None, alias="stpPortFastTrunk")
    link_negotiation: str | None = Field(default=None, alias="linkNegotiation")
    link_negotiation_capabilities: list[str] | None = Field(
        default=None, alias="linkNegotiationCapabilities"
    )
    port_schedule_id: str | None = Field(default=None, alias="portScheduleId")
    schedule: SwitchSchedule | None = None
    udld: str | None = None
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    access_policy_number: int | None = Field(default=None, alias="accessPolicyNumber")
    mac_allow_list: list[str] | None = Field(default=None, alias="macAllowList")
    mac_whitelist_limit: int | None = Field(default=None, alias="macWhitelistLimit")
    sticky_mac_allow_list: list[str] | None = Field(default=None, alias="stickyMacAllowList")
    sticky_mac_allow_list_limit: int | None = Field(default=None, alias="stickyMacAllowListLimit")
    storm_control_enabled: bool | None = Field(default=None, alias="stormControlEnabled")
    adaptive_policy_group_id: str | None = Field(default=None, alias="adaptivePolicyGroupId")
    adaptive_policy_group: SwitchSchedule | None = Field(default=None, alias="adaptivePolicyGroup")
    peer_sgt_capable: bool | None = Field(default=None, alias="peerSgtCapable")
    flexible_stacking_enabled: bool | None = Field(default=None, alias="flexibleStackingEnabled")
    dai_trusted: bool | None = Field(default=None, alias="daiTrusted")
    profile: SwitchProfile | None = None
    module: SwitchModule | None = None
    mirror: SwitchMirror | None = None
    dot3az: SwitchDot3az | None = None
    high_speed: SwitchDot3az | None = Field(default=None, alias="highSpeed")


class GetDeviceSwitchPortsStatusesPacketsResponse(
    RootModel[list["GetDeviceSwitchPortsStatusesPacketsResponseItem"]]
):
    """Response for getDeviceSwitchPortsStatusesPackets operation."""


class GetDeviceSwitchPortsStatusesPacketsResponseItem(_BaseSchema):
    """Schema for GetDeviceSwitchPortsStatusesPacketsResponseItem."""

    port_id: str | None = Field(default=None, alias="portId")
    packets: list[SwitchPacketsItem] | None = None


class GetDeviceSwitchPortsStatusesResponse(
    RootModel[list["GetDeviceSwitchPortsStatusesResponseItem"]]
):
    """Response for getDeviceSwitchPortsStatuses operation."""


class GetDeviceSwitchPortsStatusesResponseItem(_BaseSchema):
    """Schema for GetDeviceSwitchPortsStatusesResponseItem."""

    port_id: str | None = Field(default=None, alias="portId")
    enabled: bool | None = None
    status: str | None = None
    is_uplink: bool | None = Field(default=None, alias="isUplink")
    errors: list[str] | None = None
    warnings: list[str] | None = None
    speed: str | None = None
    duplex: str | None = None
    spanning_tree: SwitchSpanningTree | None = Field(default=None, alias="spanningTree")
    poe: SwitchPoe | None = None
    usage_in_kb: SwitchUsageInKb | None = Field(default=None, alias="usageInKb")
    cdp: SwitchCdp | None = None
    lldp: SwitchLldp | None = None
    client_count: int | None = Field(default=None, alias="clientCount")
    power_usage_in_wh: float | None = Field(default=None, alias="powerUsageInWh")
    traffic_in_kbps: SwitchTrafficInKbps | None = Field(default=None, alias="trafficInKbps")
    secure_port: SwitchSecurePort | None = Field(default=None, alias="securePort")


class GetDeviceSwitchRoutingInterfaceDhcpResponse(_BaseSchema):
    """Response for getDeviceSwitchRoutingInterfaceDhcp operation."""

    dhcp_mode: str | None = Field(default=None, alias="dhcpMode")
    dhcp_relay_server_ips: list[str] | None = Field(default=None, alias="dhcpRelayServerIps")
    dhcp_lease_time: str | None = Field(default=None, alias="dhcpLeaseTime")
    dns_nameservers_option: str | None = Field(default=None, alias="dnsNameserversOption")
    dns_custom_nameservers: list[str] | None = Field(default=None, alias="dnsCustomNameservers")
    boot_options_enabled: bool | None = Field(default=None, alias="bootOptionsEnabled")
    boot_next_server: str | None = Field(default=None, alias="bootNextServer")
    boot_file_name: str | None = Field(default=None, alias="bootFileName")
    dhcp_options: list[GetDeviceSwitchRoutingInterfaceDhcpResponseDhcpOptionsItem] | None = Field(
        default=None, alias="dhcpOptions"
    )
    reserved_ip_ranges: (
        list[GetDeviceSwitchRoutingInterfaceDhcpResponseReservedIpRangesItem] | None
    ) = Field(default=None, alias="reservedIpRanges")
    fixed_ip_assignments: (
        list[GetDeviceSwitchRoutingInterfaceDhcpResponseFixedIpAssignmentsItem] | None
    ) = Field(default=None, alias="fixedIpAssignments")


class GetDeviceSwitchRoutingInterfaceDhcpResponseDhcpOptionsItem(_BaseSchema):
    """Schema for GetDeviceSwitchRoutingInterfaceDhcpResponseDhcpOptionsItem."""

    code: str | None = None
    type_: str | None = Field(default=None, alias="type")
    value: str | None = None


class GetDeviceSwitchRoutingInterfaceDhcpResponseFixedIpAssignmentsItem(_BaseSchema):
    """Schema for GetDeviceSwitchRoutingInterfaceDhcpResponseFixedIpAssignmentsItem."""

    name: str | None = None
    mac: str | None = None
    ip: str | None = None


class GetDeviceSwitchRoutingInterfaceDhcpResponseReservedIpRangesItem(_BaseSchema):
    """Schema for GetDeviceSwitchRoutingInterfaceDhcpResponseReservedIpRangesItem."""

    start: str | None = None
    end: str | None = None
    comment: str | None = None


class GetDeviceSwitchRoutingInterfaceResponse(_BaseSchema):
    """Response for getDeviceSwitchRoutingInterface operation."""

    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    mode: str | None = None
    subnet: str | None = None
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    serial: str | None = None
    switch_port_id: str | None = Field(default=None, alias="switchPortId")
    multicast_routing: str | None = Field(default=None, alias="multicastRouting")
    vlan_id: int | None = Field(default=None, alias="vlanId")
    uplink_v4: bool | None = Field(default=None, alias="uplinkV4")
    uplink_v6: bool | None = Field(default=None, alias="uplinkV6")
    ospf_settings: SwitchOspfSettings | None = Field(default=None, alias="ospfSettings")
    ospf_v3: SwitchOspfSettings | None = Field(default=None, alias="ospfV3")
    ipv6: SwitchIpv6 | None = None
    vrf: SwitchVrf | None = None
    loopback: dict[str, Any] | None = None
    default_gateway: str | None = Field(default=None, alias="defaultGateway")


class GetDeviceSwitchRoutingInterfacesResponse(
    RootModel[list["GetDeviceSwitchRoutingInterfacesResponseItem"]]
):
    """Response for getDeviceSwitchRoutingInterfaces operation."""


class GetDeviceSwitchRoutingInterfacesResponseItem(_BaseSchema):
    """Schema for GetDeviceSwitchRoutingInterfacesResponseItem."""

    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    mode: str | None = None
    subnet: str | None = None
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    serial: str | None = None
    switch_port_id: str | None = Field(default=None, alias="switchPortId")
    multicast_routing: str | None = Field(default=None, alias="multicastRouting")
    vlan_id: int | None = Field(default=None, alias="vlanId")
    uplink_v4: bool | None = Field(default=None, alias="uplinkV4")
    uplink_v6: bool | None = Field(default=None, alias="uplinkV6")
    ospf_settings: SwitchOspfSettings | None = Field(default=None, alias="ospfSettings")
    ospf_v3: SwitchOspfSettings | None = Field(default=None, alias="ospfV3")
    ipv6: SwitchIpv6 | None = None
    vrf: SwitchVrf | None = None
    loopback: dict[str, Any] | None = None
    default_gateway: str | None = Field(default=None, alias="defaultGateway")


class GetDeviceSwitchRoutingStaticRouteResponse(_BaseSchema):
    """Response for getDeviceSwitchRoutingStaticRoute operation."""

    static_route_id: str = Field(alias="staticRouteId")
    name: str | None = None
    subnet: str
    next_hop_ip: str = Field(alias="nextHopIp")
    management_next_hop: str | None = Field(default=None, alias="managementNextHop")
    vrf: SwitchVrf2 | None = None
    advertise_via_ospf_enabled: bool | None = Field(default=None, alias="advertiseViaOspfEnabled")
    prefer_over_ospf_routes_enabled: bool | None = Field(
        default=None, alias="preferOverOspfRoutesEnabled"
    )


class GetDeviceSwitchRoutingStaticRoutesResponse(
    RootModel[list["GetDeviceSwitchRoutingStaticRoutesResponseItem"]]
):
    """Response for getDeviceSwitchRoutingStaticRoutes operation."""


class GetDeviceSwitchRoutingStaticRoutesResponseItem(_BaseSchema):
    """Schema for GetDeviceSwitchRoutingStaticRoutesResponseItem."""

    static_route_id: str = Field(alias="staticRouteId")
    name: str | None = None
    subnet: str
    next_hop_ip: str = Field(alias="nextHopIp")
    management_next_hop: str | None = Field(default=None, alias="managementNextHop")
    vrf: SwitchVrf2 | None = None
    advertise_via_ospf_enabled: bool | None = Field(default=None, alias="advertiseViaOspfEnabled")
    prefer_over_ospf_routes_enabled: bool | None = Field(
        default=None, alias="preferOverOspfRoutesEnabled"
    )


class GetDeviceSwitchWarmSpareResponse(_BaseSchema):
    """Response for getDeviceSwitchWarmSpare operation."""

    enabled: bool | None = None
    primary_serial: str | None = Field(default=None, alias="primarySerial")
    spare_serial: str | None = Field(default=None, alias="spareSerial")


class GetNetworkSwitchAccessControlListsResponse(_BaseSchema):
    """Response for getNetworkSwitchAccessControlLists operation."""

    rules: list[GetNetworkSwitchAccessControlListsResponseRulesItem] | None = None


class GetNetworkSwitchAccessControlListsResponseRulesItem(_BaseSchema):
    """Schema for GetNetworkSwitchAccessControlListsResponseRulesItem."""

    comment: str | None = None
    policy: str | None = None
    ip_version: str | None = Field(default=None, alias="ipVersion")
    protocol: str | None = None
    src_cidr: str | None = Field(default=None, alias="srcCidr")
    src_port: str | None = Field(default=None, alias="srcPort")
    dst_cidr: str | None = Field(default=None, alias="dstCidr")
    dst_port: str | None = Field(default=None, alias="dstPort")
    vlan: str | None = None


class GetNetworkSwitchAccessPoliciesResponse(
    RootModel[list["GetNetworkSwitchAccessPoliciesResponseItem"]]
):
    """Response for getNetworkSwitchAccessPolicies operation."""


class GetNetworkSwitchAccessPoliciesResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchAccessPoliciesResponseItem."""

    access_policy_number: str | None = Field(default=None, alias="accessPolicyNumber")
    name: str | None = None
    radius_servers: list[SwitchRadiusServersItem] | None = Field(
        default=None, alias="radiusServers"
    )
    radius: SwitchRadius | None = None
    enforce_radius_monitoring: bool | None = Field(default=None, alias="enforceRadiusMonitoring")
    guest_port_bouncing: bool | None = Field(default=None, alias="guestPortBouncing")
    radius_testing_enabled: bool | None = Field(default=None, alias="radiusTestingEnabled")
    radius_coa_support_enabled: bool | None = Field(default=None, alias="radiusCoaSupportEnabled")
    radius_accounting_enabled: bool | None = Field(default=None, alias="radiusAccountingEnabled")
    radius_accounting_servers: list[SwitchRadiusServersItem] | None = Field(
        default=None, alias="radiusAccountingServers"
    )
    radius_group_attribute: str | None = Field(default=None, alias="radiusGroupAttribute")
    host_mode: str | None = Field(default=None, alias="hostMode")
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    increase_access_speed: bool | None = Field(default=None, alias="increaseAccessSpeed")
    guest_vlan_id: int | None = Field(default=None, alias="guestVlanId")
    dot1x: SwitchDot1x | None = None
    voice_vlan_clients: bool | None = Field(default=None, alias="voiceVlanClients")
    url_redirect_walled_garden_enabled: bool | None = Field(
        default=None, alias="urlRedirectWalledGardenEnabled"
    )
    url_redirect_walled_garden_ranges: list[str] | None = Field(
        default=None, alias="urlRedirectWalledGardenRanges"
    )
    counts: SwitchCounts | None = None
    guest_group_policy_id: str | None = Field(default=None, alias="guestGroupPolicyId")
    guest_sgt_id: int | None = Field(default=None, alias="guestSgtId")


class GetNetworkSwitchAccessPolicyResponse(_BaseSchema):
    """Response for getNetworkSwitchAccessPolicy operation."""

    access_policy_number: str | None = Field(default=None, alias="accessPolicyNumber")
    name: str | None = None
    radius_servers: list[SwitchRadiusServersItem] | None = Field(
        default=None, alias="radiusServers"
    )
    radius: SwitchRadius | None = None
    enforce_radius_monitoring: bool | None = Field(default=None, alias="enforceRadiusMonitoring")
    guest_port_bouncing: bool | None = Field(default=None, alias="guestPortBouncing")
    radius_testing_enabled: bool | None = Field(default=None, alias="radiusTestingEnabled")
    radius_coa_support_enabled: bool | None = Field(default=None, alias="radiusCoaSupportEnabled")
    radius_accounting_enabled: bool | None = Field(default=None, alias="radiusAccountingEnabled")
    radius_accounting_servers: list[SwitchRadiusServersItem] | None = Field(
        default=None, alias="radiusAccountingServers"
    )
    radius_group_attribute: str | None = Field(default=None, alias="radiusGroupAttribute")
    host_mode: str | None = Field(default=None, alias="hostMode")
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    increase_access_speed: bool | None = Field(default=None, alias="increaseAccessSpeed")
    guest_vlan_id: int | None = Field(default=None, alias="guestVlanId")
    dot1x: SwitchDot1x | None = None
    voice_vlan_clients: bool | None = Field(default=None, alias="voiceVlanClients")
    url_redirect_walled_garden_enabled: bool | None = Field(
        default=None, alias="urlRedirectWalledGardenEnabled"
    )
    url_redirect_walled_garden_ranges: list[str] | None = Field(
        default=None, alias="urlRedirectWalledGardenRanges"
    )
    counts: SwitchCounts | None = None
    guest_group_policy_id: str | None = Field(default=None, alias="guestGroupPolicyId")
    guest_sgt_id: int | None = Field(default=None, alias="guestSgtId")


class GetNetworkSwitchAlternateManagementInterfaceResponse(_BaseSchema):
    """Response for getNetworkSwitchAlternateManagementInterface operation."""

    enabled: bool | None = None
    vlan_id: int | None = Field(default=None, alias="vlanId")
    protocols: list[str] | None = None
    switches: list[GetNetworkSwitchAlternateManagementInterfaceResponseSwitchesItem] | None = None


class GetNetworkSwitchAlternateManagementInterfaceResponseSwitchesItem(_BaseSchema):
    """Schema for GetNetworkSwitchAlternateManagementInterfaceResponseSwitchesItem."""

    serial: str | None = None
    alternate_management_ip: str | None = Field(default=None, alias="alternateManagementIp")
    subnet_mask: str | None = Field(default=None, alias="subnetMask")
    gateway: str | None = None


class GetNetworkSwitchDhcpServerPolicyArpInspectionTrustedServersResponse(
    RootModel[list["GetNetworkSwitchDhcpServerPolicyArpInspectionTrustedServersResponseItem"]]
):
    """Response for getNetworkSwitchDhcpServerPolicyArpInspectionTrustedServers operation."""


class GetNetworkSwitchDhcpServerPolicyArpInspectionTrustedServersResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchDhcpServerPolicyArpInspectionTrustedServersResponseItem."""

    trusted_server_id: str | None = Field(default=None, alias="trustedServerId")
    mac: str | None = None
    vlan: int | None = None
    ipv4: SwitchIpv42 | None = None


class GetNetworkSwitchDhcpServerPolicyArpInspectionWarningsByDeviceResponse(
    RootModel[list["GetNetworkSwitchDhcpServerPolicyArpInspectionWarningsByDeviceResponseItem"]]
):
    """Response for getNetworkSwitchDhcpServerPolicyArpInspectionWarningsByDevice operation."""


class GetNetworkSwitchDhcpServerPolicyArpInspectionWarningsByDeviceResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchDhcpServerPolicyArpInspectionWarningsByDeviceResponseItem."""

    serial: str | None = None
    name: str | None = None
    url: str | None = None
    supports_inspection: bool | None = Field(default=None, alias="supportsInspection")
    has_trusted_port: bool | None = Field(default=None, alias="hasTrustedPort")


class GetNetworkSwitchDhcpServerPolicyResponse(_BaseSchema):
    """Response for getNetworkSwitchDhcpServerPolicy operation."""

    alerts: GetNetworkSwitchDhcpServerPolicyResponseAlerts | None = None
    default_policy: str | None = Field(default=None, alias="defaultPolicy")
    blocked_servers: list[str] | None = Field(default=None, alias="blockedServers")
    allowed_servers: list[str] | None = Field(default=None, alias="allowedServers")
    arp_inspection: GetNetworkSwitchDhcpServerPolicyResponseArpInspection | None = Field(
        default=None, alias="arpInspection"
    )


class GetNetworkSwitchDhcpServerPolicyResponseAlerts(_BaseSchema):
    """Email alert settings for DHCP servers."""

    email: SwitchDot3az | None = None


class GetNetworkSwitchDhcpServerPolicyResponseArpInspection(_BaseSchema):
    """Dynamic ARP Inspection settings."""

    enabled: bool | None = None
    unsupported_models: list[str] | None = Field(default=None, alias="unsupportedModels")


class GetNetworkSwitchDhcpV4ServersSeenResponse(
    RootModel[list["GetNetworkSwitchDhcpV4ServersSeenResponseItem"]]
):
    """Response for getNetworkSwitchDhcpV4ServersSeen operation."""


class GetNetworkSwitchDhcpV4ServersSeenResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchDhcpV4ServersSeenResponseItem."""

    mac: str | None = None
    vlan: int | None = None
    client_id: str | None = Field(default=None, alias="clientId")
    is_allowed: bool | None = Field(default=None, alias="isAllowed")
    last_seen_at: datetime | None = Field(default=None, alias="lastSeenAt")
    seen_by: list[SwitchSeenByItem] | None = Field(default=None, alias="seenBy")
    type_: str | None = Field(default=None, alias="type")
    device: SwitchDevice | None = None
    ipv4: SwitchIpv4 | None = None
    is_configured: bool | None = Field(default=None, alias="isConfigured")
    last_ack: SwitchLastAck | None = Field(default=None, alias="lastAck")
    last_packet: SwitchLastPacket | None = Field(default=None, alias="lastPacket")


class GetNetworkSwitchDscpToCosMappingsResponse(_BaseSchema):
    """Response for getNetworkSwitchDscpToCosMappings operation."""

    mappings: list[GetNetworkSwitchDscpToCosMappingsResponseMappingsItem] | None = None


class GetNetworkSwitchDscpToCosMappingsResponseMappingsItem(_BaseSchema):
    """Schema for GetNetworkSwitchDscpToCosMappingsResponseMappingsItem."""

    dscp: int | None = None
    cos: int | None = None
    title: str | None = None


class GetNetworkSwitchLinkAggregationsResponse(
    RootModel[list["GetNetworkSwitchLinkAggregationsResponseItem"]]
):
    """Response for getNetworkSwitchLinkAggregations operation."""


class GetNetworkSwitchLinkAggregationsResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchLinkAggregationsResponseItem."""

    id: str | None = None
    switch_ports: list[SwitchSwitchPortsItem] | None = Field(default=None, alias="switchPorts")


class GetNetworkSwitchMtuResponse(_BaseSchema):
    """Response for getNetworkSwitchMtu operation."""

    default_mtu_size: int | None = Field(default=None, alias="defaultMtuSize")
    overrides: list[GetNetworkSwitchMtuResponseOverridesItem] | None = None


class GetNetworkSwitchMtuResponseOverridesItem(_BaseSchema):
    """Schema for GetNetworkSwitchMtuResponseOverridesItem."""

    switches: list[str] | None = None
    switch_profiles: list[str] | None = Field(default=None, alias="switchProfiles")
    mtu_size: int = Field(alias="mtuSize")


class GetNetworkSwitchPortSchedulesResponse(
    RootModel[list["GetNetworkSwitchPortSchedulesResponseItem"]]
):
    """Response for getNetworkSwitchPortSchedules operation."""


class GetNetworkSwitchPortSchedulesResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchPortSchedulesResponseItem."""

    id: str | None = None
    network_id: str | None = Field(default=None, alias="networkId")
    name: str | None = None
    port_schedule: SwitchPortSchedule | None = Field(default=None, alias="portSchedule")


class GetNetworkSwitchQosRuleResponse(_BaseSchema):
    """Response for getNetworkSwitchQosRule operation."""

    id: str | None = None
    vlan: int | None = None
    protocol: str | None = None
    src_port: int | None = Field(default=None, alias="srcPort")
    src_port_range: str | None = Field(default=None, alias="srcPortRange")
    dst_port: int | None = Field(default=None, alias="dstPort")
    dst_port_range: str | None = Field(default=None, alias="dstPortRange")
    dscp: int | None = None


class GetNetworkSwitchQosRulesOrderResponse(_BaseSchema):
    """Response for getNetworkSwitchQosRulesOrder operation."""

    rule_ids: list[str] | None = Field(default=None, alias="ruleIds")


class GetNetworkSwitchQosRulesResponse(RootModel[list["GetNetworkSwitchQosRulesResponseItem"]]):
    """Response for getNetworkSwitchQosRules operation."""


class GetNetworkSwitchQosRulesResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchQosRulesResponseItem."""

    id: str | None = None
    vlan: int | None = None
    protocol: str | None = None
    src_port: int | None = Field(default=None, alias="srcPort")
    src_port_range: str | None = Field(default=None, alias="srcPortRange")
    dst_port: int | None = Field(default=None, alias="dstPort")
    dst_port_range: str | None = Field(default=None, alias="dstPortRange")
    dscp: int | None = None


class GetNetworkSwitchRoutingMulticastRendezvousPointResponse(_BaseSchema):
    """Response for getNetworkSwitchRoutingMulticastRendezvousPoint operation."""

    rendezvous_point_id: str | None = Field(default=None, alias="rendezvousPointId")
    serial: str | None = None
    interface_name: str | None = Field(default=None, alias="interfaceName")
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    multicast_group: str | None = Field(default=None, alias="multicastGroup")


class GetNetworkSwitchRoutingMulticastRendezvousPointsResponse(
    RootModel[list["GetNetworkSwitchRoutingMulticastRendezvousPointsResponseItem"]]
):
    """Response for getNetworkSwitchRoutingMulticastRendezvousPoints operation."""


class GetNetworkSwitchRoutingMulticastRendezvousPointsResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchRoutingMulticastRendezvousPointsResponseItem."""

    rendezvous_point_id: str | None = Field(default=None, alias="rendezvousPointId")
    serial: str | None = None
    interface_name: str | None = Field(default=None, alias="interfaceName")
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    multicast_group: str | None = Field(default=None, alias="multicastGroup")


class GetNetworkSwitchRoutingMulticastResponse(_BaseSchema):
    """Response for getNetworkSwitchRoutingMulticast operation."""

    default_settings: GetNetworkSwitchRoutingMulticastResponseDefaultSettings | None = Field(
        default=None, alias="defaultSettings"
    )
    overrides: list[GetNetworkSwitchRoutingMulticastResponseOverridesItem] | None = None


class GetNetworkSwitchRoutingMulticastResponseDefaultSettings(_BaseSchema):
    """Default multicast setting for entire network. IGMP snooping and Flood unknown multicast
    traffic settings are enabled by default.
    """

    igmp_snooping_enabled: bool | None = Field(default=None, alias="igmpSnoopingEnabled")
    flood_unknown_multicast_traffic_enabled: bool | None = Field(
        default=None, alias="floodUnknownMulticastTrafficEnabled"
    )


class GetNetworkSwitchRoutingMulticastResponseOverridesItem(_BaseSchema):
    """Schema for GetNetworkSwitchRoutingMulticastResponseOverridesItem."""

    switches: list[str] | None = None
    stacks: list[str] | None = None
    switch_profiles: list[str] | None = Field(default=None, alias="switchProfiles")
    igmp_snooping_enabled: bool | None = Field(default=None, alias="igmpSnoopingEnabled")
    flood_unknown_multicast_traffic_enabled: bool | None = Field(
        default=None, alias="floodUnknownMulticastTrafficEnabled"
    )


class GetNetworkSwitchRoutingOspfResponse(_BaseSchema):
    """Response for getNetworkSwitchRoutingOspf operation."""

    enabled: bool | None = None
    hello_timer_in_seconds: int | None = Field(default=None, alias="helloTimerInSeconds")
    dead_timer_in_seconds: int | None = Field(default=None, alias="deadTimerInSeconds")
    areas: list[GetNetworkSwitchRoutingOspfResponseAreasItem] | None = None
    v3: GetNetworkSwitchRoutingOspfResponseV3 | None = None
    md5_authentication_enabled: bool | None = Field(default=None, alias="md5AuthenticationEnabled")
    md5_authentication_key: GetNetworkSwitchRoutingOspfResponseMd5AuthenticationKey | None = Field(
        default=None, alias="md5AuthenticationKey"
    )
    vrf: SwitchVrf | None = None


class GetNetworkSwitchRoutingOspfResponseAreasItem(_BaseSchema):
    """Schema for GetNetworkSwitchRoutingOspfResponseAreasItem."""

    area_id: str | None = Field(default=None, alias="areaId")
    area_name: str | None = Field(default=None, alias="areaName")
    area_type: str | None = Field(default=None, alias="areaType")


class GetNetworkSwitchRoutingOspfResponseMd5AuthenticationKey(_BaseSchema):
    """MD5 authentication credentials. This param is only relevant if md5AuthenticationEnabled is
    true.
    """

    id: int | None = None
    passphrase: str | None = None


class GetNetworkSwitchRoutingOspfResponseV3(_BaseSchema):
    """OSPF v3 configuration."""

    enabled: bool | None = None
    hello_timer_in_seconds: int | None = Field(default=None, alias="helloTimerInSeconds")
    dead_timer_in_seconds: int | None = Field(default=None, alias="deadTimerInSeconds")
    areas: list[GetNetworkSwitchRoutingOspfResponseAreasItem] | None = None


class GetNetworkSwitchSettingsResponse(_BaseSchema):
    """Response for getNetworkSwitchSettings operation."""

    vlan: int | None = None
    use_combined_power: bool | None = Field(default=None, alias="useCombinedPower")
    power_exceptions: list[GetNetworkSwitchSettingsResponsePowerExceptionsItem] | None = Field(
        default=None, alias="powerExceptions"
    )
    uplink_client_sampling: SwitchDot3az | None = Field(default=None, alias="uplinkClientSampling")
    mac_blocklist: SwitchDot3az | None = Field(default=None, alias="macBlocklist")
    uplink_selection: GetNetworkSwitchSettingsResponseUplinkSelection | None = Field(
        default=None, alias="uplinkSelection"
    )


class GetNetworkSwitchSettingsResponsePowerExceptionsItem(_BaseSchema):
    """Schema for GetNetworkSwitchSettingsResponsePowerExceptionsItem."""

    serial: str | None = None
    power_type: str | None = Field(default=None, alias="powerType")


class GetNetworkSwitchSettingsResponseUplinkSelection(_BaseSchema):
    """Settings related to uplink selection on IOS-XE switches."""

    failback: SwitchDot3az | None = None
    candidates: str | None = None


class GetNetworkSwitchStackResponse(_BaseSchema):
    """Response for getNetworkSwitchStack operation."""

    id: str | None = None
    name: str | None = None
    serials: list[str] | None = None
    is_monitor_only: bool | None = Field(default=None, alias="isMonitorOnly")
    virtual_mac: str | None = Field(default=None, alias="virtualMac")
    members: list[SwitchMembersItem] | None = None


class GetNetworkSwitchStackRoutingInterfaceDhcpResponse(_BaseSchema):
    """Response for getNetworkSwitchStackRoutingInterfaceDhcp operation."""

    dhcp_mode: str | None = Field(default=None, alias="dhcpMode")
    dhcp_relay_server_ips: list[str] | None = Field(default=None, alias="dhcpRelayServerIps")
    dhcp_lease_time: str | None = Field(default=None, alias="dhcpLeaseTime")
    dns_nameservers_option: str | None = Field(default=None, alias="dnsNameserversOption")
    dns_custom_nameservers: list[str] | None = Field(default=None, alias="dnsCustomNameservers")
    boot_options_enabled: bool | None = Field(default=None, alias="bootOptionsEnabled")
    boot_next_server: str | None = Field(default=None, alias="bootNextServer")
    boot_file_name: str | None = Field(default=None, alias="bootFileName")
    dhcp_options: list[GetDeviceSwitchRoutingInterfaceDhcpResponseDhcpOptionsItem] | None = Field(
        default=None, alias="dhcpOptions"
    )
    reserved_ip_ranges: (
        list[GetDeviceSwitchRoutingInterfaceDhcpResponseReservedIpRangesItem] | None
    ) = Field(default=None, alias="reservedIpRanges")
    fixed_ip_assignments: (
        list[GetDeviceSwitchRoutingInterfaceDhcpResponseFixedIpAssignmentsItem] | None
    ) = Field(default=None, alias="fixedIpAssignments")


class GetNetworkSwitchStackRoutingInterfaceResponse(_BaseSchema):
    """Response for getNetworkSwitchStackRoutingInterface operation."""

    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    mode: str | None = None
    subnet: str | None = None
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    serial: str | None = None
    switch_port_id: str | None = Field(default=None, alias="switchPortId")
    multicast_routing: str | None = Field(default=None, alias="multicastRouting")
    vlan_id: int | None = Field(default=None, alias="vlanId")
    uplink_v4: bool | None = Field(default=None, alias="uplinkV4")
    uplink_v6: bool | None = Field(default=None, alias="uplinkV6")
    ospf_settings: SwitchOspfSettings | None = Field(default=None, alias="ospfSettings")
    ospf_v3: SwitchOspfSettings | None = Field(default=None, alias="ospfV3")
    ipv6: SwitchIpv6 | None = None
    vrf: SwitchVrf | None = None
    loopback: dict[str, Any] | None = None
    default_gateway: str | None = Field(default=None, alias="defaultGateway")


class GetNetworkSwitchStackRoutingInterfacesResponse(
    RootModel[list["GetNetworkSwitchStackRoutingInterfacesResponseItem"]]
):
    """Response for getNetworkSwitchStackRoutingInterfaces operation."""


class GetNetworkSwitchStackRoutingInterfacesResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchStackRoutingInterfacesResponseItem."""

    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    mode: str | None = None
    subnet: str | None = None
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    serial: str | None = None
    switch_port_id: str | None = Field(default=None, alias="switchPortId")
    multicast_routing: str | None = Field(default=None, alias="multicastRouting")
    vlan_id: int | None = Field(default=None, alias="vlanId")
    uplink_v4: bool | None = Field(default=None, alias="uplinkV4")
    uplink_v6: bool | None = Field(default=None, alias="uplinkV6")
    ospf_settings: SwitchOspfSettings | None = Field(default=None, alias="ospfSettings")
    ospf_v3: SwitchOspfSettings | None = Field(default=None, alias="ospfV3")
    ipv6: SwitchIpv6 | None = None
    vrf: SwitchVrf | None = None
    loopback: dict[str, Any] | None = None
    default_gateway: str | None = Field(default=None, alias="defaultGateway")


class GetNetworkSwitchStackRoutingStaticRouteResponse(_BaseSchema):
    """Response for getNetworkSwitchStackRoutingStaticRoute operation."""

    static_route_id: str = Field(alias="staticRouteId")
    name: str | None = None
    subnet: str
    next_hop_ip: str = Field(alias="nextHopIp")
    management_next_hop: str | None = Field(default=None, alias="managementNextHop")
    vrf: SwitchVrf2 | None = None
    advertise_via_ospf_enabled: bool | None = Field(default=None, alias="advertiseViaOspfEnabled")
    prefer_over_ospf_routes_enabled: bool | None = Field(
        default=None, alias="preferOverOspfRoutesEnabled"
    )


class GetNetworkSwitchStackRoutingStaticRoutesResponse(
    RootModel[list["GetNetworkSwitchStackRoutingStaticRoutesResponseItem"]]
):
    """Response for getNetworkSwitchStackRoutingStaticRoutes operation."""


class GetNetworkSwitchStackRoutingStaticRoutesResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchStackRoutingStaticRoutesResponseItem."""

    static_route_id: str = Field(alias="staticRouteId")
    name: str | None = None
    subnet: str
    next_hop_ip: str = Field(alias="nextHopIp")
    management_next_hop: str | None = Field(default=None, alias="managementNextHop")
    vrf: SwitchVrf2 | None = None
    advertise_via_ospf_enabled: bool | None = Field(default=None, alias="advertiseViaOspfEnabled")
    prefer_over_ospf_routes_enabled: bool | None = Field(
        default=None, alias="preferOverOspfRoutesEnabled"
    )


class GetNetworkSwitchStacksResponse(RootModel[list["GetNetworkSwitchStacksResponseItem"]]):
    """Response for getNetworkSwitchStacks operation."""


class GetNetworkSwitchStacksResponseItem(_BaseSchema):
    """Schema for GetNetworkSwitchStacksResponseItem."""

    id: str | None = None
    name: str | None = None
    serials: list[str] | None = None
    is_monitor_only: bool | None = Field(default=None, alias="isMonitorOnly")
    virtual_mac: str | None = Field(default=None, alias="virtualMac")
    members: list[SwitchMembersItem] | None = None


class GetNetworkSwitchStormControlResponse(_BaseSchema):
    """Response for getNetworkSwitchStormControl operation."""

    broadcast_threshold: int | None = Field(default=None, alias="broadcastThreshold")
    multicast_threshold: int | None = Field(default=None, alias="multicastThreshold")
    unknown_unicast_threshold: int | None = Field(default=None, alias="unknownUnicastThreshold")
    treat_these_traffic_types_as_one_threshold: list[str] | None = Field(
        default=None, alias="treatTheseTrafficTypesAsOneThreshold"
    )


class GetNetworkSwitchStpResponse(_BaseSchema):
    """Response for getNetworkSwitchStp operation."""

    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_bridge_priority: list[GetNetworkSwitchStpResponseStpBridgePriorityItem] | None = Field(
        default=None, alias="stpBridgePriority"
    )


class GetNetworkSwitchStpResponseStpBridgePriorityItem(_BaseSchema):
    """Schema for GetNetworkSwitchStpResponseStpBridgePriorityItem."""

    switches: list[str] | None = None
    stacks: list[str] | None = None
    switch_profiles: list[str] | None = Field(default=None, alias="switchProfiles")
    stp_priority: int | None = Field(default=None, alias="stpPriority")


class GetOrganizationConfigTemplateSwitchProfilePortResponse(_BaseSchema):
    """Response for getOrganizationConfigTemplateSwitchProfilePort operation."""

    port_id: str | None = Field(default=None, alias="portId")
    name: str | None = None
    tags: list[str] | None = None
    enabled: bool | None = None
    poe_enabled: bool | None = Field(default=None, alias="poeEnabled")
    type_: str | None = Field(default=None, alias="type")
    vlan: int | None = None
    voice_vlan: int | None = Field(default=None, alias="voiceVlan")
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    isolation_enabled: bool | None = Field(default=None, alias="isolationEnabled")
    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_guard: str | None = Field(default=None, alias="stpGuard")
    stp_port_fast_trunk: bool | None = Field(default=None, alias="stpPortFastTrunk")
    link_negotiation: str | None = Field(default=None, alias="linkNegotiation")
    link_negotiation_capabilities: list[str] | None = Field(
        default=None, alias="linkNegotiationCapabilities"
    )
    port_schedule_id: str | None = Field(default=None, alias="portScheduleId")
    schedule: SwitchSchedule | None = None
    udld: str | None = None
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    access_policy_number: int | None = Field(default=None, alias="accessPolicyNumber")
    mac_allow_list: list[str] | None = Field(default=None, alias="macAllowList")
    mac_whitelist_limit: int | None = Field(default=None, alias="macWhitelistLimit")
    sticky_mac_allow_list: list[str] | None = Field(default=None, alias="stickyMacAllowList")
    sticky_mac_allow_list_limit: int | None = Field(default=None, alias="stickyMacAllowListLimit")
    storm_control_enabled: bool | None = Field(default=None, alias="stormControlEnabled")
    flexible_stacking_enabled: bool | None = Field(default=None, alias="flexibleStackingEnabled")
    dai_trusted: bool | None = Field(default=None, alias="daiTrusted")
    profile: SwitchProfile | None = None
    module: SwitchModule | None = None
    mirror: SwitchMirror | None = None
    dot3az: SwitchDot3az | None = None
    high_speed: SwitchDot3az | None = Field(default=None, alias="highSpeed")


class GetOrganizationConfigTemplateSwitchProfilePortsResponse(
    RootModel[list["GetOrganizationConfigTemplateSwitchProfilePortsResponseItem"]]
):
    """Response for getOrganizationConfigTemplateSwitchProfilePorts operation."""


class GetOrganizationConfigTemplateSwitchProfilePortsResponseItem(_BaseSchema):
    """Schema for GetOrganizationConfigTemplateSwitchProfilePortsResponseItem."""

    port_id: str | None = Field(default=None, alias="portId")
    name: str | None = None
    tags: list[str] | None = None
    enabled: bool | None = None
    poe_enabled: bool | None = Field(default=None, alias="poeEnabled")
    type_: str | None = Field(default=None, alias="type")
    vlan: int | None = None
    voice_vlan: int | None = Field(default=None, alias="voiceVlan")
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    isolation_enabled: bool | None = Field(default=None, alias="isolationEnabled")
    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_guard: str | None = Field(default=None, alias="stpGuard")
    stp_port_fast_trunk: bool | None = Field(default=None, alias="stpPortFastTrunk")
    link_negotiation: str | None = Field(default=None, alias="linkNegotiation")
    link_negotiation_capabilities: list[str] | None = Field(
        default=None, alias="linkNegotiationCapabilities"
    )
    port_schedule_id: str | None = Field(default=None, alias="portScheduleId")
    schedule: SwitchSchedule | None = None
    udld: str | None = None
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    access_policy_number: int | None = Field(default=None, alias="accessPolicyNumber")
    mac_allow_list: list[str] | None = Field(default=None, alias="macAllowList")
    mac_whitelist_limit: int | None = Field(default=None, alias="macWhitelistLimit")
    sticky_mac_allow_list: list[str] | None = Field(default=None, alias="stickyMacAllowList")
    sticky_mac_allow_list_limit: int | None = Field(default=None, alias="stickyMacAllowListLimit")
    storm_control_enabled: bool | None = Field(default=None, alias="stormControlEnabled")
    flexible_stacking_enabled: bool | None = Field(default=None, alias="flexibleStackingEnabled")
    dai_trusted: bool | None = Field(default=None, alias="daiTrusted")
    profile: SwitchProfile | None = None
    module: SwitchModule | None = None
    mirror: SwitchMirror | None = None
    dot3az: SwitchDot3az | None = None
    high_speed: SwitchDot3az | None = Field(default=None, alias="highSpeed")


class GetOrganizationConfigTemplateSwitchProfilesResponse(
    RootModel[list["GetOrganizationConfigTemplateSwitchProfilesResponseItem"]]
):
    """Response for getOrganizationConfigTemplateSwitchProfiles operation."""


class GetOrganizationConfigTemplateSwitchProfilesResponseItem(_BaseSchema):
    """Schema for GetOrganizationConfigTemplateSwitchProfilesResponseItem."""

    switch_profile_id: str | None = Field(default=None, alias="switchProfileId")
    name: str | None = None
    model: str | None = None


class GetOrganizationSummarySwitchPowerHistoryResponse(
    RootModel[list["GetOrganizationSummarySwitchPowerHistoryResponseItem"]]
):
    """Response for getOrganizationSummarySwitchPowerHistory operation."""


class GetOrganizationSummarySwitchPowerHistoryResponseItem(_BaseSchema):
    """Schema for GetOrganizationSummarySwitchPowerHistoryResponseItem."""

    ts: datetime | None = None
    draw: float | None = None


class GetOrganizationSwitchPortsBySwitchResponse(_BaseSchema):
    """Response for getOrganizationSwitchPortsBySwitch operation."""

    name: str | None = None
    serial: str | None = None
    mac: str | None = None
    network: SwitchSchedule | None = None
    model: str | None = None
    ports: list[GetOrganizationSwitchPortsBySwitchResponsePortsItem] | None = None


class GetOrganizationSwitchPortsBySwitchResponsePortsItem(_BaseSchema):
    """Schema for GetOrganizationSwitchPortsBySwitchResponsePortsItem."""

    port_id: str | None = Field(default=None, alias="portId")
    name: str | None = None
    tags: list[str] | None = None
    enabled: bool | None = None
    poe_enabled: bool | None = Field(default=None, alias="poeEnabled")
    type_: str | None = Field(default=None, alias="type")
    vlan: int | None = None
    voice_vlan: int | None = Field(default=None, alias="voiceVlan")
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_guard: str | None = Field(default=None, alias="stpGuard")
    link_negotiation: str | None = Field(default=None, alias="linkNegotiation")
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    sticky_mac_allow_list: list[str] | None = Field(default=None, alias="stickyMacAllowList")
    sticky_mac_allow_list_limit: int | None = Field(default=None, alias="stickyMacAllowListLimit")


class GetOrganizationSwitchPortsClientsOverviewByDeviceResponse(_BaseSchema):
    """Response for getOrganizationSwitchPortsClientsOverviewByDevice operation."""

    items: list[GetOrganizationSwitchPortsClientsOverviewByDeviceResponseItemsItem] | None = None
    meta: GetOrganizationSwitchPortsClientsOverviewByDeviceResponseMeta | None = None


class GetOrganizationSwitchPortsClientsOverviewByDeviceResponseItemsItem(_BaseSchema):
    """Schema for GetOrganizationSwitchPortsClientsOverviewByDeviceResponseItemsItem."""

    name: str | None = None
    serial: str | None = None
    mac: str | None = None
    network: SwitchSchedule | None = None
    model: str | None = None
    ports: list[SwitchPortsItem] | None = None


class GetOrganizationSwitchPortsClientsOverviewByDeviceResponseMeta(_BaseSchema):
    """Metadata relevant to the paginated dataset."""

    counts: SwitchMetaCounts | None = None


class GetOrganizationSwitchPortsOverviewResponse(_BaseSchema):
    """Response for getOrganizationSwitchPortsOverview operation."""

    counts: GetOrganizationSwitchPortsOverviewResponseCounts | None = None


class GetOrganizationSwitchPortsOverviewResponseCounts(_BaseSchema):
    """The count data of all ports."""

    total: int | None = None
    by_status: SwitchCountsByStatus | None = Field(default=None, alias="byStatus")


class GetOrganizationSwitchPortsStatusesBySwitchResponse(_BaseSchema):
    """Response for getOrganizationSwitchPortsStatusesBySwitch operation."""

    items: list[GetOrganizationSwitchPortsStatusesBySwitchResponseItemsItem] | None = None
    meta: GetOrganizationSwitchPortsClientsOverviewByDeviceResponseMeta | None = None


class GetOrganizationSwitchPortsStatusesBySwitchResponseItemsItem(_BaseSchema):
    """Schema for GetOrganizationSwitchPortsStatusesBySwitchResponseItemsItem."""

    name: str | None = None
    serial: str | None = None
    mac: str | None = None
    network: SwitchSchedule | None = None
    model: str | None = None
    ports: list[SwitchPortsItem2] | None = None


class GetOrganizationSwitchPortsTopologyDiscoveryByDeviceResponse(_BaseSchema):
    """Response for getOrganizationSwitchPortsTopologyDiscoveryByDevice operation."""

    items: list[GetOrganizationSwitchPortsTopologyDiscoveryByDeviceResponseItemsItem] | None = None
    meta: GetOrganizationSwitchPortsClientsOverviewByDeviceResponseMeta | None = None


class GetOrganizationSwitchPortsTopologyDiscoveryByDeviceResponseItemsItem(_BaseSchema):
    """Schema for GetOrganizationSwitchPortsTopologyDiscoveryByDeviceResponseItemsItem."""

    name: str | None = None
    serial: str | None = None
    mac: str | None = None
    network: SwitchSchedule | None = None
    model: str | None = None
    ports: list[SwitchPortsItem3] | None = None


class GetOrganizationSwitchPortsUsageHistoryByDeviceByIntervalResponse(_BaseSchema):
    """Response for getOrganizationSwitchPortsUsageHistoryByDeviceByInterval operation."""

    items: (
        list[GetOrganizationSwitchPortsUsageHistoryByDeviceByIntervalResponseItemsItem] | None
    ) = None
    meta: GetOrganizationSwitchPortsClientsOverviewByDeviceResponseMeta | None = None


class GetOrganizationSwitchPortsUsageHistoryByDeviceByIntervalResponseItemsItem(_BaseSchema):
    """Schema for GetOrganizationSwitchPortsUsageHistoryByDeviceByIntervalResponseItemsItem."""

    name: str | None = None
    serial: str | None = None
    mac: str | None = None
    network: SwitchSchedule | None = None
    model: str | None = None
    ports: list[SwitchPortsItem4] | None = None


class RemoveNetworkSwitchStackResponse(_BaseSchema):
    """Response for removeNetworkSwitchStack operation."""

    id: str | None = None
    name: str | None = None
    serials: list[str] | None = None
    is_monitor_only: bool | None = Field(default=None, alias="isMonitorOnly")
    virtual_mac: str | None = Field(default=None, alias="virtualMac")
    members: list[SwitchMembersItem] | None = None


class SwitchActive(_BaseSchema):
    """The count data for active ports."""

    total: int | None = None
    by_media_and_link_speed: SwitchByMediaAndLinkSpeed | None = Field(
        default=None, alias="byMediaAndLinkSpeed"
    )


class SwitchAuthentication(_BaseSchema):
    """Object for authentication mode settings."""

    mode: str | None = None


class SwitchBandwidth(_BaseSchema):
    """A breakdown of the average speed of data that has passed through this port during the
    interval.
    """

    usage: SwitchUsage2 | None = None


class SwitchByMedia(_BaseSchema):
    """The inactive count data, indexed by media type (RJ45 or SFP)."""

    rj45: SwitchRj452 | None = None
    sfp: SwitchRj452 | None = None


class SwitchByMediaAndLinkSpeed(_BaseSchema):
    """The active count data, indexed by media type (RJ45 or SFP)."""

    rj45: SwitchRj45 | None = None
    sfp: SwitchSfp | None = None


class SwitchByStatus(_BaseSchema):
    """Associated client count on access point by status."""

    online: int | None = None


class SwitchCache(_BaseSchema):
    """Object for RADIUS Cache Settings."""

    enabled: bool | None = None
    timeout: int | None = None


class SwitchCdp(_BaseSchema):
    """The Cisco Discovery Protocol (CDP) information of the connected device."""

    system_name: str | None = Field(default=None, alias="systemName")
    platform: str | None = None
    device_id: str | None = Field(default=None, alias="deviceId")
    port_id: str | None = Field(default=None, alias="portId")
    native_vlan: int | None = Field(default=None, alias="nativeVlan")
    address: str | None = None
    management_address: str | None = Field(default=None, alias="managementAddress")
    version: str | None = None
    vtp_management_domain: str | None = Field(default=None, alias="vtpManagementDomain")
    capabilities: str | None = None


class SwitchConfigOverrides(_BaseSchema):
    """The configuration overrides applied to this port when Secure Port is active."""

    type_: str | None = Field(default=None, alias="type")
    vlan: int | None = None
    voice_vlan: int | None = Field(default=None, alias="voiceVlan")
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")


class SwitchCounts(_BaseSchema):
    """Counts associated with the access policy."""

    ports: SwitchPorts | None = None


class SwitchCounts2(_BaseSchema):
    """Number of clients on the port in a given time."""

    by_status: SwitchByStatus | None = Field(default=None, alias="byStatus")


class SwitchCountsByStatus(_BaseSchema):
    """The count data, indexed by active or inactive status."""

    active: SwitchActive | None = None
    inactive: SwitchInactive | None = None


class SwitchCriticalAuth(_BaseSchema):
    """Critical auth settings for when authentication is rejected by the RADIUS server."""

    data_vlan_id: int | None = Field(default=None, alias="dataVlanId")
    voice_vlan_id: int | None = Field(default=None, alias="voiceVlanId")
    suspend_port_bounce: bool | None = Field(default=None, alias="suspendPortBounce")
    data_group_policy_id: str | None = Field(default=None, alias="dataGroupPolicyId")
    voice_group_policy_id: str | None = Field(default=None, alias="voiceGroupPolicyId")
    data_sgt_id: int | None = Field(default=None, alias="dataSgtId")
    voice_sgt_id: int | None = Field(default=None, alias="voiceSgtId")


class SwitchData(_BaseSchema):
    """A breakdown of how many kilobytes have passed through this port during the interval
    timespan.
    """

    usage: SwitchUsage | None = None


class SwitchDevice(_BaseSchema):
    """Attributes of the server when it's a device."""

    serial: str | None = None
    name: str | None = None
    url: str | None = None
    interface: SwitchInterface | None = None


class SwitchDot1x(_BaseSchema):
    """802.1x Settings."""

    control_direction: str | None = Field(default=None, alias="controlDirection")


class SwitchDot3az(_BaseSchema):
    """dot3az settings for the port."""

    enabled: bool | None = None


class SwitchDscp(_BaseSchema):
    """DSCP attributes of the packet."""

    tag: int | None = None
    ecn: int | None = None


class SwitchEnergy(_BaseSchema):
    """How much energy (in watt-hours) has been delivered by this port during the interval."""

    usage: SwitchUsage3 | None = None


class SwitchEthernet(_BaseSchema):
    """Additional ethernet attributes of the packet."""

    type_: str | None = Field(default=None, alias="type")


class SwitchFields(_BaseSchema):
    """DHCP-specific fields of the packet."""

    op: int | None = None
    htype: int | None = None
    hlen: int | None = None
    hops: int | None = None
    xid: str | None = None
    secs: int | None = None
    flags: str | None = None
    ciaddr: str | None = None
    yiaddr: str | None = None
    siaddr: str | None = None
    giaddr: str | None = None
    chaddr: str | None = None
    sname: str | None = None
    magic_cookie: str | None = Field(default=None, alias="magicCookie")
    options: list[SwitchOptionsItem] | None = None


class SwitchInactive(_BaseSchema):
    """The count data for inactive ports."""

    total: int | None = None
    by_media: SwitchByMedia | None = Field(default=None, alias="byMedia")


class SwitchInterface(_BaseSchema):
    """Interface attributes of the server. Only for configured servers."""

    name: str | None = None
    url: str | None = None


class SwitchIntervalsItem(_BaseSchema):
    """Schema for SwitchIntervalsItem."""

    start_ts: datetime | None = Field(default=None, alias="startTs")
    end_ts: datetime | None = Field(default=None, alias="endTs")
    data: SwitchData | None = None
    bandwidth: SwitchBandwidth | None = None
    energy: SwitchEnergy | None = None


class SwitchIp(_BaseSchema):
    """Additional IP attributes of the packet."""

    id: str | None = None
    version: int | None = None
    length: int | None = None
    header_length: int | None = Field(default=None, alias="headerLength")
    protocol: int | None = None
    ttl: int | None = None
    dscp: SwitchDscp | None = None


class SwitchIpv4(_BaseSchema):
    """IPv4 attributes of the server."""

    address: str | None = None
    subnet: str | None = None
    gateway: str | None = None


class SwitchIpv42(_BaseSchema):
    """IPv4 attributes of the last ack."""

    address: str | None = None


class SwitchIpv6(_BaseSchema):
    """IPv6 addressing."""

    assignment_mode: str | None = Field(default=None, alias="assignmentMode")
    address: str | None = None
    prefix: str | None = None
    gateway: str | None = None


class SwitchItems(_BaseSchema):
    """Counts relating to the paginated items."""

    total: int | None = None
    remaining: int | None = None


class SwitchLastAck(_BaseSchema):
    """Attributes of the server's last ack."""

    ts: datetime | None = None
    ipv4: SwitchIpv42 | None = None


class SwitchLastPacket(_BaseSchema):
    """Last packet the server received."""

    source: SwitchSource | None = None
    destination: SwitchSource | None = None
    type_: str | None = Field(default=None, alias="type")
    ethernet: SwitchEthernet | None = None
    ip: SwitchIp | None = None
    udp: SwitchUdp | None = None
    fields: SwitchFields | None = None


class SwitchLldp(_BaseSchema):
    """The Link Layer Discovery Protocol (LLDP) information of the connected device."""

    system_name: str | None = Field(default=None, alias="systemName")
    system_description: str | None = Field(default=None, alias="systemDescription")
    chassis_id: str | None = Field(default=None, alias="chassisId")
    port_id: str | None = Field(default=None, alias="portId")
    management_vlan: int | None = Field(default=None, alias="managementVlan")
    port_vlan: int | None = Field(default=None, alias="portVlan")
    management_address: str | None = Field(default=None, alias="managementAddress")
    port_description: str | None = Field(default=None, alias="portDescription")
    system_capabilities: str | None = Field(default=None, alias="systemCapabilities")


class SwitchMembersItem(_BaseSchema):
    """Schema for SwitchMembersItem."""

    serial: str | None = None
    name: str | None = None
    model: str | None = None
    mac: str | None = None
    role: str | None = None


class SwitchMetaCounts(_BaseSchema):
    """Counts relating to the paginated dataset."""

    items: SwitchItems | None = None


class SwitchMirror(_BaseSchema):
    """Port mirror."""

    mode: str | None = None


class SwitchModule(_BaseSchema):
    """Expansion module."""

    model: str | None = None
    serial: str | None = None
    slot: int | None = None


class SwitchMonday(_BaseSchema):
    """Monday schedule."""

    active: bool | None = None
    from_: str | None = Field(default=None, alias="from")
    to: str | None = None


class SwitchOptionsItem(_BaseSchema):
    """Schema for SwitchOptionsItem."""

    name: str | None = None
    value: str | None = None


class SwitchOspfSettings(_BaseSchema):
    """IPv4 OSPF Settings."""

    area: str | None = None
    cost: int | None = None
    is_passive_enabled: bool | None = Field(default=None, alias="isPassiveEnabled")
    network_type: str | None = Field(default=None, alias="networkType")


class SwitchPacketsItem(_BaseSchema):
    """Schema for SwitchPacketsItem."""

    desc: str | None = None
    total: int | None = None
    sent: int | None = None
    recv: int | None = None
    rate_per_sec: SwitchUsageInKb | None = Field(default=None, alias="ratePerSec")


class SwitchPoe(_BaseSchema):
    """PoE status of the port."""

    is_allocated: bool | None = Field(default=None, alias="isAllocated")


class SwitchPortSchedule(_BaseSchema):
    """Port schedule."""

    monday: SwitchMonday | None = None
    tuesday: SwitchMonday | None = None
    wednesday: SwitchMonday | None = None
    thursday: SwitchMonday | None = None
    friday: SwitchMonday | None = None
    saturday: SwitchMonday | None = None
    sunday: SwitchMonday | None = None


class SwitchPorts(_BaseSchema):
    """Counts associated with ports."""

    with_this_policy: int | None = Field(default=None, alias="withThisPolicy")


class SwitchPortsItem(_BaseSchema):
    """Schema for SwitchPortsItem."""

    port_id: str | None = Field(default=None, alias="portId")
    counts: SwitchCounts2 | None = None


class SwitchPortsItem2(_BaseSchema):
    """Schema for SwitchPortsItem2."""

    port_id: str | None = Field(default=None, alias="portId")
    enabled: bool | None = None
    status: str | None = None
    is_uplink: bool | None = Field(default=None, alias="isUplink")
    errors: list[str] | None = None
    warnings: list[str] | None = None
    speed: str | None = None
    duplex: str | None = None
    spanning_tree: SwitchSpanningTree | None = Field(default=None, alias="spanningTree")
    poe: SwitchPoe | None = None
    secure_port: SwitchSecurePort2 | None = Field(default=None, alias="securePort")


class SwitchPortsItem3(_BaseSchema):
    """Schema for SwitchPortsItem3."""

    port_id: str | None = Field(default=None, alias="portId")
    last_updated_at: str | None = Field(default=None, alias="lastUpdatedAt")
    cdp: list[SwitchOptionsItem] | None = None
    lldp: list[SwitchOptionsItem] | None = None


class SwitchPortsItem4(_BaseSchema):
    """Schema for SwitchPortsItem4."""

    port_id: str | None = Field(default=None, alias="portId")
    intervals: list[SwitchIntervalsItem] | None = None


class SwitchProfile(_BaseSchema):
    """Profile attributes."""

    enabled: bool | None = None
    id: str | None = None
    iname: str | None = None


class SwitchRadius(_BaseSchema):
    """Object for RADIUS Settings."""

    critical_auth: SwitchCriticalAuth | None = Field(default=None, alias="criticalAuth")
    failed_auth_vlan_id: int | None = Field(default=None, alias="failedAuthVlanId")
    failed_auth_group_policy_id: str | None = Field(default=None, alias="failedAuthGroupPolicyId")
    failed_auth_sgt_id: int | None = Field(default=None, alias="failedAuthSgtId")
    re_authentication_interval: int | None = Field(default=None, alias="reAuthenticationInterval")
    cache: SwitchCache | None = None
    authentication: SwitchAuthentication | None = None
    pre_authentication_group_policy_id: str | None = Field(
        default=None, alias="preAuthenticationGroupPolicyId"
    )


class SwitchRadiusServersItem(_BaseSchema):
    """Schema for SwitchRadiusServersItem."""

    server_id: str | None = Field(default=None, alias="serverId")
    organization_radius_server_id: str | None = Field(
        default=None, alias="organizationRadiusServerId"
    )
    host: str | None = None
    port: int | None = None


class SwitchRj45(_BaseSchema):
    """The count data for RJ45 ports, indexed by speed in Mb."""

    total: int | None = None
    n_10: int | None = Field(default=None, alias="10")
    n_100: int | None = Field(default=None, alias="100")
    n_1000: int | None = Field(default=None, alias="1000")
    n_2500: int | None = Field(default=None, alias="2500")
    n_5000: int | None = Field(default=None, alias="5000")
    n_10000: int | None = Field(default=None, alias="10000")


class SwitchRj452(_BaseSchema):
    """The count data for inactive RJ45 ports."""

    total: int | None = None


class SwitchSchedule(_BaseSchema):
    """The port schedule data."""

    id: str | None = None
    name: str | None = None


class SwitchSecurePort(_BaseSchema):
    """The Secure Port status of the port."""

    enabled: bool | None = None
    active: bool | None = None
    authentication_status: str | None = Field(default=None, alias="authenticationStatus")
    config_overrides: SwitchConfigOverrides | None = Field(default=None, alias="configOverrides")


class SwitchSecurePort2(_BaseSchema):
    """The Secure Port status of the port."""

    active: bool | None = None
    authentication_status: str | None = Field(default=None, alias="authenticationStatus")


class SwitchSeenByItem(_BaseSchema):
    """Schema for SwitchSeenByItem."""

    serial: str | None = None
    name: str | None = None
    url: str | None = None


class SwitchSfp(_BaseSchema):
    """The count data for SFP ports, indexed by speed in Mb."""

    total: int | None = None
    n_100: int | None = Field(default=None, alias="100")
    n_1000: int | None = Field(default=None, alias="1000")
    n_10000: int | None = Field(default=None, alias="10000")
    n_20000: int | None = Field(default=None, alias="20000")
    n_25000: int | None = Field(default=None, alias="25000")
    n_40000: int | None = Field(default=None, alias="40000")
    n_50000: int | None = Field(default=None, alias="50000")
    n_100000: int | None = Field(default=None, alias="100000")


class SwitchSource(_BaseSchema):
    """Source of the packet."""

    mac: str | None = None
    ipv4: SwitchIpv42 | None = None
    port: int | None = None


class SwitchSpanningTree(_BaseSchema):
    """The Spanning Tree Protocol (STP) information of the connected device."""

    statuses: list[str] | None = None


class SwitchSwitchPortsItem(_BaseSchema):
    """Schema for SwitchSwitchPortsItem."""

    serial: str | None = None
    port_id: str | None = Field(default=None, alias="portId")


class SwitchTrafficInKbps(_BaseSchema):
    """A breakdown of the average speed of data that has passed through this port during the
    timespan.
    """

    total: float | None = None
    sent: float | None = None
    recv: float | None = None


class SwitchUdp(_BaseSchema):
    """UDP attributes of the packet."""

    length: int | None = None
    checksum: str | None = None


class SwitchUsage(_BaseSchema):
    """Usage data for the given interval."""

    total: int | None = None
    upstream: int | None = None
    downstream: int | None = None


class SwitchUsage2(_BaseSchema):
    """Bandwidth usage data for the given interval."""

    total: float | None = None
    upstream: float | None = None
    downstream: float | None = None


class SwitchUsage3(_BaseSchema):
    """Energy data for the given interval."""

    total: float | None = None


class SwitchUsageInKb(_BaseSchema):
    """A breakdown of how many kilobytes have passed through this port during the timespan."""

    total: int | None = None
    sent: int | None = None
    recv: int | None = None


class SwitchVrf(_BaseSchema):
    """VRF settings. Included on networks with IOS XE 17.18 or higher."""

    name: str | None = None


class SwitchVrf2(_BaseSchema):
    """VRF settings. Included on networks with IOS XE 17.18 or higher."""

    name: str | None = None
    leak_route_to_default_vrf: bool | None = Field(default=None, alias="leakRouteToDefaultVrf")


class UpdateDeviceSwitchPortDot3az(_BaseSchema):
    """dot3az settings for the port."""

    enabled: bool | None = None


class UpdateDeviceSwitchPortHighSpeed(_BaseSchema):
    """High speed port enablement settings for C9500-32QC."""

    enabled: bool | None = None


class UpdateDeviceSwitchPortProfile(_BaseSchema):
    """Profile attributes."""

    enabled: bool | None = None
    id: str | None = None
    iname: str | None = None


class UpdateDeviceSwitchPortResponse(_BaseSchema):
    """Response for updateDeviceSwitchPort operation."""

    port_id: str | None = Field(default=None, alias="portId")
    name: str | None = None
    tags: list[str] | None = None
    enabled: bool | None = None
    poe_enabled: bool | None = Field(default=None, alias="poeEnabled")
    type_: str | None = Field(default=None, alias="type")
    vlan: int | None = None
    voice_vlan: int | None = Field(default=None, alias="voiceVlan")
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    isolation_enabled: bool | None = Field(default=None, alias="isolationEnabled")
    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_guard: str | None = Field(default=None, alias="stpGuard")
    stp_port_fast_trunk: bool | None = Field(default=None, alias="stpPortFastTrunk")
    link_negotiation: str | None = Field(default=None, alias="linkNegotiation")
    link_negotiation_capabilities: list[str] | None = Field(
        default=None, alias="linkNegotiationCapabilities"
    )
    port_schedule_id: str | None = Field(default=None, alias="portScheduleId")
    schedule: SwitchSchedule | None = None
    udld: str | None = None
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    access_policy_number: int | None = Field(default=None, alias="accessPolicyNumber")
    mac_allow_list: list[str] | None = Field(default=None, alias="macAllowList")
    mac_whitelist_limit: int | None = Field(default=None, alias="macWhitelistLimit")
    sticky_mac_allow_list: list[str] | None = Field(default=None, alias="stickyMacAllowList")
    sticky_mac_allow_list_limit: int | None = Field(default=None, alias="stickyMacAllowListLimit")
    storm_control_enabled: bool | None = Field(default=None, alias="stormControlEnabled")
    adaptive_policy_group_id: str | None = Field(default=None, alias="adaptivePolicyGroupId")
    adaptive_policy_group: SwitchSchedule | None = Field(default=None, alias="adaptivePolicyGroup")
    peer_sgt_capable: bool | None = Field(default=None, alias="peerSgtCapable")
    flexible_stacking_enabled: bool | None = Field(default=None, alias="flexibleStackingEnabled")
    dai_trusted: bool | None = Field(default=None, alias="daiTrusted")
    profile: SwitchProfile | None = None
    module: SwitchModule | None = None
    mirror: SwitchMirror | None = None
    dot3az: SwitchDot3az | None = None
    high_speed: SwitchDot3az | None = Field(default=None, alias="highSpeed")


class UpdateDeviceSwitchRoutingInterfaceDhcpDhcpOptionsItem(_BaseSchema):
    """Item schema for dhcpOptions."""

    code: str
    type_: str = Field(alias="type")
    value: str


class UpdateDeviceSwitchRoutingInterfaceDhcpFixedIpAssignmentsItem(_BaseSchema):
    """Item schema for fixedIpAssignments."""

    name: str
    mac: str
    ip: str


class UpdateDeviceSwitchRoutingInterfaceDhcpReservedIpRangesItem(_BaseSchema):
    """Item schema for reservedIpRanges."""

    start: str
    end: str
    comment: str | None = None


class UpdateDeviceSwitchRoutingInterfaceDhcpResponse(_BaseSchema):
    """Response for updateDeviceSwitchRoutingInterfaceDhcp operation."""

    dhcp_mode: str | None = Field(default=None, alias="dhcpMode")
    dhcp_relay_server_ips: list[str] | None = Field(default=None, alias="dhcpRelayServerIps")
    dhcp_lease_time: str | None = Field(default=None, alias="dhcpLeaseTime")
    dns_nameservers_option: str | None = Field(default=None, alias="dnsNameserversOption")
    dns_custom_nameservers: list[str] | None = Field(default=None, alias="dnsCustomNameservers")
    boot_options_enabled: bool | None = Field(default=None, alias="bootOptionsEnabled")
    boot_next_server: str | None = Field(default=None, alias="bootNextServer")
    boot_file_name: str | None = Field(default=None, alias="bootFileName")
    dhcp_options: list[GetDeviceSwitchRoutingInterfaceDhcpResponseDhcpOptionsItem] | None = Field(
        default=None, alias="dhcpOptions"
    )
    reserved_ip_ranges: (
        list[GetDeviceSwitchRoutingInterfaceDhcpResponseReservedIpRangesItem] | None
    ) = Field(default=None, alias="reservedIpRanges")
    fixed_ip_assignments: (
        list[GetDeviceSwitchRoutingInterfaceDhcpResponseFixedIpAssignmentsItem] | None
    ) = Field(default=None, alias="fixedIpAssignments")


class UpdateDeviceSwitchRoutingInterfaceIpv6(_BaseSchema):
    """The IPv6 settings of the interface."""

    assignment_mode: str | None = Field(default=None, alias="assignmentMode")
    prefix: str | None = None
    address: str | None = None
    gateway: str | None = None


class UpdateDeviceSwitchRoutingInterfaceOspfSettings(_BaseSchema):
    """The OSPF routing settings of the interface."""

    area: str | None = None
    cost: int | None = None
    is_passive_enabled: bool | None = Field(default=None, alias="isPassiveEnabled")
    network_type: str | None = Field(default=None, alias="networkType")


class UpdateDeviceSwitchRoutingInterfaceResponse(_BaseSchema):
    """Response for updateDeviceSwitchRoutingInterface operation."""

    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    mode: str | None = None
    subnet: str | None = None
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    serial: str | None = None
    switch_port_id: str | None = Field(default=None, alias="switchPortId")
    multicast_routing: str | None = Field(default=None, alias="multicastRouting")
    vlan_id: int | None = Field(default=None, alias="vlanId")
    uplink_v4: bool | None = Field(default=None, alias="uplinkV4")
    uplink_v6: bool | None = Field(default=None, alias="uplinkV6")
    ospf_settings: SwitchOspfSettings | None = Field(default=None, alias="ospfSettings")
    ospf_v3: SwitchOspfSettings | None = Field(default=None, alias="ospfV3")
    ipv6: SwitchIpv6 | None = None
    vrf: SwitchVrf | None = None
    loopback: dict[str, Any] | None = None
    default_gateway: str | None = Field(default=None, alias="defaultGateway")


class UpdateDeviceSwitchRoutingInterfaceVrf(_BaseSchema):
    """The VRF settings of the interface. Requires IOS XE 17.18 or higher."""

    name: str | None = None


class UpdateDeviceSwitchRoutingStaticRouteResponse(_BaseSchema):
    """Response for updateDeviceSwitchRoutingStaticRoute operation."""

    static_route_id: str = Field(alias="staticRouteId")
    name: str | None = None
    subnet: str
    next_hop_ip: str = Field(alias="nextHopIp")
    management_next_hop: str | None = Field(default=None, alias="managementNextHop")
    vrf: SwitchVrf2 | None = None
    advertise_via_ospf_enabled: bool | None = Field(default=None, alias="advertiseViaOspfEnabled")
    prefer_over_ospf_routes_enabled: bool | None = Field(
        default=None, alias="preferOverOspfRoutesEnabled"
    )


class UpdateDeviceSwitchRoutingStaticRouteVrf(_BaseSchema):
    """The VRF settings of the interface. Requires IOS XE 17.18 or higher."""

    name: str | None = None
    leak_route_to_default_vrf: bool | None = Field(default=None, alias="leakRouteToDefaultVrf")


class UpdateDeviceSwitchWarmSpareResponse(_BaseSchema):
    """Response for updateDeviceSwitchWarmSpare operation."""

    enabled: bool | None = None
    primary_serial: str | None = Field(default=None, alias="primarySerial")
    spare_serial: str | None = Field(default=None, alias="spareSerial")


class UpdateNetworkSwitchAccessControlListsResponse(_BaseSchema):
    """Response for updateNetworkSwitchAccessControlLists operation."""

    rules: list[GetNetworkSwitchAccessControlListsResponseRulesItem] | None = None


class UpdateNetworkSwitchAccessControlListsRulesItem(_BaseSchema):
    """Item schema for rules."""

    comment: str | None = None
    policy: str
    ip_version: str | None = Field(default=None, alias="ipVersion")
    protocol: str
    src_cidr: str = Field(alias="srcCidr")
    src_port: str | None = Field(default=None, alias="srcPort")
    dst_cidr: str = Field(alias="dstCidr")
    dst_port: str | None = Field(default=None, alias="dstPort")
    vlan: str | None = None


class UpdateNetworkSwitchAccessPolicyDot1x(_BaseSchema):
    """802.1x Settings."""

    control_direction: str | None = Field(default=None, alias="controlDirection")


class UpdateNetworkSwitchAccessPolicyRadius(_BaseSchema):
    """Object for RADIUS Settings."""

    critical_auth: SwitchCriticalAuth | None = Field(default=None, alias="criticalAuth")
    failed_auth_vlan_id: int | None = Field(default=None, alias="failedAuthVlanId")
    failed_auth_group_policy_id: str | None = Field(default=None, alias="failedAuthGroupPolicyId")
    failed_auth_sgt_id: int | None = Field(default=None, alias="failedAuthSgtId")
    re_authentication_interval: int | None = Field(default=None, alias="reAuthenticationInterval")
    cache: SwitchCache | None = None
    authentication: CreateNetworkSwitchAccessPolicyRadiusAuthentication | None = None
    pre_authentication_group_policy_id: str | None = Field(
        default=None, alias="preAuthenticationGroupPolicyId"
    )


class UpdateNetworkSwitchAccessPolicyRadiusAccountingServersItem(_BaseSchema):
    """Item schema for radiusAccountingServers."""

    server_id: str | None = Field(default=None, alias="serverId")
    organization_radius_server_id: str | None = Field(
        default=None, alias="organizationRadiusServerId"
    )
    host: str | None = None
    port: int | None = None
    secret: str | None = None


class UpdateNetworkSwitchAccessPolicyRadiusServersItem(_BaseSchema):
    """Item schema for radiusServers."""

    server_id: str | None = Field(default=None, alias="serverId")
    organization_radius_server_id: str | None = Field(
        default=None, alias="organizationRadiusServerId"
    )
    host: str | None = None
    port: int | None = None
    secret: str | None = None


class UpdateNetworkSwitchAccessPolicyResponse(_BaseSchema):
    """Response for updateNetworkSwitchAccessPolicy operation."""

    access_policy_number: str | None = Field(default=None, alias="accessPolicyNumber")
    name: str | None = None
    radius_servers: list[SwitchRadiusServersItem] | None = Field(
        default=None, alias="radiusServers"
    )
    radius: SwitchRadius | None = None
    enforce_radius_monitoring: bool | None = Field(default=None, alias="enforceRadiusMonitoring")
    guest_port_bouncing: bool | None = Field(default=None, alias="guestPortBouncing")
    radius_testing_enabled: bool | None = Field(default=None, alias="radiusTestingEnabled")
    radius_coa_support_enabled: bool | None = Field(default=None, alias="radiusCoaSupportEnabled")
    radius_accounting_enabled: bool | None = Field(default=None, alias="radiusAccountingEnabled")
    radius_accounting_servers: list[SwitchRadiusServersItem] | None = Field(
        default=None, alias="radiusAccountingServers"
    )
    radius_group_attribute: str | None = Field(default=None, alias="radiusGroupAttribute")
    host_mode: str | None = Field(default=None, alias="hostMode")
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    increase_access_speed: bool | None = Field(default=None, alias="increaseAccessSpeed")
    guest_vlan_id: int | None = Field(default=None, alias="guestVlanId")
    dot1x: SwitchDot1x | None = None
    voice_vlan_clients: bool | None = Field(default=None, alias="voiceVlanClients")
    url_redirect_walled_garden_enabled: bool | None = Field(
        default=None, alias="urlRedirectWalledGardenEnabled"
    )
    url_redirect_walled_garden_ranges: list[str] | None = Field(
        default=None, alias="urlRedirectWalledGardenRanges"
    )
    counts: SwitchCounts | None = None
    guest_group_policy_id: str | None = Field(default=None, alias="guestGroupPolicyId")
    guest_sgt_id: int | None = Field(default=None, alias="guestSgtId")


class UpdateNetworkSwitchAlternateManagementInterfaceResponse(_BaseSchema):
    """Response for updateNetworkSwitchAlternateManagementInterface operation."""

    enabled: bool | None = None
    vlan_id: int | None = Field(default=None, alias="vlanId")
    protocols: list[str] | None = None
    switches: list[GetNetworkSwitchAlternateManagementInterfaceResponseSwitchesItem] | None = None


class UpdateNetworkSwitchAlternateManagementInterfaceSwitchesItem(_BaseSchema):
    """Item schema for switches."""

    serial: str
    alternate_management_ip: str = Field(alias="alternateManagementIp")
    subnet_mask: str | None = Field(default=None, alias="subnetMask")
    gateway: str | None = None


class UpdateNetworkSwitchDhcpServerPolicyAlerts(_BaseSchema):
    """Alert settings for DHCP servers."""

    email: SwitchDot3az | None = None


class UpdateNetworkSwitchDhcpServerPolicyArpInspection(_BaseSchema):
    """Dynamic ARP Inspection settings."""

    enabled: bool | None = None


class UpdateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServerIpv4(_BaseSchema):
    """The updated IPv4 attributes of the trusted server."""

    address: str | None = None


class UpdateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServerResponse(_BaseSchema):
    """Response for updateNetworkSwitchDhcpServerPolicyArpInspectionTrustedServer operation."""

    trusted_server_id: str | None = Field(default=None, alias="trustedServerId")
    mac: str | None = None
    vlan: int | None = None
    ipv4: SwitchIpv42 | None = None


class UpdateNetworkSwitchDhcpServerPolicyResponse(_BaseSchema):
    """Response for updateNetworkSwitchDhcpServerPolicy operation."""

    alerts: GetNetworkSwitchDhcpServerPolicyResponseAlerts | None = None
    default_policy: str | None = Field(default=None, alias="defaultPolicy")
    blocked_servers: list[str] | None = Field(default=None, alias="blockedServers")
    allowed_servers: list[str] | None = Field(default=None, alias="allowedServers")
    arp_inspection: GetNetworkSwitchDhcpServerPolicyResponseArpInspection | None = Field(
        default=None, alias="arpInspection"
    )


class UpdateNetworkSwitchDscpToCosMappingsMappingsItem(_BaseSchema):
    """Item schema for mappings."""

    dscp: int
    cos: int
    title: str | None = None


class UpdateNetworkSwitchDscpToCosMappingsResponse(_BaseSchema):
    """Response for updateNetworkSwitchDscpToCosMappings operation."""

    mappings: list[GetNetworkSwitchDscpToCosMappingsResponseMappingsItem] | None = None


class UpdateNetworkSwitchLinkAggregationResponse(_BaseSchema):
    """Response for updateNetworkSwitchLinkAggregation operation."""

    id: str | None = None
    switch_ports: list[SwitchSwitchPortsItem] | None = Field(default=None, alias="switchPorts")


class UpdateNetworkSwitchLinkAggregationSwitchPortsItem(_BaseSchema):
    """Item schema for switchPorts."""

    serial: str
    port_id: str = Field(alias="portId")


class UpdateNetworkSwitchLinkAggregationSwitchProfilePortsItem(_BaseSchema):
    """Item schema for switchProfilePorts."""

    profile: str
    port_id: str = Field(alias="portId")


class UpdateNetworkSwitchMtuOverridesItem(_BaseSchema):
    """Item schema for overrides."""

    switches: list[str] | None = None
    switch_profiles: list[str] | None = Field(default=None, alias="switchProfiles")
    mtu_size: int = Field(alias="mtuSize")


class UpdateNetworkSwitchMtuResponse(_BaseSchema):
    """Response for updateNetworkSwitchMtu operation."""

    default_mtu_size: int | None = Field(default=None, alias="defaultMtuSize")
    overrides: list[GetNetworkSwitchMtuResponseOverridesItem] | None = None


class UpdateNetworkSwitchPortSchedulePortSchedule(_BaseSchema):
    """The schedule for switch port scheduling. Schedules are applied to days of the week. When
    it's empty, default schedule with all days of a week are configured. Any unspecified day in
    the schedule is added as a default schedule configuration of the day.
    """

    monday: SwitchMonday | None = None
    tuesday: SwitchMonday | None = None
    wednesday: SwitchMonday | None = None
    thursday: SwitchMonday | None = None
    friday: SwitchMonday | None = None
    saturday: SwitchMonday | None = None
    sunday: SwitchMonday | None = None


class UpdateNetworkSwitchPortScheduleResponse(_BaseSchema):
    """Response for updateNetworkSwitchPortSchedule operation."""

    id: str | None = None
    network_id: str | None = Field(default=None, alias="networkId")
    name: str | None = None
    port_schedule: SwitchPortSchedule | None = Field(default=None, alias="portSchedule")


class UpdateNetworkSwitchQosRuleResponse(_BaseSchema):
    """Response for updateNetworkSwitchQosRule operation."""

    id: str | None = None
    vlan: int | None = None
    protocol: str | None = None
    src_port: int | None = Field(default=None, alias="srcPort")
    src_port_range: str | None = Field(default=None, alias="srcPortRange")
    dst_port: int | None = Field(default=None, alias="dstPort")
    dst_port_range: str | None = Field(default=None, alias="dstPortRange")
    dscp: int | None = None


class UpdateNetworkSwitchQosRulesOrderResponse(_BaseSchema):
    """Response for updateNetworkSwitchQosRulesOrder operation."""

    rule_ids: list[str] | None = Field(default=None, alias="ruleIds")


class UpdateNetworkSwitchRoutingMulticastDefaultSettings(_BaseSchema):
    """Default multicast setting for entire network. IGMP snooping and Flood unknown multicast
    traffic settings are enabled by default.
    """

    igmp_snooping_enabled: bool | None = Field(default=None, alias="igmpSnoopingEnabled")
    flood_unknown_multicast_traffic_enabled: bool | None = Field(
        default=None, alias="floodUnknownMulticastTrafficEnabled"
    )


class UpdateNetworkSwitchRoutingMulticastOverridesItem(_BaseSchema):
    """Item schema for overrides."""

    switch_profiles: list[str] | None = Field(default=None, alias="switchProfiles")
    switches: list[str] | None = None
    stacks: list[str] | None = None
    igmp_snooping_enabled: bool = Field(alias="igmpSnoopingEnabled")
    flood_unknown_multicast_traffic_enabled: bool = Field(
        alias="floodUnknownMulticastTrafficEnabled"
    )


class UpdateNetworkSwitchRoutingMulticastRendezvousPointResponse(_BaseSchema):
    """Response for updateNetworkSwitchRoutingMulticastRendezvousPoint operation."""

    rendezvous_point_id: str | None = Field(default=None, alias="rendezvousPointId")
    serial: str | None = None
    interface_name: str | None = Field(default=None, alias="interfaceName")
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    multicast_group: str | None = Field(default=None, alias="multicastGroup")


class UpdateNetworkSwitchRoutingMulticastRendezvousPointVrf(_BaseSchema):
    """The VRF with PIM enabled L3 interface."""

    name: str | None = None


class UpdateNetworkSwitchRoutingMulticastResponse(_BaseSchema):
    """Response for updateNetworkSwitchRoutingMulticast operation."""

    default_settings: GetNetworkSwitchRoutingMulticastResponseDefaultSettings | None = Field(
        default=None, alias="defaultSettings"
    )
    overrides: list[GetNetworkSwitchRoutingMulticastResponseOverridesItem] | None = None


class UpdateNetworkSwitchRoutingOspfAreasItem(_BaseSchema):
    """Item schema for areas."""

    area_id: str = Field(alias="areaId")
    area_name: str = Field(alias="areaName")
    area_type: str = Field(alias="areaType")


class UpdateNetworkSwitchRoutingOspfMd5AuthenticationKey(_BaseSchema):
    """MD5 authentication credentials. This param is only relevant if md5AuthenticationEnabled is
    true.
    """

    id: int | None = None
    passphrase: str | None = None


class UpdateNetworkSwitchRoutingOspfResponse(_BaseSchema):
    """Response for updateNetworkSwitchRoutingOspf operation."""

    enabled: bool | None = None
    hello_timer_in_seconds: int | None = Field(default=None, alias="helloTimerInSeconds")
    dead_timer_in_seconds: int | None = Field(default=None, alias="deadTimerInSeconds")
    areas: list[GetNetworkSwitchRoutingOspfResponseAreasItem] | None = None
    v3: GetNetworkSwitchRoutingOspfResponseV3 | None = None
    md5_authentication_enabled: bool | None = Field(default=None, alias="md5AuthenticationEnabled")
    md5_authentication_key: GetNetworkSwitchRoutingOspfResponseMd5AuthenticationKey | None = Field(
        default=None, alias="md5AuthenticationKey"
    )
    vrf: SwitchVrf | None = None


class UpdateNetworkSwitchRoutingOspfV3(_BaseSchema):
    """OSPF v3 configuration."""

    enabled: bool | None = None
    hello_timer_in_seconds: int | None = Field(default=None, alias="helloTimerInSeconds")
    dead_timer_in_seconds: int | None = Field(default=None, alias="deadTimerInSeconds")
    areas: list[UpdateNetworkSwitchRoutingOspfV3AreasItem] | None = None


class UpdateNetworkSwitchRoutingOspfV3AreasItem(_BaseSchema):
    """Schema for UpdateNetworkSwitchRoutingOspfV3AreasItem."""

    area_id: str = Field(alias="areaId")
    area_name: str = Field(alias="areaName")
    area_type: str = Field(alias="areaType")


class UpdateNetworkSwitchSettingsMacBlocklist(_BaseSchema):
    """MAC blocklist."""

    enabled: bool | None = None


class UpdateNetworkSwitchSettingsPowerExceptionsItem(_BaseSchema):
    """Item schema for powerExceptions."""

    serial: str
    power_type: str = Field(alias="powerType")


class UpdateNetworkSwitchSettingsResponse(_BaseSchema):
    """Response for updateNetworkSwitchSettings operation."""

    vlan: int | None = None
    use_combined_power: bool | None = Field(default=None, alias="useCombinedPower")
    power_exceptions: list[GetNetworkSwitchSettingsResponsePowerExceptionsItem] | None = Field(
        default=None, alias="powerExceptions"
    )
    uplink_client_sampling: SwitchDot3az | None = Field(default=None, alias="uplinkClientSampling")
    mac_blocklist: SwitchDot3az | None = Field(default=None, alias="macBlocklist")
    uplink_selection: GetNetworkSwitchSettingsResponseUplinkSelection | None = Field(
        default=None, alias="uplinkSelection"
    )


class UpdateNetworkSwitchSettingsUplinkClientSampling(_BaseSchema):
    """Uplink client sampling."""

    enabled: bool | None = None


class UpdateNetworkSwitchSettingsUplinkSelection(_BaseSchema):
    """Settings related to uplink selection on IOS-XE switches."""

    failback: UpdateNetworkSwitchSettingsUplinkSelectionFailback | None = None
    candidates: str | None = None


class UpdateNetworkSwitchSettingsUplinkSelectionFailback(_BaseSchema):
    """If a preferred uplink ever goes offline, we will periodically reattempt it."""

    enabled: bool


class UpdateNetworkSwitchStackRoutingInterfaceDhcpDhcpOptionsItem(_BaseSchema):
    """Item schema for dhcpOptions."""

    code: str
    type_: str = Field(alias="type")
    value: str


class UpdateNetworkSwitchStackRoutingInterfaceDhcpFixedIpAssignmentsItem(_BaseSchema):
    """Item schema for fixedIpAssignments."""

    name: str
    mac: str
    ip: str


class UpdateNetworkSwitchStackRoutingInterfaceDhcpReservedIpRangesItem(_BaseSchema):
    """Item schema for reservedIpRanges."""

    start: str
    end: str
    comment: str | None = None


class UpdateNetworkSwitchStackRoutingInterfaceDhcpResponse(_BaseSchema):
    """Response for updateNetworkSwitchStackRoutingInterfaceDhcp operation."""

    dhcp_mode: str | None = Field(default=None, alias="dhcpMode")
    dhcp_relay_server_ips: list[str] | None = Field(default=None, alias="dhcpRelayServerIps")
    dhcp_lease_time: str | None = Field(default=None, alias="dhcpLeaseTime")
    dns_nameservers_option: str | None = Field(default=None, alias="dnsNameserversOption")
    dns_custom_nameservers: list[str] | None = Field(default=None, alias="dnsCustomNameservers")
    boot_options_enabled: bool | None = Field(default=None, alias="bootOptionsEnabled")
    boot_next_server: str | None = Field(default=None, alias="bootNextServer")
    boot_file_name: str | None = Field(default=None, alias="bootFileName")
    dhcp_options: list[GetDeviceSwitchRoutingInterfaceDhcpResponseDhcpOptionsItem] | None = Field(
        default=None, alias="dhcpOptions"
    )
    reserved_ip_ranges: (
        list[GetDeviceSwitchRoutingInterfaceDhcpResponseReservedIpRangesItem] | None
    ) = Field(default=None, alias="reservedIpRanges")
    fixed_ip_assignments: (
        list[GetDeviceSwitchRoutingInterfaceDhcpResponseFixedIpAssignmentsItem] | None
    ) = Field(default=None, alias="fixedIpAssignments")


class UpdateNetworkSwitchStackRoutingInterfaceIpv6(_BaseSchema):
    """The IPv6 settings of the interface."""

    assignment_mode: str | None = Field(default=None, alias="assignmentMode")
    prefix: str | None = None
    address: str | None = None
    gateway: str | None = None


class UpdateNetworkSwitchStackRoutingInterfaceOspfSettings(_BaseSchema):
    """The OSPF routing settings of the interface."""

    area: str | None = None
    cost: int | None = None
    is_passive_enabled: bool | None = Field(default=None, alias="isPassiveEnabled")
    network_type: str | None = Field(default=None, alias="networkType")


class UpdateNetworkSwitchStackRoutingInterfaceResponse(_BaseSchema):
    """Response for updateNetworkSwitchStackRoutingInterface operation."""

    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    mode: str | None = None
    subnet: str | None = None
    interface_ip: str | None = Field(default=None, alias="interfaceIp")
    serial: str | None = None
    switch_port_id: str | None = Field(default=None, alias="switchPortId")
    multicast_routing: str | None = Field(default=None, alias="multicastRouting")
    vlan_id: int | None = Field(default=None, alias="vlanId")
    uplink_v4: bool | None = Field(default=None, alias="uplinkV4")
    uplink_v6: bool | None = Field(default=None, alias="uplinkV6")
    ospf_settings: SwitchOspfSettings | None = Field(default=None, alias="ospfSettings")
    ospf_v3: SwitchOspfSettings | None = Field(default=None, alias="ospfV3")
    ipv6: SwitchIpv6 | None = None
    vrf: SwitchVrf | None = None
    loopback: dict[str, Any] | None = None


class UpdateNetworkSwitchStackRoutingInterfaceVrf(_BaseSchema):
    """The VRF settings of the interface. Requires IOS XE 17.18 or higher."""

    name: str | None = None


class UpdateNetworkSwitchStackRoutingStaticRouteResponse(_BaseSchema):
    """Response for updateNetworkSwitchStackRoutingStaticRoute operation."""

    static_route_id: str = Field(alias="staticRouteId")
    name: str | None = None
    subnet: str
    next_hop_ip: str = Field(alias="nextHopIp")
    management_next_hop: str | None = Field(default=None, alias="managementNextHop")
    vrf: SwitchVrf2 | None = None
    advertise_via_ospf_enabled: bool | None = Field(default=None, alias="advertiseViaOspfEnabled")
    prefer_over_ospf_routes_enabled: bool | None = Field(
        default=None, alias="preferOverOspfRoutesEnabled"
    )


class UpdateNetworkSwitchStackRoutingStaticRouteVrf(_BaseSchema):
    """The VRF settings of the interface. Requires IOS XE 17.18 or higher."""

    name: str | None = None
    leak_route_to_default_vrf: bool | None = Field(default=None, alias="leakRouteToDefaultVrf")


class UpdateNetworkSwitchStormControlResponse(_BaseSchema):
    """Response for updateNetworkSwitchStormControl operation."""

    broadcast_threshold: int | None = Field(default=None, alias="broadcastThreshold")
    multicast_threshold: int | None = Field(default=None, alias="multicastThreshold")
    unknown_unicast_threshold: int | None = Field(default=None, alias="unknownUnicastThreshold")
    treat_these_traffic_types_as_one_threshold: list[str] | None = Field(
        default=None, alias="treatTheseTrafficTypesAsOneThreshold"
    )


class UpdateNetworkSwitchStpResponse(_BaseSchema):
    """Response for updateNetworkSwitchStp operation."""

    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_bridge_priority: list[GetNetworkSwitchStpResponseStpBridgePriorityItem] | None = Field(
        default=None, alias="stpBridgePriority"
    )


class UpdateNetworkSwitchStpStpBridgePriorityItem(_BaseSchema):
    """Item schema for stpBridgePriority."""

    switch_profiles: list[str] | None = Field(default=None, alias="switchProfiles")
    switches: list[str] | None = None
    stacks: list[str] | None = None
    stp_priority: int = Field(alias="stpPriority")


class UpdateOrganizationConfigTemplateSwitchProfilePortDot3az(_BaseSchema):
    """dot3az settings for the port."""

    enabled: bool | None = None


class UpdateOrganizationConfigTemplateSwitchProfilePortHighSpeed(_BaseSchema):
    """High speed port enablement settings for C9500-32QC."""

    enabled: bool | None = None


class UpdateOrganizationConfigTemplateSwitchProfilePortProfile(_BaseSchema):
    """Profile attributes."""

    enabled: bool | None = None
    id: str | None = None
    iname: str | None = None


class UpdateOrganizationConfigTemplateSwitchProfilePortResponse(_BaseSchema):
    """Response for updateOrganizationConfigTemplateSwitchProfilePort operation."""

    port_id: str | None = Field(default=None, alias="portId")
    name: str | None = None
    tags: list[str] | None = None
    enabled: bool | None = None
    poe_enabled: bool | None = Field(default=None, alias="poeEnabled")
    type_: str | None = Field(default=None, alias="type")
    vlan: int | None = None
    voice_vlan: int | None = Field(default=None, alias="voiceVlan")
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    isolation_enabled: bool | None = Field(default=None, alias="isolationEnabled")
    rstp_enabled: bool | None = Field(default=None, alias="rstpEnabled")
    stp_guard: str | None = Field(default=None, alias="stpGuard")
    stp_port_fast_trunk: bool | None = Field(default=None, alias="stpPortFastTrunk")
    link_negotiation: str | None = Field(default=None, alias="linkNegotiation")
    link_negotiation_capabilities: list[str] | None = Field(
        default=None, alias="linkNegotiationCapabilities"
    )
    port_schedule_id: str | None = Field(default=None, alias="portScheduleId")
    schedule: SwitchSchedule | None = None
    udld: str | None = None
    access_policy_type: str | None = Field(default=None, alias="accessPolicyType")
    access_policy_number: int | None = Field(default=None, alias="accessPolicyNumber")
    mac_allow_list: list[str] | None = Field(default=None, alias="macAllowList")
    mac_whitelist_limit: int | None = Field(default=None, alias="macWhitelistLimit")
    sticky_mac_allow_list: list[str] | None = Field(default=None, alias="stickyMacAllowList")
    sticky_mac_allow_list_limit: int | None = Field(default=None, alias="stickyMacAllowListLimit")
    storm_control_enabled: bool | None = Field(default=None, alias="stormControlEnabled")
    flexible_stacking_enabled: bool | None = Field(default=None, alias="flexibleStackingEnabled")
    dai_trusted: bool | None = Field(default=None, alias="daiTrusted")
    profile: SwitchProfile | None = None
    module: SwitchModule | None = None
    mirror: SwitchMirror | None = None
    dot3az: SwitchDot3az | None = None
    high_speed: SwitchDot3az | None = Field(default=None, alias="highSpeed")
