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

import tests.apps.grpc_server.stan_pb2 as stan__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.OneQuestionOneResponse = channel.unary_unary(
        '/stan.Stan/OneQuestionOneResponse',
        request_serializer=stan__pb2.QuestionRequest.SerializeToString,
        response_deserializer=stan__pb2.QuestionResponse.FromString,
        )
    self.ManyQuestionsOneResponse = channel.stream_unary(
        '/stan.Stan/ManyQuestionsOneResponse',
        request_serializer=stan__pb2.QuestionRequest.SerializeToString,
        response_deserializer=stan__pb2.QuestionResponse.FromString,
        )
    self.OneQuestionManyResponses = channel.unary_stream(
        '/stan.Stan/OneQuestionManyResponses',
        request_serializer=stan__pb2.QuestionRequest.SerializeToString,
        response_deserializer=stan__pb2.QuestionResponse.FromString,
        )
    self.ManyQuestionsManyReponses = channel.stream_stream(
        '/stan.Stan/ManyQuestionsManyReponses',
        request_serializer=stan__pb2.QuestionRequest.SerializeToString,
        response_deserializer=stan__pb2.QuestionResponse.FromString,
        )
    self.OneQuestionOneErrorResponse = channel.unary_unary(
        '/stan.Stan/OneQuestionOneErrorResponse',
        request_serializer=stan__pb2.QuestionRequest.SerializeToString,
        response_deserializer=stan__pb2.QuestionResponse.FromString,
        )
    self.OneErroredQuestionOneResponse = channel.unary_unary(
        '/stan.Stan/OneErroredQuestionOneResponse',
        request_serializer=stan__pb2.QuestionRequest.SerializeToString,
        response_deserializer=stan__pb2.QuestionResponse.FromString,
        )


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

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

  def ManyQuestionsOneResponse(self, request_iterator, context):
    """Streaming
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OneQuestionManyResponses(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 ManyQuestionsManyReponses(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 OneQuestionOneErrorResponse(self, request, context):
    """Error Testing
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def OneErroredQuestionOneResponse(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_StanServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'OneQuestionOneResponse': grpc.unary_unary_rpc_method_handler(
          servicer.OneQuestionOneResponse,
          request_deserializer=stan__pb2.QuestionRequest.FromString,
          response_serializer=stan__pb2.QuestionResponse.SerializeToString,
      ),
      'ManyQuestionsOneResponse': grpc.stream_unary_rpc_method_handler(
          servicer.ManyQuestionsOneResponse,
          request_deserializer=stan__pb2.QuestionRequest.FromString,
          response_serializer=stan__pb2.QuestionResponse.SerializeToString,
      ),
      'OneQuestionManyResponses': grpc.unary_stream_rpc_method_handler(
          servicer.OneQuestionManyResponses,
          request_deserializer=stan__pb2.QuestionRequest.FromString,
          response_serializer=stan__pb2.QuestionResponse.SerializeToString,
      ),
      'ManyQuestionsManyReponses': grpc.stream_stream_rpc_method_handler(
          servicer.ManyQuestionsManyReponses,
          request_deserializer=stan__pb2.QuestionRequest.FromString,
          response_serializer=stan__pb2.QuestionResponse.SerializeToString,
      ),
      'OneQuestionOneErrorResponse': grpc.unary_unary_rpc_method_handler(
          servicer.OneQuestionOneErrorResponse,
          request_deserializer=stan__pb2.QuestionRequest.FromString,
          response_serializer=stan__pb2.QuestionResponse.SerializeToString,
      ),
      'OneErroredQuestionOneResponse': grpc.unary_unary_rpc_method_handler(
          servicer.OneErroredQuestionOneResponse,
          request_deserializer=stan__pb2.QuestionRequest.FromString,
          response_serializer=stan__pb2.QuestionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'stan.Stan', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
