"""Response schemas for cellular_gateway 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 CellularGatewayApnsItem(_BaseSchema):
    """Schema for CellularGatewayApnsItem."""

    name: str | None = None


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

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


class CellularGatewayDevice(_BaseSchema):
    """Meraki Device properties."""

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


class CellularGatewayLogo(_BaseSchema):
    """Service Provider logo data."""

    url: str | None = None


class CellularGatewayNetwork(_BaseSchema):
    """Meraki Network properties."""

    id: str | None = None


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

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


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

    custom_apns: list[str] = Field(
        default_factory=list, validation_alias="customApns", serialization_alias="customApns"
    )
    iccid: str | None = None
    status: str | None = None
    service_provider: CellularGatewayServiceProvider | None = Field(
        default=None, validation_alias="serviceProvider", serialization_alias="serviceProvider"
    )


class CellularGatewayRoaming(_BaseSchema):
    """Roaming Status."""

    status: str | None = None


class CellularGatewayServiceProvider(_BaseSchema):
    """Service Provider information."""

    name: str | None = None
    plans: list[CellularGatewayPlansItem] = Field(default_factory=list)


class CellularGatewayServiceProvider2(_BaseSchema):
    """Service provider data."""

    name: str | None = None
    logo: CellularGatewayLogo | None = None


class CellularGatewaySignalStat(_BaseSchema):
    """Tower Signal Status (Cellular Signal Stats)."""

    rsrp: str | None = None
    rsrq: str | None = None


class CellularGatewayTerms(_BaseSchema):
    """Service provider terms."""

    content: str | None = None
    name: str | None = None


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

    interface: str | None = None
    status: str | None = None
    ip: str | None = None
    provider: str | None = None
    public_ip: str | None = Field(
        default=None, validation_alias="publicIp", serialization_alias="publicIp"
    )
    model: str | None = None
    signal_stat: CellularGatewaySignalStat | None = Field(
        default=None, validation_alias="signalStat", serialization_alias="signalStat"
    )
    mcc: str | None = None
    mnc: str | None = None
    roaming: CellularGatewayRoaming | None = None
    connection_type: str | None = Field(
        default=None, validation_alias="connectionType", serialization_alias="connectionType"
    )
    apn: str | None = None
    gateway: str | None = None
    dns1: str | None = None
    dns2: str | None = None
    signal_type: str | None = Field(
        default=None, validation_alias="signalType", serialization_alias="signalType"
    )
    mtu: int | None = None
    iccid: str | None = None
    imsi: str | None = None
    msisdn: str | None = None


class CreateOrganizationCellularGatewayEsimsServiceProvidersAccountResponse(_BaseSchema):
    """Response for createOrganizationCellularGatewayEsimsServiceProvidersAccount operation."""

    account_id: str | None = Field(
        default=None, validation_alias="accountId", serialization_alias="accountId"
    )
    last_updated_at: str | None = Field(
        default=None, validation_alias="lastUpdatedAt", serialization_alias="lastUpdatedAt"
    )
    service_provider: CellularGatewayServiceProvider2 | None = Field(
        default=None, validation_alias="serviceProvider", serialization_alias="serviceProvider"
    )
    title: str | None = None
    username: str | None = None


class CreateOrganizationCellularGatewayEsimsServiceProvidersAccountServiceProvider(_BaseSchema):
    """Service Provider information."""

    name: str | None = None


class CreateOrganizationCellularGatewayEsimsSwapResponse(_BaseSchema):
    """Response for createOrganizationCellularGatewayEsimsSwap operation."""

    eid: str
    iccid: str
    status: str


class CreateOrganizationCellularGatewayEsimsSwapSwapsItem(_BaseSchema):
    """Item schema for swaps."""

    eid: str
    target: CreateOrganizationCellularGatewayEsimsSwapSwapsItemTarget | None = None


class CreateOrganizationCellularGatewayEsimsSwapSwapsItemTarget(_BaseSchema):
    """Target Profile attributes."""

    account_id: str = Field(validation_alias="accountId", serialization_alias="accountId")
    communication_plan: str = Field(
        validation_alias="communicationPlan", serialization_alias="communicationPlan"
    )
    rate_plan: str = Field(validation_alias="ratePlan", serialization_alias="ratePlan")


class GetDeviceCellularGatewayLanResponse(_BaseSchema):
    """Response for getDeviceCellularGatewayLan operation."""

    device_name: str | None = Field(
        default=None, validation_alias="deviceName", serialization_alias="deviceName"
    )
    device_lan_ip: str | None = Field(
        default=None, validation_alias="deviceLanIp", serialization_alias="deviceLanIp"
    )
    device_subnet: str | None = Field(
        default=None, validation_alias="deviceSubnet", serialization_alias="deviceSubnet"
    )
    fixed_ip_assignments: list[GetDeviceCellularGatewayLanResponseFixedIpAssignmentsItem] = Field(
        default_factory=list,
        validation_alias="fixedIpAssignments",
        serialization_alias="fixedIpAssignments",
    )
    reserved_ip_ranges: list[GetDeviceCellularGatewayLanResponseReservedIpRangesItem] = Field(
        default_factory=list,
        validation_alias="reservedIpRanges",
        serialization_alias="reservedIpRanges",
    )


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

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


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

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


class GetDeviceCellularGatewayPortForwardingRulesResponse(_BaseSchema):
    """Response for getDeviceCellularGatewayPortForwardingRules operation."""

    rules: list[GetDeviceCellularGatewayPortForwardingRulesResponseRulesItem] = Field(
        default_factory=list
    )


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

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


class GetNetworkCellularGatewayConnectivityMonitoringDestinationsResponse(_BaseSchema):
    """Response for getNetworkCellularGatewayConnectivityMonitoringDestinations operation."""

    destinations: list[CellularGatewayDestinationsItem] = Field(default_factory=list)


class GetNetworkCellularGatewayDhcpResponse(_BaseSchema):
    """Response for getNetworkCellularGatewayDhcp operation."""

    dhcp_lease_time: str | None = Field(
        default=None, validation_alias="dhcpLeaseTime", serialization_alias="dhcpLeaseTime"
    )
    dns_nameservers: str | None = Field(
        default=None, validation_alias="dnsNameservers", serialization_alias="dnsNameservers"
    )
    dns_custom_nameservers: list[str] = Field(
        default_factory=list,
        validation_alias="dnsCustomNameservers",
        serialization_alias="dnsCustomNameservers",
    )


class GetNetworkCellularGatewaySubnetPoolResponse(_BaseSchema):
    """Response for getNetworkCellularGatewaySubnetPool operation."""

    deployment_mode: str | None = Field(
        default=None, validation_alias="deploymentMode", serialization_alias="deploymentMode"
    )
    cidr: str | None = None
    mask: int | None = None
    subnets: list[GetNetworkCellularGatewaySubnetPoolResponseSubnetsItem] = Field(
        default_factory=list
    )


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

    serial: str | None = None
    name: str | None = None
    appliance_ip: str | None = Field(
        default=None, validation_alias="applianceIp", serialization_alias="applianceIp"
    )
    subnet: str | None = None


class GetNetworkCellularGatewayUplinkResponse(_BaseSchema):
    """Response for getNetworkCellularGatewayUplink operation."""

    bandwidth_limits: GetNetworkCellularGatewayUplinkResponseBandwidthLimits | None = Field(
        default=None, validation_alias="bandwidthLimits", serialization_alias="bandwidthLimits"
    )


class GetNetworkCellularGatewayUplinkResponseBandwidthLimits(_BaseSchema):
    """The bandwidth settings for the 'cellular' uplink."""

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


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

    device: CellularGatewayDevice | None = None
    active: bool | None = None
    eid: str | None = None
    last_updated_at: str | None = Field(
        default=None, validation_alias="lastUpdatedAt", serialization_alias="lastUpdatedAt"
    )
    network: CellularGatewayNetwork | None = None
    profiles: list[CellularGatewayProfilesItem] = Field(default_factory=list)


class GetOrganizationCellularGatewayEsimsServiceProvidersAccountsCommunicationPlansResponseItemsItem(
    _BaseSchema
):
    """Schema for GetOrganizationCellularGatewayEsimsServiceProvidersAccountsCommunicationPlansResp
    onseItemsItem.
    """

    account_id: str | None = Field(
        default=None, validation_alias="accountId", serialization_alias="accountId"
    )
    apns: list[CellularGatewayApnsItem] = Field(default_factory=list)
    name: str | None = None


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

    account_id: str | None = Field(
        default=None, validation_alias="accountId", serialization_alias="accountId"
    )
    name: str | None = None


class GetOrganizationCellularGatewayEsimsServiceProvidersAccountsResponse(
    RootModel[list["GetOrganizationCellularGatewayEsimsServiceProvidersAccountsResponseItem"]]
):
    """IList of Cellular Service Provider Accounts."""


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

    account_id: str | None = Field(
        default=None, validation_alias="accountId", serialization_alias="accountId"
    )
    last_updated_at: str | None = Field(
        default=None, validation_alias="lastUpdatedAt", serialization_alias="lastUpdatedAt"
    )
    service_provider: CellularGatewayServiceProvider2 | None = Field(
        default=None, validation_alias="serviceProvider", serialization_alias="serviceProvider"
    )
    title: str | None = None
    username: str | None = None


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

    name: str | None = None
    logo: CellularGatewayLogo | None = None
    is_bootstrap: bool | None = Field(
        default=None, validation_alias="isBootstrap", serialization_alias="isBootstrap"
    )
    terms: CellularGatewayTerms | None = None


class GetOrganizationCellularGatewayUplinkStatusesResponse(
    RootModel[list["GetOrganizationCellularGatewayUplinkStatusesResponseItem"]]
):
    """Response for getOrganizationCellularGatewayUplinkStatuses operation."""


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

    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    serial: str | None = None
    model: str | None = None
    last_reported_at: datetime | None = Field(
        default=None, validation_alias="lastReportedAt", serialization_alias="lastReportedAt"
    )
    uplinks: list[CellularGatewayUplinksItem] = Field(default_factory=list)


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

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


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

    start: str
    end: str
    comment: str


class UpdateDeviceCellularGatewayLanResponse(_BaseSchema):
    """Response for updateDeviceCellularGatewayLan operation."""

    device_name: str | None = Field(
        default=None, validation_alias="deviceName", serialization_alias="deviceName"
    )
    device_lan_ip: str | None = Field(
        default=None, validation_alias="deviceLanIp", serialization_alias="deviceLanIp"
    )
    device_subnet: str | None = Field(
        default=None, validation_alias="deviceSubnet", serialization_alias="deviceSubnet"
    )
    fixed_ip_assignments: list[GetDeviceCellularGatewayLanResponseFixedIpAssignmentsItem] = Field(
        default_factory=list,
        validation_alias="fixedIpAssignments",
        serialization_alias="fixedIpAssignments",
    )
    reserved_ip_ranges: list[GetDeviceCellularGatewayLanResponseReservedIpRangesItem] = Field(
        default_factory=list,
        validation_alias="reservedIpRanges",
        serialization_alias="reservedIpRanges",
    )


class UpdateDeviceCellularGatewayPortForwardingRulesResponse(_BaseSchema):
    """Response for updateDeviceCellularGatewayPortForwardingRules operation."""

    rules: list[GetDeviceCellularGatewayPortForwardingRulesResponseRulesItem] = Field(
        default_factory=list
    )


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

    name: str | None = None
    lan_ip: str = Field(validation_alias="lanIp", serialization_alias="lanIp")
    public_port: str = Field(validation_alias="publicPort", serialization_alias="publicPort")
    local_port: str = Field(validation_alias="localPort", serialization_alias="localPort")
    allowed_ips: list[str] = Field(
        default_factory=list, validation_alias="allowedIps", serialization_alias="allowedIps"
    )
    protocol: str
    access: str


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

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


class UpdateNetworkCellularGatewayConnectivityMonitoringDestinationsResponse(_BaseSchema):
    """Response for updateNetworkCellularGatewayConnectivityMonitoringDestinations operation."""

    destinations: list[CellularGatewayDestinationsItem] = Field(default_factory=list)


class UpdateNetworkCellularGatewayDhcpResponse(_BaseSchema):
    """Response for updateNetworkCellularGatewayDhcp operation."""

    dhcp_lease_time: str | None = Field(
        default=None, validation_alias="dhcpLeaseTime", serialization_alias="dhcpLeaseTime"
    )
    dns_nameservers: str | None = Field(
        default=None, validation_alias="dnsNameservers", serialization_alias="dnsNameservers"
    )
    dns_custom_nameservers: list[str] = Field(
        default_factory=list,
        validation_alias="dnsCustomNameservers",
        serialization_alias="dnsCustomNameservers",
    )


class UpdateNetworkCellularGatewaySubnetPoolResponse(_BaseSchema):
    """Response for updateNetworkCellularGatewaySubnetPool operation."""

    deployment_mode: str | None = Field(
        default=None, validation_alias="deploymentMode", serialization_alias="deploymentMode"
    )
    cidr: str | None = None
    mask: int | None = None
    subnets: list[GetNetworkCellularGatewaySubnetPoolResponseSubnetsItem] = Field(
        default_factory=list
    )


class UpdateNetworkCellularGatewayUplinkBandwidthLimits(_BaseSchema):
    """The bandwidth settings for the 'cellular' uplink."""

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


class UpdateNetworkCellularGatewayUplinkResponse(_BaseSchema):
    """Response for updateNetworkCellularGatewayUplink operation."""

    bandwidth_limits: GetNetworkCellularGatewayUplinkResponseBandwidthLimits | None = Field(
        default=None, validation_alias="bandwidthLimits", serialization_alias="bandwidthLimits"
    )


class UpdateOrganizationCellularGatewayEsimsInventoryResponse(_BaseSchema):
    """Response for updateOrganizationCellularGatewayEsimsInventory operation."""

    device: CellularGatewayDevice | None = None
    active: bool | None = None
    eid: str | None = None
    last_updated_at: str | None = Field(
        default=None, validation_alias="lastUpdatedAt", serialization_alias="lastUpdatedAt"
    )
    network: CellularGatewayNetwork | None = None
    profiles: list[CellularGatewayProfilesItem] = Field(default_factory=list)


class UpdateOrganizationCellularGatewayEsimsServiceProvidersAccountResponse(_BaseSchema):
    """Response for updateOrganizationCellularGatewayEsimsServiceProvidersAccount operation."""

    account_id: str | None = Field(
        default=None, validation_alias="accountId", serialization_alias="accountId"
    )
    last_updated_at: str | None = Field(
        default=None, validation_alias="lastUpdatedAt", serialization_alias="lastUpdatedAt"
    )
    service_provider: CellularGatewayServiceProvider2 | None = Field(
        default=None, validation_alias="serviceProvider", serialization_alias="serviceProvider"
    )
    title: str | None = None
    username: str | None = None


class UpdateOrganizationCellularGatewayEsimsSwapResponse(_BaseSchema):
    """Response for updateOrganizationCellularGatewayEsimsSwap operation."""

    eid: str
    iccid: str
    status: str
