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

from . import registration_pb2 as registration__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ExchangeAuthIdForToken = channel.unary_unary(
                '/dialog.Registration/ExchangeAuthIdForToken',
                request_serializer=registration__pb2.RequestExchangeAuthIdForToken.SerializeToString,
                response_deserializer=registration__pb2.ResponseDeviceRequest.FromString,
                )
        self.RegisterDevice = channel.unary_unary(
                '/dialog.Registration/RegisterDevice',
                request_serializer=registration__pb2.RequestRegisterDevice.SerializeToString,
                response_deserializer=registration__pb2.ResponseDeviceRequest.FromString,
                )
        self.RegisterDeprecatedDevice = channel.unary_unary(
                '/dialog.Registration/RegisterDeprecatedDevice',
                request_serializer=registration__pb2.RegisterDeprecatedDeviceRequest.SerializeToString,
                response_deserializer=registration__pb2.ResponseDeviceRequest.FromString,
                )


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

    def ExchangeAuthIdForToken(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 RegisterDevice(self, request, context):
        """/ register device to get auth token
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RegisterDeprecatedDevice(self, request, context):
        """deprecated
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RegistrationServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ExchangeAuthIdForToken': grpc.unary_unary_rpc_method_handler(
                    servicer.ExchangeAuthIdForToken,
                    request_deserializer=registration__pb2.RequestExchangeAuthIdForToken.FromString,
                    response_serializer=registration__pb2.ResponseDeviceRequest.SerializeToString,
            ),
            'RegisterDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterDevice,
                    request_deserializer=registration__pb2.RequestRegisterDevice.FromString,
                    response_serializer=registration__pb2.ResponseDeviceRequest.SerializeToString,
            ),
            'RegisterDeprecatedDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterDeprecatedDevice,
                    request_deserializer=registration__pb2.RegisterDeprecatedDeviceRequest.FromString,
                    response_serializer=registration__pb2.ResponseDeviceRequest.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dialog.Registration', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ExchangeAuthIdForToken(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, '/dialog.Registration/ExchangeAuthIdForToken',
            registration__pb2.RequestExchangeAuthIdForToken.SerializeToString,
            registration__pb2.ResponseDeviceRequest.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RegisterDevice(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, '/dialog.Registration/RegisterDevice',
            registration__pb2.RequestRegisterDevice.SerializeToString,
            registration__pb2.ResponseDeviceRequest.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RegisterDeprecatedDevice(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, '/dialog.Registration/RegisterDeprecatedDevice',
            registration__pb2.RegisterDeprecatedDeviceRequest.SerializeToString,
            registration__pb2.ResponseDeviceRequest.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
