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

from python_pachyderm.proto.transaction import transaction_pb2 as client_dot_transaction_dot_transaction__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.BatchTransaction = channel.unary_unary(
        '/transaction.API/BatchTransaction',
        request_serializer=client_dot_transaction_dot_transaction__pb2.BatchTransactionRequest.SerializeToString,
        response_deserializer=client_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
        )
    self.StartTransaction = channel.unary_unary(
        '/transaction.API/StartTransaction',
        request_serializer=client_dot_transaction_dot_transaction__pb2.StartTransactionRequest.SerializeToString,
        response_deserializer=client_dot_transaction_dot_transaction__pb2.Transaction.FromString,
        )
    self.InspectTransaction = channel.unary_unary(
        '/transaction.API/InspectTransaction',
        request_serializer=client_dot_transaction_dot_transaction__pb2.InspectTransactionRequest.SerializeToString,
        response_deserializer=client_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
        )
    self.DeleteTransaction = channel.unary_unary(
        '/transaction.API/DeleteTransaction',
        request_serializer=client_dot_transaction_dot_transaction__pb2.DeleteTransactionRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.ListTransaction = channel.unary_unary(
        '/transaction.API/ListTransaction',
        request_serializer=client_dot_transaction_dot_transaction__pb2.ListTransactionRequest.SerializeToString,
        response_deserializer=client_dot_transaction_dot_transaction__pb2.TransactionInfos.FromString,
        )
    self.FinishTransaction = channel.unary_unary(
        '/transaction.API/FinishTransaction',
        request_serializer=client_dot_transaction_dot_transaction__pb2.FinishTransactionRequest.SerializeToString,
        response_deserializer=client_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
        )
    self.DeleteAll = channel.unary_unary(
        '/transaction.API/DeleteAll',
        request_serializer=client_dot_transaction_dot_transaction__pb2.DeleteAllRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )


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

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

  def StartTransaction(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 InspectTransaction(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 DeleteTransaction(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 ListTransaction(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 FinishTransaction(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 DeleteAll(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_APIServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'BatchTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.BatchTransaction,
          request_deserializer=client_dot_transaction_dot_transaction__pb2.BatchTransactionRequest.FromString,
          response_serializer=client_dot_transaction_dot_transaction__pb2.TransactionInfo.SerializeToString,
      ),
      'StartTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.StartTransaction,
          request_deserializer=client_dot_transaction_dot_transaction__pb2.StartTransactionRequest.FromString,
          response_serializer=client_dot_transaction_dot_transaction__pb2.Transaction.SerializeToString,
      ),
      'InspectTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.InspectTransaction,
          request_deserializer=client_dot_transaction_dot_transaction__pb2.InspectTransactionRequest.FromString,
          response_serializer=client_dot_transaction_dot_transaction__pb2.TransactionInfo.SerializeToString,
      ),
      'DeleteTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteTransaction,
          request_deserializer=client_dot_transaction_dot_transaction__pb2.DeleteTransactionRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'ListTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.ListTransaction,
          request_deserializer=client_dot_transaction_dot_transaction__pb2.ListTransactionRequest.FromString,
          response_serializer=client_dot_transaction_dot_transaction__pb2.TransactionInfos.SerializeToString,
      ),
      'FinishTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.FinishTransaction,
          request_deserializer=client_dot_transaction_dot_transaction__pb2.FinishTransactionRequest.FromString,
          response_serializer=client_dot_transaction_dot_transaction__pb2.TransactionInfo.SerializeToString,
      ),
      'DeleteAll': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteAll,
          request_deserializer=client_dot_transaction_dot_transaction__pb2.DeleteAllRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'transaction.API', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
