# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: nanit.proto
# plugin: python-betterproto
# This file has been @generated

from dataclasses import dataclass
from typing import List

import betterproto


class RequestType(betterproto.Enum):
    PUT_STREAMING = 2
    GET_STREAMING = 3
    GET_SETTINGS = 4
    PUT_SETTINGS = 5
    GET_CONTROL = 6
    PUT_CONTROL = 7
    GET_STATUS = 8
    PUT_STATUS = 9
    PUT_SENSOR_DATA = 11
    GET_SENSOR_DATA = 12
    GET_UCTOKENS = 13
    PUT_UCTOKENS = 14
    PUT_SETUP_NETWORK = 15
    PUT_SETUP_SERVER = 16
    GET_FIRMWARE = 17
    PUT_FIRMWARE = 18
    GET_PLAYBACK = 19
    PUT_PLAYBACK = 20
    GET_SOUNDTRACKS = 21
    GET_STATUS_NETWORK = 22
    GET_LIST_NETWORKS = 23
    GET_LOGS = 24
    GET_BANDWIDTH = 25
    GET_AUDIO_STREAMING = 26
    PUT_AUDIO_STREAMING = 27
    GET_WIFI_SETUP = 28
    PUT_WIFI_SETUP = 29
    PUT_STING_START = 30
    PUT_STING_STOP = 31
    PUT_STING_STATUS = 32
    PUT_STING_ALERT = 34
    PUT_KEEP_ALIVE = 35
    GET_STING_STATUS = 36
    PUT_STING_TEST = 37
    PUT_RTSP_STREAMING = 38
    GET_UOM_URI = 39
    GET_UOM = 40
    PUT_UOM = 41
    GET_AUTH_KEY = 42
    PUT_AUTH_KEY = 43
    PUT_HEALTH = 44
    PUT_TCP_REQUEST = 45
    GET_STING_START = 46
    GET_LOGS_URI = 47


class SensorType(betterproto.Enum):
    SOUND = 0
    MOTION = 1
    TEMPERATURE = 2
    HUMIDITY = 3
    LIGHT = 4
    NIGHT = 5


class StreamIdentifier(betterproto.Enum):
    DVR = 0
    ANALYTICS = 1
    MOBILE = 2


class MountingMode(betterproto.Enum):
    STAND = 0
    TRAVEL = 1
    SWITCH = 2


class ControlNightLight(betterproto.Enum):
    LIGHT_OFF = 0
    LIGHT_ON = 1


class SettingsAntiFlicker(betterproto.Enum):
    FR50HZ = 0
    FR60HZ = 1


class SettingsWifiBand(betterproto.Enum):
    ANY = 0
    FR2_4GHZ = 1
    FR5_0GHZ = 2


class StatusConnectionToServer(betterproto.Enum):
    DISCONNECTED = 0
    CONNECTED = 1


class PlaybackStatus(betterproto.Enum):
    STARTED = 0
    STOPPED = 1


class StreamType(betterproto.Enum):
    LOCAL = 0
    REMOTE = 1
    RTSP = 2
    P2P = 3


class StreamingStatus(betterproto.Enum):
    STARTED = 0
    STOPPED = 1
    PAUSED = 2


class MessageType(betterproto.Enum):
    KEEPALIVE = 0
    REQUEST = 1
    RESPONSE = 2


@dataclass(eq=False, repr=False)
class SensorData(betterproto.Message):
    sensor_type: "SensorType" = betterproto.enum_field(1)
    value: int = betterproto.int32_field(3)
    is_alert: bool = betterproto.bool_field(4)
    timestamp: int = betterproto.int32_field(5)
    value_milli: int = betterproto.int32_field(6)


@dataclass(eq=False, repr=False)
class GetSensorData(betterproto.Message):
    all: bool = betterproto.bool_field(1)
    temperature: bool = betterproto.bool_field(4)
    humidity: bool = betterproto.bool_field(5)
    light: bool = betterproto.bool_field(6)
    night: bool = betterproto.bool_field(7)


@dataclass(eq=False, repr=False)
class GetControl(betterproto.Message):
    ptz: bool = betterproto.bool_field(1)
    night_light: bool = betterproto.bool_field(2)
    night_light_timeout: bool = betterproto.bool_field(3)
    sensor_data_transfer_en: bool = betterproto.bool_field(4)


@dataclass(eq=False, repr=False)
class Control(betterproto.Message):
    night_light: "ControlNightLight" = betterproto.enum_field(3)
    sensor_data_transfer: "ControlSensorDataTransfer" = betterproto.message_field(4)
    force_connect_to_server: bool = betterproto.bool_field(5)
    night_light_timeout: int = betterproto.int32_field(6)


@dataclass(eq=False, repr=False)
class ControlSensorDataTransfer(betterproto.Message):
    sound: bool = betterproto.bool_field(1)
    motion: bool = betterproto.bool_field(2)
    temperature: bool = betterproto.bool_field(3)
    humidity: bool = betterproto.bool_field(4)
    light: bool = betterproto.bool_field(5)
    night: bool = betterproto.bool_field(6)


