"""Response schemas for appliance 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 Appliance1(_BaseSchema):
    """Settings for SSID 1."""

    band_operation_mode: str | None = Field(default=None, alias="bandOperationMode")
    band_steering_enabled: bool | None = Field(default=None, alias="bandSteeringEnabled")


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

    id: str | None = None
    name: str | None = None
    applications: (
        list[GetNetworkApplianceContentFilteringResponseBlockedUrlCategoriesItem] | None
    ) = None


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

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


class ApplianceAssignedFiveGhzSettings(_BaseSchema):
    """Settings related to 5Ghz band."""

    min_bitrate: int | None = Field(default=None, alias="minBitrate")
    ax_enabled: bool | None = Field(default=None, alias="axEnabled")


class ApplianceAssignedPerSsidSettings(_BaseSchema):
    """Per-SSID radio settings by number."""

    n_1: Appliance1 | None = Field(default=None, alias="1")
    n_2: Appliance1 | None = Field(default=None, alias="2")
    n_3: Appliance1 | None = Field(default=None, alias="3")
    n_4: Appliance1 | None = Field(default=None, alias="4")


class ApplianceAssignedTwoFourGhzSettings(_BaseSchema):
    """Settings related to 2.4Ghz band."""

    min_bitrate: float | None = Field(default=None, alias="minBitrate")
    ax_enabled: bool | None = Field(default=None, alias="axEnabled")


class ApplianceAuthentication(_BaseSchema):
    """Settings for PPPoE Authentication."""

    enabled: bool | None = None
    username: str | None = None


class ApplianceAuthentication2(_BaseSchema):
    """Settings for PPPoE Authentication."""

    enabled: bool | None = None
    username: str | None = None
    password: str | None = None


class ApplianceBandwidthLimits(_BaseSchema):
    """The bandwidth limits object, specifying the upload ('limitUp') and download ('limitDown')
    speed in Kbps. These are only enforced if 'settings' is set to 'custom'.
    """

    limit_up: int | None = Field(default=None, alias="limitUp")
    limit_down: int | None = Field(default=None, alias="limitDown")


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

    interface: str | None = None
    sent: int | None = None
    received: int | None = None


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

    serial: str | None = None
    interface: str | None = None
    sent: int | None = None
    received: int | None = None


class ApplianceCountsByStatus(_BaseSchema):
    """byStatus."""

    active: int | None = None
    ready: int | None = None
    failed: int | None = None
    connecting: int | None = None
    not_connected: int | None = Field(default=None, alias="notConnected")


class ApplianceDestination(_BaseSchema):
    """Destination of 'custom' type traffic filter."""

    port: str | None = None
    cidr: str | None = None
    applications: list[ApplianceApplicationsItem] | None = None


class ApplianceDestination2(_BaseSchema):
    """Destination of 'custom' type traffic filter."""

    port: str | None = None
    cidr: str | None = None
    network: str | None = None
    vlan: int | None = None
    host: int | None = None
    fqdn: str | None = None


class ApplianceDestination3(_BaseSchema):
    """Destination of this custom type traffic filter."""

    port: str | None = None
    cidr: str | None = None


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

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


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

    subnet: str | None = None
    name: str | None = None


class ApplianceFailover(_BaseSchema):
    """[optional] Contains the failover configuration for the group."""

    direct_to_internet: bool | None = Field(default=None, alias="directToInternet")


class ApplianceFailoverAndFailbackImmediate(_BaseSchema):
    """Immediate WAN failover and failback."""

    enabled: bool


class ApplianceHighAvailability(_BaseSchema):
    """Device High Availability Capabilities."""

    enabled: bool | None = None
    role: str | None = None


class ApplianceInterfacesWan1(_BaseSchema):
    """WAN 1 settings."""

    enabled: bool | None = None
    vlan_tagging: ApplianceVlanTagging | None = Field(default=None, alias="vlanTagging")
    svis: ApplianceSvis | None = None
    pppoe: AppliancePppoe | None = None


class ApplianceIpsec(_BaseSchema):
    """IPsec configuration data."""

    peer_ids: list[str] | None = Field(default=None, alias="peerIds")


class ApplianceIpv4(_BaseSchema):
    """IPv4 settings for static/dynamic mode."""

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


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

    autonomous: bool | None = None
    static_prefix: str | None = Field(default=None, alias="staticPrefix")
    static_appliance_ip6: str | None = Field(default=None, alias="staticApplianceIp6")
    origin: ApplianceOrigin2 | None = None


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

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


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

    sender_uplink: str | None = Field(default=None, alias="senderUplink")
    receiver_uplink: str | None = Field(default=None, alias="receiverUplink")
    avg_jitter: float | None = Field(default=None, alias="avgJitter")
    min_jitter: float | None = Field(default=None, alias="minJitter")
    max_jitter: float | None = Field(default=None, alias="maxJitter")


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

    sender_uplink: str | None = Field(default=None, alias="senderUplink")
    receiver_uplink: str | None = Field(default=None, alias="receiverUplink")
    avg_latency_ms: int | None = Field(default=None, alias="avgLatencyMs")
    min_latency_ms: int | None = Field(default=None, alias="minLatencyMs")
    max_latency_ms: int | None = Field(default=None, alias="maxLatencyMs")


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

    sender_uplink: str | None = Field(default=None, alias="senderUplink")
    receiver_uplink: str | None = Field(default=None, alias="receiverUplink")
    avg_loss_percentage: float | None = Field(default=None, alias="avgLossPercentage")
    min_loss_percentage: float | None = Field(default=None, alias="minLossPercentage")
    max_loss_percentage: float | None = Field(default=None, alias="maxLossPercentage")


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

    network_id: str | None = Field(default=None, alias="networkId")
    network_name: str | None = Field(default=None, alias="networkName")
    usage_summary: ApplianceUsageSummary | None = Field(default=None, alias="usageSummary")
    latency_summaries: list[ApplianceLatencySummariesItem] | None = Field(
        default=None, alias="latencySummaries"
    )
    loss_percentage_summaries: list[ApplianceLossPercentageSummariesItem] | None = Field(
        default=None, alias="lossPercentageSummaries"
    )
    jitter_summaries: list[ApplianceJitterSummariesItem] | None = Field(
        default=None, alias="jitterSummaries"
    )
    mos_summaries: list[ApplianceMosSummariesItem] | None = Field(
        default=None, alias="mosSummaries"
    )


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

    network_id: str | None = Field(default=None, alias="networkId")
    network_name: str | None = Field(default=None, alias="networkName")
    reachability: str | None = None


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

    items: ApplianceItems | None = None


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

    sender_uplink: str | None = Field(default=None, alias="senderUplink")
    receiver_uplink: str | None = Field(default=None, alias="receiverUplink")
    avg_mos: float | None = Field(default=None, alias="avgMos")
    min_mos: float | None = Field(default=None, alias="minMos")
    max_mos: float | None = Field(default=None, alias="maxMos")


class ApplianceNameservers(_BaseSchema):
    """The nameserver settings for this SVI."""

    addresses: list[str] | None = None


class ApplianceNeighborsAuthentication(_BaseSchema):
    """Authentication settings between BGP peers."""

    password: str | None = None


class ApplianceNeighborsIpv6(_BaseSchema):
    """Information regarding IPv6 address of the neighbor."""

    address: str | None = None


class ApplianceNetwork(_BaseSchema):
    """The network attached to the profile."""

    id: str | None = None


class ApplianceOrigin(_BaseSchema):
    """WAN1/WAN2/Independent prefix."""

    type_: str | None = Field(default=None, alias="type")
    interfaces: list[str] | None = None


class ApplianceOrigin2(_BaseSchema):
    """The origin of the prefix."""

    type_: str | None = Field(default=None, alias="type")
    interfaces: list[str] | None = None


class ApplianceOrigin3(_BaseSchema):
    """The origin of the prefix."""

    type_: str = Field(alias="type")
    interfaces: list[str] | None = None


class AppliancePeersEbgpNeighbor(_BaseSchema):
    """[optional] The BGP neighbor configuration for the VPN peer. Supported only for MX 19.1 and
    above.
    """

    neighbor_id: int | None = Field(default=None, alias="neighborId")
    neighbor_ip: str | None = Field(default=None, alias="neighborIp")
    ip_version: int | None = Field(default=None, alias="ipVersion")
    remote_as_number: int | None = Field(default=None, alias="remoteAsNumber")
    ebgp_hold_timer: int | None = Field(default=None, alias="ebgpHoldTimer")
    ebgp_multihop: int | None = Field(default=None, alias="ebgpMultihop")
    source_ip: str | None = Field(default=None, alias="sourceIp")
    path_prepend: list[int] | None = Field(default=None, alias="pathPrepend")
    multi_exit_discriminator: int | None = Field(default=None, alias="multiExitDiscriminator")
    weight: int | None = None


class AppliancePeersGroup(_BaseSchema):
    """[optional] Contains the mapping between primary tunnel and backup tunnels."""

    number: int | None = None
    failover: ApplianceFailover | None = None
    active_active_tunnel: bool | None = Field(default=None, alias="activeActiveTunnel")


class AppliancePeersIpsecPolicies(_BaseSchema):
    """Custom IPSec policies for the VPN peer. If not included and a preset has not been chosen,
    the default preset for IPSec policies will be used.
    """

    ike_cipher_algo: list[str] | None = Field(default=None, alias="ikeCipherAlgo")
    ike_auth_algo: list[str] | None = Field(default=None, alias="ikeAuthAlgo")
    ike_prf_algo: list[str] | None = Field(default=None, alias="ikePrfAlgo")
    ike_diffie_hellman_group: list[str] | None = Field(default=None, alias="ikeDiffieHellmanGroup")
    ike_lifetime: int | None = Field(default=None, alias="ikeLifetime")
    child_cipher_algo: list[str] | None = Field(default=None, alias="childCipherAlgo")
    child_auth_algo: list[str] | None = Field(default=None, alias="childAuthAlgo")
    child_pfs_group: list[str] | None = Field(default=None, alias="childPfsGroup")
    child_lifetime: int | None = Field(default=None, alias="childLifetime")


class AppliancePeersNetwork(_BaseSchema):
    """[optional] A list of network Names and IDs that will connect with this peer. Supported only
    for MX 19.1 and above.
    """

    names: list[str] | None = None
    ids: list[str] | None = None


class AppliancePerformanceClass(_BaseSchema):
    """Performance class setting for uplink preference rule."""

    type_: str | None = Field(default=None, alias="type")
    builtin_performance_class_name: str | None = Field(
        default=None, alias="builtinPerformanceClassName"
    )
    custom_performance_class_id: str | None = Field(default=None, alias="customPerformanceClassId")


class AppliancePerformanceClass2(_BaseSchema):
    """Performance class setting for uplink preference rule."""

    type_: str = Field(alias="type")
    builtin_performance_class_name: str | None = Field(
        default=None, alias="builtinPerformanceClassName"
    )
    custom_performance_class_id: str | None = Field(default=None, alias="customPerformanceClassId")


class AppliancePppoe(_BaseSchema):
    """Configuration options for PPPoE."""

    enabled: bool | None = None
    authentication: ApplianceAuthentication | None = None


class AppliancePppoe2(_BaseSchema):
    """Configuration options for PPPoE."""

    enabled: bool | None = None
    authentication: ApplianceAuthentication2 | None = None


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

    host: str | None = None
    port: int | None = None


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

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


class ApplianceSource(_BaseSchema):
    """Source of traffic filter."""

    port: str | None = None
    cidr: str | None = None
    vlan: int | None = None
    host: int | None = None


class ApplianceSource2(_BaseSchema):
    """Source of 'custom' type traffic filter."""

    port: str | None = None
    cidr: str | None = None
    network: str | None = None
    vlan: int | None = None
    host: int | None = None


class ApplianceSubnetNat(_BaseSchema):
    """Configuration of NAT for subnets."""

    is_allowed: bool | None = Field(default=None, alias="isAllowed")


class ApplianceSubnetsNat(_BaseSchema):
    """Configuration of NAT for the subnet."""

    enabled: bool | None = None
    remote_subnet: str | None = Field(default=None, alias="remoteSubnet")


class ApplianceSvis(_BaseSchema):
    """SVI settings by protocol."""

    ipv4: ApplianceIpv4 | None = None
    ipv6: ApplianceIpv4 | None = None


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

    name: str | None = None
    public_ip: str | None = Field(default=None, alias="publicIp")
    reachability: str | None = None


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

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


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

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


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

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


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

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


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

    interface: str | None = None
    status: str | None = None
    ip: str | None = None
    gateway: str | None = None
    public_ip: str | None = Field(default=None, alias="publicIp")
    primary_dns: str | None = Field(default=None, alias="primaryDns")
    secondary_dns: str | None = Field(default=None, alias="secondaryDns")
    ip_assigned_by: str | None = Field(default=None, alias="ipAssignedBy")


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

    interface: str | None = None
    public_ip: str | None = Field(default=None, alias="publicIp")


class ApplianceUsageSummary(_BaseSchema):
    """Usage summary."""

    received_in_kilobytes: int | None = Field(default=None, alias="receivedInKilobytes")
    sent_in_kilobytes: int | None = Field(default=None, alias="sentInKilobytes")


class ApplianceValue(_BaseSchema):
    """Value of traffic filter."""

    protocol: str | None = None
    source: ApplianceSource
    destination: ApplianceDestination


class ApplianceValue2(_BaseSchema):
    """Value of traffic filter."""

    id: str | None = None
    protocol: str | None = None
    source: ApplianceSource2 | None = None
    destination: ApplianceDestination2 | None = None


class ApplianceValue3(_BaseSchema):
    """Value object of this traffic filter."""

    protocol: str | None = None
    source: ApplianceSource
    destination: ApplianceDestination3


class ApplianceVlanTagging(_BaseSchema):
    """VLAN tagging settings."""

    enabled: bool | None = None
    vlan_id: int | None = Field(default=None, alias="vlanId")


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

    traffic_filters: list[ApplianceTrafficFiltersItem3] = Field(alias="trafficFilters")
    preferred_uplink: str = Field(alias="preferredUplink")
    fail_over_criterion: str | None = Field(default=None, alias="failOverCriterion")
    performance_class: AppliancePerformanceClass2 | None = Field(
        default=None, alias="performanceClass"
    )


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

    preferred_uplink: str = Field(alias="preferredUplink")
    fail_over_criterion: str | None = Field(default=None, alias="failOverCriterion")
    performance_class: AppliancePerformanceClass | None = Field(
        default=None, alias="performanceClass"
    )
    traffic_filters: list[ApplianceTrafficFiltersItem] = Field(alias="trafficFilters")


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

    traffic_filters: list[ApplianceTrafficFiltersItem2] = Field(alias="trafficFilters")
    preferred_uplink: str = Field(alias="preferredUplink")


class BulkOrganizationApplianceDnsLocalProfilesAssignmentsCreateItemsItem(_BaseSchema):
    """Item schema for items."""

    network: ApplianceNetwork | None = None
    profile: ApplianceNetwork | None = None


class BulkOrganizationApplianceDnsLocalProfilesAssignmentsCreateResponse(_BaseSchema):
    """Response for bulkOrganizationApplianceDnsLocalProfilesAssignmentsCreate operation."""

    items: list[GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseItemsItem] | None = None


class CreateDeviceApplianceVmxAuthenticationTokenResponse(_BaseSchema):
    """Response for createDeviceApplianceVmxAuthenticationToken operation."""

    token: str | None = None
    expires_at: str | None = Field(default=None, alias="expiresAt")


class CreateNetworkAppliancePrefixesDelegatedStaticOrigin(_BaseSchema):
    """The origin of the prefix."""

    type_: str | None = Field(default=None, alias="type")
    interfaces: list[str] | None = None


class CreateNetworkApplianceRfProfileFiveGhzSettings(_BaseSchema):
    """Settings related to 5Ghz band."""

    min_bitrate: int | None = Field(default=None, alias="minBitrate")
    ax_enabled: bool | None = Field(default=None, alias="axEnabled")


class CreateNetworkApplianceRfProfilePerSsidSettings(_BaseSchema):
    """Per-SSID radio settings by number."""

    n_1: CreateNetworkApplianceRfProfilePerSsidSettings1 | None = Field(default=None, alias="1")
    n_2: CreateNetworkApplianceRfProfilePerSsidSettings1 | None = Field(default=None, alias="2")
    n_3: CreateNetworkApplianceRfProfilePerSsidSettings1 | None = Field(default=None, alias="3")
    n_4: CreateNetworkApplianceRfProfilePerSsidSettings1 | None = Field(default=None, alias="4")


class CreateNetworkApplianceRfProfilePerSsidSettings1(_BaseSchema):
    """Settings for SSID 1."""

    band_operation_mode: str | None = Field(default=None, alias="bandOperationMode")
    band_steering_enabled: bool | None = Field(default=None, alias="bandSteeringEnabled")


class CreateNetworkApplianceRfProfileResponse(_BaseSchema):
    """Response for createNetworkApplianceRfProfile operation."""

    id: str | None = None
    network_id: str | None = Field(default=None, alias="networkId")
    name: str | None = None
    two_four_ghz_settings: ApplianceAssignedTwoFourGhzSettings | None = Field(
        default=None, alias="twoFourGhzSettings"
    )
    five_ghz_settings: ApplianceAssignedFiveGhzSettings | None = Field(
        default=None, alias="fiveGhzSettings"
    )
    per_ssid_settings: ApplianceAssignedPerSsidSettings | None = Field(
        default=None, alias="perSsidSettings"
    )


class CreateNetworkApplianceRfProfileTwoFourGhzSettings(_BaseSchema):
    """Settings related to 2.4Ghz band."""

    min_bitrate: float | None = Field(default=None, alias="minBitrate")
    ax_enabled: bool | None = Field(default=None, alias="axEnabled")


class CreateNetworkApplianceStaticRouteResponse(_BaseSchema):
    """Response for createNetworkApplianceStaticRoute operation."""

    id: str | None = None
    ip_version: int | None = Field(default=None, alias="ipVersion")
    network_id: str | None = Field(default=None, alias="networkId")
    enabled: bool | None = None
    name: str | None = None
    subnet: str | None = None
    gateway_ip: str | None = Field(default=None, alias="gatewayIp")
    fixed_ip_assignments: dict[str, Any] | None = Field(default=None, alias="fixedIpAssignments")
    reserved_ip_ranges: list[ApplianceReservedIpRangesItem] | None = Field(
        default=None, alias="reservedIpRanges"
    )
    gateway_vlan_id: int | None = Field(default=None, alias="gatewayVlanId")


class CreateNetworkApplianceTrafficShapingCustomPerformanceClassResponse(_BaseSchema):
    """Response for createNetworkApplianceTrafficShapingCustomPerformanceClass operation."""

    name: str | None = None
    custom_performance_class_id: str | None = Field(default=None, alias="customPerformanceClassId")
    max_latency: int | None = Field(default=None, alias="maxLatency")
    max_jitter: int | None = Field(default=None, alias="maxJitter")
    max_loss_percentage: int | None = Field(default=None, alias="maxLossPercentage")


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

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


class CreateNetworkApplianceVlanIpv6(_BaseSchema):
    """IPv6 configuration on the VLAN."""

    enabled: bool | None = None
    prefix_assignments: list[UpdateNetworkApplianceSingleLanIpv6PrefixAssignmentsItem] | None = (
        Field(default=None, alias="prefixAssignments")
    )


class CreateNetworkApplianceVlanMandatoryDhcp(_BaseSchema):
    """Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address
    assigned by the DHCP server. Clients who use a static IP address won't be able to associate.
    Only available on firmware versions 17.0 and above.
    """

    enabled: bool | None = None


class CreateNetworkApplianceVlanResponse(_BaseSchema):
    """Response for createNetworkApplianceVlan operation."""

    id: str | None = None
    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    subnet: str | None = None
    appliance_ip: str | None = Field(default=None, alias="applianceIp")
    group_policy_id: str | None = Field(default=None, alias="groupPolicyId")
    template_vlan_type: str | None = Field(default=None, alias="templateVlanType")
    cidr: str | None = None
    mask: int | None = None
    mandatory_dhcp: GetNetworkApplianceSingleLanResponseMandatoryDhcp | None = Field(
        default=None, alias="mandatoryDhcp"
    )
    ipv6: GetNetworkApplianceSingleLanResponseIpv6 | None = None


class CreateOrganizationApplianceDnsLocalProfileResponse(_BaseSchema):
    """Response for createOrganizationApplianceDnsLocalProfile operation."""

    profile_id: str | None = Field(default=None, alias="profileId")
    name: str | None = None


class CreateOrganizationApplianceDnsLocalProfilesAssignmentsBulkDeleteItemsItem(_BaseSchema):
    """Item schema for items."""

    assignment_id: str | None = Field(default=None, alias="assignmentId")


class CreateOrganizationApplianceDnsLocalProfilesAssignmentsBulkDeleteResponse(_BaseSchema):
    """Response for createOrganizationApplianceDnsLocalProfilesAssignmentsBulkDelete operation."""

    items: list[GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseItemsItem] | None = None


class CreateOrganizationApplianceDnsLocalRecordProfile(_BaseSchema):
    """The profile the DNS record is associated with."""

    id: str | None = None


class CreateOrganizationApplianceDnsLocalRecordResponse(
    RootModel[list["CreateOrganizationApplianceDnsLocalRecordResponseItem"]]
):
    """Response for createOrganizationApplianceDnsLocalRecord operation."""


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

    record_id: str | None = Field(default=None, alias="recordId")
    hostname: str | None = None
    address: str | None = None
    profile: ApplianceNetwork | None = None


class CreateOrganizationApplianceDnsSplitProfileNameservers(_BaseSchema):
    """Contains the nameserver information for redirection."""

    addresses: list[str] | None = None


class CreateOrganizationApplianceDnsSplitProfileResponse(_BaseSchema):
    """Response for createOrganizationApplianceDnsSplitProfile operation."""

    profile_id: str | None = Field(default=None, alias="profileId")
    name: str | None = None
    hostnames: list[str] | None = None
    nameservers: ApplianceNameservers | None = None


class CreateOrganizationApplianceDnsSplitProfilesAssignmentsBulkCreateItemsItem(_BaseSchema):
    """Item schema for items."""

    network: ApplianceNetwork | None = None
    profile: ApplianceNetwork | None = None


class CreateOrganizationApplianceDnsSplitProfilesAssignmentsBulkCreateResponse(_BaseSchema):
    """Response for createOrganizationApplianceDnsSplitProfilesAssignmentsBulkCreate operation."""

    items: list[GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseItemsItem] | None = None


class CreateOrganizationApplianceDnsSplitProfilesAssignmentsBulkDeleteItemsItem(_BaseSchema):
    """Item schema for items."""

    assignment_id: str | None = Field(default=None, alias="assignmentId")


class CreateOrganizationApplianceDnsSplitProfilesAssignmentsBulkDeleteResponse(_BaseSchema):
    """Response for createOrganizationApplianceDnsSplitProfilesAssignmentsBulkDelete operation."""

    items: list[GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseItemsItem] | None = None


class GetDeviceApplianceDhcpSubnetsResponse(
    RootModel[list["GetDeviceApplianceDhcpSubnetsResponseItem"]]
):
    """Response for getDeviceApplianceDhcpSubnets operation."""


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

    subnet: str | None = None
    vlan_id: int | None = Field(default=None, alias="vlanId")
    used_count: int | None = Field(default=None, alias="usedCount")
    free_count: int | None = Field(default=None, alias="freeCount")


class GetDeviceAppliancePerformanceResponse(_BaseSchema):
    """Response for getDeviceAppliancePerformance operation."""

    perf_score: float | None = Field(default=None, alias="perfScore")


class GetDeviceAppliancePrefixesDelegatedResponse(RootModel[list[dict[str, Any]]]):
    """Response for getDeviceAppliancePrefixesDelegated operation."""


class GetDeviceAppliancePrefixesDelegatedVlanAssignmentsResponse(RootModel[list[dict[str, Any]]]):
    """Response for getDeviceAppliancePrefixesDelegatedVlanAssignments operation."""


class GetDeviceApplianceRadioSettingsResponse(_BaseSchema):
    """Response for getDeviceApplianceRadioSettings operation."""

    serial: str | None = None
    rf_profile_id: str | None = Field(default=None, alias="rfProfileId")
    two_four_ghz_settings: GetDeviceApplianceRadioSettingsResponseTwoFourGhzSettings | None = Field(
        default=None, alias="twoFourGhzSettings"
    )
    five_ghz_settings: GetDeviceApplianceRadioSettingsResponseFiveGhzSettings | None = Field(
        default=None, alias="fiveGhzSettings"
    )


class GetDeviceApplianceRadioSettingsResponseFiveGhzSettings(_BaseSchema):
    """Manual radio settings for 5 GHz."""

    channel: int | None = None
    channel_width: int | None = Field(default=None, alias="channelWidth")
    target_power: int | None = Field(default=None, alias="targetPower")


class GetDeviceApplianceRadioSettingsResponseTwoFourGhzSettings(_BaseSchema):
    """Manual radio settings for 2.4 GHz."""

    channel: int | None = None
    target_power: int | None = Field(default=None, alias="targetPower")


class GetDeviceApplianceUplinksSettingsResponse(_BaseSchema):
    """Response for getDeviceApplianceUplinksSettings operation."""

    interfaces: GetDeviceApplianceUplinksSettingsResponseInterfaces | None = None


class GetDeviceApplianceUplinksSettingsResponseInterfaces(_BaseSchema):
    """Interface settings."""

    wan1: ApplianceInterfacesWan1 | None = None
    wan2: ApplianceInterfacesWan1 | None = None


class GetNetworkApplianceClientSecurityEventsResponse(RootModel[list[dict[str, Any]]]):
    """Response for getNetworkApplianceClientSecurityEvents operation."""


class GetNetworkApplianceConnectivityMonitoringDestinationsResponse(_BaseSchema):
    """Response for getNetworkApplianceConnectivityMonitoringDestinations operation."""

    destinations: (
        list[GetNetworkApplianceConnectivityMonitoringDestinationsResponseDestinationsItem] | None
    ) = None


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

    ip: str | None = None
    description: str | None = None
    default: bool | None = None


class GetNetworkApplianceContentFilteringResponse(_BaseSchema):
    """Response for getNetworkApplianceContentFiltering operation."""

    allowed_url_patterns: list[str] | None = Field(default=None, alias="allowedUrlPatterns")
    blocked_url_patterns: list[str] | None = Field(default=None, alias="blockedUrlPatterns")
    blocked_url_categories: (
        list[GetNetworkApplianceContentFilteringResponseBlockedUrlCategoriesItem] | None
    ) = Field(default=None, alias="blockedUrlCategories")
    url_category_list_size: str | None = Field(default=None, alias="urlCategoryListSize")


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

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


class GetNetworkApplianceFirewallFirewalledServiceResponse(_BaseSchema):
    """Response for getNetworkApplianceFirewallFirewalledService operation."""

    service: str | None = None
    access: str | None = None
    allowed_ips: list[str] | None = Field(default=None, alias="allowedIps")


class GetNetworkApplianceFirewallFirewalledServicesResponse(
    RootModel[list["GetNetworkApplianceFirewallFirewalledServicesResponseItem"]]
):
    """Response for getNetworkApplianceFirewallFirewalledServices operation."""


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

    service: str | None = None
    access: str | None = None
    allowed_ips: list[str] | None = Field(default=None, alias="allowedIps")


class GetNetworkApplianceFirewallInboundCellularFirewallRulesResponse(_BaseSchema):
    """Response for getNetworkApplianceFirewallInboundCellularFirewallRules operation."""

    rules: list[GetNetworkApplianceFirewallInboundCellularFirewallRulesResponseRulesItem] | None = (
        None
    )


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

    comment: str | None = None
    policy: str | None = None
    protocol: str | None = None
    src_port: str | None = Field(default=None, alias="srcPort")
    src_cidr: str | None = Field(default=None, alias="srcCidr")
    dest_port: str | None = Field(default=None, alias="destPort")
    dest_cidr: str | None = Field(default=None, alias="destCidr")
    syslog_enabled: bool | None = Field(default=None, alias="syslogEnabled")


class GetNetworkApplianceFirewallInboundFirewallRulesResponse(_BaseSchema):
    """Response for getNetworkApplianceFirewallInboundFirewallRules operation."""

    rules: list[GetNetworkApplianceFirewallInboundCellularFirewallRulesResponseRulesItem] | None = (
        None
    )
    syslog_default_rule: bool | None = Field(default=None, alias="syslogDefaultRule")


class GetNetworkApplianceFirewallL7FirewallRulesApplicationCategoriesResponse(_BaseSchema):
    """Response for getNetworkApplianceFirewallL7FirewallRulesApplicationCategories operation."""

    application_categories: list[ApplianceApplicationCategoriesItem] | None = Field(
        default=None, alias="applicationCategories"
    )


class GetNetworkApplianceFirewallPortForwardingRulesResponse(_BaseSchema):
    """Response for getNetworkApplianceFirewallPortForwardingRules operation."""

    rules: list[GetNetworkApplianceFirewallPortForwardingRulesResponseRulesItem] | None = None


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

    lan_ip: str | None = Field(default=None, alias="lanIp")
    allowed_ips: list[str] | None = Field(default=None, alias="allowedIps")
    name: str | None = None
    protocol: str | None = None
    public_port: str | None = Field(default=None, alias="publicPort")
    local_port: str | None = Field(default=None, alias="localPort")
    uplink: str | None = None


class GetNetworkAppliancePortResponse(_BaseSchema):
    """Response for getNetworkAppliancePort operation."""

    number: int | None = None
    enabled: bool | None = None
    type_: str | None = Field(default=None, alias="type")
    drop_untagged_traffic: bool | None = Field(default=None, alias="dropUntaggedTraffic")
    vlan: int | None = None
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    access_policy: str | None = Field(default=None, alias="accessPolicy")


class GetNetworkAppliancePortsResponse(RootModel[list["GetNetworkAppliancePortsResponseItem"]]):
    """Response for getNetworkAppliancePorts operation."""


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

    number: int | None = None
    enabled: bool | None = None
    type_: str | None = Field(default=None, alias="type")
    drop_untagged_traffic: bool | None = Field(default=None, alias="dropUntaggedTraffic")
    vlan: int | None = None
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    access_policy: str | None = Field(default=None, alias="accessPolicy")


class GetNetworkAppliancePrefixesDelegatedStaticResponse(_BaseSchema):
    """Response for getNetworkAppliancePrefixesDelegatedStatic operation."""

    static_delegated_prefix_id: str | None = Field(default=None, alias="staticDelegatedPrefixId")
    prefix: str | None = None
    origin: ApplianceOrigin | None = None
    description: str | None = None
    created_at: datetime | None = Field(default=None, alias="createdAt")
    updated_at: datetime | None = Field(default=None, alias="updatedAt")


class GetNetworkAppliancePrefixesDelegatedStaticsResponse(
    RootModel[list["GetNetworkAppliancePrefixesDelegatedStaticsResponseItem"]]
):
    """Response for getNetworkAppliancePrefixesDelegatedStatics operation."""


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

    static_delegated_prefix_id: str | None = Field(default=None, alias="staticDelegatedPrefixId")
    prefix: str | None = None
    origin: ApplianceOrigin | None = None
    description: str | None = None
    created_at: datetime | None = Field(default=None, alias="createdAt")
    updated_at: datetime | None = Field(default=None, alias="updatedAt")


class GetNetworkApplianceRfProfileResponse(_BaseSchema):
    """Response for getNetworkApplianceRfProfile operation."""

    id: str | None = None
    network_id: str | None = Field(default=None, alias="networkId")
    name: str | None = None
    two_four_ghz_settings: ApplianceAssignedTwoFourGhzSettings | None = Field(
        default=None, alias="twoFourGhzSettings"
    )
    five_ghz_settings: ApplianceAssignedFiveGhzSettings | None = Field(
        default=None, alias="fiveGhzSettings"
    )
    per_ssid_settings: ApplianceAssignedPerSsidSettings | None = Field(
        default=None, alias="perSsidSettings"
    )


class GetNetworkApplianceRfProfilesResponse(_BaseSchema):
    """Response for getNetworkApplianceRfProfiles operation."""

    assigned: list[GetNetworkApplianceRfProfilesResponseAssignedItem] | None = None


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

    id: str | None = None
    network_id: str | None = Field(default=None, alias="networkId")
    name: str | None = None
    two_four_ghz_settings: ApplianceAssignedTwoFourGhzSettings | None = Field(
        default=None, alias="twoFourGhzSettings"
    )
    five_ghz_settings: ApplianceAssignedFiveGhzSettings | None = Field(
        default=None, alias="fiveGhzSettings"
    )
    per_ssid_settings: ApplianceAssignedPerSsidSettings | None = Field(
        default=None, alias="perSsidSettings"
    )


class GetNetworkApplianceSecurityEventsResponse(RootModel[list[dict[str, Any]]]):
    """Response for getNetworkApplianceSecurityEvents operation."""


class GetNetworkApplianceSecurityIntrusionResponse(_BaseSchema):
    """Response for getNetworkApplianceSecurityIntrusion operation."""

    mode: str | None = None
    ids_rulesets: str | None = Field(default=None, alias="idsRulesets")
    protected_networks: GetNetworkApplianceSecurityIntrusionResponseProtectedNetworks | None = (
        Field(default=None, alias="protectedNetworks")
    )


class GetNetworkApplianceSecurityIntrusionResponseProtectedNetworks(_BaseSchema):
    """Networks included in and excluded from the detection engine."""

    use_default: bool | None = Field(default=None, alias="useDefault")
    included_cidr: list[str] | None = Field(default=None, alias="includedCidr")
    excluded_cidr: list[str] | None = Field(default=None, alias="excludedCidr")


class GetNetworkApplianceSecurityMalwareResponse(_BaseSchema):
    """Response for getNetworkApplianceSecurityMalware operation."""

    mode: str | None = None
    allowed_urls: list[GetNetworkApplianceSecurityMalwareResponseAllowedUrlsItem] | None = Field(
        default=None, alias="allowedUrls"
    )
    allowed_files: list[GetNetworkApplianceSecurityMalwareResponseAllowedFilesItem] | None = Field(
        default=None, alias="allowedFiles"
    )


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

    sha256: str | None = None
    comment: str | None = None


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

    url: str | None = None
    comment: str | None = None


class GetNetworkApplianceSettingsResponse(_BaseSchema):
    """Response for getNetworkApplianceSettings operation."""

    client_tracking_method: str | None = Field(default=None, alias="clientTrackingMethod")
    deployment_mode: str | None = Field(default=None, alias="deploymentMode")
    dynamic_dns: GetNetworkApplianceSettingsResponseDynamicDns | None = Field(
        default=None, alias="dynamicDns"
    )


class GetNetworkApplianceSettingsResponseDynamicDns(_BaseSchema):
    """Dynamic DNS settings for a network."""

    enabled: bool | None = None
    prefix: str | None = None
    url: str | None = None


class GetNetworkApplianceSingleLanResponse(_BaseSchema):
    """Response for getNetworkApplianceSingleLan operation."""

    subnet: str | None = None
    appliance_ip: str | None = Field(default=None, alias="applianceIp")
    mandatory_dhcp: GetNetworkApplianceSingleLanResponseMandatoryDhcp | None = Field(
        default=None, alias="mandatoryDhcp"
    )
    ipv6: GetNetworkApplianceSingleLanResponseIpv6 | None = None


class GetNetworkApplianceSingleLanResponseIpv6(_BaseSchema):
    """IPv6 configuration on the single LAN."""

    enabled: bool | None = None
    prefix_assignments: list[ApplianceIpv6PrefixAssignmentsItem] | None = Field(
        default=None, alias="prefixAssignments"
    )


class GetNetworkApplianceSingleLanResponseMandatoryDhcp(_BaseSchema):
    """Mandatory DHCP will enforce that clients connecting to this single LAN must use the IP
    address assigned by the DHCP server. Clients who use a static IP address won't be able to
    associate. Only available on firmware versions 17.0 and above.
    """

    enabled: bool | None = None


class GetNetworkApplianceSsidResponse(_BaseSchema):
    """Response for getNetworkApplianceSsid operation."""

    number: int | None = None
    name: str | None = None
    enabled: bool | None = None
    default_vlan_id: int | None = Field(default=None, alias="defaultVlanId")
    auth_mode: str | None = Field(default=None, alias="authMode")
    radius_servers: list[ApplianceRadiusServersItem] | None = Field(
        default=None, alias="radiusServers"
    )
    encryption_mode: str | None = Field(default=None, alias="encryptionMode")
    wpa_encryption_mode: str | None = Field(default=None, alias="wpaEncryptionMode")
    visible: bool | None = None


class GetNetworkApplianceSsidsResponse(RootModel[list["GetNetworkApplianceSsidsResponseItem"]]):
    """Response for getNetworkApplianceSsids operation."""


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

    number: int | None = None
    name: str | None = None
    enabled: bool | None = None
    default_vlan_id: int | None = Field(default=None, alias="defaultVlanId")
    auth_mode: str | None = Field(default=None, alias="authMode")
    radius_servers: list[ApplianceRadiusServersItem] | None = Field(
        default=None, alias="radiusServers"
    )
    encryption_mode: str | None = Field(default=None, alias="encryptionMode")
    wpa_encryption_mode: str | None = Field(default=None, alias="wpaEncryptionMode")
    visible: bool | None = None


class GetNetworkApplianceStaticRouteResponse(_BaseSchema):
    """Response for getNetworkApplianceStaticRoute operation."""

    id: str | None = None
    ip_version: int | None = Field(default=None, alias="ipVersion")
    network_id: str | None = Field(default=None, alias="networkId")
    enabled: bool | None = None
    name: str | None = None
    subnet: str | None = None
    gateway_ip: str | None = Field(default=None, alias="gatewayIp")
    fixed_ip_assignments: dict[str, Any] | None = Field(default=None, alias="fixedIpAssignments")
    reserved_ip_ranges: list[ApplianceReservedIpRangesItem] | None = Field(
        default=None, alias="reservedIpRanges"
    )
    gateway_vlan_id: int | None = Field(default=None, alias="gatewayVlanId")


class GetNetworkApplianceStaticRoutesResponse(
    RootModel[list["GetNetworkApplianceStaticRoutesResponseItem"]]
):
    """Response for getNetworkApplianceStaticRoutes operation."""


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

    id: str | None = None
    ip_version: int | None = Field(default=None, alias="ipVersion")
    network_id: str | None = Field(default=None, alias="networkId")
    enabled: bool | None = None
    name: str | None = None
    subnet: str | None = None
    gateway_ip: str | None = Field(default=None, alias="gatewayIp")
    fixed_ip_assignments: dict[str, Any] | None = Field(default=None, alias="fixedIpAssignments")
    reserved_ip_ranges: list[ApplianceReservedIpRangesItem] | None = Field(
        default=None, alias="reservedIpRanges"
    )
    gateway_vlan_id: int | None = Field(default=None, alias="gatewayVlanId")


class GetNetworkApplianceTrafficShapingCustomPerformanceClassResponse(_BaseSchema):
    """Response for getNetworkApplianceTrafficShapingCustomPerformanceClass operation."""

    name: str | None = None
    custom_performance_class_id: str | None = Field(default=None, alias="customPerformanceClassId")
    max_latency: int | None = Field(default=None, alias="maxLatency")
    max_jitter: int | None = Field(default=None, alias="maxJitter")
    max_loss_percentage: int | None = Field(default=None, alias="maxLossPercentage")


class GetNetworkApplianceTrafficShapingCustomPerformanceClassesResponse(
    RootModel[list["GetNetworkApplianceTrafficShapingCustomPerformanceClassesResponseItem"]]
):
    """Response for getNetworkApplianceTrafficShapingCustomPerformanceClasses operation."""


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

    name: str | None = None
    custom_performance_class_id: str | None = Field(default=None, alias="customPerformanceClassId")
    max_latency: int | None = Field(default=None, alias="maxLatency")
    max_jitter: int | None = Field(default=None, alias="maxJitter")
    max_loss_percentage: int | None = Field(default=None, alias="maxLossPercentage")


class GetNetworkApplianceTrafficShapingUplinkBandwidthResponse(_BaseSchema):
    """Response for getNetworkApplianceTrafficShapingUplinkBandwidth operation."""

    bandwidth_limits: (
        GetNetworkApplianceTrafficShapingUplinkBandwidthResponseBandwidthLimits | None
    ) = Field(default=None, alias="bandwidthLimits")


class GetNetworkApplianceTrafficShapingUplinkBandwidthResponseBandwidthLimits(_BaseSchema):
    """A hash uplink keys and their configured settings for the Appliance."""

    wan1: ApplianceBandwidthLimits | None = None
    wan2: ApplianceBandwidthLimits | None = None
    cellular: ApplianceBandwidthLimits | None = None


class GetNetworkApplianceTrafficShapingUplinkSelectionResponse(_BaseSchema):
    """Response for getNetworkApplianceTrafficShapingUplinkSelection operation."""

    active_active_auto_vpn_enabled: bool | None = Field(
        default=None, alias="activeActiveAutoVpnEnabled"
    )
    default_uplink: str | None = Field(default=None, alias="defaultUplink")
    load_balancing_enabled: bool | None = Field(default=None, alias="loadBalancingEnabled")
    failover_and_failback: (
        GetNetworkApplianceTrafficShapingUplinkSelectionResponseFailoverAndFailback | None
    ) = Field(default=None, alias="failoverAndFailback")
    wan_traffic_uplink_preferences: list[ApplianceWanTrafficUplinkPreferencesItem2] | None = Field(
        default=None, alias="wanTrafficUplinkPreferences"
    )
    vpn_traffic_uplink_preferences: list[ApplianceVpnTrafficUplinkPreferencesItem] | None = Field(
        default=None, alias="vpnTrafficUplinkPreferences"
    )


class GetNetworkApplianceTrafficShapingUplinkSelectionResponseFailoverAndFailback(_BaseSchema):
    """WAN failover and failback."""

    immediate: ApplianceFailoverAndFailbackImmediate | None = None


class GetNetworkApplianceUplinksUsageHistoryResponse(
    RootModel[list["GetNetworkApplianceUplinksUsageHistoryResponseItem"]]
):
    """Response for getNetworkApplianceUplinksUsageHistory operation."""


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

    start_time: datetime | None = Field(default=None, alias="startTime")
    end_time: datetime | None = Field(default=None, alias="endTime")
    by_interface: list[ApplianceByInterfaceItem] | None = Field(default=None, alias="byInterface")


class GetNetworkApplianceVlanResponse(_BaseSchema):
    """Response for getNetworkApplianceVlan operation."""

    id: str | None = None
    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    subnet: str | None = None
    appliance_ip: str | None = Field(default=None, alias="applianceIp")
    group_policy_id: str | None = Field(default=None, alias="groupPolicyId")
    template_vlan_type: str | None = Field(default=None, alias="templateVlanType")
    cidr: str | None = None
    mask: int | None = None
    dhcp_relay_server_ips: list[str] | None = Field(default=None, alias="dhcpRelayServerIps")
    dhcp_handling: str | None = Field(default=None, alias="dhcpHandling")
    dhcp_lease_time: str | None = Field(default=None, alias="dhcpLeaseTime")
    dhcp_boot_options_enabled: bool | None = Field(default=None, alias="dhcpBootOptionsEnabled")
    dhcp_boot_next_server: str | None = Field(default=None, alias="dhcpBootNextServer")
    dhcp_boot_filename: str | None = Field(default=None, alias="dhcpBootFilename")
    fixed_ip_assignments: dict[str, Any] | None = Field(default=None, alias="fixedIpAssignments")
    reserved_ip_ranges: list[ApplianceReservedIpRangesItem] | None = Field(
        default=None, alias="reservedIpRanges"
    )
    dns_nameservers: str | None = Field(default=None, alias="dnsNameservers")
    dhcp_options: list[ApplianceDhcpOptionsItem] | None = Field(default=None, alias="dhcpOptions")
    vpn_nat_subnet: str | None = Field(default=None, alias="vpnNatSubnet")
    mandatory_dhcp: GetNetworkApplianceSingleLanResponseMandatoryDhcp | None = Field(
        default=None, alias="mandatoryDhcp"
    )
    ipv6: GetNetworkApplianceSingleLanResponseIpv6 | None = None


class GetNetworkApplianceVlansResponse(RootModel[list["GetNetworkApplianceVlansResponseItem"]]):
    """Response for getNetworkApplianceVlans operation."""


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

    id: int | None = None
    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    subnet: str | None = None
    appliance_ip: str | None = Field(default=None, alias="applianceIp")
    group_policy_id: str | None = Field(default=None, alias="groupPolicyId")
    template_vlan_type: str | None = Field(default=None, alias="templateVlanType")
    cidr: str | None = None
    mask: int | None = None
    dhcp_relay_server_ips: list[str] | None = Field(default=None, alias="dhcpRelayServerIps")
    dhcp_handling: str | None = Field(default=None, alias="dhcpHandling")
    dhcp_lease_time: str | None = Field(default=None, alias="dhcpLeaseTime")
    dhcp_boot_options_enabled: bool | None = Field(default=None, alias="dhcpBootOptionsEnabled")
    dhcp_boot_next_server: str | None = Field(default=None, alias="dhcpBootNextServer")
    dhcp_boot_filename: str | None = Field(default=None, alias="dhcpBootFilename")
    fixed_ip_assignments: dict[str, Any] | None = Field(default=None, alias="fixedIpAssignments")
    reserved_ip_ranges: list[ApplianceReservedIpRangesItem] | None = Field(
        default=None, alias="reservedIpRanges"
    )
    dns_nameservers: str | None = Field(default=None, alias="dnsNameservers")
    dhcp_options: list[ApplianceDhcpOptionsItem] | None = Field(default=None, alias="dhcpOptions")
    vpn_nat_subnet: str | None = Field(default=None, alias="vpnNatSubnet")
    mandatory_dhcp: GetNetworkApplianceSingleLanResponseMandatoryDhcp | None = Field(
        default=None, alias="mandatoryDhcp"
    )
    ipv6: GetNetworkApplianceSingleLanResponseIpv6 | None = None


class GetNetworkApplianceVlansSettingsResponse(_BaseSchema):
    """Response for getNetworkApplianceVlansSettings operation."""

    vlans_enabled: bool | None = Field(default=None, alias="vlansEnabled")


class GetNetworkApplianceVpnBgpResponse(_BaseSchema):
    """Response for getNetworkApplianceVpnBgp operation."""

    enabled: bool | None = None
    as_number: int | None = Field(default=None, alias="asNumber")
    ibgp_hold_timer: int | None = Field(default=None, alias="ibgpHoldTimer")
    neighbors: list[GetNetworkApplianceVpnBgpResponseNeighborsItem] | None = None


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

    ip: str | None = None
    ipv6: ApplianceNeighborsIpv6 | None = None
    remote_as_number: int | None = Field(default=None, alias="remoteAsNumber")
    receive_limit: int | None = Field(default=None, alias="receiveLimit")
    allow_transit: bool | None = Field(default=None, alias="allowTransit")
    ebgp_hold_timer: int | None = Field(default=None, alias="ebgpHoldTimer")
    ebgp_multihop: int | None = Field(default=None, alias="ebgpMultihop")
    source_interface: str | None = Field(default=None, alias="sourceInterface")
    next_hop_ip: str | None = Field(default=None, alias="nextHopIp")
    ttl_security: GetNetworkApplianceSingleLanResponseMandatoryDhcp | None = Field(
        default=None, alias="ttlSecurity"
    )
    authentication: ApplianceNeighborsAuthentication | None = None
    multi_exit_discriminator: int | None = Field(default=None, alias="multiExitDiscriminator")
    path_prepend: list[int] | None = Field(default=None, alias="pathPrepend")
    weight: int | None = None


class GetNetworkApplianceVpnSiteToSiteVpnResponse(_BaseSchema):
    """Response for getNetworkApplianceVpnSiteToSiteVpn operation."""

    mode: str | None = None
    hubs: list[GetNetworkApplianceVpnSiteToSiteVpnResponseHubsItem] | None = None
    subnets: list[GetNetworkApplianceVpnSiteToSiteVpnResponseSubnetsItem] | None = None
    subnet: GetNetworkApplianceVpnSiteToSiteVpnResponseSubnet | None = None


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

    hub_id: str | None = Field(default=None, alias="hubId")
    use_default_route: bool | None = Field(default=None, alias="useDefaultRoute")


class GetNetworkApplianceVpnSiteToSiteVpnResponseSubnet(_BaseSchema):
    """Configuration of subnet features."""

    nat: ApplianceSubnetNat | None = None


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

    local_subnet: str | None = Field(default=None, alias="localSubnet")
    use_vpn: bool | None = Field(default=None, alias="useVpn")
    nat: ApplianceSubnetsNat | None = None


class GetNetworkApplianceWarmSpareResponse(_BaseSchema):
    """Response for getNetworkApplianceWarmSpare operation."""

    enabled: bool | None = None
    primary_serial: str | None = Field(default=None, alias="primarySerial")
    spare_serial: str | None = Field(default=None, alias="spareSerial")
    uplink_mode: str | None = Field(default=None, alias="uplinkMode")
    wan1: GetNetworkApplianceWarmSpareResponseWan1 | None = None
    wan2: GetNetworkApplianceWarmSpareResponseWan1 | None = None


class GetNetworkApplianceWarmSpareResponseWan1(_BaseSchema):
    """WAN 1 IP and subnet."""

    ip: str | None = None
    subnet: str | None = None


class GetOrganizationApplianceDnsLocalProfilesAssignmentsResponse(_BaseSchema):
    """Response for getOrganizationApplianceDnsLocalProfilesAssignments operation."""

    items: list[GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseItemsItem] | None = None
    meta: GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseMeta | None = None


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

    assignment_id: str | None = Field(default=None, alias="assignmentId")
    network: ApplianceNetwork | None = None
    profile: ApplianceNetwork | None = None


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

    counts: ApplianceMetaCounts | None = None


class GetOrganizationApplianceDnsLocalProfilesResponse(
    RootModel[list["GetOrganizationApplianceDnsLocalProfilesResponseItem"]]
):
    """Response for getOrganizationApplianceDnsLocalProfiles operation."""


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

    profile_id: str | None = Field(default=None, alias="profileId")
    name: str | None = None


class GetOrganizationApplianceDnsLocalRecordsResponse(
    RootModel[list["GetOrganizationApplianceDnsLocalRecordsResponseItem"]]
):
    """Response for getOrganizationApplianceDnsLocalRecords operation."""


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

    record_id: str | None = Field(default=None, alias="recordId")
    hostname: str | None = None
    address: str | None = None
    profile: ApplianceNetwork | None = None


class GetOrganizationApplianceDnsSplitProfilesAssignmentsResponse(_BaseSchema):
    """Response for getOrganizationApplianceDnsSplitProfilesAssignments operation."""

    items: list[GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseItemsItem] | None = None
    meta: GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseMeta | None = None


class GetOrganizationApplianceDnsSplitProfilesResponse(
    RootModel[list["GetOrganizationApplianceDnsSplitProfilesResponseItem"]]
):
    """Response for getOrganizationApplianceDnsSplitProfiles operation."""


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

    profile_id: str | None = Field(default=None, alias="profileId")
    name: str | None = None
    hostnames: list[str] | None = None
    nameservers: ApplianceNameservers | None = None


class GetOrganizationApplianceFirewallMulticastForwardingByNetworkResponse(_BaseSchema):
    """Response for getOrganizationApplianceFirewallMulticastForwardingByNetwork operation."""

    items: (
        list[GetOrganizationApplianceFirewallMulticastForwardingByNetworkResponseItemsItem] | None
    ) = None
    meta: GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseMeta | None = None


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

    network: UpdateNetworkApplianceFirewallMulticastForwardingResponseNetwork
    rules: list[UpdateNetworkApplianceFirewallMulticastForwardingResponseRulesItem]


class GetOrganizationApplianceSecurityEventsResponse(RootModel[list[dict[str, Any]]]):
    """Response for getOrganizationApplianceSecurityEvents operation."""


class GetOrganizationApplianceTrafficShapingVpnExclusionsByNetworkResponse(_BaseSchema):
    """Response for getOrganizationApplianceTrafficShapingVpnExclusionsByNetwork operation."""

    items: (
        list[GetOrganizationApplianceTrafficShapingVpnExclusionsByNetworkResponseItemsItem] | None
    ) = None


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

    network_id: str = Field(alias="networkId")
    network_name: str = Field(alias="networkName")
    custom: list[UpdateNetworkApplianceTrafficShapingVpnExclusionsResponseCustomItem]
    major_applications: list[
        UpdateNetworkApplianceTrafficShapingVpnExclusionsResponseMajorApplicationsItem
    ] = Field(alias="majorApplications")


class GetOrganizationApplianceUplinkStatusesResponse(
    RootModel[list["GetOrganizationApplianceUplinkStatusesResponseItem"]]
):
    """Response for getOrganizationApplianceUplinkStatuses operation."""


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

    network_id: str | None = Field(default=None, alias="networkId")
    serial: str | None = None
    model: str | None = None
    last_reported_at: datetime | None = Field(default=None, alias="lastReportedAt")
    high_availability: ApplianceHighAvailability | None = Field(
        default=None, alias="highAvailability"
    )
    uplinks: list[ApplianceUplinksItem] | None = None


class GetOrganizationApplianceUplinksStatusesOverviewResponse(_BaseSchema):
    """Response for getOrganizationApplianceUplinksStatusesOverview operation."""

    counts: GetOrganizationApplianceUplinksStatusesOverviewResponseCounts | None = None


class GetOrganizationApplianceUplinksStatusesOverviewResponseCounts(_BaseSchema):
    """counts."""

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


class GetOrganizationApplianceUplinksUsageByNetworkResponse(
    RootModel[list["GetOrganizationApplianceUplinksUsageByNetworkResponseItem"]]
):
    """Response for getOrganizationApplianceUplinksUsageByNetwork operation."""


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

    network_id: str | None = Field(default=None, alias="networkId")
    name: str | None = None
    by_uplink: list[ApplianceByUplinkItem] | None = Field(default=None, alias="byUplink")


class GetOrganizationApplianceVpnSiteToSiteIpsecPeersSlasResponse(_BaseSchema):
    """Response for getOrganizationApplianceVpnSiteToSiteIpsecPeersSlas operation."""

    items: list[GetOrganizationApplianceVpnSiteToSiteIpsecPeersSlasResponseItemsItem] | None = None
    meta: GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseMeta | None = None


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

    id: str | None = None
    name: str | None = None
    uri: str | None = None
    ipsec: ApplianceIpsec | None = None


class GetOrganizationApplianceVpnStatsResponse(
    RootModel[list["GetOrganizationApplianceVpnStatsResponseItem"]]
):
    """Response for getOrganizationApplianceVpnStats operation."""


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

    network_id: str | None = Field(default=None, alias="networkId")
    network_name: str | None = Field(default=None, alias="networkName")
    meraki_vpn_peers: list[ApplianceMerakiVpnPeersItem] | None = Field(
        default=None, alias="merakiVpnPeers"
    )


class GetOrganizationApplianceVpnStatusesResponse(
    RootModel[list["GetOrganizationApplianceVpnStatusesResponseItem"]]
):
    """Response for getOrganizationApplianceVpnStatuses operation."""


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

    network_id: str | None = Field(default=None, alias="networkId")
    network_name: str | None = Field(default=None, alias="networkName")
    device_serial: str | None = Field(default=None, alias="deviceSerial")
    device_status: str | None = Field(default=None, alias="deviceStatus")
    uplinks: list[ApplianceUplinksItem2] | None = None
    vpn_mode: str | None = Field(default=None, alias="vpnMode")
    exported_subnets: list[ApplianceExportedSubnetsItem] | None = Field(
        default=None, alias="exportedSubnets"
    )
    meraki_vpn_peers: list[ApplianceMerakiVpnPeersItem2] | None = Field(
        default=None, alias="merakiVpnPeers"
    )
    third_party_vpn_peers: list[ApplianceThirdPartyVpnPeersItem] | None = Field(
        default=None, alias="thirdPartyVpnPeers"
    )


class GetOrganizationApplianceVpnThirdPartyVPNPeersResponse(_BaseSchema):
    """Response for getOrganizationApplianceVpnThirdPartyVPNPeers operation."""

    peers: list[GetOrganizationApplianceVpnThirdPartyVPNPeersResponsePeersItem] | None = None


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

    peer_id: str | None = Field(default=None, alias="peerId")
    name: str | None = None
    public_ip: str | None = Field(default=None, alias="publicIp")
    remote_id: str | None = Field(default=None, alias="remoteId")
    local_id: str | None = Field(default=None, alias="localId")
    secret: str | None = None
    private_subnets: list[str] | None = Field(default=None, alias="privateSubnets")
    ipsec_policies: AppliancePeersIpsecPolicies | None = Field(default=None, alias="ipsecPolicies")
    sla_policy: ApplianceNetwork | None = Field(default=None, alias="slaPolicy")
    ipsec_policies_preset: str | None = Field(default=None, alias="ipsecPoliciesPreset")
    ike_version: str | None = Field(default=None, alias="ikeVersion")
    network_tags: list[str] | None = Field(default=None, alias="networkTags")
    network: AppliancePeersNetwork | None = None
    is_route_based: bool | None = Field(default=None, alias="isRouteBased")
    ebgp_neighbor: AppliancePeersEbgpNeighbor | None = Field(default=None, alias="ebgpNeighbor")
    priority_in_group: int | None = Field(default=None, alias="priorityInGroup")
    group: AppliancePeersGroup | None = None


class GetOrganizationApplianceVpnVpnFirewallRulesResponse(_BaseSchema):
    """Response for getOrganizationApplianceVpnVpnFirewallRules operation."""

    rules: list[GetNetworkApplianceFirewallInboundCellularFirewallRulesResponseRulesItem] | None = (
        None
    )


class SwapNetworkApplianceWarmSpareResponse(_BaseSchema):
    """Response for swapNetworkApplianceWarmSpare operation."""

    enabled: bool | None = None
    primary_serial: str | None = Field(default=None, alias="primarySerial")
    spare_serial: str | None = Field(default=None, alias="spareSerial")
    uplink_mode: str | None = Field(default=None, alias="uplinkMode")
    wan1: GetNetworkApplianceWarmSpareResponseWan1 | None = None
    wan2: GetNetworkApplianceWarmSpareResponseWan1 | None = None


class UpdateDeviceApplianceRadioSettingsFiveGhzSettings(_BaseSchema):
    """Manual radio settings for 5 GHz."""

    channel: int | None = None
    channel_width: int | None = Field(default=None, alias="channelWidth")
    target_power: int | None = Field(default=None, alias="targetPower")


class UpdateDeviceApplianceRadioSettingsResponse(_BaseSchema):
    """Response for updateDeviceApplianceRadioSettings operation."""

    serial: str | None = None
    rf_profile_id: str | None = Field(default=None, alias="rfProfileId")
    two_four_ghz_settings: GetDeviceApplianceRadioSettingsResponseTwoFourGhzSettings | None = Field(
        default=None, alias="twoFourGhzSettings"
    )
    five_ghz_settings: GetDeviceApplianceRadioSettingsResponseFiveGhzSettings | None = Field(
        default=None, alias="fiveGhzSettings"
    )


class UpdateDeviceApplianceRadioSettingsTwoFourGhzSettings(_BaseSchema):
    """Manual radio settings for 2.4 GHz."""

    channel: int | None = None
    target_power: int | None = Field(default=None, alias="targetPower")


class UpdateDeviceApplianceUplinksSettingsInterfaces(_BaseSchema):
    """Interface settings."""

    wan1: UpdateDeviceApplianceUplinksSettingsInterfacesWan1 | None = None
    wan2: UpdateDeviceApplianceUplinksSettingsInterfacesWan1 | None = None


class UpdateDeviceApplianceUplinksSettingsInterfacesWan1(_BaseSchema):
    """WAN 1 settings."""

    enabled: bool | None = None
    vlan_tagging: ApplianceVlanTagging | None = Field(default=None, alias="vlanTagging")
    svis: ApplianceSvis | None = None
    pppoe: AppliancePppoe2 | None = None


class UpdateDeviceApplianceUplinksSettingsResponse(_BaseSchema):
    """Response for updateDeviceApplianceUplinksSettings operation."""

    interfaces: GetDeviceApplianceUplinksSettingsResponseInterfaces | None = None


class UpdateNetworkApplianceConnectivityMonitoringDestinationsDestinationsItem(_BaseSchema):
    """Item schema for destinations."""

    ip: str
    description: str | None = None
    default: bool | None = None


class UpdateNetworkApplianceConnectivityMonitoringDestinationsResponse(_BaseSchema):
    """Response for updateNetworkApplianceConnectivityMonitoringDestinations operation."""

    destinations: (
        list[GetNetworkApplianceConnectivityMonitoringDestinationsResponseDestinationsItem] | None
    ) = None


class UpdateNetworkApplianceContentFilteringResponse(_BaseSchema):
    """Response for updateNetworkApplianceContentFiltering operation."""

    allowed_url_patterns: list[str] | None = Field(default=None, alias="allowedUrlPatterns")
    blocked_url_patterns: list[str] | None = Field(default=None, alias="blockedUrlPatterns")
    blocked_url_categories: (
        list[GetNetworkApplianceContentFilteringResponseBlockedUrlCategoriesItem] | None
    ) = Field(default=None, alias="blockedUrlCategories")
    url_category_list_size: str | None = Field(default=None, alias="urlCategoryListSize")


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

    comment: str | None = None
    policy: str
    protocol: str
    src_port: str | None = Field(default=None, alias="srcPort")
    src_cidr: str = Field(alias="srcCidr")
    dest_port: str | None = Field(default=None, alias="destPort")
    dest_cidr: str = Field(alias="destCidr")
    syslog_enabled: bool | None = Field(default=None, alias="syslogEnabled")


class UpdateNetworkApplianceFirewallFirewalledServiceResponse(_BaseSchema):
    """Response for updateNetworkApplianceFirewallFirewalledService operation."""

    service: str | None = None
    access: str | None = None
    allowed_ips: list[str] | None = Field(default=None, alias="allowedIps")


class UpdateNetworkApplianceFirewallInboundCellularFirewallRulesResponse(_BaseSchema):
    """Response for updateNetworkApplianceFirewallInboundCellularFirewallRules operation."""

    rules: list[GetNetworkApplianceFirewallInboundCellularFirewallRulesResponseRulesItem] | None = (
        None
    )


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

    comment: str | None = None
    policy: str
    protocol: str
    src_port: str | None = Field(default=None, alias="srcPort")
    src_cidr: str = Field(alias="srcCidr")
    dest_port: str | None = Field(default=None, alias="destPort")
    dest_cidr: str = Field(alias="destCidr")
    syslog_enabled: bool | None = Field(default=None, alias="syslogEnabled")


class UpdateNetworkApplianceFirewallInboundFirewallRulesResponse(_BaseSchema):
    """Response for updateNetworkApplianceFirewallInboundFirewallRules operation."""

    rules: list[GetNetworkApplianceFirewallInboundCellularFirewallRulesResponseRulesItem] | None = (
        None
    )
    syslog_default_rule: bool | None = Field(default=None, alias="syslogDefaultRule")


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

    comment: str | None = None
    policy: str
    protocol: str
    src_port: str | None = Field(default=None, alias="srcPort")
    src_cidr: str = Field(alias="srcCidr")
    dest_port: str | None = Field(default=None, alias="destPort")
    dest_cidr: str = Field(alias="destCidr")
    syslog_enabled: bool | None = Field(default=None, alias="syslogEnabled")


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

    comment: str | None = None
    policy: str
    protocol: str
    src_port: str | None = Field(default=None, alias="srcPort")
    src_cidr: str = Field(alias="srcCidr")
    dest_port: str | None = Field(default=None, alias="destPort")
    dest_cidr: str = Field(alias="destCidr")
    syslog_enabled: bool | None = Field(default=None, alias="syslogEnabled")


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

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


class UpdateNetworkApplianceFirewallMulticastForwardingResponse(_BaseSchema):
    """Response for updateNetworkApplianceFirewallMulticastForwarding operation."""

    network: UpdateNetworkApplianceFirewallMulticastForwardingResponseNetwork
    rules: list[UpdateNetworkApplianceFirewallMulticastForwardingResponseRulesItem]


class UpdateNetworkApplianceFirewallMulticastForwardingResponseNetwork(_BaseSchema):
    """Network details."""

    id: str
    name: str


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

    description: str
    address: str
    vlan_ids: list[str] = Field(alias="vlanIds")


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

    description: str
    address: str
    vlan_ids: list[str] = Field(alias="vlanIds")


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

    public_ip: str = Field(alias="publicIp")
    uplink: str
    port_rules: list[UpdateNetworkApplianceFirewallOneToManyNatRulesRulesItemPortRulesItem] = Field(
        alias="portRules"
    )


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

    name: str | None = None
    protocol: str | None = None
    public_port: str | None = Field(default=None, alias="publicPort")
    local_ip: str | None = Field(default=None, alias="localIp")
    local_port: str | None = Field(default=None, alias="localPort")
    allowed_ips: list[str] | None = Field(default=None, alias="allowedIps")


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

    name: str | None = None
    public_ip: str | None = Field(default=None, alias="publicIp")
    lan_ip: str = Field(alias="lanIp")
    uplink: str | None = None
    allowed_inbound: (
        list[UpdateNetworkApplianceFirewallOneToOneNatRulesRulesItemAllowedInboundItem] | None
    ) = Field(default=None, alias="allowedInbound")


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

    protocol: str | None = None
    destination_ports: list[str] | None = Field(default=None, alias="destinationPorts")
    allowed_ips: list[str] | None = Field(default=None, alias="allowedIps")


class UpdateNetworkApplianceFirewallPortForwardingRulesResponse(_BaseSchema):
    """Response for updateNetworkApplianceFirewallPortForwardingRules operation."""

    rules: list[GetNetworkApplianceFirewallPortForwardingRulesResponseRulesItem] | None = None


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

    name: str | None = None
    lan_ip: str = Field(alias="lanIp")
    uplink: str | None = None
    public_port: str = Field(alias="publicPort")
    local_port: str = Field(alias="localPort")
    allowed_ips: list[str] = Field(alias="allowedIps")
    protocol: str


class UpdateNetworkApplianceFirewallSettingsSpoofingProtection(_BaseSchema):
    """Spoofing protection settings."""

    ip_source_guard: (
        UpdateNetworkApplianceFirewallSettingsSpoofingProtectionIpSourceGuard | None
    ) = Field(default=None, alias="ipSourceGuard")


class UpdateNetworkApplianceFirewallSettingsSpoofingProtectionIpSourceGuard(_BaseSchema):
    """IP source address spoofing settings."""

    mode: str | None = None


class UpdateNetworkAppliancePortResponse(_BaseSchema):
    """Response for updateNetworkAppliancePort operation."""

    number: int | None = None
    enabled: bool | None = None
    type_: str | None = Field(default=None, alias="type")
    drop_untagged_traffic: bool | None = Field(default=None, alias="dropUntaggedTraffic")
    vlan: int | None = None
    allowed_vlans: str | None = Field(default=None, alias="allowedVlans")
    access_policy: str | None = Field(default=None, alias="accessPolicy")


class UpdateNetworkAppliancePrefixesDelegatedStaticOrigin(_BaseSchema):
    """The origin of the prefix."""

    type_: str | None = Field(default=None, alias="type")
    interfaces: list[str] | None = None


class UpdateNetworkApplianceRfProfileFiveGhzSettings(_BaseSchema):
    """Settings related to 5Ghz band."""

    min_bitrate: int | None = Field(default=None, alias="minBitrate")
    ax_enabled: bool | None = Field(default=None, alias="axEnabled")


class UpdateNetworkApplianceRfProfilePerSsidSettings(_BaseSchema):
    """Per-SSID radio settings by number."""

    n_1: CreateNetworkApplianceRfProfilePerSsidSettings1 | None = Field(default=None, alias="1")
    n_2: CreateNetworkApplianceRfProfilePerSsidSettings1 | None = Field(default=None, alias="2")
    n_3: CreateNetworkApplianceRfProfilePerSsidSettings1 | None = Field(default=None, alias="3")
    n_4: CreateNetworkApplianceRfProfilePerSsidSettings1 | None = Field(default=None, alias="4")


class UpdateNetworkApplianceRfProfileResponse(_BaseSchema):
    """Response for updateNetworkApplianceRfProfile operation."""

    id: str | None = None
    network_id: str | None = Field(default=None, alias="networkId")
    name: str | None = None
    two_four_ghz_settings: ApplianceAssignedTwoFourGhzSettings | None = Field(
        default=None, alias="twoFourGhzSettings"
    )
    five_ghz_settings: ApplianceAssignedFiveGhzSettings | None = Field(
        default=None, alias="fiveGhzSettings"
    )
    per_ssid_settings: ApplianceAssignedPerSsidSettings | None = Field(
        default=None, alias="perSsidSettings"
    )


class UpdateNetworkApplianceRfProfileTwoFourGhzSettings(_BaseSchema):
    """Settings related to 2.4Ghz band."""

    min_bitrate: float | None = Field(default=None, alias="minBitrate")
    ax_enabled: bool | None = Field(default=None, alias="axEnabled")


class UpdateNetworkApplianceSdwanInternetPoliciesResponse(_BaseSchema):
    """Response for updateNetworkApplianceSdwanInternetPolicies operation."""

    wan_traffic_uplink_preferences: list[ApplianceWanTrafficUplinkPreferencesItem] | None = Field(
        default=None, alias="wanTrafficUplinkPreferences"
    )


class UpdateNetworkApplianceSdwanInternetPoliciesWanTrafficUplinkPreferencesItem(_BaseSchema):
    """Item schema for wanTrafficUplinkPreferences."""

    preferred_uplink: str = Field(alias="preferredUplink")
    fail_over_criterion: str | None = Field(default=None, alias="failOverCriterion")
    performance_class: AppliancePerformanceClass | None = Field(
        default=None, alias="performanceClass"
    )
    traffic_filters: list[ApplianceTrafficFiltersItem] = Field(alias="trafficFilters")


class UpdateNetworkApplianceSecurityIntrusionProtectedNetworks(_BaseSchema):
    """Set the included/excluded networks from the intrusion engine (optional - omitting will leave
    current config unchanged). This is available only in 'passthrough' mode.
    """

    use_default: bool | None = Field(default=None, alias="useDefault")
    included_cidr: list[str] | None = Field(default=None, alias="includedCidr")
    excluded_cidr: list[str] | None = Field(default=None, alias="excludedCidr")


class UpdateNetworkApplianceSecurityIntrusionResponse(_BaseSchema):
    """Response for updateNetworkApplianceSecurityIntrusion operation."""

    mode: str | None = None
    ids_rulesets: str | None = Field(default=None, alias="idsRulesets")
    protected_networks: GetNetworkApplianceSecurityIntrusionResponseProtectedNetworks | None = (
        Field(default=None, alias="protectedNetworks")
    )


class UpdateNetworkApplianceSecurityMalwareAllowedFilesItem(_BaseSchema):
    """Item schema for allowedFiles."""

    sha256: str
    comment: str


class UpdateNetworkApplianceSecurityMalwareAllowedUrlsItem(_BaseSchema):
    """Item schema for allowedUrls."""

    url: str
    comment: str


class UpdateNetworkApplianceSecurityMalwareResponse(_BaseSchema):
    """Response for updateNetworkApplianceSecurityMalware operation."""

    mode: str | None = None
    allowed_urls: list[GetNetworkApplianceSecurityMalwareResponseAllowedUrlsItem] | None = Field(
        default=None, alias="allowedUrls"
    )
    allowed_files: list[GetNetworkApplianceSecurityMalwareResponseAllowedFilesItem] | None = Field(
        default=None, alias="allowedFiles"
    )


class UpdateNetworkApplianceSettingsDynamicDns(_BaseSchema):
    """Dynamic DNS settings for a network."""

    prefix: str | None = None
    enabled: bool | None = None


class UpdateNetworkApplianceSettingsResponse(_BaseSchema):
    """Response for updateNetworkApplianceSettings operation."""

    client_tracking_method: str | None = Field(default=None, alias="clientTrackingMethod")
    deployment_mode: str | None = Field(default=None, alias="deploymentMode")
    dynamic_dns: GetNetworkApplianceSettingsResponseDynamicDns | None = Field(
        default=None, alias="dynamicDns"
    )


class UpdateNetworkApplianceSingleLanIpv6(_BaseSchema):
    """IPv6 configuration on the VLAN."""

    enabled: bool | None = None
    prefix_assignments: list[UpdateNetworkApplianceSingleLanIpv6PrefixAssignmentsItem] | None = (
        Field(default=None, alias="prefixAssignments")
    )


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

    autonomous: bool | None = None
    disabled: bool
    static_prefix: str | None = Field(default=None, alias="staticPrefix")
    static_appliance_ip6: str | None = Field(default=None, alias="staticApplianceIp6")
    origin: ApplianceOrigin3 | None = None


class UpdateNetworkApplianceSingleLanMandatoryDhcp(_BaseSchema):
    """Mandatory DHCP will enforce that clients connecting to this LAN must use the IP address
    assigned by the DHCP server. Clients who use a static IP address won't be able to associate.
    Only available on firmware versions 17.0 and above.
    """

    enabled: bool | None = None


class UpdateNetworkApplianceSingleLanResponse(_BaseSchema):
    """Response for updateNetworkApplianceSingleLan operation."""

    subnet: str | None = None
    appliance_ip: str | None = Field(default=None, alias="applianceIp")
    mandatory_dhcp: GetNetworkApplianceSingleLanResponseMandatoryDhcp | None = Field(
        default=None, alias="mandatoryDhcp"
    )
    ipv6: GetNetworkApplianceSingleLanResponseIpv6 | None = None


class UpdateNetworkApplianceSsidDhcpEnforcedDeauthentication(_BaseSchema):
    """DHCP Enforced Deauthentication enables the disassociation of wireless clients in addition to
    Mandatory DHCP. This param is only valid on firmware versions >= MX 17.0 where the
    associated LAN has Mandatory DHCP Enabled.
    """

    enabled: bool | None = None


class UpdateNetworkApplianceSsidDot11w(_BaseSchema):
    """The current setting for Protected Management Frames (802.11w)."""

    enabled: bool | None = None
    required: bool | None = None


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

    host: str | None = None
    port: int | None = None
    secret: str | None = None


class UpdateNetworkApplianceSsidResponse(_BaseSchema):
    """Response for updateNetworkApplianceSsid operation."""

    number: int | None = None
    name: str | None = None
    enabled: bool | None = None
    default_vlan_id: int | None = Field(default=None, alias="defaultVlanId")
    auth_mode: str | None = Field(default=None, alias="authMode")
    radius_servers: list[ApplianceRadiusServersItem] | None = Field(
        default=None, alias="radiusServers"
    )
    encryption_mode: str | None = Field(default=None, alias="encryptionMode")
    wpa_encryption_mode: str | None = Field(default=None, alias="wpaEncryptionMode")
    visible: bool | None = None


class UpdateNetworkApplianceStaticRouteFixedIpAssignmentsValue(_BaseSchema):
    """An object mapping MAC addresses to IP addresses and client names."""

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


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

    start: str
    end: str
    comment: str


class UpdateNetworkApplianceStaticRouteResponse(_BaseSchema):
    """Response for updateNetworkApplianceStaticRoute operation."""

    id: str | None = None
    ip_version: int | None = Field(default=None, alias="ipVersion")
    network_id: str | None = Field(default=None, alias="networkId")
    enabled: bool | None = None
    name: str | None = None
    subnet: str | None = None
    gateway_ip: str | None = Field(default=None, alias="gatewayIp")
    fixed_ip_assignments: dict[str, Any] | None = Field(default=None, alias="fixedIpAssignments")
    reserved_ip_ranges: list[ApplianceReservedIpRangesItem] | None = Field(
        default=None, alias="reservedIpRanges"
    )
    gateway_vlan_id: int | None = Field(default=None, alias="gatewayVlanId")


class UpdateNetworkApplianceTrafficShapingCustomPerformanceClassResponse(_BaseSchema):
    """Response for updateNetworkApplianceTrafficShapingCustomPerformanceClass operation."""

    name: str | None = None
    custom_performance_class_id: str | None = Field(default=None, alias="customPerformanceClassId")
    max_latency: int | None = Field(default=None, alias="maxLatency")
    max_jitter: int | None = Field(default=None, alias="maxJitter")
    max_loss_percentage: int | None = Field(default=None, alias="maxLossPercentage")


class UpdateNetworkApplianceTrafficShapingGlobalBandwidthLimits(_BaseSchema):
    """Global per-client bandwidth limit."""

    limit_up: int | None = Field(default=None, alias="limitUp")
    limit_down: int | None = Field(default=None, alias="limitDown")


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

    definitions: list[UpdateNetworkApplianceTrafficShapingRulesRulesItemDefinitionsItem]
    per_client_bandwidth_limits: (
        UpdateNetworkApplianceTrafficShapingRulesRulesItemPerClientBandwidthLimits | None
    ) = Field(default=None, alias="perClientBandwidthLimits")
    dscp_tag_value: int | None = Field(default=None, alias="dscpTagValue")
    priority: str | None = None


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

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


class UpdateNetworkApplianceTrafficShapingRulesRulesItemPerClientBandwidthLimits(_BaseSchema):
    """An object describing the bandwidth settings for your rule."""

    settings: str | None = None
    bandwidth_limits: ApplianceBandwidthLimits | None = Field(default=None, alias="bandwidthLimits")


class UpdateNetworkApplianceTrafficShapingUplinkBandwidthBandwidthLimits(_BaseSchema):
    """A mapping of uplinks to their bandwidth settings (be sure to check which uplinks are
    supported for your network).
    """

    wan1: ApplianceBandwidthLimits | None = None
    wan2: ApplianceBandwidthLimits | None = None
    cellular: ApplianceBandwidthLimits | None = None


class UpdateNetworkApplianceTrafficShapingUplinkSelectionFailoverAndFailback(_BaseSchema):
    """WAN failover and failback behavior."""

    immediate: ApplianceFailoverAndFailbackImmediate | None = None


class UpdateNetworkApplianceTrafficShapingUplinkSelectionResponse(_BaseSchema):
    """Response for updateNetworkApplianceTrafficShapingUplinkSelection operation."""

    active_active_auto_vpn_enabled: bool | None = Field(
        default=None, alias="activeActiveAutoVpnEnabled"
    )
    default_uplink: str | None = Field(default=None, alias="defaultUplink")
    load_balancing_enabled: bool | None = Field(default=None, alias="loadBalancingEnabled")
    failover_and_failback: (
        GetNetworkApplianceTrafficShapingUplinkSelectionResponseFailoverAndFailback | None
    ) = Field(default=None, alias="failoverAndFailback")
    wan_traffic_uplink_preferences: list[ApplianceWanTrafficUplinkPreferencesItem2] | None = Field(
        default=None, alias="wanTrafficUplinkPreferences"
    )
    vpn_traffic_uplink_preferences: list[ApplianceVpnTrafficUplinkPreferencesItem] | None = Field(
        default=None, alias="vpnTrafficUplinkPreferences"
    )


class UpdateNetworkApplianceTrafficShapingUplinkSelectionVpnTrafficUplinkPreferencesItem(
    _BaseSchema
):
    """Item schema for vpnTrafficUplinkPreferences."""

    traffic_filters: list[ApplianceTrafficFiltersItem3] = Field(alias="trafficFilters")
    preferred_uplink: str = Field(alias="preferredUplink")
    fail_over_criterion: str | None = Field(default=None, alias="failOverCriterion")
    performance_class: AppliancePerformanceClass2 | None = Field(
        default=None, alias="performanceClass"
    )


class UpdateNetworkApplianceTrafficShapingUplinkSelectionWanTrafficUplinkPreferencesItem(
    _BaseSchema
):
    """Item schema for wanTrafficUplinkPreferences."""

    traffic_filters: list[ApplianceTrafficFiltersItem4] = Field(alias="trafficFilters")
    preferred_uplink: str = Field(alias="preferredUplink")


class UpdateNetworkApplianceTrafficShapingVpnExclusionsCustomItem(_BaseSchema):
    """Item schema for custom."""

    protocol: str
    destination: str | None = None
    port: str | None = None


class UpdateNetworkApplianceTrafficShapingVpnExclusionsMajorApplicationsItem(_BaseSchema):
    """Item schema for majorApplications."""

    id: str
    name: str | None = None


class UpdateNetworkApplianceTrafficShapingVpnExclusionsResponse(_BaseSchema):
    """Response for updateNetworkApplianceTrafficShapingVpnExclusions operation."""

    network_id: str = Field(alias="networkId")
    network_name: str = Field(alias="networkName")
    custom: list[UpdateNetworkApplianceTrafficShapingVpnExclusionsResponseCustomItem]
    major_applications: list[
        UpdateNetworkApplianceTrafficShapingVpnExclusionsResponseMajorApplicationsItem
    ] = Field(alias="majorApplications")


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

    protocol: str
    destination: str
    port: str


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

    id: str
    name: str


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

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


class UpdateNetworkApplianceVlanIpv6(_BaseSchema):
    """IPv6 configuration on the VLAN."""

    enabled: bool | None = None
    prefix_assignments: list[UpdateNetworkApplianceVlanIpv6PrefixAssignmentsItem] | None = Field(
        default=None, alias="prefixAssignments"
    )


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

    autonomous: bool | None = None
    static_prefix: str | None = Field(default=None, alias="staticPrefix")
    static_appliance_ip6: str | None = Field(default=None, alias="staticApplianceIp6")
    origin: ApplianceOrigin3 | None = None


class UpdateNetworkApplianceVlanMandatoryDhcp(_BaseSchema):
    """Mandatory DHCP will enforce that clients connecting to this VLAN must use the IP address
    assigned by the DHCP server. Clients who use a static IP address won't be able to associate.
    Only available on firmware versions 17.0 and above.
    """

    enabled: bool | None = None


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

    start: str
    end: str
    comment: str


class UpdateNetworkApplianceVlanResponse(_BaseSchema):
    """Response for updateNetworkApplianceVlan operation."""

    id: str | None = None
    interface_id: str | None = Field(default=None, alias="interfaceId")
    name: str | None = None
    subnet: str | None = None
    appliance_ip: str | None = Field(default=None, alias="applianceIp")
    group_policy_id: str | None = Field(default=None, alias="groupPolicyId")
    template_vlan_type: str | None = Field(default=None, alias="templateVlanType")
    cidr: str | None = None
    mask: int | None = None
    dhcp_relay_server_ips: list[str] | None = Field(default=None, alias="dhcpRelayServerIps")
    dhcp_handling: str | None = Field(default=None, alias="dhcpHandling")
    dhcp_lease_time: str | None = Field(default=None, alias="dhcpLeaseTime")
    dhcp_boot_options_enabled: bool | None = Field(default=None, alias="dhcpBootOptionsEnabled")
    dhcp_boot_next_server: str | None = Field(default=None, alias="dhcpBootNextServer")
    dhcp_boot_filename: str | None = Field(default=None, alias="dhcpBootFilename")
    fixed_ip_assignments: dict[str, Any] | None = Field(default=None, alias="fixedIpAssignments")
    reserved_ip_ranges: list[ApplianceReservedIpRangesItem] | None = Field(
        default=None, alias="reservedIpRanges"
    )
    dns_nameservers: str | None = Field(default=None, alias="dnsNameservers")
    dhcp_options: list[ApplianceDhcpOptionsItem] | None = Field(default=None, alias="dhcpOptions")
    vpn_nat_subnet: str | None = Field(default=None, alias="vpnNatSubnet")
    mandatory_dhcp: GetNetworkApplianceSingleLanResponseMandatoryDhcp | None = Field(
        default=None, alias="mandatoryDhcp"
    )
    ipv6: GetNetworkApplianceSingleLanResponseIpv6 | None = None


class UpdateNetworkApplianceVlansSettingsResponse(_BaseSchema):
    """Response for updateNetworkApplianceVlansSettings operation."""

    vlans_enabled: bool | None = Field(default=None, alias="vlansEnabled")


class UpdateNetworkApplianceVpnBgpNeighborsItem(_BaseSchema):
    """Item schema for neighbors."""

    ip: str | None = None
    ipv6: UpdateNetworkApplianceVpnBgpNeighborsItemIpv6 | None = None
    remote_as_number: int = Field(alias="remoteAsNumber")
    receive_limit: int | None = Field(default=None, alias="receiveLimit")
    allow_transit: bool | None = Field(default=None, alias="allowTransit")
    ebgp_hold_timer: int = Field(alias="ebgpHoldTimer")
    ebgp_multihop: int = Field(alias="ebgpMultihop")
    source_interface: str | None = Field(default=None, alias="sourceInterface")
    next_hop_ip: str | None = Field(default=None, alias="nextHopIp")
    ttl_security: GetNetworkApplianceSingleLanResponseMandatoryDhcp | None = Field(
        default=None, alias="ttlSecurity"
    )
    authentication: ApplianceNeighborsAuthentication | None = None
    multi_exit_discriminator: int | None = Field(default=None, alias="multiExitDiscriminator")
    path_prepend: list[int] | None = Field(default=None, alias="pathPrepend")
    weight: int | None = None


class UpdateNetworkApplianceVpnBgpNeighborsItemIpv6(_BaseSchema):
    """Information regarding IPv6 address of the neighbor, Required if `ip` is not present."""

    address: str


class UpdateNetworkApplianceVpnBgpResponse(_BaseSchema):
    """Response for updateNetworkApplianceVpnBgp operation."""

    enabled: bool | None = None
    as_number: int | None = Field(default=None, alias="asNumber")
    ibgp_hold_timer: int | None = Field(default=None, alias="ibgpHoldTimer")
    neighbors: list[GetNetworkApplianceVpnBgpResponseNeighborsItem] | None = None


class UpdateNetworkApplianceVpnSiteToSiteVpnHubsItem(_BaseSchema):
    """Item schema for hubs."""

    hub_id: str = Field(alias="hubId")
    use_default_route: bool | None = Field(default=None, alias="useDefaultRoute")


class UpdateNetworkApplianceVpnSiteToSiteVpnResponse(_BaseSchema):
    """Response for updateNetworkApplianceVpnSiteToSiteVpn operation."""

    mode: str | None = None
    hubs: list[GetNetworkApplianceVpnSiteToSiteVpnResponseHubsItem] | None = None
    subnets: list[GetNetworkApplianceVpnSiteToSiteVpnResponseSubnetsItem] | None = None
    subnet: GetNetworkApplianceVpnSiteToSiteVpnResponseSubnet | None = None


class UpdateNetworkApplianceVpnSiteToSiteVpnSubnet(_BaseSchema):
    """Configuration of subnet features."""

    nat: ApplianceSubnetNat | None = None


class UpdateNetworkApplianceVpnSiteToSiteVpnSubnetsItem(_BaseSchema):
    """Item schema for subnets."""

    local_subnet: str = Field(alias="localSubnet")
    use_vpn: bool | None = Field(default=None, alias="useVpn")
    nat: ApplianceSubnetsNat | None = None


class UpdateNetworkApplianceWarmSpareResponse(_BaseSchema):
    """Response for updateNetworkApplianceWarmSpare operation."""

    enabled: bool | None = None
    primary_serial: str | None = Field(default=None, alias="primarySerial")
    spare_serial: str | None = Field(default=None, alias="spareSerial")
    uplink_mode: str | None = Field(default=None, alias="uplinkMode")
    wan1: GetNetworkApplianceWarmSpareResponseWan1 | None = None
    wan2: GetNetworkApplianceWarmSpareResponseWan1 | None = None


class UpdateOrganizationApplianceDnsLocalProfileResponse(_BaseSchema):
    """Response for updateOrganizationApplianceDnsLocalProfile operation."""

    profile_id: str | None = Field(default=None, alias="profileId")
    name: str | None = None


class UpdateOrganizationApplianceDnsLocalRecordProfile(_BaseSchema):
    """The profile the DNS record is associated with."""

    id: str | None = None


class UpdateOrganizationApplianceDnsLocalRecordResponse(_BaseSchema):
    """Response for updateOrganizationApplianceDnsLocalRecord operation."""

    record_id: str | None = Field(default=None, alias="recordId")
    hostname: str | None = None
    address: str | None = None
    profile: ApplianceNetwork | None = None


class UpdateOrganizationApplianceDnsSplitProfileNameservers(_BaseSchema):
    """Contains the nameserver information for redirection."""

    addresses: list[str] | None = None


class UpdateOrganizationApplianceDnsSplitProfileResponse(_BaseSchema):
    """Response for updateOrganizationApplianceDnsSplitProfile operation."""

    profile_id: str | None = Field(default=None, alias="profileId")
    name: str | None = None
    hostnames: list[str] | None = None
    nameservers: ApplianceNameservers | None = None


class UpdateOrganizationApplianceSecurityIntrusionAllowedRulesItem(_BaseSchema):
    """Item schema for allowedRules."""

    rule_id: str = Field(alias="ruleId")
    message: str | None = None


class UpdateOrganizationApplianceVpnSiteToSiteIpsecPeersSlasItemsItem(_BaseSchema):
    """Item schema for items."""

    name: str | None = None
    uri: str | None = None


class UpdateOrganizationApplianceVpnSiteToSiteIpsecPeersSlasResponse(_BaseSchema):
    """Response for updateOrganizationApplianceVpnSiteToSiteIpsecPeersSlas operation."""

    items: list[GetOrganizationApplianceVpnSiteToSiteIpsecPeersSlasResponseItemsItem] | None = None
    meta: GetOrganizationApplianceDnsLocalProfilesAssignmentsResponseMeta | None = None


class UpdateOrganizationApplianceVpnThirdPartyVPNPeersPeersItem(_BaseSchema):
    """Item schema for peers."""

    peer_id: str | None = Field(default=None, alias="peerId")
    name: str
    public_ip: str | None = Field(default=None, alias="publicIp")
    public_hostname: str | None = Field(default=None, alias="publicHostname")
    private_subnets: list[str] = Field(alias="privateSubnets")
    local_id: str | None = Field(default=None, alias="localId")
    remote_id: str | None = Field(default=None, alias="remoteId")
    ipsec_policies: AppliancePeersIpsecPolicies | None = Field(default=None, alias="ipsecPolicies")
    ipsec_policies_preset: str | None = Field(default=None, alias="ipsecPoliciesPreset")
    sla_policy: ApplianceNetwork | None = Field(default=None, alias="slaPolicy")
    secret: str
    ike_version: str | None = Field(default=None, alias="ikeVersion")
    network_tags: list[str] | None = Field(default=None, alias="networkTags")
    network: UpdateOrganizationApplianceVpnThirdPartyVPNPeersPeersItemNetwork | None = None
    is_route_based: bool | None = Field(default=None, alias="isRouteBased")
    ebgp_neighbor: UpdateOrganizationApplianceVpnThirdPartyVPNPeersPeersItemEbgpNeighbor | None = (
        Field(default=None, alias="ebgpNeighbor")
    )
    priority_in_group: int | None = Field(default=None, alias="priorityInGroup")
    group: AppliancePeersGroup | None = None


class UpdateOrganizationApplianceVpnThirdPartyVPNPeersPeersItemEbgpNeighbor(_BaseSchema):
    """[optional] The BGP neighbor configuration for the VPN peer. Supported only for MX 19.1 and
    above.
    """

    neighbor_ip: str | None = Field(default=None, alias="neighborIp")
    ip_version: int | None = Field(default=None, alias="ipVersion")
    remote_as_number: int | None = Field(default=None, alias="remoteAsNumber")
    ebgp_hold_timer: int | None = Field(default=None, alias="ebgpHoldTimer")
    ebgp_multihop: int | None = Field(default=None, alias="ebgpMultihop")
    source_ip: str | None = Field(default=None, alias="sourceIp")
    path_prepend: list[int] | None = Field(default=None, alias="pathPrepend")
    multi_exit_discriminator: int | None = Field(default=None, alias="multiExitDiscriminator")
    weight: int | None = None


class UpdateOrganizationApplianceVpnThirdPartyVPNPeersPeersItemNetwork(_BaseSchema):
    """[optional] A list of network Names and IDs that will connect with this peer. Supported only
    for MX 19.1 and above.
    """

    ids: list[str] | None = None


class UpdateOrganizationApplianceVpnThirdPartyVPNPeersResponse(_BaseSchema):
    """Response for updateOrganizationApplianceVpnThirdPartyVPNPeers operation."""

    peers: list[GetOrganizationApplianceVpnThirdPartyVPNPeersResponsePeersItem] | None = None


class UpdateOrganizationApplianceVpnVpnFirewallRulesResponse(_BaseSchema):
    """Response for updateOrganizationApplianceVpnVpnFirewallRules operation."""

    rules: list[GetNetworkApplianceFirewallInboundCellularFirewallRulesResponseRulesItem] | None = (
        None
    )


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

    comment: str | None = None
    policy: str
    protocol: str
    src_port: str | None = Field(default=None, alias="srcPort")
    src_cidr: str = Field(alias="srcCidr")
    dest_port: str | None = Field(default=None, alias="destPort")
    dest_cidr: str = Field(alias="destCidr")
    syslog_enabled: bool | None = Field(default=None, alias="syslogEnabled")
