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

from hfc.protos.peer import proposal_pb2 as hfc_dot_protos_dot_peer_dot_proposal__pb2
from hfc.protos.peer import proposal_response_pb2 as hfc_dot_protos_dot_peer_dot_proposal__response__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.ProcessProposal = channel.unary_unary(
        '/protos.Endorser/ProcessProposal',
        request_serializer=hfc_dot_protos_dot_peer_dot_proposal__pb2.SignedProposal.SerializeToString,
        response_deserializer=hfc_dot_protos_dot_peer_dot_proposal__response__pb2.ProposalResponse.FromString,
        )


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

  def ProcessProposal(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_EndorserServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ProcessProposal': grpc.unary_unary_rpc_method_handler(
          servicer.ProcessProposal,
          request_deserializer=hfc_dot_protos_dot_peer_dot_proposal__pb2.SignedProposal.FromString,
          response_serializer=hfc_dot_protos_dot_peer_dot_proposal__response__pb2.ProposalResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'protos.Endorser', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
