"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import collections.abc
import devices_pb2
import grpc
import grpc.aio
import typing

_T = typing.TypeVar("_T")

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore[misc, type-arg]
    ...

GRPC_GENERATED_VERSION: str
GRPC_VERSION: str

class DevicesServiceStub:
    @typing.overload
    def __new__(cls, channel: grpc.Channel) -> DevicesServiceStub: ...
    @typing.overload
    def __new__(cls, channel: grpc.aio.Channel) -> DevicesServiceAsyncStub: ...
    CreateDevice: grpc.UnaryUnaryMultiCallable[devices_pb2.CreateDeviceRequest, devices_pb2.CreateDeviceResponse]
    """Devices CRUD"""
    GetDevice: grpc.UnaryUnaryMultiCallable[devices_pb2.GetDeviceRequest, devices_pb2.GetDeviceResponse]
    ListDevices: grpc.UnaryUnaryMultiCallable[devices_pb2.ListDevicesRequest, devices_pb2.ListDevicesResponse]
    UpdateDevice: grpc.UnaryUnaryMultiCallable[devices_pb2.UpdateDeviceRequest, devices_pb2.UpdateDeviceResponse]
    DeleteDevice: grpc.UnaryUnaryMultiCallable[devices_pb2.DeleteDeviceRequest, devices_pb2.DeleteDeviceResponse]
    RegenerateDeviceToken: grpc.UnaryUnaryMultiCallable[devices_pb2.RegenerateDeviceTokenRequest, devices_pb2.RegenerateDeviceTokenResponse]
    CreateSensor: grpc.UnaryUnaryMultiCallable[devices_pb2.CreateSensorRequest, devices_pb2.CreateSensorResponse]
    """Sensors CRUD"""
    ListSensors: grpc.UnaryUnaryMultiCallable[devices_pb2.ListSensorsRequest, devices_pb2.ListSensorsResponse]
    UpdateSensor: grpc.UnaryUnaryMultiCallable[devices_pb2.UpdateSensorRequest, devices_pb2.UpdateSensorResponse]
    DeleteSensor: grpc.UnaryUnaryMultiCallable[devices_pb2.DeleteSensorRequest, devices_pb2.DeleteSensorResponse]
    SetThreshold: grpc.UnaryUnaryMultiCallable[devices_pb2.SetThresholdRequest, devices_pb2.SetThresholdResponse]
    """Sensor Thresholds"""
    ListThresholds: grpc.UnaryUnaryMultiCallable[devices_pb2.ListThresholdsRequest, devices_pb2.ListThresholdsResponse]
    DeleteThreshold: grpc.UnaryUnaryMultiCallable[devices_pb2.DeleteThresholdRequest, devices_pb2.DeleteThresholdResponse]
    GetSensorThresholds: grpc.UnaryUnaryMultiCallable[devices_pb2.GetSensorThresholdsRequest, devices_pb2.GetSensorThresholdsResponse]
    CreateActuator: grpc.UnaryUnaryMultiCallable[devices_pb2.CreateActuatorRequest, devices_pb2.CreateActuatorResponse]
    """Actuators CRUD"""
    ListActuators: grpc.UnaryUnaryMultiCallable[devices_pb2.ListActuatorsRequest, devices_pb2.ListActuatorsResponse]
    UpdateActuator: grpc.UnaryUnaryMultiCallable[devices_pb2.UpdateActuatorRequest, devices_pb2.UpdateActuatorResponse]
    DeleteActuator: grpc.UnaryUnaryMultiCallable[devices_pb2.DeleteActuatorRequest, devices_pb2.DeleteActuatorResponse]
    SendCommand: grpc.UnaryUnaryMultiCallable[devices_pb2.SendCommandRequest, devices_pb2.SendCommandResponse]
    """Commands"""
    AuthenticateDevice: grpc.UnaryUnaryMultiCallable[devices_pb2.AuthenticateDeviceRequest, devices_pb2.AuthenticateDeviceResponse]
    """MQTT auth (internal, for gateway webhook)"""
    CheckDeviceAcl: grpc.UnaryUnaryMultiCallable[devices_pb2.CheckDeviceAclRequest, devices_pb2.CheckDeviceAclResponse]
    GenerateMqttCredentials: grpc.UnaryUnaryMultiCallable[devices_pb2.GenerateMqttCredentialsRequest, devices_pb2.GenerateMqttCredentialsResponse]
    """MQTT credentials for frontend users"""
    UpdateDeviceStatus: grpc.UnaryUnaryMultiCallable[devices_pb2.UpdateDeviceStatusRequest, devices_pb2.UpdateDeviceStatusResponse]
    """Device status (for collector)"""
    DeleteDevicesByPlace: grpc.UnaryUnaryMultiCallable[devices_pb2.DeleteDevicesByPlaceRequest, devices_pb2.DeleteDevicesByPlaceResponse]
    """Internal: delete all devices by place (for gateway cascade)"""
    InvalidateMqttCredentials: grpc.UnaryUnaryMultiCallable[devices_pb2.InvalidateMqttCredentialsRequest, devices_pb2.InvalidateMqttCredentialsResponse]
    """Internal: invalidate cached MQTT credentials (for gateway)"""
    GetAllThresholds: grpc.UnaryUnaryMultiCallable[devices_pb2.GetAllThresholdsRequest, devices_pb2.GetAllThresholdsResponse]
    """Internal: all thresholds for collector cache"""

