"""Response schemas for sm endpoints.

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

from __future__ import annotations

from datetime import datetime
from typing import Any

from pydantic import Field, RootModel

from meraki_client.schemas._base import _BaseSchema


class CheckinNetworkSmDevicesResponse(_BaseSchema):
    """Response for checkinNetworkSmDevices operation."""

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


class CreateNetworkSmTargetGroupResponse(_BaseSchema):
    """Response for createNetworkSmTargetGroup operation."""

    id: str | None = None
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)


class CreateOrganizationSmAdminsRoleResponse(_BaseSchema):
    """Response for createOrganizationSmAdminsRole operation."""

    role_id: str | None = Field(
        default=None, validation_alias="roleId", serialization_alias="roleId"
    )
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)


class GetNetworkSmDeviceCellularUsageHistoryResponse(
    RootModel[list["GetNetworkSmDeviceCellularUsageHistoryResponseItem"]]
):
    """Response for getNetworkSmDeviceCellularUsageHistory operation."""


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

    received: float | None = None
    sent: float | None = None
    ts: str | None = None


class GetNetworkSmDeviceCertsResponse(RootModel[list["GetNetworkSmDeviceCertsResponseItem"]]):
    """Response for getNetworkSmDeviceCerts operation."""


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

    name: str | None = None
    not_valid_after: str | None = Field(
        default=None, validation_alias="notValidAfter", serialization_alias="notValidAfter"
    )
    not_valid_before: str | None = Field(
        default=None, validation_alias="notValidBefore", serialization_alias="notValidBefore"
    )
    cert_pem: str | None = Field(
        default=None, validation_alias="certPem", serialization_alias="certPem"
    )
    device_id: str | None = Field(
        default=None, validation_alias="deviceId", serialization_alias="deviceId"
    )
    issuer: str | None = None
    subject: str | None = None
    id: str | None = None


class GetNetworkSmDeviceConnectivityResponse(
    RootModel[list["GetNetworkSmDeviceConnectivityResponseItem"]]
):
    """Response for getNetworkSmDeviceConnectivity operation."""


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

    first_seen_at: str | None = Field(
        default=None, validation_alias="firstSeenAt", serialization_alias="firstSeenAt"
    )
    last_seen_at: str | None = Field(
        default=None, validation_alias="lastSeenAt", serialization_alias="lastSeenAt"
    )


class GetNetworkSmDeviceDesktopLogsResponse(
    RootModel[list["GetNetworkSmDeviceDesktopLogsResponseItem"]]
):
    """Response for getNetworkSmDeviceDesktopLogs operation."""


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

    measured_at: str | None = Field(
        default=None, validation_alias="measuredAt", serialization_alias="measuredAt"
    )
    user: str | None = None
    network_device: str | None = Field(
        default=None, validation_alias="networkDevice", serialization_alias="networkDevice"
    )
    network_driver: str | None = Field(
        default=None, validation_alias="networkDriver", serialization_alias="networkDriver"
    )
    wifi_channel: str | None = Field(
        default=None, validation_alias="wifiChannel", serialization_alias="wifiChannel"
    )
    wifi_auth: str | None = Field(
        default=None, validation_alias="wifiAuth", serialization_alias="wifiAuth"
    )
    wifi_bssid: str | None = Field(
        default=None, validation_alias="wifiBssid", serialization_alias="wifiBssid"
    )
    wifi_ssid: str | None = Field(
        default=None, validation_alias="wifiSsid", serialization_alias="wifiSsid"
    )
    wifi_rssi: str | None = Field(
        default=None, validation_alias="wifiRssi", serialization_alias="wifiRssi"
    )
    wifi_noise: str | None = Field(
        default=None, validation_alias="wifiNoise", serialization_alias="wifiNoise"
    )
    dhcp_server: str | None = Field(
        default=None, validation_alias="dhcpServer", serialization_alias="dhcpServer"
    )
    ip: str | None = None
    network_mtu: str | None = Field(
        default=None, validation_alias="networkMTU", serialization_alias="networkMTU"
    )
    subnet: str | None = None
    gateway: str | None = None
    public_ip: str | None = Field(
        default=None, validation_alias="publicIP", serialization_alias="publicIP"
    )
    dns_server: str | None = Field(
        default=None, validation_alias="dnsServer", serialization_alias="dnsServer"
    )
    ts: str | None = None


class GetNetworkSmDeviceDeviceCommandLogsResponse(
    RootModel[list["GetNetworkSmDeviceDeviceCommandLogsResponseItem"]]
):
    """Response for getNetworkSmDeviceDeviceCommandLogs operation."""


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

    action: str | None = None
    name: str | None = None
    details: str | None = None
    dashboard_user: str | None = Field(
        default=None, validation_alias="dashboardUser", serialization_alias="dashboardUser"
    )
    ts: str | None = None


class GetNetworkSmDeviceDeviceProfilesResponse(
    RootModel[list["GetNetworkSmDeviceDeviceProfilesResponseItem"]]
):
    """Response for getNetworkSmDeviceDeviceProfiles operation."""


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

    device_id: str | None = Field(
        default=None, validation_alias="deviceId", serialization_alias="deviceId"
    )
    id: str | None = None
    is_encrypted: bool | None = Field(
        default=None, validation_alias="isEncrypted", serialization_alias="isEncrypted"
    )
    is_managed: bool | None = Field(
        default=None, validation_alias="isManaged", serialization_alias="isManaged"
    )
    profile_data: str | None = Field(
        default=None, validation_alias="profileData", serialization_alias="profileData"
    )
    profile_identifier: str | None = Field(
        default=None, validation_alias="profileIdentifier", serialization_alias="profileIdentifier"
    )
    name: str | None = None
    version: str | None = None


class GetNetworkSmDeviceNetworkAdaptersResponse(
    RootModel[list["GetNetworkSmDeviceNetworkAdaptersResponseItem"]]
):
    """Response for getNetworkSmDeviceNetworkAdapters operation."""


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

    dhcp_server: str | None = Field(
        default=None, validation_alias="dhcpServer", serialization_alias="dhcpServer"
    )
    dns_server: str | None = Field(
        default=None, validation_alias="dnsServer", serialization_alias="dnsServer"
    )
    gateway: str | None = None
    id: str | None = None
    ip: str | None = None
    mac: str | None = None
    name: str | None = None
    subnet: str | None = None


class GetNetworkSmDevicePerformanceHistoryResponse(
    RootModel[list["GetNetworkSmDevicePerformanceHistoryResponseItem"]]
):
    """Response for getNetworkSmDevicePerformanceHistory operation."""


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

    cpu_percent_used: float | None = Field(
        default=None, validation_alias="cpuPercentUsed", serialization_alias="cpuPercentUsed"
    )
    mem_free: int | None = Field(
        default=None, validation_alias="memFree", serialization_alias="memFree"
    )
    mem_wired: int | None = Field(
        default=None, validation_alias="memWired", serialization_alias="memWired"
    )
    mem_active: int | None = Field(
        default=None, validation_alias="memActive", serialization_alias="memActive"
    )
    mem_inactive: int | None = Field(
        default=None, validation_alias="memInactive", serialization_alias="memInactive"
    )
    network_sent: int | None = Field(
        default=None, validation_alias="networkSent", serialization_alias="networkSent"
    )
    network_received: int | None = Field(
        default=None, validation_alias="networkReceived", serialization_alias="networkReceived"
    )
    swap_used: int | None = Field(
        default=None, validation_alias="swapUsed", serialization_alias="swapUsed"
    )
    disk_usage: SmDiskUsage | None = Field(
        default=None, validation_alias="diskUsage", serialization_alias="diskUsage"
    )
    ts: str | None = None


class GetNetworkSmDeviceRestrictionsResponse(_BaseSchema):
    """Response for getNetworkSmDeviceRestrictions operation."""

    restrictions: list[GetNetworkSmDeviceRestrictionsResponseRestrictionsItem] = Field(
        default_factory=list
    )


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

    profile: str | None = None
    restrictions: dict[str, Any] | None = None


class GetNetworkSmDeviceSecurityCentersResponse(
    RootModel[list["GetNetworkSmDeviceSecurityCentersResponseItem"]]
):
    """Response for getNetworkSmDeviceSecurityCenters operation."""


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

    is_rooted: bool | None = Field(
        default=None, validation_alias="isRooted", serialization_alias="isRooted"
    )
    has_anti_virus: bool | None = Field(
        default=None, validation_alias="hasAntiVirus", serialization_alias="hasAntiVirus"
    )
    anti_virus_name: str | None = Field(
        default=None, validation_alias="antiVirusName", serialization_alias="antiVirusName"
    )
    is_fire_wall_enabled: bool | None = Field(
        default=None, validation_alias="isFireWallEnabled", serialization_alias="isFireWallEnabled"
    )
    has_fire_wall_installed: bool | None = Field(
        default=None,
        validation_alias="hasFireWallInstalled",
        serialization_alias="hasFireWallInstalled",
    )
    fire_wall_name: str | None = Field(
        default=None, validation_alias="fireWallName", serialization_alias="fireWallName"
    )
    is_disk_encrypted: bool | None = Field(
        default=None, validation_alias="isDiskEncrypted", serialization_alias="isDiskEncrypted"
    )
    is_auto_login_disabled: bool | None = Field(
        default=None,
        validation_alias="isAutoLoginDisabled",
        serialization_alias="isAutoLoginDisabled",
    )
    id: str | None = None
    running_procs: str | None = Field(
        default=None, validation_alias="runningProcs", serialization_alias="runningProcs"
    )


class GetNetworkSmDeviceSoftwaresResponse(
    RootModel[list["GetNetworkSmDeviceSoftwaresResponseItem"]]
):
    """Response for getNetworkSmDeviceSoftwares operation."""


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

    app_id: str | None = Field(default=None, validation_alias="appId", serialization_alias="appId")
    bundle_size: int | None = Field(
        default=None, validation_alias="bundleSize", serialization_alias="bundleSize"
    )
    created_at: str | None = Field(
        default=None, validation_alias="createdAt", serialization_alias="createdAt"
    )
    device_id: str | None = Field(
        default=None, validation_alias="deviceId", serialization_alias="deviceId"
    )
    dynamic_size: int | None = Field(
        default=None, validation_alias="dynamicSize", serialization_alias="dynamicSize"
    )
    id: str | None = None
    identifier: str | None = None
    installed_at: str | None = Field(
        default=None, validation_alias="installedAt", serialization_alias="installedAt"
    )
    to_install: bool | None = Field(
        default=None, validation_alias="toInstall", serialization_alias="toInstall"
    )
    ios_redemption_code: bool | None = Field(
        default=None, validation_alias="iosRedemptionCode", serialization_alias="iosRedemptionCode"
    )
    is_managed: bool | None = Field(
        default=None, validation_alias="isManaged", serialization_alias="isManaged"
    )
    itunes_id: str | None = Field(
        default=None, validation_alias="itunesId", serialization_alias="itunesId"
    )
    license_key: str | None = Field(
        default=None, validation_alias="licenseKey", serialization_alias="licenseKey"
    )
    name: str | None = None
    path: str | None = None
    redemption_code: int | None = Field(
        default=None, validation_alias="redemptionCode", serialization_alias="redemptionCode"
    )
    short_version: str | None = Field(
        default=None, validation_alias="shortVersion", serialization_alias="shortVersion"
    )
    status: str | None = None
    to_uninstall: bool | None = Field(
        default=None, validation_alias="toUninstall", serialization_alias="toUninstall"
    )
    uninstalled_at: str | None = Field(
        default=None, validation_alias="uninstalledAt", serialization_alias="uninstalledAt"
    )
    updated_at: str | None = Field(
        default=None, validation_alias="updatedAt", serialization_alias="updatedAt"
    )
    vendor: str | None = None
    version: str | None = None


class GetNetworkSmDeviceWlanListsResponse(
    RootModel[list["GetNetworkSmDeviceWlanListsResponseItem"]]
):
    """Response for getNetworkSmDeviceWlanLists operation."""


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

    created_at: str | None = Field(
        default=None, validation_alias="createdAt", serialization_alias="createdAt"
    )
    id: str | None = None
    xml: str | None = None


class GetNetworkSmDevicesResponse(RootModel[list["GetNetworkSmDevicesResponseItem"]]):
    """Response for getNetworkSmDevices operation."""


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

    id: str | None = None
    name: str | None = None
    tags: list[str] = Field(default_factory=list)
    ssid: str | None = None
    wifi_mac: str | None = Field(
        default=None, validation_alias="wifiMac", serialization_alias="wifiMac"
    )
    os_name: str | None = Field(
        default=None, validation_alias="osName", serialization_alias="osName"
    )
    system_model: str | None = Field(
        default=None, validation_alias="systemModel", serialization_alias="systemModel"
    )
    uuid: str | None = None
    serial_number: str | None = Field(
        default=None, validation_alias="serialNumber", serialization_alias="serialNumber"
    )
    serial: str | None = None
    ip: str | None = None
    notes: str | None = None


class GetNetworkSmProfilesResponse(RootModel[list["GetNetworkSmProfilesResponseItem"]]):
    """Response for getNetworkSmProfiles operation."""


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

    id: str | None = None
    name: str | None = None
    description: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)
    payload_types: list[str] = Field(
        default_factory=list, validation_alias="payloadTypes", serialization_alias="payloadTypes"
    )


class GetNetworkSmTargetGroupResponse(_BaseSchema):
    """Response for getNetworkSmTargetGroup operation."""

    id: str | None = None
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)


class GetNetworkSmTargetGroupsResponse(RootModel[list["GetNetworkSmTargetGroupsResponseItem"]]):
    """Response for getNetworkSmTargetGroups operation."""


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

    id: str | None = None
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)


class GetNetworkSmTrustedAccessConfigsResponse(
    RootModel[list["GetNetworkSmTrustedAccessConfigsResponseItem"]]
):
    """Response for getNetworkSmTrustedAccessConfigs operation."""


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

    id: str | None = None
    ssid_name: str | None = Field(
        default=None, validation_alias="ssidName", serialization_alias="ssidName"
    )
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)
    timebound_type: str | None = Field(
        default=None, validation_alias="timeboundType", serialization_alias="timeboundType"
    )
    send_expiration_emails: bool | None = Field(
        default=None,
        validation_alias="sendExpirationEmails",
        serialization_alias="sendExpirationEmails",
    )
    notify_time_before_access_ends: int | None = Field(
        default=None,
        validation_alias="notifyTimeBeforeAccessEnds",
        serialization_alias="notifyTimeBeforeAccessEnds",
    )
    additional_email_text: str | None = Field(
        default=None,
        validation_alias="additionalEmailText",
        serialization_alias="additionalEmailText",
    )
    access_start_at: datetime | None = Field(
        default=None, validation_alias="accessStartAt", serialization_alias="accessStartAt"
    )
    access_end_at: datetime | None = Field(
        default=None, validation_alias="accessEndAt", serialization_alias="accessEndAt"
    )


class GetNetworkSmUserAccessDevicesResponse(
    RootModel[list["GetNetworkSmUserAccessDevicesResponseItem"]]
):
    """Response for getNetworkSmUserAccessDevices operation."""


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

    id: str | None = None
    name: str | None = None
    system_type: str | None = Field(
        default=None, validation_alias="systemType", serialization_alias="systemType"
    )
    mac: str | None = None
    username: str | None = None
    email: str | None = None
    tags: list[str] = Field(default_factory=list)
    trusted_access_connections: list[SmTrustedAccessConnectionsItem] = Field(
        default_factory=list,
        validation_alias="trustedAccessConnections",
        serialization_alias="trustedAccessConnections",
    )


class GetNetworkSmUserDeviceProfilesResponse(
    RootModel[list["GetNetworkSmUserDeviceProfilesResponseItem"]]
):
    """Response for getNetworkSmUserDeviceProfiles operation."""


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

    device_id: str | None = Field(
        default=None, validation_alias="deviceId", serialization_alias="deviceId"
    )
    id: str | None = None
    is_encrypted: bool | None = Field(
        default=None, validation_alias="isEncrypted", serialization_alias="isEncrypted"
    )
    is_managed: bool | None = Field(
        default=None, validation_alias="isManaged", serialization_alias="isManaged"
    )
    profile_data: str | None = Field(
        default=None, validation_alias="profileData", serialization_alias="profileData"
    )
    profile_identifier: str | None = Field(
        default=None, validation_alias="profileIdentifier", serialization_alias="profileIdentifier"
    )
    name: str | None = None
    version: str | None = None


class GetNetworkSmUserSoftwaresResponse(RootModel[list["GetNetworkSmUserSoftwaresResponseItem"]]):
    """Response for getNetworkSmUserSoftwares operation."""


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

    app_id: str | None = Field(default=None, validation_alias="appId", serialization_alias="appId")
    bundle_size: int | None = Field(
        default=None, validation_alias="bundleSize", serialization_alias="bundleSize"
    )
    created_at: str | None = Field(
        default=None, validation_alias="createdAt", serialization_alias="createdAt"
    )
    device_id: str | None = Field(
        default=None, validation_alias="deviceId", serialization_alias="deviceId"
    )
    dynamic_size: int | None = Field(
        default=None, validation_alias="dynamicSize", serialization_alias="dynamicSize"
    )
    id: str | None = None
    identifier: str | None = None
    installed_at: str | None = Field(
        default=None, validation_alias="installedAt", serialization_alias="installedAt"
    )
    to_install: bool | None = Field(
        default=None, validation_alias="toInstall", serialization_alias="toInstall"
    )
    ios_redemption_code: bool | None = Field(
        default=None, validation_alias="iosRedemptionCode", serialization_alias="iosRedemptionCode"
    )
    is_managed: bool | None = Field(
        default=None, validation_alias="isManaged", serialization_alias="isManaged"
    )
    itunes_id: str | None = Field(
        default=None, validation_alias="itunesId", serialization_alias="itunesId"
    )
    license_key: str | None = Field(
        default=None, validation_alias="licenseKey", serialization_alias="licenseKey"
    )
    name: str | None = None
    path: str | None = None
    redemption_code: int | None = Field(
        default=None, validation_alias="redemptionCode", serialization_alias="redemptionCode"
    )
    short_version: str | None = Field(
        default=None, validation_alias="shortVersion", serialization_alias="shortVersion"
    )
    status: str | None = None
    to_uninstall: bool | None = Field(
        default=None, validation_alias="toUninstall", serialization_alias="toUninstall"
    )
    uninstalled_at: str | None = Field(
        default=None, validation_alias="uninstalledAt", serialization_alias="uninstalledAt"
    )
    updated_at: str | None = Field(
        default=None, validation_alias="updatedAt", serialization_alias="updatedAt"
    )
    vendor: str | None = None
    version: str | None = None


class GetNetworkSmUsersResponse(RootModel[list["GetNetworkSmUsersResponseItem"]]):
    """Response for getNetworkSmUsers operation."""


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

    id: str | None = None
    email: str | None = None
    full_name: str | None = Field(
        default=None, validation_alias="fullName", serialization_alias="fullName"
    )
    username: str | None = None
    has_password: bool | None = Field(
        default=None, validation_alias="hasPassword", serialization_alias="hasPassword"
    )
    tags: str | None = None
    ad_groups: list[str] = Field(
        default_factory=list, validation_alias="adGroups", serialization_alias="adGroups"
    )
    azure_ad_groups: list[str] = Field(
        default_factory=list, validation_alias="azureAdGroups", serialization_alias="azureAdGroups"
    )
    saml_groups: list[str] = Field(
        default_factory=list, validation_alias="samlGroups", serialization_alias="samlGroups"
    )
    asm_groups: list[str] = Field(
        default_factory=list, validation_alias="asmGroups", serialization_alias="asmGroups"
    )
    is_external: bool | None = Field(
        default=None, validation_alias="isExternal", serialization_alias="isExternal"
    )
    display_name: str | None = Field(
        default=None, validation_alias="displayName", serialization_alias="displayName"
    )
    has_identity_certificate: bool | None = Field(
        default=None,
        validation_alias="hasIdentityCertificate",
        serialization_alias="hasIdentityCertificate",
    )
    user_thumbnail: str | None = Field(
        default=None, validation_alias="userThumbnail", serialization_alias="userThumbnail"
    )


class GetOrganizationSmAdminsRoleResponse(_BaseSchema):
    """Response for getOrganizationSmAdminsRole operation."""

    role_id: str | None = Field(
        default=None, validation_alias="roleId", serialization_alias="roleId"
    )
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)


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

    role_id: str | None = Field(
        default=None, validation_alias="roleId", serialization_alias="roleId"
    )
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)


class GetOrganizationSmApnsCertResponse(_BaseSchema):
    """Response for getOrganizationSmApnsCert operation."""

    certificate: str | None = None


class GetOrganizationSmSentryPoliciesAssignmentsByNetworkResponse(
    RootModel[list["GetOrganizationSmSentryPoliciesAssignmentsByNetworkResponseItem"]]
):
    """Sentry Group Policies for the Organization keyed by the Network or Locale Id the Policy
    belongs to.
    """


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

    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    policies: list[SmPoliciesItem] = Field(default_factory=list)


class GetOrganizationSmVppAccountResponse(_BaseSchema):
    """Response for getOrganizationSmVppAccount operation."""

    vpp_account_id: str | None = Field(
        default=None, validation_alias="vppAccountId", serialization_alias="vppAccountId"
    )
    content_token: str | None = Field(
        default=None, validation_alias="contentToken", serialization_alias="contentToken"
    )
    email: str | None = None
    name: str | None = None
    allowed_admins: str | None = Field(
        default=None, validation_alias="allowedAdmins", serialization_alias="allowedAdmins"
    )
    network_id_admins: str | None = Field(
        default=None, validation_alias="networkIdAdmins", serialization_alias="networkIdAdmins"
    )
    assignable_networks: str | None = Field(
        default=None,
        validation_alias="assignableNetworks",
        serialization_alias="assignableNetworks",
    )
    assignable_network_ids: list[str] = Field(
        default_factory=list,
        validation_alias="assignableNetworkIds",
        serialization_alias="assignableNetworkIds",
    )
    vpp_location_id: str | None = Field(
        default=None, validation_alias="vppLocationId", serialization_alias="vppLocationId"
    )
    vpp_location_name: str | None = Field(
        default=None, validation_alias="vppLocationName", serialization_alias="vppLocationName"
    )
    last_synced_at: str | None = Field(
        default=None, validation_alias="lastSyncedAt", serialization_alias="lastSyncedAt"
    )
    last_force_synced_at: str | None = Field(
        default=None, validation_alias="lastForceSyncedAt", serialization_alias="lastForceSyncedAt"
    )
    parsed_token: SmParsedToken | None = Field(
        default=None, validation_alias="parsedToken", serialization_alias="parsedToken"
    )
    id: str | None = None
    vpp_service_token: str | None = Field(
        default=None, validation_alias="vppServiceToken", serialization_alias="vppServiceToken"
    )


class GetOrganizationSmVppAccountsResponse(
    RootModel[list["GetOrganizationSmVppAccountsResponseItem"]]
):
    """Response for getOrganizationSmVppAccounts operation."""


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

    vpp_account_id: str | None = Field(
        default=None, validation_alias="vppAccountId", serialization_alias="vppAccountId"
    )
    content_token: str | None = Field(
        default=None, validation_alias="contentToken", serialization_alias="contentToken"
    )
    email: str | None = None
    name: str | None = None
    allowed_admins: str | None = Field(
        default=None, validation_alias="allowedAdmins", serialization_alias="allowedAdmins"
    )
    network_id_admins: str | None = Field(
        default=None, validation_alias="networkIdAdmins", serialization_alias="networkIdAdmins"
    )
    assignable_networks: str | None = Field(
        default=None,
        validation_alias="assignableNetworks",
        serialization_alias="assignableNetworks",
    )
    assignable_network_ids: list[str] = Field(
        default_factory=list,
        validation_alias="assignableNetworkIds",
        serialization_alias="assignableNetworkIds",
    )
    vpp_location_id: str | None = Field(
        default=None, validation_alias="vppLocationId", serialization_alias="vppLocationId"
    )
    vpp_location_name: str | None = Field(
        default=None, validation_alias="vppLocationName", serialization_alias="vppLocationName"
    )
    last_synced_at: str | None = Field(
        default=None, validation_alias="lastSyncedAt", serialization_alias="lastSyncedAt"
    )
    last_force_synced_at: str | None = Field(
        default=None, validation_alias="lastForceSyncedAt", serialization_alias="lastForceSyncedAt"
    )
    parsed_token: SmParsedToken | None = Field(
        default=None, validation_alias="parsedToken", serialization_alias="parsedToken"
    )
    id: str | None = None
    vpp_service_token: str | None = Field(
        default=None, validation_alias="vppServiceToken", serialization_alias="vppServiceToken"
    )


class LockNetworkSmDevicesResponse(_BaseSchema):
    """Response for lockNetworkSmDevices operation."""

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


class ModifyNetworkSmDevicesTagsResponse(RootModel[list["ModifyNetworkSmDevicesTagsResponseItem"]]):
    """Response for modifyNetworkSmDevicesTags operation."""


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

    id: str | None = None
    tags: list[str] = Field(default_factory=list)
    wifi_mac: str | None = Field(
        default=None, validation_alias="wifiMac", serialization_alias="wifiMac"
    )
    serial: str | None = None


class MoveNetworkSmDevicesResponse(_BaseSchema):
    """Response for moveNetworkSmDevices operation."""

    ids: list[str] = Field(default_factory=list)
    new_network: str | None = Field(
        default=None, validation_alias="newNetwork", serialization_alias="newNetwork"
    )


class RebootNetworkSmDevicesResponse(_BaseSchema):
    """Response for rebootNetworkSmDevices operation."""

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


class ShutdownNetworkSmDevicesResponse(_BaseSchema):
    """Response for shutdownNetworkSmDevices operation."""

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


class SmC(_BaseSchema):
    """An object containing current disk usage details."""

    used: int | None = None
    space: int | None = None


class SmDiskUsage(_BaseSchema):
    """An object containing disk usage details."""

    c: SmC | None = None


class SmParsedToken(_BaseSchema):
    """The parsed VPP service token."""

    org_name: str | None = Field(
        default=None, validation_alias="orgName", serialization_alias="orgName"
    )
    hashed_token: str | None = Field(
        default=None, validation_alias="hashedToken", serialization_alias="hashedToken"
    )
    expires_at: str | None = Field(
        default=None, validation_alias="expiresAt", serialization_alias="expiresAt"
    )


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

    policy_id: str | None = Field(
        default=None, validation_alias="policyId", serialization_alias="policyId"
    )
    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    sm_network_id: str | None = Field(
        default=None, validation_alias="smNetworkId", serialization_alias="smNetworkId"
    )
    tags: list[str] = Field(default_factory=list)
    scope: str | None = None
    group_number: str | None = Field(
        default=None, validation_alias="groupNumber", serialization_alias="groupNumber"
    )
    group_policy_id: str | None = Field(
        default=None, validation_alias="groupPolicyId", serialization_alias="groupPolicyId"
    )
    priority: str | None = None
    created_at: str | None = Field(
        default=None, validation_alias="createdAt", serialization_alias="createdAt"
    )
    last_updated_at: str | None = Field(
        default=None, validation_alias="lastUpdatedAt", serialization_alias="lastUpdatedAt"
    )


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

    trusted_access_config_id: str | None = Field(
        default=None,
        validation_alias="trustedAccessConfigId",
        serialization_alias="trustedAccessConfigId",
    )
    downloaded_at: str | None = Field(
        default=None, validation_alias="downloadedAt", serialization_alias="downloadedAt"
    )
    scep_completed_at: datetime | None = Field(
        default=None, validation_alias="scepCompletedAt", serialization_alias="scepCompletedAt"
    )
    last_connected_at: datetime | None = Field(
        default=None, validation_alias="lastConnectedAt", serialization_alias="lastConnectedAt"
    )


class UnenrollNetworkSmDeviceResponse(_BaseSchema):
    """Response for unenrollNetworkSmDevice operation."""

    success: bool | None = None


class UpdateNetworkSmDevicesFieldsDeviceFields(_BaseSchema):
    """The new fields of the device. Each field of this object is optional."""

    name: str | None = None
    notes: str | None = None


class UpdateNetworkSmDevicesFieldsResponse(
    RootModel[list["UpdateNetworkSmDevicesFieldsResponseItem"]]
):
    """Response for updateNetworkSmDevicesFields operation."""


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

    id: str | None = None
    name: str | None = None
    wifi_mac: str | None = Field(
        default=None, validation_alias="wifiMac", serialization_alias="wifiMac"
    )
    serial: str | None = None
    notes: str | None = None


class UpdateNetworkSmTargetGroupResponse(_BaseSchema):
    """Response for updateNetworkSmTargetGroup operation."""

    id: str | None = None
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)


class UpdateOrganizationSmAdminsRoleResponse(_BaseSchema):
    """Response for updateOrganizationSmAdminsRole operation."""

    role_id: str | None = Field(
        default=None, validation_alias="roleId", serialization_alias="roleId"
    )
    name: str | None = None
    scope: str | None = None
    tags: list[str] = Field(default_factory=list)


class UpdateOrganizationSmSentryPoliciesAssignmentsItemsItem(_BaseSchema):
    """Item schema for items."""

    network_id: str = Field(validation_alias="networkId", serialization_alias="networkId")
    policies: list[UpdateOrganizationSmSentryPoliciesAssignmentsItemsItemPoliciesItem] = Field(
        default_factory=list
    )


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

    policy_id: str | None = Field(
        default=None, validation_alias="policyId", serialization_alias="policyId"
    )
    sm_network_id: str = Field(validation_alias="smNetworkId", serialization_alias="smNetworkId")
    scope: str
    tags: list[str]
    group_policy_id: str = Field(
        validation_alias="groupPolicyId", serialization_alias="groupPolicyId"
    )


class UpdateOrganizationSmSentryPoliciesAssignmentsResponse(_BaseSchema):
    """Response for updateOrganizationSmSentryPoliciesAssignments operation."""

    items: list[UpdateOrganizationSmSentryPoliciesAssignmentsResponseItemsItem] = Field(
        default_factory=list
    )


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

    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    policies: list[SmPoliciesItem] = Field(default_factory=list)


class WipeNetworkSmDevicesResponse(_BaseSchema):
    """Response for wipeNetworkSmDevices operation."""

    id: str | None = None
