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

    tag: str | None = None
    id: str | None = None
    permission_scope_id: str | None = Field(
        default=None, validation_alias="permissionScopeId", serialization_alias="permissionScopeId"
    )
    permission_scope: str | None = Field(
        default=None, validation_alias="permissionScope", serialization_alias="permissionScope"
    )
    permission_level: str | None = Field(
        default=None, validation_alias="permissionLevel", serialization_alias="permissionLevel"
    )


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

    tag: str | None = None
    permission_scope_id: str | None = Field(
        default=None, validation_alias="permissionScopeId", serialization_alias="permissionScopeId"
    )
    permission_scope: str | None = Field(
        default=None, validation_alias="permissionScope", serialization_alias="permissionScope"
    )
    permission_level: str | None = Field(
        default=None, validation_alias="permissionLevel", serialization_alias="permissionLevel"
    )


class CameraBoundaries(_BaseSchema):
    """Configured area boundaries of the camera."""

    id: str | None = None
    type_: str | None = Field(default=None, validation_alias="type", serialization_alias="type")
    name: str | None = None
    vertices: list[CameraVerticesItem] = Field(default_factory=list)


class CameraBoundaries2(_BaseSchema):
    """Configured line boundaries of the camera."""

    id: str | None = None
    type_: str | None = Field(default=None, validation_alias="type", serialization_alias="type")
    name: str | None = None
    vertices: list[CameraVerticesItem] = Field(default_factory=list)
    direction_vertex: CameraVerticesItem | None = Field(
        default=None, validation_alias="directionVertex", serialization_alias="directionVertex"
    )


class CameraIdentity(_BaseSchema):
    """The identity of the wireless profile. Required for creating wireless profiles in
    8021x-radius auth mode.
    """

    username: str | None = None
    password: str | None = None


class CameraRegionOfInterest(_BaseSchema):
    """The region of interest."""

    x0: str | None = None
    y0: str | None = None
    x1: str | None = None
    y1: str | None = None


class CameraResults(_BaseSchema):
    """The analytics data."""

    start_time: str | None = Field(
        default=None, validation_alias="startTime", serialization_alias="startTime"
    )
    end_time: str | None = Field(
        default=None, validation_alias="endTime", serialization_alias="endTime"
    )
    object_type: str | None = Field(
        default=None, validation_alias="objectType", serialization_alias="objectType"
    )
    in_: int | None = Field(default=None, validation_alias="in", serialization_alias="in")
    out: int | None = None


class CameraSmartRetention(_BaseSchema):
    """Smart retention settings."""

    enabled: bool | None = None


class CameraSsid(_BaseSchema):
    """The details of the SSID config."""

    name: str | None = None
    auth_mode: str | None = Field(
        default=None, validation_alias="authMode", serialization_alias="authMode"
    )
    encryption_mode: str | None = Field(
        default=None, validation_alias="encryptionMode", serialization_alias="encryptionMode"
    )
    psk: str | None = None


class CameraStatus(_BaseSchema):
    """Custom analytics artifact status."""

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


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

    x: float | None = None
    y: float | None = None


class CameraZonesZoneId(_BaseSchema):
    """The zone state, dynamic."""

    person: int | None = None


class CreateNetworkCameraQualityRetentionProfileResponse(_BaseSchema):
    """Response for createNetworkCameraQualityRetentionProfile operation."""

    id: str | None = None
    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    name: str | None = None
    restricted_bandwidth_mode_enabled: bool | None = Field(
        default=None,
        validation_alias="restrictedBandwidthModeEnabled",
        serialization_alias="restrictedBandwidthModeEnabled",
    )
    motion_based_retention_enabled: bool | None = Field(
        default=None,
        validation_alias="motionBasedRetentionEnabled",
        serialization_alias="motionBasedRetentionEnabled",
    )
    audio_recording_enabled: bool | None = Field(
        default=None,
        validation_alias="audioRecordingEnabled",
        serialization_alias="audioRecordingEnabled",
    )
    cloud_archive_enabled: bool | None = Field(
        default=None,
        validation_alias="cloudArchiveEnabled",
        serialization_alias="cloudArchiveEnabled",
    )
    max_retention_days: int | None = Field(
        default=None, validation_alias="maxRetentionDays", serialization_alias="maxRetentionDays"
    )
    schedule_id: str | None = Field(
        default=None, validation_alias="scheduleId", serialization_alias="scheduleId"
    )
    motion_detector_version: int | None = Field(
        default=None,
        validation_alias="motionDetectorVersion",
        serialization_alias="motionDetectorVersion",
    )
    smart_retention: CameraSmartRetention | None = Field(
        default=None, validation_alias="smartRetention", serialization_alias="smartRetention"
    )
    video_settings: dict[str, Any] | None = Field(
        default=None, validation_alias="videoSettings", serialization_alias="videoSettings"
    )


