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

from . import hello_pb2 as hello__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.SayHello = channel.unary_unary(
        '/helloworld.Hello/SayHello',
        request_serializer=hello__pb2.HelloRequest.SerializeToString,
        response_deserializer=hello__pb2.HelloReply.FromString,
        )
    self.SayHelloTwice = channel.unary_stream(
        '/helloworld.Hello/SayHelloTwice',
        request_serializer=hello__pb2.HelloRequest.SerializeToString,
        response_deserializer=hello__pb2.HelloReply.FromString,
        )
    self.SayHelloRepeatedly = channel.stream_stream(
        '/helloworld.Hello/SayHelloRepeatedly',
        request_serializer=hello__pb2.HelloRequest.SerializeToString,
        response_deserializer=hello__pb2.HelloReply.FromString,
        )
    self.SayHelloLast = channel.stream_unary(
        '/helloworld.Hello/SayHelloLast',
        request_serializer=hello__pb2.HelloRequest.SerializeToString,
        response_deserializer=hello__pb2.HelloReply.FromString,
        )
    self.SayHelloUnknown = channel.unary_unary(
        '/helloworld.Hello/SayHelloUnknown',
        request_serializer=hello__pb2.HelloRequest.SerializeToString,
        response_deserializer=hello__pb2.HelloReply.FromString,
        )


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

  def SayHello(self, request, context):
    """Sends a greeting
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SayHelloTwice(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 SayHelloRepeatedly(self, request_iterator, 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 SayHelloLast(self, request_iterator, 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 SayHelloUnknown(self, request_iterator, 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_HelloServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SayHello': grpc.unary_unary_rpc_method_handler(
          servicer.SayHello,
          request_deserializer=hello__pb2.HelloRequest.FromString,
          response_serializer=hello__pb2.HelloReply.SerializeToString,
      ),
      'SayHelloTwice': grpc.unary_stream_rpc_method_handler(
          servicer.SayHelloTwice,
          request_deserializer=hello__pb2.HelloRequest.FromString,
          response_serializer=hello__pb2.HelloReply.SerializeToString,
      ),
      'SayHelloRepeatedly': grpc.stream_stream_rpc_method_handler(
          servicer.SayHelloRepeatedly,
          request_deserializer=hello__pb2.HelloRequest.FromString,
          response_serializer=hello__pb2.HelloReply.SerializeToString,
      ),
      'SayHelloLast': grpc.stream_unary_rpc_method_handler(
          servicer.SayHelloLast,
          request_deserializer=hello__pb2.HelloRequest.FromString,
          response_serializer=hello__pb2.HelloReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'helloworld.Hello', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
