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


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.create_auth_token = channel.unary_unary(
        '/Auth/create_auth_token',
        request_serializer=auth__pb2.UserId.SerializeToString,
        response_deserializer=auth__pb2.AuthToken.FromString,
        )
    self.read_auth_token = channel.unary_unary(
        '/Auth/read_auth_token',
        request_serializer=auth__pb2.GeneratedAuthToken.SerializeToString,
        response_deserializer=auth__pb2.Payload.FromString,
        )


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

  def create_auth_token(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 read_auth_token(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 add_AuthServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'create_auth_token': grpc.unary_unary_rpc_method_handler(
          servicer.create_auth_token,
          request_deserializer=auth__pb2.UserId.FromString,
          response_serializer=auth__pb2.AuthToken.SerializeToString,
      ),
      'read_auth_token': grpc.unary_unary_rpc_method_handler(
          servicer.read_auth_token,
          request_deserializer=auth__pb2.GeneratedAuthToken.FromString,
          response_serializer=auth__pb2.Payload.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'Auth', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