class CreateNetworkCameraQualityRetentionProfileSmartRetention(_BaseSchema):
    """Smart Retention records footage in two qualities and intelligently retains higher quality
    when motion, people or vehicles are detected.
    """

    enabled: bool | None = None


class CreateNetworkCameraQualityRetentionProfileVideoSettings(_BaseSchema):
    """Video quality and resolution settings for all the camera models."""

    mv12_mv22_mv72: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV12MV22MV72 | None = (
        Field(default=None, validation_alias="MV12/MV22/MV72", serialization_alias="MV12/MV22/MV72")
    )
    mv12_we: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV12MV22MV72 | None = Field(
        default=None, validation_alias="MV12WE", serialization_alias="MV12WE"
    )
    mv13: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV13", serialization_alias="MV13"
    )
    mv13_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV13M", serialization_alias="MV13M"
    )
    mv21_mv71: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV21MV71 | None = Field(
        default=None, validation_alias="MV21/MV71", serialization_alias="MV21/MV71"
    )
    mv22x_mv72x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV22XMV72X | None = Field(
        default=None, validation_alias="MV22X/MV72X", serialization_alias="MV22X/MV72X"
    )
    mv23: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV23", serialization_alias="MV23"
    )
    mv23_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV23M", serialization_alias="MV23M"
    )
    mv23_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV23X", serialization_alias="MV23X"
    )
    mv32: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV32 | None = Field(
        default=None, validation_alias="MV32", serialization_alias="MV32"
    )
    mv33: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV33", serialization_alias="MV33"
    )
    mv33_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV33M", serialization_alias="MV33M"
    )
    mv52: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV52 | None = Field(
        default=None, validation_alias="MV52", serialization_alias="MV52"
    )
    mv63: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV63", serialization_alias="MV63"
    )
    mv63_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV63M", serialization_alias="MV63M"
    )
    mv63_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV63X", serialization_alias="MV63X"
    )
    mv73: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV73", serialization_alias="MV73"
    )
    mv73_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV73M", serialization_alias="MV73M"
    )
    mv73_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV73X", serialization_alias="MV73X"
    )
    mv93: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV93", serialization_alias="MV93"
    )
    mv93_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV93M", serialization_alias="MV93M"
    )
    mv93_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV93X", serialization_alias="MV93X"
    )
    mv53_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV53X", serialization_alias="MV53X"
    )
    mv84_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV84X | None = Field(
        default=None, validation_alias="MV84X", serialization_alias="MV84X"
    )


class CreateNetworkCameraQualityRetentionProfileVideoSettingsMV12MV22MV72(_BaseSchema):
    """Quality and resolution for MV12/MV22/MV72 camera models."""

    quality: str
    resolution: str


class CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13(_BaseSchema):
    """Quality and resolution for MV13 camera models."""

    quality: str
    resolution: str


class CreateNetworkCameraQualityRetentionProfileVideoSettingsMV21MV71(_BaseSchema):
    """Quality and resolution for MV21/MV71 camera models."""

    quality: str
    resolution: str


class CreateNetworkCameraQualityRetentionProfileVideoSettingsMV22XMV72X(_BaseSchema):
    """Quality and resolution for MV22X/MV72X camera models."""

    quality: str
    resolution: str


class CreateNetworkCameraQualityRetentionProfileVideoSettingsMV32(_BaseSchema):
    """Quality and resolution for MV32 camera models."""

    quality: str
    resolution: str


class CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33(_BaseSchema):
    """Quality and resolution for MV33 camera models."""

    quality: str
    resolution: str


class CreateNetworkCameraQualityRetentionProfileVideoSettingsMV52(_BaseSchema):
    """Quality and resolution for MV52 camera models."""

    quality: str
    resolution: str


class CreateNetworkCameraQualityRetentionProfileVideoSettingsMV84X(_BaseSchema):
    """Quality and resolution for MV84X camera models."""

    quality: str
    resolution: str


