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

from tensorflow.contrib.rpc.python.kernel_tests import test_example_pb2 as tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.IncrementTestShapes = channel.unary_unary(
        '/tensorflow.contrib.rpc.TestCaseService/IncrementTestShapes',
        request_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
        response_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
        )
    self.SleepForever = channel.unary_unary(
        '/tensorflow.contrib.rpc.TestCaseService/SleepForever',
        request_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
        response_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
        )
    self.SometimesSleepForever = channel.unary_unary(
        '/tensorflow.contrib.rpc.TestCaseService/SometimesSleepForever',
        request_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
        response_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
        )
    self.AlwaysFailWithInvalidArgument = channel.unary_unary(
        '/tensorflow.contrib.rpc.TestCaseService/AlwaysFailWithInvalidArgument',
        request_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
        response_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
        )
    self.SometimesFailWithInvalidArgument = channel.unary_unary(
        '/tensorflow.contrib.rpc.TestCaseService/SometimesFailWithInvalidArgument',
        request_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
        response_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
        )


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

  def IncrementTestShapes(self, request, context):
    """Copy input, and increment each entry in 'shape' by 1.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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

  def SometimesSleepForever(self, request, context):
    """Sleep forever 50% of the time, return immediately the other 50%.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def AlwaysFailWithInvalidArgument(self, request, context):
    """Always fails with InvalidArgument.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SometimesFailWithInvalidArgument(self, request, context):
    """Fails with InvalidArgument 50% of the time.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_TestCaseServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'IncrementTestShapes': grpc.unary_unary_rpc_method_handler(
          servicer.IncrementTestShapes,
          request_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
          response_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
      ),
      'SleepForever': grpc.unary_unary_rpc_method_handler(
          servicer.SleepForever,
          request_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
          response_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
      ),
      'SometimesSleepForever': grpc.unary_unary_rpc_method_handler(
          servicer.SometimesSleepForever,
          request_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
          response_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
      ),
      'AlwaysFailWithInvalidArgument': grpc.unary_unary_rpc_method_handler(
          servicer.AlwaysFailWithInvalidArgument,
          request_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
          response_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
      ),
      'SometimesFailWithInvalidArgument': grpc.unary_unary_rpc_method_handler(
          servicer.SometimesFailWithInvalidArgument,
          request_deserializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.FromString,
          response_serializer=tensorflow_dot_contrib_dot_rpc_dot_python_dot_kernel__tests_dot_test__example__pb2.TestCase.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'tensorflow.contrib.rpc.TestCaseService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
