# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import registration_pb2 as registration__pb2


class RegistrationStub(object):
  # missing associated documentation comment in .proto file
  pass

  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
  pass

  def ExchangeAuthIdForToken(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    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,))