class CreateNetworkCameraWirelessProfileIdentity(_BaseSchema):
    """The identity of the wireless profile. Required for creating wireless profiles in
    8021x-radius auth mode.
    """

    username: str | None = None
    password: str | None = None


class CreateNetworkCameraWirelessProfileResponse(_BaseSchema):
    """Response for createNetworkCameraWirelessProfile operation."""

    id: str | None = None
    name: str | None = None
    applied_device_count: int | None = Field(
        default=None,
        validation_alias="appliedDeviceCount",
        serialization_alias="appliedDeviceCount",
    )
    ssid: CameraSsid | None = None
    identity: CameraIdentity | None = None


class CreateNetworkCameraWirelessProfileSsid(_BaseSchema):
    """The details of the SSID config."""

    name: str | None = None
    auth_mode: str | None = Field(
        default=None, validation_alias="authMode", serialization_alias="authMode"
    )
    encryption_mode: str | None = Field(
        default=None, validation_alias="encryptionMode", serialization_alias="encryptionMode"
    )
    psk: str | None = None


class CreateOrganizationCameraCustomAnalyticsArtifactResponse(_BaseSchema):
    """Response for createOrganizationCameraCustomAnalyticsArtifact operation."""

    artifact_id: str | None = Field(
        default=None, validation_alias="artifactId", serialization_alias="artifactId"
    )
    organization_id: str | None = Field(
        default=None, validation_alias="organizationId", serialization_alias="organizationId"
    )
    name: str | None = None
    status: CameraStatus | None = None
    upload_id: str | None = Field(
        default=None, validation_alias="uploadId", serialization_alias="uploadId"
    )
    upload_url: str | None = Field(
        default=None, validation_alias="uploadUrl", serialization_alias="uploadUrl"
    )
    upload_url_expiry: datetime | None = Field(
        default=None, validation_alias="uploadUrlExpiry", serialization_alias="uploadUrlExpiry"
    )


class CreateOrganizationCameraRoleAppliedOnDevicesItem(_BaseSchema):
    """Item schema for appliedOnDevices."""

    tag: str | None = None
    id: str | None = None
    in_networks_with_tag: str | None = Field(
        default=None, validation_alias="inNetworksWithTag", serialization_alias="inNetworksWithTag"
    )
    in_networks_with_id: str | None = Field(
        default=None, validation_alias="inNetworksWithId", serialization_alias="inNetworksWithId"
    )
    permission_scope_id: str = Field(
        validation_alias="permissionScopeId", serialization_alias="permissionScopeId"
    )


class CreateOrganizationCameraRoleAppliedOnNetworksItem(_BaseSchema):
    """Item schema for appliedOnNetworks."""

    tag: str | None = None
    id: str | None = None
    permission_scope_id: str = Field(
        validation_alias="permissionScopeId", serialization_alias="permissionScopeId"
    )


class CreateOrganizationCameraRoleAppliedOrgWideItem(_BaseSchema):
    """Item schema for appliedOrgWide."""

    permission_scope_id: str = Field(
        validation_alias="permissionScopeId", serialization_alias="permissionScopeId"
    )


class CreateOrganizationCameraRoleResponse(_BaseSchema):
    """Response for createOrganizationCameraRole operation."""

    name: str | None = None
    applied_on_devices: list[CameraAppliedOnDevicesItem] = Field(
        default_factory=list,
        validation_alias="appliedOnDevices",
        serialization_alias="appliedOnDevices",
    )
    applied_on_networks: list[CameraAppliedOnDevicesItem] = Field(
        default_factory=list,
        validation_alias="appliedOnNetworks",
        serialization_alias="appliedOnNetworks",
    )
    applied_org_wide: list[CameraAppliedOrgWideItem] = Field(
        default_factory=list,
        validation_alias="appliedOrgWide",
        serialization_alias="appliedOrgWide",
    )


class GenerateDeviceCameraSnapshotResponse(_BaseSchema):
    """Response for generateDeviceCameraSnapshot operation."""

    url: str | None = None
    expiry: str | None = None


class GetDeviceCameraAnalyticsLiveResponse(_BaseSchema):
    """Response for getDeviceCameraAnalyticsLive operation."""

    ts: str | None = None
    zones: GetDeviceCameraAnalyticsLiveResponseZones | None = None