@typing.type_check_only
class DevicesServiceAsyncStub(DevicesServiceStub):
    def __init__(self, channel: grpc.aio.Channel) -> None: ...
    CreateDevice: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.CreateDeviceRequest, devices_pb2.CreateDeviceResponse]  # type: ignore[assignment]
    """Devices CRUD"""
    GetDevice: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.GetDeviceRequest, devices_pb2.GetDeviceResponse]  # type: ignore[assignment]
    ListDevices: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.ListDevicesRequest, devices_pb2.ListDevicesResponse]  # type: ignore[assignment]
    UpdateDevice: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.UpdateDeviceRequest, devices_pb2.UpdateDeviceResponse]  # type: ignore[assignment]
    DeleteDevice: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.DeleteDeviceRequest, devices_pb2.DeleteDeviceResponse]  # type: ignore[assignment]
    RegenerateDeviceToken: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.RegenerateDeviceTokenRequest, devices_pb2.RegenerateDeviceTokenResponse]  # type: ignore[assignment]
    CreateSensor: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.CreateSensorRequest, devices_pb2.CreateSensorResponse]  # type: ignore[assignment]
    """Sensors CRUD"""
    ListSensors: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.ListSensorsRequest, devices_pb2.ListSensorsResponse]  # type: ignore[assignment]
    UpdateSensor: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.UpdateSensorRequest, devices_pb2.UpdateSensorResponse]  # type: ignore[assignment]
    DeleteSensor: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.DeleteSensorRequest, devices_pb2.DeleteSensorResponse]  # type: ignore[assignment]
    SetThreshold: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.SetThresholdRequest, devices_pb2.SetThresholdResponse]  # type: ignore[assignment]
    """Sensor Thresholds"""
    ListThresholds: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.ListThresholdsRequest, devices_pb2.ListThresholdsResponse]  # type: ignore[assignment]
    DeleteThreshold: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.DeleteThresholdRequest, devices_pb2.DeleteThresholdResponse]  # type: ignore[assignment]
    GetSensorThresholds: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.GetSensorThresholdsRequest, devices_pb2.GetSensorThresholdsResponse]  # type: ignore[assignment]
    CreateActuator: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.CreateActuatorRequest, devices_pb2.CreateActuatorResponse]  # type: ignore[assignment]
    """Actuators CRUD"""
    ListActuators: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.ListActuatorsRequest, devices_pb2.ListActuatorsResponse]  # type: ignore[assignment]
    UpdateActuator: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.UpdateActuatorRequest, devices_pb2.UpdateActuatorResponse]  # type: ignore[assignment]
    DeleteActuator: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.DeleteActuatorRequest, devices_pb2.DeleteActuatorResponse]  # type: ignore[assignment]
    SendCommand: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.SendCommandRequest, devices_pb2.SendCommandResponse]  # type: ignore[assignment]
    """Commands"""
    AuthenticateDevice: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.AuthenticateDeviceRequest, devices_pb2.AuthenticateDeviceResponse]  # type: ignore[assignment]
    """MQTT auth (internal, for gateway webhook)"""
    CheckDeviceAcl: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.CheckDeviceAclRequest, devices_pb2.CheckDeviceAclResponse]  # type: ignore[assignment]
    GenerateMqttCredentials: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.GenerateMqttCredentialsRequest, devices_pb2.GenerateMqttCredentialsResponse]  # type: ignore[assignment]
    """MQTT credentials for frontend users"""
    UpdateDeviceStatus: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.UpdateDeviceStatusRequest, devices_pb2.UpdateDeviceStatusResponse]  # type: ignore[assignment]
    """Device status (for collector)"""
    DeleteDevicesByPlace: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.DeleteDevicesByPlaceRequest, devices_pb2.DeleteDevicesByPlaceResponse]  # type: ignore[assignment]
    """Internal: delete all devices by place (for gateway cascade)"""
    InvalidateMqttCredentials: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.InvalidateMqttCredentialsRequest, devices_pb2.InvalidateMqttCredentialsResponse]  # type: ignore[assignment]
    """Internal: invalidate cached MQTT credentials (for gateway)"""
    GetAllThresholds: grpc.aio.UnaryUnaryMultiCallable[devices_pb2.GetAllThresholdsRequest, devices_pb2.GetAllThresholdsResponse]  # type: ignore[assignment]
    """Internal: all thresholds for collector cache"""

class DevicesServiceServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def CreateDevice(
        self,
        request: devices_pb2.CreateDeviceRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.CreateDeviceResponse, collections.abc.Awaitable[devices_pb2.CreateDeviceResponse]]:
        """Devices CRUD"""

    @abc.abstractmethod
    def GetDevice(
        self,
        request: devices_pb2.GetDeviceRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.GetDeviceResponse, collections.abc.Awaitable[devices_pb2.GetDeviceResponse]]: ...

    @abc.abstractmethod
    def ListDevices(
        self,
        request: devices_pb2.ListDevicesRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.ListDevicesResponse, collections.abc.Awaitable[devices_pb2.ListDevicesResponse]]: ...

    @abc.abstractmethod
    def UpdateDevice(
        self,
        request: devices_pb2.UpdateDeviceRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.UpdateDeviceResponse, collections.abc.Awaitable[devices_pb2.UpdateDeviceResponse]]: ...

    @abc.abstractmethod
    def DeleteDevice(
        self,
        request: devices_pb2.DeleteDeviceRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.DeleteDeviceResponse, collections.abc.Awaitable[devices_pb2.DeleteDeviceResponse]]: ...

    @abc.abstractmethod
    def RegenerateDeviceToken(
        self,
        request: devices_pb2.RegenerateDeviceTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.RegenerateDeviceTokenResponse, collections.abc.Awaitable[devices_pb2.RegenerateDeviceTokenResponse]]: ...

    @abc.abstractmethod
    def CreateSensor(
        self,
        request: devices_pb2.CreateSensorRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.CreateSensorResponse, collections.abc.Awaitable[devices_pb2.CreateSensorResponse]]:
        """Sensors CRUD"""

    @abc.abstractmethod
    def ListSensors(
        self,
        request: devices_pb2.ListSensorsRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.ListSensorsResponse, collections.abc.Awaitable[devices_pb2.ListSensorsResponse]]: ...

    @abc.abstractmethod
    def UpdateSensor(
        self,
        request: devices_pb2.UpdateSensorRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.UpdateSensorResponse, collections.abc.Awaitable[devices_pb2.UpdateSensorResponse]]: ...

    @abc.abstractmethod
    def DeleteSensor(
        self,
        request: devices_pb2.DeleteSensorRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.DeleteSensorResponse, collections.abc.Awaitable[devices_pb2.DeleteSensorResponse]]: ...

    @abc.abstractmethod
    def SetThreshold(
        self,
        request: devices_pb2.SetThresholdRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.SetThresholdResponse, collections.abc.Awaitable[devices_pb2.SetThresholdResponse]]:
        """Sensor Thresholds"""

    @abc.abstractmethod
    def ListThresholds(
        self,
        request: devices_pb2.ListThresholdsRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.ListThresholdsResponse, collections.abc.Awaitable[devices_pb2.ListThresholdsResponse]]: ...

    @abc.abstractmethod
    def DeleteThreshold(
        self,
        request: devices_pb2.DeleteThresholdRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.DeleteThresholdResponse, collections.abc.Awaitable[devices_pb2.DeleteThresholdResponse]]: ...

    @abc.abstractmethod
    def GetSensorThresholds(
        self,
        request: devices_pb2.GetSensorThresholdsRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.GetSensorThresholdsResponse, collections.abc.Awaitable[devices_pb2.GetSensorThresholdsResponse]]: ...

    @abc.abstractmethod
    def CreateActuator(
        self,
        request: devices_pb2.CreateActuatorRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.CreateActuatorResponse, collections.abc.Awaitable[devices_pb2.CreateActuatorResponse]]:
        """Actuators CRUD"""

    @abc.abstractmethod
    def ListActuators(
        self,
        request: devices_pb2.ListActuatorsRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.ListActuatorsResponse, collections.abc.Awaitable[devices_pb2.ListActuatorsResponse]]: ...

    @abc.abstractmethod
    def UpdateActuator(
        self,
        request: devices_pb2.UpdateActuatorRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.UpdateActuatorResponse, collections.abc.Awaitable[devices_pb2.UpdateActuatorResponse]]: ...

    @abc.abstractmethod
    def DeleteActuator(
        self,
        request: devices_pb2.DeleteActuatorRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.DeleteActuatorResponse, collections.abc.Awaitable[devices_pb2.DeleteActuatorResponse]]: ...

    @abc.abstractmethod
    def SendCommand(
        self,
        request: devices_pb2.SendCommandRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.SendCommandResponse, collections.abc.Awaitable[devices_pb2.SendCommandResponse]]:
        """Commands"""

    @abc.abstractmethod
    def AuthenticateDevice(
        self,
        request: devices_pb2.AuthenticateDeviceRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.AuthenticateDeviceResponse, collections.abc.Awaitable[devices_pb2.AuthenticateDeviceResponse]]:
        """MQTT auth (internal, for gateway webhook)"""

    @abc.abstractmethod
    def CheckDeviceAcl(
        self,
        request: devices_pb2.CheckDeviceAclRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.CheckDeviceAclResponse, collections.abc.Awaitable[devices_pb2.CheckDeviceAclResponse]]: ...

    @abc.abstractmethod
    def GenerateMqttCredentials(
        self,
        request: devices_pb2.GenerateMqttCredentialsRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.GenerateMqttCredentialsResponse, collections.abc.Awaitable[devices_pb2.GenerateMqttCredentialsResponse]]:
        """MQTT credentials for frontend users"""

    @abc.abstractmethod
    def UpdateDeviceStatus(
        self,
        request: devices_pb2.UpdateDeviceStatusRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.UpdateDeviceStatusResponse, collections.abc.Awaitable[devices_pb2.UpdateDeviceStatusResponse]]:
        """Device status (for collector)"""

    @abc.abstractmethod
    def DeleteDevicesByPlace(
        self,
        request: devices_pb2.DeleteDevicesByPlaceRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.DeleteDevicesByPlaceResponse, collections.abc.Awaitable[devices_pb2.DeleteDevicesByPlaceResponse]]:
        """Internal: delete all devices by place (for gateway cascade)"""

    @abc.abstractmethod
    def InvalidateMqttCredentials(
        self,
        request: devices_pb2.InvalidateMqttCredentialsRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.InvalidateMqttCredentialsResponse, collections.abc.Awaitable[devices_pb2.InvalidateMqttCredentialsResponse]]:
        """Internal: invalidate cached MQTT credentials (for gateway)"""

    @abc.abstractmethod
    def GetAllThresholds(
        self,
        request: devices_pb2.GetAllThresholdsRequest,
        context: _ServicerContext,
    ) -> typing.Union[devices_pb2.GetAllThresholdsResponse, collections.abc.Awaitable[devices_pb2.GetAllThresholdsResponse]]:
        """Internal: all thresholds for collector cache"""

def add_DevicesServiceServicer_to_server(servicer: DevicesServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
