"""Response schemas for devices 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 BlinkDeviceLedsResponse(_BaseSchema):
    """Response for blinkDeviceLeds operation."""

    duration: int | None = None
    period: int | None = None
    duty: int | None = None


class CreateDeviceLiveToolsArpTableCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsArpTableCallbackHttpServer(_BaseSchema):
    """The webhook receiver used for the callback webhook."""

    id: str | None = None


class CreateDeviceLiveToolsArpTableResponse(_BaseSchema):
    """Response for createDeviceLiveToolsArpTable operation."""

    arp_table_id: str | None = Field(
        default=None, validation_alias="arpTableId", serialization_alias="arpTableId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsArpTableResponseRequest | None = None
    status: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsArpTableResponseCallback(_BaseSchema):
    """Information for callback used to send back results."""

    id: str | None = None
    url: str | None = None
    status: str | None = None


class CreateDeviceLiveToolsArpTableResponseRequest(_BaseSchema):
    """ARP table request parameters."""

    serial: str | None = None


class CreateDeviceLiveToolsCableTestCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsCableTestResponse(_BaseSchema):
    """Response for createDeviceLiveToolsCableTest operation."""

    cable_test_id: str | None = Field(
        default=None, validation_alias="cableTestId", serialization_alias="cableTestId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsCableTestResponseRequest | None = None
    status: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsCableTestResponseRequest(_BaseSchema):
    """Cable test request parameters."""

    serial: str | None = None
    ports: list[str] = Field(default_factory=list)


class CreateDeviceLiveToolsLedsBlinkCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsLedsBlinkResponse(_BaseSchema):
    """Response for createDeviceLiveToolsLedsBlink operation."""

    leds_blink_id: str | None = Field(
        default=None, validation_alias="ledsBlinkId", serialization_alias="ledsBlinkId"
    )
    url: str | None = None
    status: str | None = None
    request: CreateDeviceLiveToolsLedsBlinkResponseRequest | None = None
    error: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsLedsBlinkResponseRequest(_BaseSchema):
    """The parameters of the leds blink request."""

    serial: str | None = None
    duration: int | None = None


class CreateDeviceLiveToolsMacTableCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsMacTableResponse(_BaseSchema):
    """Response for createDeviceLiveToolsMacTable operation."""

    mac_table_id: str | None = Field(
        default=None, validation_alias="macTableId", serialization_alias="macTableId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsArpTableResponseRequest | None = None
    status: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsMulticastRoutingCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsMulticastRoutingResponse(_BaseSchema):
    """Response for createDeviceLiveToolsMulticastRouting operation."""

    multicast_routing_id: str | None = Field(
        default=None,
        validation_alias="multicastRoutingId",
        serialization_alias="multicastRoutingId",
    )
    url: str | None = None
    request: CreateDeviceLiveToolsArpTableResponseRequest | None = None
    status: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsPingCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsPingDeviceCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsPingDeviceResponse(_BaseSchema):
    """Response for createDeviceLiveToolsPingDevice operation."""

    ping_id: str | None = Field(
        default=None, validation_alias="pingId", serialization_alias="pingId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsPingDeviceResponseRequest | None = None
    status: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsPingDeviceResponseRequest(_BaseSchema):
    """Ping request parameters."""

    serial: str | None = None
    count: int | None = None


class CreateDeviceLiveToolsPingResponse(_BaseSchema):
    """Response for createDeviceLiveToolsPing operation."""

    ping_id: str | None = Field(
        default=None, validation_alias="pingId", serialization_alias="pingId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsPingResponseRequest | None = None
    status: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsPingResponseRequest(_BaseSchema):
    """Ping request parameters."""

    serial: str | None = None
    target: str | None = None
    count: int | None = None


class CreateDeviceLiveToolsThroughputTestCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsThroughputTestResponse(_BaseSchema):
    """Response for createDeviceLiveToolsThroughputTest operation."""

    throughput_test_id: str | None = Field(
        default=None, validation_alias="throughputTestId", serialization_alias="throughputTestId"
    )
    url: str | None = None
    status: str | None = None
    result: CreateDeviceLiveToolsThroughputTestResponseResult | None = None
    request: CreateDeviceLiveToolsArpTableResponseRequest | None = None
    error: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsThroughputTestResponseResult(_BaseSchema):
    """Result of the throughput test request."""

    speeds: DevicesResultSpeeds | None = None


class CreateDeviceLiveToolsWakeOnLanCallback(_BaseSchema):
    """Details for the callback. Please include either an httpServerId OR url and sharedSecret."""

    url: str | None = None
    shared_secret: str | None = Field(
        default=None, validation_alias="sharedSecret", serialization_alias="sharedSecret"
    )
    http_server: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="httpServer", serialization_alias="httpServer"
    )
    payload_template: CreateDeviceLiveToolsArpTableCallbackHttpServer | None = Field(
        default=None, validation_alias="payloadTemplate", serialization_alias="payloadTemplate"
    )


class CreateDeviceLiveToolsWakeOnLanResponse(_BaseSchema):
    """Response for createDeviceLiveToolsWakeOnLan operation."""

    wake_on_lan_id: str | None = Field(
        default=None, validation_alias="wakeOnLanId", serialization_alias="wakeOnLanId"
    )
    url: str | None = None
    status: str | None = None
    request: CreateDeviceLiveToolsWakeOnLanResponseRequest | None = None
    error: str | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class CreateDeviceLiveToolsWakeOnLanResponseRequest(_BaseSchema):
    """The parameters of the Wake-on-LAN request."""

    serial: str | None = None
    vlan_id: int | None = Field(
        default=None, validation_alias="vlanId", serialization_alias="vlanId"
    )
    mac: str | None = None


class DevicesAuthentication(_BaseSchema):
    """APN authentication configurations."""

    type_: str | None = Field(default=None, validation_alias="type", serialization_alias="type")
    username: str | None = None
    password: str | None = None


class DevicesResultSpeeds(_BaseSchema):
    """Shows the speeds (Mbps)."""

    downstream: float | None = None


class DevicesResultsLatencies(_BaseSchema):
    """Packet latency stats."""

    minimum: float | None = None
    average: float | None = None
    maximum: float | None = None


class DevicesResultsLoss(_BaseSchema):
    """Lost packets."""

    percentage: float | None = None


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

    index: int | None = None
    status: str | None = None
    length_meters: int | None = Field(
        default=None, validation_alias="lengthMeters", serialization_alias="lengthMeters"
    )


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

    sequence_id: int | None = Field(
        default=None, validation_alias="sequenceId", serialization_alias="sequenceId"
    )
    size: int | None = None
    latency: float | None = None


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

    name: str
    allowed_ip_types: list[str] = Field(
        validation_alias="allowedIpTypes", serialization_alias="allowedIpTypes"
    )
    authentication: DevicesAuthentication | None = None


class DevicesUsage(_BaseSchema):
    """Client usage data for sent and received."""

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


class DevicesWan1Vrf(_BaseSchema):
    """VRF associated with the management interface. If not provided, the default VRF is used."""

    name: str | None = None


class GetDeviceCellularSimsResponse(_BaseSchema):
    """Response for getDeviceCellularSims operation."""

    sims: list[GetDeviceCellularSimsResponseSimsItem] = Field(default_factory=list)
    sim_ordering: list[str] = Field(
        default_factory=list, validation_alias="simOrdering", serialization_alias="simOrdering"
    )
    sim_failover: GetDeviceCellularSimsResponseSimFailover | None = Field(
        default=None, validation_alias="simFailover", serialization_alias="simFailover"
    )


class GetDeviceCellularSimsResponseSimFailover(_BaseSchema):
    """SIM Failover settings."""

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


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

    slot: str | None = None
    iccid: str | None = None
    imsi: str | None = None
    msisdn: str | None = None
    is_primary: bool | None = Field(
        default=None, validation_alias="isPrimary", serialization_alias="isPrimary"
    )
    status: str | None = None
    apns: list[DevicesSimsApnsItem] = Field(default_factory=list)


class GetDeviceClientsResponse(RootModel[list["GetDeviceClientsResponseItem"]]):
    """Response for getDeviceClients operation."""


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

    id: str | None = None
    mac: str | None = None
    description: str | None = None
    mdns_name: str | None = Field(
        default=None, validation_alias="mdnsName", serialization_alias="mdnsName"
    )
    dhcp_hostname: str | None = Field(
        default=None, validation_alias="dhcpHostname", serialization_alias="dhcpHostname"
    )
    user: str | None = None
    ip: str | None = None
    vlan: str | None = None
    named_vlan: str | None = Field(
        default=None, validation_alias="namedVlan", serialization_alias="namedVlan"
    )
    switchport: str | None = None
    adaptive_policy_group: str | None = Field(
        default=None,
        validation_alias="adaptivePolicyGroup",
        serialization_alias="adaptivePolicyGroup",
    )
    usage: DevicesUsage | None = None


class GetDeviceLiveToolsArpTableResponse(_BaseSchema):
    """Response for getDeviceLiveToolsArpTable operation."""

    arp_table_id: str | None = Field(
        default=None, validation_alias="arpTableId", serialization_alias="arpTableId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsArpTableResponseRequest | None = None
    status: str | None = None
    entries: list[GetDeviceLiveToolsArpTableResponseEntriesItem] = Field(default_factory=list)
    error: str | None = None


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

    ip: str | None = None
    mac: str | None = None
    vlan_id: int | None = Field(
        default=None, validation_alias="vlanId", serialization_alias="vlanId"
    )
    interface: str | None = None
    last_updated_at: datetime | None = Field(
        default=None, validation_alias="lastUpdatedAt", serialization_alias="lastUpdatedAt"
    )


class GetDeviceLiveToolsCableTestResponse(_BaseSchema):
    """Response for getDeviceLiveToolsCableTest operation."""

    cable_test_id: str | None = Field(
        default=None, validation_alias="cableTestId", serialization_alias="cableTestId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsCableTestResponseRequest | None = None
    status: str | None = None
    results: list[GetDeviceLiveToolsCableTestResponseResultsItem] = Field(default_factory=list)
    error: str | None = None


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

    port: str | None = None
    status: str | None = None
    speed_mbps: int | None = Field(
        default=None, validation_alias="speedMbps", serialization_alias="speedMbps"
    )
    error: str | None = None
    pairs: list[DevicesResultsPairsItem] = Field(default_factory=list)


class GetDeviceLiveToolsLedsBlinkResponse(_BaseSchema):
    """Response for getDeviceLiveToolsLedsBlink operation."""

    leds_blink_id: str | None = Field(
        default=None, validation_alias="ledsBlinkId", serialization_alias="ledsBlinkId"
    )
    url: str | None = None
    status: str | None = None
    request: CreateDeviceLiveToolsLedsBlinkResponseRequest | None = None
    error: str | None = None


class GetDeviceLiveToolsMacTableResponse(_BaseSchema):
    """Response for getDeviceLiveToolsMacTable operation."""

    mac_table_id: str | None = Field(
        default=None, validation_alias="macTableId", serialization_alias="macTableId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsArpTableResponseRequest | None = None
    status: str | None = None
    entries: list[GetDeviceLiveToolsMacTableResponseEntriesItem] = Field(default_factory=list)
    error: str | None = None


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

    mac: str | None = None
    port: str | None = None
    vlan_id: int | None = Field(
        default=None, validation_alias="vlanId", serialization_alias="vlanId"
    )


class GetDeviceLiveToolsMulticastRoutingResponse(_BaseSchema):
    """Response for getDeviceLiveToolsMulticastRouting operation."""

    multicast_routing_id: str | None = Field(
        default=None,
        validation_alias="multicastRoutingId",
        serialization_alias="multicastRoutingId",
    )
    url: str | None = None
    request: CreateDeviceLiveToolsArpTableResponseRequest | None = None
    status: str | None = None
    interfaces: list[GetDeviceLiveToolsMulticastRoutingResponseInterfacesItem] = Field(
        default_factory=list
    )
    routes: list[GetDeviceLiveToolsMulticastRoutingResponseRoutesItem] = Field(default_factory=list)
    error: str | None = None


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

    ip: str | None = None
    name: str | None = None
    subnet: str | None = None
    flags: list[str] = Field(default_factory=list)
    neighbors: list[str] = Field(default_factory=list)


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

    source: str | None = None
    group: str | None = None
    rendezvous_point: str | None = Field(
        default=None, validation_alias="rendezvousPoint", serialization_alias="rendezvousPoint"
    )
    incoming_interface_name: str | None = Field(
        default=None,
        validation_alias="incomingInterfaceName",
        serialization_alias="incomingInterfaceName",
    )
    outgoing_interface_names: list[str] = Field(
        default_factory=list,
        validation_alias="outgoingInterfaceNames",
        serialization_alias="outgoingInterfaceNames",
    )
    flags: list[str] = Field(default_factory=list)


class GetDeviceLiveToolsPingDeviceResponse(_BaseSchema):
    """Response for getDeviceLiveToolsPingDevice operation."""

    ping_id: str | None = Field(
        default=None, validation_alias="pingId", serialization_alias="pingId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsPingDeviceResponseRequest | None = None
    status: str | None = None
    results: GetDeviceLiveToolsPingResponseResults | None = None
    callback: CreateDeviceLiveToolsArpTableResponseCallback | None = None


class GetDeviceLiveToolsPingResponse(_BaseSchema):
    """Response for getDeviceLiveToolsPing operation."""

    ping_id: str | None = Field(
        default=None, validation_alias="pingId", serialization_alias="pingId"
    )
    url: str | None = None
    request: CreateDeviceLiveToolsPingResponseRequest | None = None
    status: str | None = None
    results: GetDeviceLiveToolsPingResponseResults | None = None


class GetDeviceLiveToolsPingResponseResults(_BaseSchema):
    """Results of the ping request."""

    sent: int | None = None
    received: int | None = None
    loss: DevicesResultsLoss | None = None
    latencies: DevicesResultsLatencies | None = None
    replies: list[DevicesResultsRepliesItem] = Field(default_factory=list)


class GetDeviceLiveToolsThroughputTestResponse(_BaseSchema):
    """Response for getDeviceLiveToolsThroughputTest operation."""

    throughput_test_id: str | None = Field(
        default=None, validation_alias="throughputTestId", serialization_alias="throughputTestId"
    )
    url: str | None = None
    status: str | None = None
    result: CreateDeviceLiveToolsThroughputTestResponseResult | None = None
    request: CreateDeviceLiveToolsArpTableResponseRequest | None = None
    error: str | None = None


class GetDeviceLiveToolsWakeOnLanResponse(_BaseSchema):
    """Response for getDeviceLiveToolsWakeOnLan operation."""

    wake_on_lan_id: str | None = Field(
        default=None, validation_alias="wakeOnLanId", serialization_alias="wakeOnLanId"
    )
    url: str | None = None
    status: str | None = None
    request: CreateDeviceLiveToolsWakeOnLanResponseRequest | None = None
    error: str | None = None


class GetDeviceLldpCdpResponse(_BaseSchema):
    """Response for getDeviceLldpCdp operation."""

    source_mac: str | None = Field(
        default=None, validation_alias="sourceMac", serialization_alias="sourceMac"
    )
    ports: dict[str, Any] | None = None


class GetDeviceLossAndLatencyHistoryResponse(
    RootModel[list["GetDeviceLossAndLatencyHistoryResponseItem"]]
):
    """Response for getDeviceLossAndLatencyHistory operation."""


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

    start_time: datetime | None = Field(
        default=None, validation_alias="startTime", serialization_alias="startTime"
    )
    end_time: datetime | None = Field(
        default=None, validation_alias="endTime", serialization_alias="endTime"
    )
    loss_percent: float | None = Field(
        default=None, validation_alias="lossPercent", serialization_alias="lossPercent"
    )
    latency_ms: float | None = Field(
        default=None, validation_alias="latencyMs", serialization_alias="latencyMs"
    )
    goodput: int | None = None
    jitter: float | None = None


class GetDeviceManagementInterfaceResponse(_BaseSchema):
    """Response for getDeviceManagementInterface operation."""

    ddns_hostnames: GetDeviceManagementInterfaceResponseDdnsHostnames | None = Field(
        default=None, validation_alias="ddnsHostnames", serialization_alias="ddnsHostnames"
    )
    wan1: GetDeviceManagementInterfaceResponseWan1 | None = None
    wan2: GetDeviceManagementInterfaceResponseWan1 | None = None


class GetDeviceManagementInterfaceResponseDdnsHostnames(_BaseSchema):
    """Dynamic DNS hostnames."""

    active_ddns_hostname: str | None = Field(
        default=None,
        validation_alias="activeDdnsHostname",
        serialization_alias="activeDdnsHostname",
    )
    ddns_hostname_wan1: str | None = Field(
        default=None, validation_alias="ddnsHostnameWan1", serialization_alias="ddnsHostnameWan1"
    )
    ddns_hostname_wan2: str | None = Field(
        default=None, validation_alias="ddnsHostnameWan2", serialization_alias="ddnsHostnameWan2"
    )


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

    wan_enabled: str | None = Field(
        default=None, validation_alias="wanEnabled", serialization_alias="wanEnabled"
    )
    using_static_ip: bool | None = Field(
        default=None, validation_alias="usingStaticIp", serialization_alias="usingStaticIp"
    )
    static_ip: str | None = Field(
        default=None, validation_alias="staticIp", serialization_alias="staticIp"
    )
    static_subnet_mask: str | None = Field(
        default=None, validation_alias="staticSubnetMask", serialization_alias="staticSubnetMask"
    )
    static_gateway_ip: str | None = Field(
        default=None, validation_alias="staticGatewayIp", serialization_alias="staticGatewayIp"
    )
    static_dns: list[str] = Field(
        default_factory=list, validation_alias="staticDns", serialization_alias="staticDns"
    )
    vlan: int | None = None
    vrf: DevicesWan1Vrf | None = None


class GetDeviceResponse(_BaseSchema):
    """Response for getDevice operation."""

    name: str | None = None
    lat: float | None = None
    lng: float | None = None
    address: str | None = None
    notes: str | None = None
    tags: list[str] = Field(default_factory=list)
    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    serial: str | None = None
    model: str | None = None
    mac: str | None = None
    lan_ip: str | None = Field(default=None, validation_alias="lanIp", serialization_alias="lanIp")
    firmware: str | None = None
    floor_plan_id: str | None = Field(
        default=None, validation_alias="floorPlanId", serialization_alias="floorPlanId"
    )
    details: list[GetDeviceResponseDetailsItem] = Field(default_factory=list)
    beacon_id_params: GetDeviceResponseBeaconIdParams | None = Field(
        default=None, validation_alias="beaconIdParams", serialization_alias="beaconIdParams"
    )


class GetDeviceResponseBeaconIdParams(_BaseSchema):
    """Beacon Id parameters with an identifier and major and minor versions."""

    uuid: str | None = None
    major: int | None = None
    minor: int | None = None


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

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


class RebootDeviceResponse(_BaseSchema):
    """Response for rebootDevice operation."""

    success: bool | None = None


class UpdateDeviceCellularSimsResponse(_BaseSchema):
    """Response for updateDeviceCellularSims operation."""

    sims: list[GetDeviceCellularSimsResponseSimsItem] = Field(default_factory=list)
    sim_ordering: list[str] = Field(
        default_factory=list, validation_alias="simOrdering", serialization_alias="simOrdering"
    )
    sim_failover: GetDeviceCellularSimsResponseSimFailover | None = Field(
        default=None, validation_alias="simFailover", serialization_alias="simFailover"
    )


class UpdateDeviceCellularSimsSimFailover(_BaseSchema):
    """SIM Failover settings."""

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


class UpdateDeviceCellularSimsSimsItem(_BaseSchema):
    """Item schema for sims."""

    slot: str | None = None
    is_primary: bool | None = Field(
        default=None, validation_alias="isPrimary", serialization_alias="isPrimary"
    )
    apns: list[DevicesSimsApnsItem] = Field(default_factory=list)
    sim_order: int | None = Field(
        default=None, validation_alias="simOrder", serialization_alias="simOrder"
    )


class UpdateDeviceManagementInterfaceResponse(_BaseSchema):
    """Response for updateDeviceManagementInterface operation."""

    ddns_hostnames: GetDeviceManagementInterfaceResponseDdnsHostnames | None = Field(
        default=None, validation_alias="ddnsHostnames", serialization_alias="ddnsHostnames"
    )
    wan1: GetDeviceManagementInterfaceResponseWan1 | None = None
    wan2: GetDeviceManagementInterfaceResponseWan1 | None = None


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

    wan_enabled: str | None = Field(
        default=None, validation_alias="wanEnabled", serialization_alias="wanEnabled"
    )
    using_static_ip: bool | None = Field(
        default=None, validation_alias="usingStaticIp", serialization_alias="usingStaticIp"
    )
    static_ip: str | None = Field(
        default=None, validation_alias="staticIp", serialization_alias="staticIp"
    )
    static_gateway_ip: str | None = Field(
        default=None, validation_alias="staticGatewayIp", serialization_alias="staticGatewayIp"
    )
    static_subnet_mask: str | None = Field(
        default=None, validation_alias="staticSubnetMask", serialization_alias="staticSubnetMask"
    )
    static_dns: list[str] = Field(
        default_factory=list, validation_alias="staticDns", serialization_alias="staticDns"
    )
    vlan: int | None = None


class UpdateDeviceManagementInterfaceWan2(_BaseSchema):
    """WAN 2 settings (only for MX devices)."""

    wan_enabled: str | None = Field(
        default=None, validation_alias="wanEnabled", serialization_alias="wanEnabled"
    )
    using_static_ip: bool | None = Field(
        default=None, validation_alias="usingStaticIp", serialization_alias="usingStaticIp"
    )
    static_ip: str | None = Field(
        default=None, validation_alias="staticIp", serialization_alias="staticIp"
    )
    static_gateway_ip: str | None = Field(
        default=None, validation_alias="staticGatewayIp", serialization_alias="staticGatewayIp"
    )
    static_subnet_mask: str | None = Field(
        default=None, validation_alias="staticSubnetMask", serialization_alias="staticSubnetMask"
    )
    static_dns: list[str] = Field(
        default_factory=list, validation_alias="staticDns", serialization_alias="staticDns"
    )
    vlan: int | None = None


class UpdateDeviceResponse(_BaseSchema):
    """Response for updateDevice operation."""

    name: str | None = None
    lat: float | None = None
    lng: float | None = None
    address: str | None = None
    notes: str | None = None
    tags: list[str] = Field(default_factory=list)
    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    serial: str | None = None
    model: str | None = None
    mac: str | None = None
    lan_ip: str | None = Field(default=None, validation_alias="lanIp", serialization_alias="lanIp")
    firmware: str | None = None
    floor_plan_id: str | None = Field(
        default=None, validation_alias="floorPlanId", serialization_alias="floorPlanId"
    )
    details: list[GetDeviceResponseDetailsItem] = Field(default_factory=list)
    beacon_id_params: GetDeviceResponseBeaconIdParams | None = Field(
        default=None, validation_alias="beaconIdParams", serialization_alias="beaconIdParams"
    )