class GetDeviceCameraAnalyticsLiveResponseZones(_BaseSchema):
    """The zones state."""

    zone_id: CameraZonesZoneId | None = Field(
        default=None, validation_alias="zoneId", serialization_alias="zoneId"
    )


class GetDeviceCameraAnalyticsOverviewResponse(
    RootModel[list["GetDeviceCameraAnalyticsOverviewResponseItem"]]
):
    """Response for getDeviceCameraAnalyticsOverview operation."""


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

    start_ts: datetime | None = Field(
        default=None, validation_alias="startTs", serialization_alias="startTs"
    )
    end_ts: datetime | None = Field(
        default=None, validation_alias="endTs", serialization_alias="endTs"
    )
    zone_id: int | None = Field(
        default=None, validation_alias="zoneId", serialization_alias="zoneId"
    )
    entrances: int | None = None
    average_count: float | None = Field(
        default=None, validation_alias="averageCount", serialization_alias="averageCount"
    )


class GetDeviceCameraAnalyticsRecentResponse(
    RootModel[list["GetDeviceCameraAnalyticsRecentResponseItem"]]
):
    """Response for getDeviceCameraAnalyticsRecent operation."""


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

    start_ts: datetime | None = Field(
        default=None, validation_alias="startTs", serialization_alias="startTs"
    )
    end_ts: datetime | None = Field(
        default=None, validation_alias="endTs", serialization_alias="endTs"
    )
    zone_id: int | None = Field(
        default=None, validation_alias="zoneId", serialization_alias="zoneId"
    )
    entrances: int | None = None
    average_count: float | None = Field(
        default=None, validation_alias="averageCount", serialization_alias="averageCount"
    )


class GetDeviceCameraAnalyticsZoneHistoryResponse(
    RootModel[list["GetDeviceCameraAnalyticsZoneHistoryResponseItem"]]
):
    """Response for getDeviceCameraAnalyticsZoneHistory operation."""


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

    start_ts: datetime | None = Field(
        default=None, validation_alias="startTs", serialization_alias="startTs"
    )
    end_ts: datetime | None = Field(
        default=None, validation_alias="endTs", serialization_alias="endTs"
    )
    entrances: int | None = None
    average_count: float | None = Field(
        default=None, validation_alias="averageCount", serialization_alias="averageCount"
    )


class GetDeviceCameraAnalyticsZonesResponse(
    RootModel[list["GetDeviceCameraAnalyticsZonesResponseItem"]]
):
    """Response for getDeviceCameraAnalyticsZones operation."""


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

    id: str | None = None
    type_: str | None = Field(default=None, validation_alias="type", serialization_alias="type")
    label: str | None = None
    region_of_interest: CameraRegionOfInterest | None = Field(
        default=None, validation_alias="regionOfInterest", serialization_alias="regionOfInterest"
    )


class GetDeviceCameraCustomAnalyticsResponse(_BaseSchema):
    """Response for getDeviceCameraCustomAnalytics operation."""

    enabled: bool | None = None
    artifact_id: str | None = Field(
        default=None, validation_alias="artifactId", serialization_alias="artifactId"
    )
    parameters: list[GetDeviceCameraCustomAnalyticsResponseParametersItem] = Field(
        default_factory=list
    )


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

    name: str | None = None
    value: float | None = None


class GetDeviceCameraSenseObjectDetectionModelsResponse(RootModel[list[dict[str, Any]]]):
    """Response for getDeviceCameraSenseObjectDetectionModels operation."""


class GetDeviceCameraVideoSettingsResponse(_BaseSchema):
    """Response for getDeviceCameraVideoSettings operation."""

    external_rtsp_enabled: bool | None = Field(
        default=None,
        validation_alias="externalRtspEnabled",
        serialization_alias="externalRtspEnabled",
    )
    rtsp_url: str | None = Field(
        default=None, validation_alias="rtspUrl", serialization_alias="rtspUrl"
    )


