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

from . import discomfort_pb2 as discomfort__pb2


class DiscomfortStub(object):
  """The Discomfort service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetLinearDiscomfort = channel.unary_unary(
        '/discomfort.Discomfort/GetLinearDiscomfort',
        request_serializer=discomfort__pb2.Request.SerializeToString,
        response_deserializer=discomfort__pb2.DiscomfortPoint.FromString,
        )


class DiscomfortServicer(object):
  """The Discomfort service definition.
  """

  def GetLinearDiscomfort(self, request, context):
    """A simple RPC.

    Gets the linear discomfort from the edges of the given temperature band. (Euclidean distance to comfortband.)
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_DiscomfortServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetLinearDiscomfort': grpc.unary_unary_rpc_method_handler(
          servicer.GetLinearDiscomfort,
          request_deserializer=discomfort__pb2.Request.FromString,
          response_serializer=discomfort__pb2.DiscomfortPoint.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'discomfort.Discomfort', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
