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

import betterproto
from pydantic.dataclasses import (
    dataclass,
    rebuild_dataclass,
)


class DeviceAvailabilityTaskAvailabilityType(betterproto.Enum):
    """Тип доступности"""

    AVAILABILITY_TYPE_UNKNOWN = 0
    """Значение не указано"""

    ONLINE = 1
    """Онлайн"""

    OFFLINE = 2
    """Офлайн"""

    @classmethod
    def __get_pydantic_core_schema__(cls, _source_type, _handler):
        from pydantic_core import core_schema

        return core_schema.int_schema(ge=0)


@dataclass(eq=False, repr=False, config={"extra": "forbid"})
class DeviceAvailabilityTask(betterproto.Message):
    """
    Событие изменения доступности устройства.
     Очередь bus.watchdog.device_availability
    """

    request_id: str = betterproto.string_field(1)
    """Идентификатор запроса"""

    device_id: int = betterproto.int32_field(2)
    """Идентификатор устройства"""

    availability_type: "DeviceAvailabilityTaskAvailabilityType" = (
        betterproto.enum_field(3)
    )
    """Тип доступности"""


rebuild_dataclass(DeviceAvailabilityTask)  # type: ignore