class GetNetworkCameraQualityRetentionProfileResponse(_BaseSchema):
    """Response for getNetworkCameraQualityRetentionProfile operation."""

    id: str | None = None
    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    name: str | None = None
    restricted_bandwidth_mode_enabled: bool | None = Field(
        default=None,
        validation_alias="restrictedBandwidthModeEnabled",
        serialization_alias="restrictedBandwidthModeEnabled",
    )
    motion_based_retention_enabled: bool | None = Field(
        default=None,
        validation_alias="motionBasedRetentionEnabled",
        serialization_alias="motionBasedRetentionEnabled",
    )
    audio_recording_enabled: bool | None = Field(
        default=None,
        validation_alias="audioRecordingEnabled",
        serialization_alias="audioRecordingEnabled",
    )
    cloud_archive_enabled: bool | None = Field(
        default=None,
        validation_alias="cloudArchiveEnabled",
        serialization_alias="cloudArchiveEnabled",
    )
    max_retention_days: int | None = Field(
        default=None, validation_alias="maxRetentionDays", serialization_alias="maxRetentionDays"
    )
    schedule_id: str | None = Field(
        default=None, validation_alias="scheduleId", serialization_alias="scheduleId"
    )
    motion_detector_version: int | None = Field(
        default=None,
        validation_alias="motionDetectorVersion",
        serialization_alias="motionDetectorVersion",
    )
    smart_retention: CameraSmartRetention | None = Field(
        default=None, validation_alias="smartRetention", serialization_alias="smartRetention"
    )
    video_settings: dict[str, Any] | None = Field(
        default=None, validation_alias="videoSettings", serialization_alias="videoSettings"
    )


class GetNetworkCameraQualityRetentionProfilesResponse(
    RootModel[list["GetNetworkCameraQualityRetentionProfilesResponseItem"]]
):
    """Response for getNetworkCameraQualityRetentionProfiles operation."""


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

    id: str | None = None
    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    name: str | None = None
    restricted_bandwidth_mode_enabled: bool | None = Field(
        default=None,
        validation_alias="restrictedBandwidthModeEnabled",
        serialization_alias="restrictedBandwidthModeEnabled",
    )
    motion_based_retention_enabled: bool | None = Field(
        default=None,
        validation_alias="motionBasedRetentionEnabled",
        serialization_alias="motionBasedRetentionEnabled",
    )
    audio_recording_enabled: bool | None = Field(
        default=None,
        validation_alias="audioRecordingEnabled",
        serialization_alias="audioRecordingEnabled",
    )
    cloud_archive_enabled: bool | None = Field(
        default=None,
        validation_alias="cloudArchiveEnabled",
        serialization_alias="cloudArchiveEnabled",
    )
    max_retention_days: int | None = Field(
        default=None, validation_alias="maxRetentionDays", serialization_alias="maxRetentionDays"
    )
    schedule_id: str | None = Field(
        default=None, validation_alias="scheduleId", serialization_alias="scheduleId"
    )
    motion_detector_version: int | None = Field(
        default=None,
        validation_alias="motionDetectorVersion",
        serialization_alias="motionDetectorVersion",
    )
    smart_retention: CameraSmartRetention | None = Field(
        default=None, validation_alias="smartRetention", serialization_alias="smartRetention"
    )
    video_settings: dict[str, Any] | None = Field(
        default=None, validation_alias="videoSettings", serialization_alias="videoSettings"
    )


class GetNetworkCameraSchedulesResponse(RootModel[list["GetNetworkCameraSchedulesResponseItem"]]):
    """Response for getNetworkCameraSchedules operation."""


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

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


class GetNetworkCameraWirelessProfileResponse(_BaseSchema):
    """Response for getNetworkCameraWirelessProfile operation."""

    id: str | None = None
    name: str | None = None
    applied_device_count: int | None = Field(
        default=None,
        validation_alias="appliedDeviceCount",
        serialization_alias="appliedDeviceCount",
    )
    ssid: CameraSsid | None = None
    identity: CameraIdentity | None = None


class GetNetworkCameraWirelessProfilesResponse(
    RootModel[list["GetNetworkCameraWirelessProfilesResponseItem"]]
):
    """Response for getNetworkCameraWirelessProfiles operation."""


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

    id: str | None = None
    name: str | None = None
    applied_device_count: int | None = Field(
        default=None,
        validation_alias="appliedDeviceCount",
        serialization_alias="appliedDeviceCount",
    )
    ssid: CameraSsid | None = None
    identity: CameraIdentity | None = None


class GetOrganizationCameraBoundariesAreasByDeviceResponse(
    RootModel[list["GetOrganizationCameraBoundariesAreasByDeviceResponseItem"]]
):
    """Response for getOrganizationCameraBoundariesAreasByDevice operation."""


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

    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    serial: str | None = None
    boundaries: CameraBoundaries | None = None


