"""Response schemas for wireless_controller 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 pydantic import Field, RootModel

from meraki_client.schemas._base import _BaseSchema


class GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponse(_BaseSchema):
    """Response for getOrganizationWirelessControllerAvailabilitiesChangeHistory operation."""

    items: (
        list[GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseItemsItem] | None
    ) = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


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

    serial: str | None = None
    changes: list[WirelessControllerChangesItem] | None = None


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

    counts: WirelessControllerMetaCounts | None = None


class GetOrganizationWirelessControllerClientsOverviewHistoryByDeviceByIntervalResponse(
    _BaseSchema
):
    """Response for getOrganizationWirelessControllerClientsOverviewHistoryByDeviceByInterval
    operation.
    """

    items: list[WirelessControllerItemsItem] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerConnectionsResponse(_BaseSchema):
    """Response for getOrganizationWirelessControllerConnections operation."""

    items: list[GetOrganizationWirelessControllerConnectionsResponseItemsItem] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


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

    serial: str | None = None
    controller: WirelessControllerController | None = None
    network: WirelessControllerNetwork2 | None = None


class GetOrganizationWirelessControllerDevicesInterfacesL2ByDeviceResponse(_BaseSchema):
    """Response for getOrganizationWirelessControllerDevicesInterfacesL2ByDevice operation."""

    items: (
        list[GetOrganizationWirelessControllerDevicesInterfacesL2ByDeviceResponseItemsItem] | None
    ) = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


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

    serial: str | None = None
    interfaces: list[WirelessControllerInterfacesItem] | None = None


class GetOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDeviceResponse(
    _BaseSchema
):
    """Response for
    getOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDevice operation.
    """

    items: list[WirelessControllerItemsItem2] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByIntervalResponse(
    _BaseSchema
):
    """Response for getOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByInterval
    operation.
    """

    items: list[WirelessControllerItemsItem3] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerDevicesInterfacesL3ByDeviceResponse(_BaseSchema):
    """Response for getOrganizationWirelessControllerDevicesInterfacesL3ByDevice operation."""

    items: (
        list[GetOrganizationWirelessControllerDevicesInterfacesL3ByDeviceResponseItemsItem] | None
    ) = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


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

    serial: str | None = None
    interfaces: list[WirelessControllerInterfacesItem3] | None = None


class GetOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDeviceResponse(
    _BaseSchema
):
    """Response for
    getOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDevice operation.
    """

    items: list[WirelessControllerItemsItem2] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByIntervalResponse(
    _BaseSchema
):
    """Response for getOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByInterval
    operation.
    """

    items: list[WirelessControllerItemsItem3] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDeviceResponse(
    _BaseSchema
):
    """Response for getOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDevice
    operation.
    """

    items: list[WirelessControllerItemsItem4] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerDevicesInterfacesUsageHistoryByIntervalResponse(_BaseSchema):
    """Response for getOrganizationWirelessControllerDevicesInterfacesUsageHistoryByInterval
    operation.
    """

    items: list[WirelessControllerItemsItem5] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerDevicesRedundancyFailoverHistoryResponse(
    RootModel[list["GetOrganizationWirelessControllerDevicesRedundancyFailoverHistoryResponseItem"]]
):
    """Response for getOrganizationWirelessControllerDevicesRedundancyFailoverHistory operation."""


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

    items: list[WirelessControllerItemsItem6] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerDevicesRedundancyStatusesResponse(_BaseSchema):
    """Response for getOrganizationWirelessControllerDevicesRedundancyStatuses operation."""

    items: (
        list[GetOrganizationWirelessControllerDevicesRedundancyStatusesResponseItemsItem] | None
    ) = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


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

    serial: str | None = None
    mode: str | None = None
    enabled: bool | None = None
    failover: WirelessControllerFailover | None = None
    mobility_mac: str | None = Field(
        default=None, validation_alias="mobilityMac", serialization_alias="mobilityMac"
    )


class GetOrganizationWirelessControllerDevicesSystemUtilizationHistoryByIntervalResponse(
    _BaseSchema
):
    """Response for getOrganizationWirelessControllerDevicesSystemUtilizationHistoryByInterval
    operation.
    """

    items: list[WirelessControllerItemsItem7] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


class GetOrganizationWirelessControllerOverviewByDeviceResponse(_BaseSchema):
    """Response for getOrganizationWirelessControllerOverviewByDevice operation."""

    items: list[GetOrganizationWirelessControllerOverviewByDeviceResponseItemsItem] | None = None
    meta: GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseMeta | None = None


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

    serial: str | None = None
    network: WirelessControllerNetwork | None = None
    counts: WirelessControllerCounts3 | None = None
    redundancy: WirelessControllerRedundancy | None = None
    firmware: WirelessControllerFirmware | None = None


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

    protocol: str | None = None
    address: str | None = None
    subnet: str | None = None


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

    address: str | None = None


class WirelessControllerAverage(_BaseSchema):
    """The average CPU usage of the wireless LAN controller."""

    percentage: float | None = None


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

    name: str | None = None
    usage: WirelessControllerUsage | None = None


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

    name: str | None = None
    usage: WirelessControllerRate | None = None


class WirelessControllerByStatus(_BaseSchema):
    """Client counts by its status."""

    online: int | None = None


class WirelessControllerByStatus2(_BaseSchema):
    """Access point counts by their status."""

    online: int | None = None
    offline: int | None = None


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

    start_ts: datetime | None = Field(
        default=None, validation_alias="startTs", serialization_alias="startTs"
    )
    end_ts: str | None = Field(default=None, validation_alias="endTs", serialization_alias="endTs")
    status: str | None = None


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

    ts: datetime | None = None
    status: str | None = None
    warnings: list[str] | None = None
    errors: list[str] | None = None


class WirelessControllerChannelGroup(_BaseSchema):
    """The channel group of this wireless LAN controller interface."""

    number: int | None = None


class WirelessControllerConnections(_BaseSchema):
    """Wireless LAN controller associated access point counts."""

    total: int | None = None
    by_status: WirelessControllerByStatus2 | None = Field(
        default=None, validation_alias="byStatus", serialization_alias="byStatus"
    )


class WirelessControllerController(_BaseSchema):
    """Associated wireless LAN controller."""

    serial: str | None = None


class WirelessControllerCounts(_BaseSchema):
    """Client counts."""

    by_status: WirelessControllerByStatus | None = Field(
        default=None, validation_alias="byStatus", serialization_alias="byStatus"
    )


class WirelessControllerCounts2(_BaseSchema):
    """Wireless LAN controller switchover counts."""

    total: int | None = None


class WirelessControllerCounts3(_BaseSchema):
    """Wireless LAN controller client and access point counts."""

    clients: WirelessControllerCounts | None = None
    connections: WirelessControllerConnections | None = None


class WirelessControllerFailed(_BaseSchema):
    """Details about the failed unit."""

    chassis: WirelessControllerVrf | None = None


class WirelessControllerFailover(_BaseSchema):
    """Wireless LAN controller failover information."""

    last: WirelessControllerLast | None = None
    counts: WirelessControllerCounts2 | None = None


class WirelessControllerFirmware(_BaseSchema):
    """Wireless LAN controller device firmware information."""

    version: WirelessControllerVersion | None = None


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

    name: str | None = None
    description: str | None = None
    enabled: bool | None = None
    mac: str | None = None
    status: str | None = None
    speed: str | None = None
    is_uplink: bool | None = Field(
        default=None, validation_alias="isUplink", serialization_alias="isUplink"
    )
    vlan: int | None = None
    is_redundancy_port: bool | None = Field(
        default=None, validation_alias="isRedundancyPort", serialization_alias="isRedundancyPort"
    )
    link_negotiation: str | None = Field(
        default=None, validation_alias="linkNegotiation", serialization_alias="linkNegotiation"
    )
    channel_group: WirelessControllerChannelGroup | None = Field(
        default=None, validation_alias="channelGroup", serialization_alias="channelGroup"
    )
    module: WirelessControllerModule | None = None


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

    name: str | None = None
    mac: str | None = None
    changes: list[WirelessControllerChangesItem2] | None = None


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

    name: str | None = None
    description: str | None = None
    mac: str | None = None
    status: str | None = None
    speed: str | None = None
    addresses: list[WirelessControllerAddressesItem] | None = None
    vrf: WirelessControllerVrf | None = None
    is_uplink: bool | None = Field(
        default=None, validation_alias="isUplink", serialization_alias="isUplink"
    )
    vlan: int | None = None
    link_negotiation: str | None = Field(
        default=None, validation_alias="linkNegotiation", serialization_alias="linkNegotiation"
    )
    channel_group: WirelessControllerChannelGroup | None = Field(
        default=None, validation_alias="channelGroup", serialization_alias="channelGroup"
    )
    module: WirelessControllerModule | None = None


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

    name: str | None = None
    readings: list[WirelessControllerReadingsItem3] | None = None


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

    start_ts: str | None = Field(
        default=None, validation_alias="startTs", serialization_alias="startTs"
    )
    end_ts: str | None = Field(default=None, validation_alias="endTs", serialization_alias="endTs")
    overall: WirelessControllerRate | None = None
    by_interface: list[WirelessControllerByInterfaceItem] | None = Field(
        default=None, validation_alias="byInterface", serialization_alias="byInterface"
    )


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

    start_ts: str | None = Field(
        default=None, validation_alias="startTs", serialization_alias="startTs"
    )
    end_ts: str | None = Field(default=None, validation_alias="endTs", serialization_alias="endTs")
    overall: WirelessControllerOverall | None = None
    by_core: list[WirelessControllerByCoreItem] | None = Field(
        default=None, validation_alias="byCore", serialization_alias="byCore"
    )


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

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


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

    serial: str | None = None
    network: WirelessControllerNetwork | None = None
    readings: list[WirelessControllerReadingsItem] | None = None


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

    serial: str | None = None
    interfaces: list[WirelessControllerInterfacesItem2] | None = None


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

    serial: str | None = None
    readings: list[WirelessControllerReadingsItem2] | None = None


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

    serial: str | None = None
    interfaces: list[WirelessControllerInterfacesItem4] | None = None


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

    serial: str | None = None
    intervals: list[WirelessControllerIntervalsItem] | None = None


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

    serial: str | None = None
    ts: datetime | None = None
    reason: str | None = None
    failed: WirelessControllerFailed | None = None
    active: WirelessControllerFailed | None = None


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

    serial: str | None = None
    intervals: list[WirelessControllerIntervalsItem2] | None = None


class WirelessControllerLast(_BaseSchema):
    """Wireless LAN controller last failover information."""

    ts: datetime | None = None
    reason: str | None = None


class WirelessControllerManagement(_BaseSchema):
    """Wireless LAN controller redundancy management interface information."""

    addresses: list[WirelessControllerAddressesItem2] | None = None


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

    items: WirelessControllerItems | None = None


class WirelessControllerModule(_BaseSchema):
    """The module of this wireless LAN controller interface."""

    model: str | None = None


class WirelessControllerNetwork(_BaseSchema):
    """Wireless LAN controller network."""

    id: str | None = None


class WirelessControllerNetwork2(_BaseSchema):
    """Access points network."""

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


class WirelessControllerOverall(_BaseSchema):
    """The overall CPU usage of the wireless LAN controller."""

    usage: WirelessControllerUsage | None = None


class WirelessControllerRate(_BaseSchema):
    """The interface packet rates measured in packets per second."""

    total: int | None = None
    recv: int | None = None
    send: int | None = None


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

    start_ts: datetime | None = Field(
        default=None, validation_alias="startTs", serialization_alias="startTs"
    )
    end_ts: datetime | None = Field(
        default=None, validation_alias="endTs", serialization_alias="endTs"
    )
    counts: WirelessControllerCounts | None = None


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

    name: str | None = None
    mac: str | None = None
    recv: int | None = None
    send: int | None = None


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

    name: str | None = None
    total: int | None = None
    recv: int | None = None
    send: int | None = None
    rate: WirelessControllerRate | None = None


class WirelessControllerRedundancy(_BaseSchema):
    """Wireless LAN controller redundancy information."""

    role: str | None = None
    id: str | None = None
    chassis_name: str | None = Field(
        default=None, validation_alias="chassisName", serialization_alias="chassisName"
    )
    redundant_serial: str | None = Field(
        default=None, validation_alias="redundantSerial", serialization_alias="redundantSerial"
    )
    management: WirelessControllerManagement | None = None


class WirelessControllerUsage(_BaseSchema):
    """The CPU usage of the wireless LAN controller."""

    average: WirelessControllerAverage | None = None


class WirelessControllerVersion(_BaseSchema):
    """Wireless LAN controller firmware version."""

    short_name: str | None = Field(
        default=None, validation_alias="shortName", serialization_alias="shortName"
    )


class WirelessControllerVrf(_BaseSchema):
    """The virtual routing and forwarding (VRF) for the wireless LAN controller interface."""

    name: str | None = None
