"""Response schemas for campus_gateway endpoints.

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

from __future__ import annotations

from pydantic import Field

from meraki_client.schemas._base import _BaseSchema


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

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


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

    protocol: str
    address: str


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

    protocol: str | None = None
    address: str


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

    assignment_mode: str | None = Field(
        default=None, validation_alias="assignmentMode", serialization_alias="assignmentMode"
    )
    protocol: str | None = None
    gateway: str | None = None
    subnet_mask: str | None = Field(
        default=None, validation_alias="subnetMask", serialization_alias="subnetMask"
    )
    address: str | None = None


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

    interface: str | None = None
    addresses: list[CampusGatewayAddressesItem] = Field(default_factory=list)


class CampusGatewayNetwork(_BaseSchema):
    """Network details of the cluster."""

    id: str | None = None


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

    protocol: str | None = None
    gateway: str | None = None
    subnet_mask: str | None = Field(
        default=None, validation_alias="subnetMask", serialization_alias="subnetMask"
    )


class CampusGatewayTunnelsUplink(_BaseSchema):
    """Use uplink interface as tunnel interface."""

    interface: str | None = None


class CampusGatewayUplink(_BaseSchema):
    """Uplink setting of the cluster."""

    interface: str | None = None
    vlan: int | None = None
    addresses: list[CampusGatewayAddressesItem4] = Field(default_factory=list)


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

    assignment_mode: str | None = Field(
        default=None, validation_alias="assignmentMode", serialization_alias="assignmentMode"
    )
    protocol: str | None = None
    gateway: str | None = None
    subnet_mask: str | None = Field(
        default=None, validation_alias="subnetMask", serialization_alias="subnetMask"
    )


class CreateNetworkCampusGatewayClusterDevicesItem(_BaseSchema):
    """Item schema for devices."""

    serial: str
    uplinks: list[CreateNetworkCampusGatewayClusterDevicesItemUplinksItem] = Field(
        default_factory=list
    )
    tunnels: list[CreateNetworkCampusGatewayClusterDevicesItemUplinksItem] = Field(
        default_factory=list
    )


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

    interface: str
    addresses: list[CampusGatewayAddressesItem2]


class CreateNetworkCampusGatewayClusterNameservers(_BaseSchema):
    """Nameservers of the cluster."""

    addresses: list[str] = Field(default_factory=list)


class CreateNetworkCampusGatewayClusterPortChannelsItem(_BaseSchema):
    """Item schema for portChannels."""

    name: str
    vlan: int
    allowed_vlans: str = Field(validation_alias="allowedVlans", serialization_alias="allowedVlans")


class CreateNetworkCampusGatewayClusterResponse(_BaseSchema):
    """Response for createNetworkCampusGatewayCluster operation."""

    cluster_id: str | None = Field(
        default=None, validation_alias="clusterId", serialization_alias="clusterId"
    )
    name: str | None = None
    uplinks: list[CreateNetworkCampusGatewayClusterResponseUplinksItem] = Field(
        default_factory=list
    )
    tunnels: list[CreateNetworkCampusGatewayClusterResponseTunnelsItem] = Field(
        default_factory=list
    )
    nameservers: CreateNetworkCampusGatewayClusterResponseNameservers | None = None
    port_channels: list[CreateNetworkCampusGatewayClusterResponsePortChannelsItem] = Field(
        default_factory=list, validation_alias="portChannels", serialization_alias="portChannels"
    )
    devices: list[CreateNetworkCampusGatewayClusterResponseDevicesItem] = Field(
        default_factory=list
    )
    notes: str | None = None
    url: str | None = None


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

    serial: str | None = None
    member_id: str | None = Field(
        default=None, validation_alias="memberId", serialization_alias="memberId"
    )
    uplinks: list[CampusGatewayDevicesUplinksItem] = Field(default_factory=list)
    tunnels: list[CampusGatewayDevicesUplinksItem] = Field(default_factory=list)


class CreateNetworkCampusGatewayClusterResponseNameservers(_BaseSchema):
    """Nameservers of the cluster."""

    addresses: list[str] = Field(default_factory=list)


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

    id: str | None = None
    name: str | None = None
    vlan: int | None = None
    allowed_vlans: str | None = Field(
        default=None, validation_alias="allowedVlans", serialization_alias="allowedVlans"
    )


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

    uplink: CampusGatewayTunnelsUplink | None = None
    interface: str | None = None
    vlan: int | None = None
    addresses: list[CampusGatewayTunnelsAddressesItem] = Field(default_factory=list)


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

    interface: str | None = None
    vlan: int | None = None
    addresses: list[CampusGatewayUplinksAddressesItem] = Field(default_factory=list)


class CreateNetworkCampusGatewayClusterTunnelsItem(_BaseSchema):
    """Item schema for tunnels."""

    uplink: CreateNetworkCampusGatewayClusterTunnelsItemUplink | None = None
    interface: str | None = None
    vlan: int | None = None
    addresses: list[CreateNetworkCampusGatewayClusterTunnelsItemAddressesItem] = Field(
        default_factory=list
    )


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

    protocol: str
    gateway: str
    subnet_mask: str = Field(validation_alias="subnetMask", serialization_alias="subnetMask")


class CreateNetworkCampusGatewayClusterTunnelsItemUplink(_BaseSchema):
    """Uplink interface details if uplink is reused as tunnel."""

    interface: str


class CreateNetworkCampusGatewayClusterUplinksItem(_BaseSchema):
    """Item schema for uplinks."""

    interface: str
    vlan: int
    addresses: list[CreateNetworkCampusGatewayClusterUplinksItemAddressesItem]


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

    assignment_mode: str = Field(
        validation_alias="assignmentMode", serialization_alias="assignmentMode"
    )
    protocol: str | None = None
    gateway: str | None = None
    subnet_mask: str | None = Field(
        default=None, validation_alias="subnetMask", serialization_alias="subnetMask"
    )


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

    network: CampusGatewayNetwork | None = None
    cluster_id: str | None = Field(
        default=None, validation_alias="clusterId", serialization_alias="clusterId"
    )
    name: str | None = None
    uplinks: list[CreateNetworkCampusGatewayClusterResponseUplinksItem] = Field(
        default_factory=list
    )
    tunnels: list[CreateNetworkCampusGatewayClusterResponseTunnelsItem] = Field(
        default_factory=list
    )
    nameservers: CreateNetworkCampusGatewayClusterResponseNameservers | None = None
    port_channels: list[CreateNetworkCampusGatewayClusterResponsePortChannelsItem] = Field(
        default_factory=list, validation_alias="portChannels", serialization_alias="portChannels"
    )
    devices: list[CreateNetworkCampusGatewayClusterResponseDevicesItem] = Field(
        default_factory=list
    )
    notes: str | None = None
    url: str | None = None


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

    serial: str | None = None
    uplink: CampusGatewayUplink | None = None
    nameservers: CreateNetworkCampusGatewayClusterResponseNameservers | None = None
    sgt: int | None = None


class UpdateNetworkCampusGatewayClusterDevicesItem(_BaseSchema):
    """Item schema for devices."""

    serial: str
    uplinks: list[UpdateNetworkCampusGatewayClusterDevicesItemUplinksItem] = Field(
        default_factory=list
    )
    tunnels: list[UpdateNetworkCampusGatewayClusterDevicesItemUplinksItem] = Field(
        default_factory=list
    )


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

    interface: str
    addresses: list[CampusGatewayAddressesItem3]


class UpdateNetworkCampusGatewayClusterNameservers(_BaseSchema):
    """Nameservers of the cluster."""

    addresses: list[str] = Field(default_factory=list)


class UpdateNetworkCampusGatewayClusterPortChannelsItem(_BaseSchema):
    """Item schema for portChannels."""

    name: str
    vlan: int | None = None
    allowed_vlans: str | None = Field(
        default=None, validation_alias="allowedVlans", serialization_alias="allowedVlans"
    )


class UpdateNetworkCampusGatewayClusterResponse(_BaseSchema):
    """Response for updateNetworkCampusGatewayCluster operation."""

    cluster_id: str | None = Field(
        default=None, validation_alias="clusterId", serialization_alias="clusterId"
    )
    name: str | None = None
    uplinks: list[CreateNetworkCampusGatewayClusterResponseUplinksItem] = Field(
        default_factory=list
    )
    tunnels: list[CreateNetworkCampusGatewayClusterResponseTunnelsItem] = Field(
        default_factory=list
    )
    nameservers: CreateNetworkCampusGatewayClusterResponseNameservers | None = None
    port_channels: list[CreateNetworkCampusGatewayClusterResponsePortChannelsItem] = Field(
        default_factory=list, validation_alias="portChannels", serialization_alias="portChannels"
    )
    devices: list[CreateNetworkCampusGatewayClusterResponseDevicesItem] = Field(
        default_factory=list
    )
    notes: str | None = None
    url: str | None = None


class UpdateNetworkCampusGatewayClusterTunnelsItem(_BaseSchema):
    """Item schema for tunnels."""

    uplink: CreateNetworkCampusGatewayClusterTunnelsItemUplink | None = None
    interface: str | None = None
    vlan: int | None = None
    addresses: list[UpdateNetworkCampusGatewayClusterTunnelsItemAddressesItem] = Field(
        default_factory=list
    )


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

    protocol: str | None = None
    gateway: str | None = None
    subnet_mask: str | None = Field(
        default=None, validation_alias="subnetMask", serialization_alias="subnetMask"
    )


class UpdateNetworkCampusGatewayClusterUplinksItem(_BaseSchema):
    """Item schema for uplinks."""

    interface: str
    vlan: int | None = None
    addresses: list[UpdateNetworkCampusGatewayClusterUplinksItemAddressesItem] = Field(
        default_factory=list
    )


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

    assignment_mode: str | None = Field(
        default=None, validation_alias="assignmentMode", serialization_alias="assignmentMode"
    )
    protocol: str | None = None
    gateway: str | None = None
    subnet_mask: str | None = Field(
        default=None, validation_alias="subnetMask", serialization_alias="subnetMask"
    )