class GetOrganizationCameraBoundariesLinesByDeviceResponse(
    RootModel[list["GetOrganizationCameraBoundariesLinesByDeviceResponseItem"]]
):
    """Response for getOrganizationCameraBoundariesLinesByDevice operation."""


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

    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    serial: str | None = None
    boundaries: CameraBoundaries2 | None = None


class GetOrganizationCameraCustomAnalyticsArtifactResponse(_BaseSchema):
    """Response for getOrganizationCameraCustomAnalyticsArtifact operation."""

    artifact_id: str | None = Field(
        default=None, validation_alias="artifactId", serialization_alias="artifactId"
    )
    organization_id: str | None = Field(
        default=None, validation_alias="organizationId", serialization_alias="organizationId"
    )
    name: str | None = None
    status: CameraStatus | None = None


class GetOrganizationCameraCustomAnalyticsArtifactsResponse(
    RootModel[list["GetOrganizationCameraCustomAnalyticsArtifactsResponseItem"]]
):
    """Response for getOrganizationCameraCustomAnalyticsArtifacts operation."""


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

    artifact_id: str | None = Field(
        default=None, validation_alias="artifactId", serialization_alias="artifactId"
    )
    organization_id: str | None = Field(
        default=None, validation_alias="organizationId", serialization_alias="organizationId"
    )
    name: str | None = None
    status: CameraStatus | None = None


class GetOrganizationCameraDetectionsHistoryByBoundaryByIntervalResponse(
    RootModel[list["GetOrganizationCameraDetectionsHistoryByBoundaryByIntervalResponseItem"]]
):
    """Response for getOrganizationCameraDetectionsHistoryByBoundaryByInterval operation."""


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

    boundary_id: str | None = Field(
        default=None, validation_alias="boundaryId", serialization_alias="boundaryId"
    )
    type_: str | None = Field(default=None, validation_alias="type", serialization_alias="type")
    results: CameraResults | None = None


class GetOrganizationCameraOnboardingStatusesResponse(RootModel[list[dict[str, Any]]]):
    """Response for getOrganizationCameraOnboardingStatuses operation."""


class GetOrganizationCameraPermissionResponse(_BaseSchema):
    """Response for getOrganizationCameraPermission operation."""

    id: str | None = None
    name: str | None = None
    level: str | None = None


class GetOrganizationCameraPermissionsResponse(
    RootModel[list["GetOrganizationCameraPermissionsResponseItem"]]
):
    """Response for getOrganizationCameraPermissions operation."""


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

    id: str | None = None
    name: str | None = None
    level: str | None = None


class GetOrganizationCameraRoleResponse(_BaseSchema):
    """Response for getOrganizationCameraRole operation."""

    name: str | None = None
    applied_on_devices: list[CameraAppliedOnDevicesItem] = Field(
        default_factory=list,
        validation_alias="appliedOnDevices",
        serialization_alias="appliedOnDevices",
    )
    applied_on_networks: list[CameraAppliedOnDevicesItem] = Field(
        default_factory=list,
        validation_alias="appliedOnNetworks",
        serialization_alias="appliedOnNetworks",
    )
    applied_org_wide: list[CameraAppliedOrgWideItem] = Field(
        default_factory=list,
        validation_alias="appliedOrgWide",
        serialization_alias="appliedOrgWide",
    )


class GetOrganizationCameraRolesResponse(RootModel[list["GetOrganizationCameraRolesResponseItem"]]):
    """Response for getOrganizationCameraRoles operation."""


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

    name: str | None = None
    applied_on_devices: list[CameraAppliedOnDevicesItem] = Field(
        default_factory=list,
        validation_alias="appliedOnDevices",
        serialization_alias="appliedOnDevices",
    )
    applied_on_networks: list[CameraAppliedOnDevicesItem] = Field(
        default_factory=list,
        validation_alias="appliedOnNetworks",
        serialization_alias="appliedOnNetworks",
    )
    applied_org_wide: list[CameraAppliedOrgWideItem] = Field(
        default_factory=list,
        validation_alias="appliedOrgWide",
        serialization_alias="appliedOrgWide",
    )


class UpdateDeviceCameraCustomAnalyticsParametersItem(_BaseSchema):
    """Item schema for parameters."""

    name: str
    value: str