@dataclass(eq=False, repr=False)
class Settings(betterproto.Message):
    night_vision: bool = betterproto.bool_field(2)
    sensors: List["SettingsSensorSettings"] = betterproto.message_field(7)
    streams: List["SettingsStreamSettings"] = betterproto.message_field(8)
    volume: int = betterproto.int32_field(9)
    anti_flicker: "SettingsAntiFlicker" = betterproto.enum_field(10)
    sleep_mode: bool = betterproto.bool_field(11)
    status_light_on: bool = betterproto.bool_field(12)
    mounting_mode: int = betterproto.int32_field(15)
    wifi_band: "SettingsWifiBand" = betterproto.enum_field(18)
    mic_mute_on: bool = betterproto.bool_field(20)


@dataclass(eq=False, repr=False)
class SettingsSensorSettings(betterproto.Message):
    sensor_type: "SensorType" = betterproto.enum_field(1)
    use_low_threshold: bool = betterproto.bool_field(2)
    use_high_threshold: bool = betterproto.bool_field(3)
    low_threshold: int = betterproto.int32_field(4)
    high_threshold: int = betterproto.int32_field(5)
    sample_interval_sec: int = betterproto.int32_field(6)
    trigger_interval_sec: int = betterproto.int32_field(7)
    use_milli_for_thresholds: bool = betterproto.bool_field(8)


@dataclass(eq=False, repr=False)
class SettingsStreamSettings(betterproto.Message):
    id: "StreamIdentifier" = betterproto.enum_field(1)
    bitrate: int = betterproto.int32_field(2)
    economy_bitrate: int = betterproto.int32_field(3)
    economy_fps: int = betterproto.int32_field(4)
    best_bitrate: int = betterproto.int32_field(5)
    best_fps: int = betterproto.int32_field(6)


@dataclass(eq=False, repr=False)
class Status(betterproto.Message):
    upgrade_downloaded: bool = betterproto.bool_field(1)
    connection_to_server: "StatusConnectionToServer" = betterproto.enum_field(2)
    current_version: str = betterproto.string_field(3)
    mode: "MountingMode" = betterproto.enum_field(4)
    is_security_upgrade: bool = betterproto.bool_field(5)
    downloaded_version: str = betterproto.string_field(6)
    hardware_version: str = betterproto.string_field(7)


@dataclass(eq=False, repr=False)
class Playback(betterproto.Message):
    status: "PlaybackStatus" = betterproto.enum_field(1)


@dataclass(eq=False, repr=False)
class Stream(betterproto.Message):
    type: "StreamType" = betterproto.enum_field(1)
    url: str = betterproto.string_field(2)
    bps: int = betterproto.int32_field(3)


@dataclass(eq=False, repr=False)
class Streaming(betterproto.Message):
    id: "StreamIdentifier" = betterproto.enum_field(1)
    status: "StreamingStatus" = betterproto.enum_field(2)
    rtmp_url: str = betterproto.string_field(3)
    attempts: int = betterproto.int32_field(4)


@dataclass(eq=False, repr=False)
class GetLogs(betterproto.Message):
    url: str = betterproto.string_field(1)


@dataclass(eq=False, repr=False)
class GetStatus(betterproto.Message):
    all: bool = betterproto.bool_field(1)


@dataclass(eq=False, repr=False)
class Request(betterproto.Message):
    id: int = betterproto.int32_field(1)
    type: "RequestType" = betterproto.enum_field(2)
    streaming: "Streaming" = betterproto.message_field(4)
    settings: "Settings" = betterproto.message_field(5)
    status: "Status" = betterproto.message_field(7)
    get_status: "GetStatus" = betterproto.message_field(8)
    get_sensor_data: "GetSensorData" = betterproto.message_field(12)
    sensor_data: List["SensorData"] = betterproto.message_field(13)
    control: "Control" = betterproto.message_field(15)
    playback: "Playback" = betterproto.message_field(16)
    get_control: "GetControl" = betterproto.message_field(17)
    get_logs: "GetLogs" = betterproto.message_field(18)


@dataclass(eq=False, repr=False)
class Response(betterproto.Message):
    request_id: int = betterproto.int32_field(1)
    request_type: "RequestType" = betterproto.enum_field(2)
    status_code: int = betterproto.int32_field(3)
    status_message: str = betterproto.string_field(4)
    status: "Status" = betterproto.message_field(5)
    settings: "Settings" = betterproto.message_field(6)
    sensor_data: List["SensorData"] = betterproto.message_field(9)
    control: "Control" = betterproto.message_field(13)


@dataclass(eq=False, repr=False)
class Message(betterproto.Message):
    type: "MessageType" = betterproto.enum_field(1)
    request: "Request" = betterproto.message_field(2)
    response: "Response" = betterproto.message_field(3)
