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

import value_pb2 as value__pb2


class ValueServiceStub(object):
  """Handles a single value, and makes it accessible and modifiable by clients.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetValue = channel.unary_unary(
        '/ValueService/GetValue',
        request_serializer=value__pb2.Empty.SerializeToString,
        response_deserializer=value__pb2.Value.FromString,
        )
    self.SetValue = channel.unary_unary(
        '/ValueService/SetValue',
        request_serializer=value__pb2.Value.SerializeToString,
        response_deserializer=value__pb2.Empty.FromString,
        )


class ValueServiceServicer(object):
  """Handles a single value, and makes it accessible and modifiable by clients.
  """

  def GetValue(self, request, context):
    """Gets the value that this service handles.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def SetValue(self, request, context):
    """Sets the value that this service handles.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ValueServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetValue': grpc.unary_unary_rpc_method_handler(
          servicer.GetValue,
          request_deserializer=value__pb2.Empty.FromString,
          response_serializer=value__pb2.Value.SerializeToString,
      ),
      'SetValue': grpc.unary_unary_rpc_method_handler(
          servicer.SetValue,
          request_deserializer=value__pb2.Value.FromString,
          response_serializer=value__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ValueService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
