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

from . import grpcserver_pb2 as grpcserver__pb2


class TestStub(object):
  """dummy service
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.TestUnary = channel.unary_unary(
        '/xbospb.Test/TestUnary',
        request_serializer=grpcserver__pb2.TestParams.SerializeToString,
        response_deserializer=grpcserver__pb2.TestResponse.FromString,
        )
    self.TestStream = channel.unary_stream(
        '/xbospb.Test/TestStream',
        request_serializer=grpcserver__pb2.TestParams.SerializeToString,
        response_deserializer=grpcserver__pb2.TestResponse.FromString,
        )


class TestServicer(object):
  """dummy service
  """

  def TestUnary(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 TestStream(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_TestServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'TestUnary': grpc.unary_unary_rpc_method_handler(
          servicer.TestUnary,
          request_deserializer=grpcserver__pb2.TestParams.FromString,
          response_serializer=grpcserver__pb2.TestResponse.SerializeToString,
      ),
      'TestStream': grpc.unary_stream_rpc_method_handler(
          servicer.TestStream,
          request_deserializer=grpcserver__pb2.TestParams.FromString,
          response_serializer=grpcserver__pb2.TestResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'xbospb.Test', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
