"""WirelessController API endpoints.

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

"""

from __future__ import annotations

import urllib.parse
from typing import TYPE_CHECKING, Any, Literal

from meraki_client.schemas import (
    GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseItemsItem,
    GetOrganizationWirelessControllerClientsOverviewHistoryByDeviceByIntervalResponseItemsItem,
    GetOrganizationWirelessControllerConnectionsResponseItemsItem,
    GetOrganizationWirelessControllerDevicesInterfacesL2ByDeviceResponseItemsItem,
    GetOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDeviceResponseItemsItem,
    GetOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByIntervalResponseItemsItem,
    GetOrganizationWirelessControllerDevicesInterfacesL3ByDeviceResponseItemsItem,
    GetOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDeviceResponseItemsItem,
    GetOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByIntervalResponseItemsItem,
    GetOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDeviceResponseItemsItem,
    GetOrganizationWirelessControllerDevicesInterfacesUsageHistoryByIntervalResponseItemsItem,
    GetOrganizationWirelessControllerDevicesRedundancyFailoverHistoryResponseItem,
    GetOrganizationWirelessControllerDevicesRedundancyStatusesResponseItemsItem,
    GetOrganizationWirelessControllerDevicesSystemUtilizationHistoryByIntervalResponseItemsItem,
    GetOrganizationWirelessControllerOverviewByDeviceResponseItemsItem,
)

if TYPE_CHECKING:
    from meraki_client._session import PaginatedResponse, Session


