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

from business_context_grpc import business_context_pb2 as business__context__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.FetchContexts = channel.unary_unary(
        '/businessContext.BusinessContextServer/FetchContexts',
        request_serializer=business__context__pb2.BusinessContextRequestMessage.SerializeToString,
        response_deserializer=business__context__pb2.BusinessContextsResponseMessage.FromString,
        )
    self.FetchAllContexts = channel.unary_unary(
        '/businessContext.BusinessContextServer/FetchAllContexts',
        request_serializer=business__context__pb2.Empty.SerializeToString,
        response_deserializer=business__context__pb2.BusinessContextsResponseMessage.FromString,
        )
    self.UpdateContext = channel.unary_unary(
        '/businessContext.BusinessContextServer/UpdateContext',
        request_serializer=business__context__pb2.BusinessContextUpdateRequestMessage.SerializeToString,
        response_deserializer=business__context__pb2.Empty.FromString,
        )
    self.BeginTransaction = channel.unary_unary(
        '/businessContext.BusinessContextServer/BeginTransaction',
        request_serializer=business__context__pb2.Empty.SerializeToString,
        response_deserializer=business__context__pb2.Empty.FromString,
        )
    self.CommitTransaction = channel.unary_unary(
        '/businessContext.BusinessContextServer/CommitTransaction',
        request_serializer=business__context__pb2.Empty.SerializeToString,
        response_deserializer=business__context__pb2.Empty.FromString,
        )
    self.RollbackTransaction = channel.unary_unary(
        '/businessContext.BusinessContextServer/RollbackTransaction',
        request_serializer=business__context__pb2.Empty.SerializeToString,
        response_deserializer=business__context__pb2.Empty.FromString,
        )


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

  def FetchContexts(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 FetchAllContexts(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 UpdateContext(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 BeginTransaction(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 CommitTransaction(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 RollbackTransaction(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_BusinessContextServerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'FetchContexts': grpc.unary_unary_rpc_method_handler(
          servicer.FetchContexts,
          request_deserializer=business__context__pb2.BusinessContextRequestMessage.FromString,
          response_serializer=business__context__pb2.BusinessContextsResponseMessage.SerializeToString,
      ),
      'FetchAllContexts': grpc.unary_unary_rpc_method_handler(
          servicer.FetchAllContexts,
          request_deserializer=business__context__pb2.Empty.FromString,
          response_serializer=business__context__pb2.BusinessContextsResponseMessage.SerializeToString,
      ),
      'UpdateContext': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateContext,
          request_deserializer=business__context__pb2.BusinessContextUpdateRequestMessage.FromString,
          response_serializer=business__context__pb2.Empty.SerializeToString,
      ),
      'BeginTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.BeginTransaction,
          request_deserializer=business__context__pb2.Empty.FromString,
          response_serializer=business__context__pb2.Empty.SerializeToString,
      ),
      'CommitTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.CommitTransaction,
          request_deserializer=business__context__pb2.Empty.FromString,
          response_serializer=business__context__pb2.Empty.SerializeToString,
      ),
      'RollbackTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.RollbackTransaction,
          request_deserializer=business__context__pb2.Empty.FromString,
          response_serializer=business__context__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'businessContext.BusinessContextServer', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