class UpdateDeviceCameraCustomAnalyticsResponse(_BaseSchema):
    """Response for updateDeviceCameraCustomAnalytics operation."""

    enabled: bool | None = None
    artifact_id: str | None = Field(
        default=None, validation_alias="artifactId", serialization_alias="artifactId"
    )
    parameters: list[GetDeviceCameraCustomAnalyticsResponseParametersItem] = Field(
        default_factory=list
    )


class UpdateDeviceCameraSenseAudioDetection(_BaseSchema):
    """The details of the audio detection config."""

    enabled: bool | None = None


class UpdateDeviceCameraVideoSettingsResponse(_BaseSchema):
    """Response for updateDeviceCameraVideoSettings operation."""

    external_rtsp_enabled: bool | None = Field(
        default=None,
        validation_alias="externalRtspEnabled",
        serialization_alias="externalRtspEnabled",
    )
    rtsp_url: str | None = Field(
        default=None, validation_alias="rtspUrl", serialization_alias="rtspUrl"
    )


class UpdateDeviceCameraWirelessProfilesIds(_BaseSchema):
    """The ids of the wireless profile to assign to the given camera."""

    primary: str | None = None
    secondary: str | None = None
    backup: str | None = None


class UpdateNetworkCameraQualityRetentionProfileResponse(_BaseSchema):
    """Response for updateNetworkCameraQualityRetentionProfile operation."""

    id: str | None = None
    network_id: str | None = Field(
        default=None, validation_alias="networkId", serialization_alias="networkId"
    )
    name: str | None = None
    restricted_bandwidth_mode_enabled: bool | None = Field(
        default=None,
        validation_alias="restrictedBandwidthModeEnabled",
        serialization_alias="restrictedBandwidthModeEnabled",
    )
    motion_based_retention_enabled: bool | None = Field(
        default=None,
        validation_alias="motionBasedRetentionEnabled",
        serialization_alias="motionBasedRetentionEnabled",
    )
    audio_recording_enabled: bool | None = Field(
        default=None,
        validation_alias="audioRecordingEnabled",
        serialization_alias="audioRecordingEnabled",
    )
    cloud_archive_enabled: bool | None = Field(
        default=None,
        validation_alias="cloudArchiveEnabled",
        serialization_alias="cloudArchiveEnabled",
    )
    max_retention_days: int | None = Field(
        default=None, validation_alias="maxRetentionDays", serialization_alias="maxRetentionDays"
    )
    schedule_id: str | None = Field(
        default=None, validation_alias="scheduleId", serialization_alias="scheduleId"
    )
    motion_detector_version: int | None = Field(
        default=None,
        validation_alias="motionDetectorVersion",
        serialization_alias="motionDetectorVersion",
    )
    smart_retention: CameraSmartRetention | None = Field(
        default=None, validation_alias="smartRetention", serialization_alias="smartRetention"
    )
    video_settings: dict[str, Any] | None = Field(
        default=None, validation_alias="videoSettings", serialization_alias="videoSettings"
    )


class UpdateNetworkCameraQualityRetentionProfileSmartRetention(_BaseSchema):
    """Smart Retention records footage in two qualities and intelligently retains higher quality
    when motion, people or vehicles are detected.
    """

    enabled: bool | None = None


