# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from . import context_pb2 as context__pb2


class DeviceServiceStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.AddDevice = channel.unary_unary(
                '/device.DeviceService/AddDevice',
                request_serializer=context__pb2.Device.SerializeToString,
                response_deserializer=context__pb2.DeviceId.FromString,
                )
        self.ConfigureDevice = channel.unary_unary(
                '/device.DeviceService/ConfigureDevice',
                request_serializer=context__pb2.Device.SerializeToString,
                response_deserializer=context__pb2.DeviceId.FromString,
                )
        self.DeleteDevice = channel.unary_unary(
                '/device.DeviceService/DeleteDevice',
                request_serializer=context__pb2.DeviceId.SerializeToString,
                response_deserializer=context__pb2.Empty.FromString,
                )


class DeviceServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def AddDevice(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ConfigureDevice(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteDevice(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DeviceServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.AddDevice,
                    request_deserializer=context__pb2.Device.FromString,
                    response_serializer=context__pb2.DeviceId.SerializeToString,
            ),
            'ConfigureDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.ConfigureDevice,
                    request_deserializer=context__pb2.Device.FromString,
                    response_serializer=context__pb2.DeviceId.SerializeToString,
            ),
            'DeleteDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteDevice,
                    request_deserializer=context__pb2.DeviceId.FromString,
                    response_serializer=context__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'device.DeviceService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class DeviceService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def AddDevice(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/device.DeviceService/AddDevice',
            context__pb2.Device.SerializeToString,
            context__pb2.DeviceId.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ConfigureDevice(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/device.DeviceService/ConfigureDevice',
            context__pb2.Device.SerializeToString,
            context__pb2.DeviceId.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteDevice(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/device.DeviceService/DeleteDevice',
            context__pb2.DeviceId.SerializeToString,
            context__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