class WirelessController:
    """WirelessController class."""

    def __init__(self, session: Session) -> None:
        self._session = session

    def get_organization_wireless_controller_availabilities_change_history(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseItemsItem
    ]:
        """List connectivity data of wireless LAN controllers in an organization.

        [API documentation: getOrganizationWirelessControllerAvailabilitiesChangeHistory](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-availabilities-change-history)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "changes": [
                    {
                      "startTs": "2020-01-01T00:00:00Z",
                      "endTs": "null",
                      "status": "online"
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/availabilities/changeHistory"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerAvailabilitiesChangeHistory",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerAvailabilitiesChangeHistoryResponseItemsItem,
        )

    def get_organization_wireless_controller_clients_overview_history_by_device_by_interval(
        self,
        organization_id: str,
        *,
        network_ids: list[str] | None = None,
        serials: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        resolution: int | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerClientsOverviewHistoryByDeviceByIntervalResponseItemsItem
    ]:
        """List wireless client counts of wireless LAN controllers over time in an organization.

        [API documentation: getOrganizationWirelessControllerClientsOverviewHistoryByDeviceByInterval](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-clients-overview-history-by-device-by-interval)

        Args:
            organization_id: Organization ID.
            network_ids: Optional parameter to filter wireless LAN controllers by network ID. This
                filter uses multiple exact matches.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            resolution: The time resolution in seconds for returned data. The valid resolutions are:
                300, 600, 1200, 3600, 14400, 86400. The default is 86400.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "network": {
                    "id": "N_24329156"
                  },
                  "readings": [
                    {
                      "startTs": "2020-01-01T00:00:00Z",
                      "endTs": "2020-01-01T01:00:00Z",
                      "counts": {
                        "byStatus": {
                          "online": 1
                        }
                      }
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/clients/overview/history/byDevice/byInterval"

        params: dict[str, Any] = {}
        if network_ids is not None:
            params["networkIds[]"] = network_ids
        if serials is not None:
            params["serials[]"] = serials
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before
        if resolution is not None:
            params["resolution"] = resolution

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerClientsOverviewHistoryByDeviceByInterval",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerClientsOverviewHistoryByDeviceByIntervalResponseItemsItem,
        )

    def get_organization_wireless_controller_connections(
        self,
        organization_id: str,
        *,
        network_ids: list[str] | None = None,
        controller_serials: list[str] | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[GetOrganizationWirelessControllerConnectionsResponseItemsItem]:
        """List all access points associated with wireless LAN controllers in an organization.

        [API documentation: getOrganizationWirelessControllerConnections](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-connections)

        Args:
            organization_id: Organization ID.
            network_ids: Optional parameter to filter access points by network ID. This filter uses
                multiple exact matches.
            controller_serials: Optional parameter to filter access points by its controller cloud
                ID. This filter uses multiple exact matches.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "controller": {
                    "serial": "Q234-ABCD-5678"
                  },
                  "network": {
                    "id": "N_24329156",
                    "url": "https://network/url",
                    "name": "Network1"
                  }
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/connections"

        params: dict[str, Any] = {}
        if network_ids is not None:
            params["networkIds[]"] = network_ids
        if controller_serials is not None:
            params["controllerSerials[]"] = controller_serials
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerConnections",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerConnectionsResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_interfaces_l2_by_device(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesInterfacesL2ByDeviceResponseItemsItem
    ]:
        """List wireless LAN controller layer 2 interfaces in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesInterfacesL2ByDevice](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-interfaces-l-2-by-device)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "interfaces": [
                    {
                      "name": "TenGigabitEthernet0/0/5",
                      "description": "Uplink",
                      "enabled": true,
                      "mac": "b0:c5:3c:0d:c5:0b",
                      "status": "disabled",
                      "speed": "1 Gbps",
                      "isUplink": true,
                      "vlan": 10,
                      "isRedundancyPort": true,
                      "linkNegotiation": "auto",
                      "channelGroup": {
                        "number": 5
                      },
                      "module": {
                        "model": "C9800-2X40GE"
                      }
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/interfaces/l2/byDevice"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesInterfacesL2ByDevice",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesInterfacesL2ByDeviceResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_interfaces_l2_statuses_change_history_by_device(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        include_interfaces_without_changes: bool | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDeviceResponseItemsItem
    ]:
        """List wireless LAN controller layer 2 interfaces history status in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDevice](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-interfaces-l-2-statuses-change-history-by-device)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            include_interfaces_without_changes: By default, interfaces without changes are omitted
                from the response for brevity. If you want to include the interfaces
                even if they have no changes, set to true. (default: false).
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "interfaces": [
                    {
                      "name": "TenGigabitEthernet0/0/5",
                      "mac": "b0:c5:3c:0d:c5:0b",
                      "changes": [
                        {
                          "ts": "2020-01-01T00:00:00Z",
                          "status": "disabled",
                          "warnings": [
                            "CRC warnings"
                          ],
                          "errors": [
                            "CRC errors"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/interfaces/l2/statuses/changeHistory/byDevice"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if include_interfaces_without_changes is not None:
            params["includeInterfacesWithoutChanges"] = include_interfaces_without_changes
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDevice",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesInterfacesL2StatusesChangeHistoryByDeviceResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_interfaces_l2_usage_history_by_interval(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByIntervalResponseItemsItem
    ]:
        """List wireless LAN controller layer 2 interfaces history usage in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByInterval](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-interfaces-l-2-usage-history-by-interval)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "readings": [
                    {
                      "name": "TenGigabitEthernet0/0/5",
                      "mac": "b0:c5:3c:0d:c5:0b",
                      "recv": 0,
                      "send": 0
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/interfaces/l2/usage/history/byInterval"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByInterval",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesInterfacesL2UsageHistoryByIntervalResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_interfaces_l3_by_device(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesInterfacesL3ByDeviceResponseItemsItem
    ]:
        """List wireless LAN controller layer 3 interfaces in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesInterfacesL3ByDevice](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-interfaces-l-3-by-device)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "interfaces": [
                    {
                      "name": "vlan123",
                      "description": "Wireless Mgmt",
                      "mac": "1c:e8:5d:00:00:0c",
                      "status": "disabled",
                      "speed": "1 Gbps",
                      "addresses": [
                        {
                          "protocol": "ipv4",
                          "address": "192.168.123.1",
                          "subnet": "192.168.123.0/24"
                        }
                      ],
                      "vrf": {
                        "name": "Global"
                      },
                      "isUplink": true,
                      "vlan": 10,
                      "linkNegotiation": "auto",
                      "channelGroup": {
                        "number": 5
                      },
                      "module": {
                        "model": "C9800-2X40GE"
                      }
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/interfaces/l3/byDevice"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesInterfacesL3ByDevice",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesInterfacesL3ByDeviceResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_interfaces_l3_statuses_change_history_by_device(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        include_interfaces_without_changes: bool | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDeviceResponseItemsItem
    ]:
        """List wireless LAN controller layer 3 interfaces history status in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDevice](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-interfaces-l-3-statuses-change-history-by-device)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            include_interfaces_without_changes: By default, interfaces without changes are omitted
                from the response for brevity. If you want to include the interfaces
                even if they have no changes, set to true. (default: false).
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "interfaces": [
                    {
                      "name": "TenGigabitEthernet0/0/5",
                      "mac": "b0:c5:3c:0d:c5:0b",
                      "changes": [
                        {
                          "ts": "2020-01-01T00:00:00Z",
                          "status": "disabled",
                          "warnings": [
                            "CRC warnings"
                          ],
                          "errors": [
                            "CRC errors"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/interfaces/l3/statuses/changeHistory/byDevice"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if include_interfaces_without_changes is not None:
            params["includeInterfacesWithoutChanges"] = include_interfaces_without_changes
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDevice",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesInterfacesL3StatusesChangeHistoryByDeviceResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_interfaces_l3_usage_history_by_interval(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByIntervalResponseItemsItem
    ]:
        """List wireless LAN controller layer 3 interfaces history usage in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByInterval](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-interfaces-l-3-usage-history-by-interval)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "readings": [
                    {
                      "name": "TenGigabitEthernet0/0/5",
                      "mac": "b0:c5:3c:0d:c5:0b",
                      "recv": 0,
                      "send": 0
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/interfaces/l3/usage/history/byInterval"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByInterval",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesInterfacesL3UsageHistoryByIntervalResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_interfaces_packets_overview_by_device(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        names: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDeviceResponseItemsItem
    ]:
        """Retrieve the packet counters for the interfaces of a Wireless LAN controller.

        [API documentation: getOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDevice](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-interfaces-packets-overview-by-device)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            names: Optional parameter to filter wireless LAN controller by its interface name. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 1 day
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 1 day after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 1 day. The default is 1 hour.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "interfaces": [
                    {
                      "name": "TenGigabitEthernet0/0/0",
                      "readings": [
                        {
                          "name": "Total",
                          "total": 2001,
                          "recv": 1000,
                          "send": 1001,
                          "rate": {
                            "total": 12,
                            "recv": 3,
                            "send": 8
                          }
                        }
                      ]
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/interfaces/packets/overview/byDevice"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if names is not None:
            params["names[]"] = names
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDevice",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesInterfacesPacketsOverviewByDeviceResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_interfaces_usage_history_by_interval(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        names: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesInterfacesUsageHistoryByIntervalResponseItemsItem
    ]:
        """Retrieve the traffic for the interfaces of a Wireless LAN controller.

        [API documentation: getOrganizationWirelessControllerDevicesInterfacesUsageHistoryByInterval](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-interfaces-usage-history-by-interval)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            names: Optional parameter to filter wireless LAN controller by its interface name. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "intervals": [
                    {
                      "startTs": "2024-07-25T03:20:55Z",
                      "endTs": "2024-07-25T03:25:55Z",
                      "overall": {
                        "total": 12300,
                        "recv": 2300,
                        "send": 10000
                      },
                      "byInterface": [
                        {
                          "name": "TenGigabitEthernet0/0/1",
                          "usage": {
                            "total": 12300,
                            "recv": 2300,
                            "send": 10000
                          }
                        }
                      ]
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/interfaces/usage/history/byInterval"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if names is not None:
            params["names[]"] = names
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesInterfacesUsageHistoryByInterval",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesInterfacesUsageHistoryByIntervalResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_redundancy_failover_history(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesRedundancyFailoverHistoryResponseItem
    ]:
        """List the failover events of wireless LAN controllers in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesRedundancyFailoverHistory](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-redundancy-failover-history)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            [
              {
                "items": [
                  {
                    "serial": "Q234-ABCD-5678",
                    "ts": "2020-01-01T00:00:00Z",
                    "reason": "Active Unit Failed",
                    "failed": {
                      "chassis": {
                        "name": "Chassis 2"
                      }
                    },
                    "active": {
                      "chassis": {
                        "name": "Chassis 1"
                      }
                    }
                  }
                ],
                "meta": {
                  "counts": {
                    "items": {
                      "total": 10,
                      "remaining": 0
                    }
                  }
                }
              }
            ]
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/redundancy/failover/history"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesRedundancyFailoverHistory",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesRedundancyFailoverHistoryResponseItem,
        )

    def get_organization_wireless_controller_devices_redundancy_statuses(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesRedundancyStatusesResponseItemsItem
    ]:
        """List redundancy details of wireless LAN controllers in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesRedundancyStatuses](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-redundancy-statuses)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud IDs. This
                filter uses multiple exact matches.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "mode": "SSO",
                  "enabled": true,
                  "failover": {
                    "last": {
                      "ts": "2020-01-01T00:00:00Z",
                      "reason": "Active Unit Failed"
                    },
                    "counts": {
                      "total": 2
                    }
                  },
                  "mobilityMac": "b0:c5:3c:0d:c5:0b"
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/redundancy/statuses"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesRedundancyStatuses",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesRedundancyStatusesResponseItemsItem,
        )

    def get_organization_wireless_controller_devices_system_utilization_history_by_interval(
        self,
        organization_id: str,
        *,
        serials: list[str] | None = None,
        t0: str | None = None,
        t1: str | None = None,
        timespan: float | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[
        GetOrganizationWirelessControllerDevicesSystemUtilizationHistoryByIntervalResponseItemsItem
    ]:
        """List cpu utilization data of wireless LAN controllers in an organization.

        [API documentation: getOrganizationWirelessControllerDevicesSystemUtilizationHistoryByInterval](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-devices-system-utilization-history-by-interval)

        Args:
            organization_id: Organization ID.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            t0: The beginning of the timespan for the data. The maximum lookback period is 31 days
                from today.
            t1: The end of the timespan for the data. t1 can be a maximum of 31 days after t0.
            timespan: The timespan for which the information will be fetched. If specifying
                timespan, do not specify parameters t0 and t1. The value must be in
                seconds and be less than or equal to 31 days. The default is 7 days.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "intervals": [
                    {
                      "startTs": "2024-03-04T05:25:03Z",
                      "endTs": "2024-03-04T05:30:19Z",
                      "overall": {
                        "usage": {
                          "average": {
                            "percentage": 10.59
                          }
                        }
                      },
                      "byCore": [
                        {
                          "name": "0",
                          "usage": {
                            "average": {
                              "percentage": 2.74
                            }
                          }
                        }
                      ]
                    }
                  ]
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/devices/system/utilization/history/byInterval"

        params: dict[str, Any] = {}
        if serials is not None:
            params["serials[]"] = serials
        if t0 is not None:
            params["t0"] = t0
        if t1 is not None:
            params["t1"] = t1
        if timespan is not None:
            params["timespan"] = timespan
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerDevicesSystemUtilizationHistoryByInterval",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerDevicesSystemUtilizationHistoryByIntervalResponseItemsItem,
        )

    def get_organization_wireless_controller_overview_by_device(
        self,
        organization_id: str,
        *,
        network_ids: list[str] | None = None,
        serials: list[str] | None = None,
        per_page: int | None = None,
        starting_after: str | None = None,
        ending_before: str | None = None,
        total_pages: int | Literal["all"] = "all",
        direction: Literal["prev", "next"] = "next",
    ) -> PaginatedResponse[GetOrganizationWirelessControllerOverviewByDeviceResponseItemsItem]:
        """List the overview information of wireless LAN controllers in an organization and it is updated every minute.

        [API documentation: getOrganizationWirelessControllerOverviewByDevice](https://developer.cisco.com/meraki/api-v1/#!get-organization-wireless-controller-overview-by-device)

        Args:
            organization_id: Organization ID.
            network_ids: Optional parameter to filter wireless LAN controllers by network ID. This
                filter uses multiple exact matches.
            serials: Optional parameter to filter wireless LAN controller by its cloud ID. This
                filter uses multiple exact matches.
            per_page: The number of entries per page returned. Acceptable range is 3 - 1000. Default
                is 1000.
            starting_after: A token used by the server to indicate the start of the page. Often this
                is a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            ending_before: A token used by the server to indicate the end of the page. Often this is
                a timestamp or an ID but it is not limited to those. This parameter
                should not be defined by client applications. The link for the first,
                last, prev, or next page in the HTTP Link header should define it.
            total_pages: use with per_page to get total results up to total_pages * per_page; -1 or
                "all" for all pages.
            direction: direction to paginate, either "next" (default) or "prev" page.

        Returns:
            Successful operation.

        Note:
            Returns a lazy PaginatedResponse
            that can be iterated or collected with `.collect()`.
            Page metadata is available on `.meta` and `.meta_pages`.

        Example API response:
            ```json
            {
              "items": [
                {
                  "serial": "Q234-ABCD-5678",
                  "network": {
                    "id": "N_24329156"
                  },
                  "counts": {
                    "clients": {
                      "byStatus": {
                        "online": 300
                      }
                    },
                    "connections": {
                      "total": 200,
                      "byStatus": {
                        "online": 180,
                        "offline": 20
                      }
                    }
                  },
                  "redundancy": {
                    "role": "Active",
                    "id": "123456",
                    "chassisName": "Chassis 1",
                    "redundantSerial": "Q234-ABCD-5679",
                    "management": {
                      "addresses": [
                        {
                          "address": "10.14.140.5"
                        }
                      ]
                    }
                  },
                  "firmware": {
                    "version": {
                      "shortName": "ios-xe"
                    }
                  }
                }
              ],
              "meta": {
                "counts": {
                  "items": {
                    "total": 10,
                    "remaining": 0
                  }
                }
              }
            }
            ```

        """
        organization_id = urllib.parse.quote(str(organization_id), safe="")
        path = f"/organizations/{organization_id}/wirelessController/overview/byDevice"

        params: dict[str, Any] = {}
        if network_ids is not None:
            params["networkIds[]"] = network_ids
        if serials is not None:
            params["serials[]"] = serials
        if per_page is not None:
            params["perPage"] = per_page
        if starting_after is not None:
            params["startingAfter"] = starting_after
        if ending_before is not None:
            params["endingBefore"] = ending_before

        return self._session.get_pages(
            scope="wirelessController",
            operation_id="getOrganizationWirelessControllerOverviewByDevice",
            path=path,
            params=params,
            total_pages=total_pages,
            direction=direction,
            item_schema=GetOrganizationWirelessControllerOverviewByDeviceResponseItemsItem,
        )