class UpdateNetworkCameraQualityRetentionProfileVideoSettings(_BaseSchema):
    """Video quality and resolution settings for all the camera models."""

    mv12_mv22_mv72: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV12MV22MV72 | None = (
        Field(default=None, validation_alias="MV12/MV22/MV72", serialization_alias="MV12/MV22/MV72")
    )
    mv12_we: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV12MV22MV72 | None = Field(
        default=None, validation_alias="MV12WE", serialization_alias="MV12WE"
    )
    mv13: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV13", serialization_alias="MV13"
    )
    mv13_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV13M", serialization_alias="MV13M"
    )
    mv21_mv71: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV21MV71 | None = Field(
        default=None, validation_alias="MV21/MV71", serialization_alias="MV21/MV71"
    )
    mv22x_mv72x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV22XMV72X | None = Field(
        default=None, validation_alias="MV22X/MV72X", serialization_alias="MV22X/MV72X"
    )
    mv23: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV23", serialization_alias="MV23"
    )
    mv23_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV23M", serialization_alias="MV23M"
    )
    mv23_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV23X", serialization_alias="MV23X"
    )
    mv32: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV32 | None = Field(
        default=None, validation_alias="MV32", serialization_alias="MV32"
    )
    mv33: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV33", serialization_alias="MV33"
    )
    mv33_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV33M", serialization_alias="MV33M"
    )
    mv52: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV52 | None = Field(
        default=None, validation_alias="MV52", serialization_alias="MV52"
    )
    mv63: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV63", serialization_alias="MV63"
    )
    mv63_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV63M", serialization_alias="MV63M"
    )
    mv63_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV63X", serialization_alias="MV63X"
    )
    mv73: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV73", serialization_alias="MV73"
    )
    mv73_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV73M", serialization_alias="MV73M"
    )
    mv73_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV73X", serialization_alias="MV73X"
    )
    mv93: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV93", serialization_alias="MV93"
    )
    mv93_m: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV93M", serialization_alias="MV93M"
    )
    mv93_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV33 | None = Field(
        default=None, validation_alias="MV93X", serialization_alias="MV93X"
    )
    mv53_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV13 | None = Field(
        default=None, validation_alias="MV53X", serialization_alias="MV53X"
    )
    mv84_x: CreateNetworkCameraQualityRetentionProfileVideoSettingsMV84X | None = Field(
        default=None, validation_alias="MV84X", serialization_alias="MV84X"
    )


class UpdateNetworkCameraWirelessProfileIdentity(_BaseSchema):
    """The identity of the wireless profile. Required for creating wireless profiles in
    8021x-radius auth mode.
    """

    username: str | None = None
    password: str | None = None


class UpdateNetworkCameraWirelessProfileResponse(_BaseSchema):
    """Response for updateNetworkCameraWirelessProfile operation."""

    id: str | None = None
    name: str | None = None
    applied_device_count: int | None = Field(
        default=None,
        validation_alias="appliedDeviceCount",
        serialization_alias="appliedDeviceCount",
    )
    ssid: CameraSsid | None = None
    identity: CameraIdentity | None = None


class UpdateNetworkCameraWirelessProfileSsid(_BaseSchema):
    """The details of the SSID config."""

    name: str | None = None
    auth_mode: str | None = Field(
        default=None, validation_alias="authMode", serialization_alias="authMode"
    )
    encryption_mode: str | None = Field(
        default=None, validation_alias="encryptionMode", serialization_alias="encryptionMode"
    )
    psk: str | None = None


class UpdateOrganizationCameraRoleAppliedOnDevicesItem(_BaseSchema):
    """Item schema for appliedOnDevices."""

    tag: str | None = None
    id: str | None = None
    in_networks_with_tag: str | None = Field(
        default=None, validation_alias="inNetworksWithTag", serialization_alias="inNetworksWithTag"
    )
    in_networks_with_id: str | None = Field(
        default=None, validation_alias="inNetworksWithId", serialization_alias="inNetworksWithId"
    )
    permission_scope_id: str = Field(
        validation_alias="permissionScopeId", serialization_alias="permissionScopeId"
    )


class UpdateOrganizationCameraRoleAppliedOnNetworksItem(_BaseSchema):
    """Item schema for appliedOnNetworks."""

    tag: str | None = None
    id: str | None = None
    permission_scope_id: str = Field(
        validation_alias="permissionScopeId", serialization_alias="permissionScopeId"
    )


class UpdateOrganizationCameraRoleAppliedOrgWideItem(_BaseSchema):
    """Item schema for appliedOrgWide."""

    permission_scope_id: str = Field(
        validation_alias="permissionScopeId", serialization_alias="permissionScopeId"
    )


class UpdateOrganizationCameraRoleResponse(_BaseSchema):
    """Response for updateOrganizationCameraRole operation."""

    name: str | None = None
    applied_on_devices: list[CameraAppliedOnDevicesItem] = Field(
        default_factory=list,
        validation_alias="appliedOnDevices",
        serialization_alias="appliedOnDevices",
    )
    applied_on_networks: list[CameraAppliedOnDevicesItem] = Field(
        default_factory=list,
        validation_alias="appliedOnNetworks",
        serialization_alias="appliedOnNetworks",
    )
    applied_org_wide: list[CameraAppliedOrgWideItem] = Field(
        default_factory=list,
        validation_alias="appliedOrgWide",
        serialization_alias="appliedOrgWide",
    )
