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

import currency_tracker_pb2 as currency__tracker__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.subscribe = channel.unary_stream(
        '/currency_tracker.CurrencyTracker/subscribe',
        request_serializer=currency__tracker__pb2.Subscription.SerializeToString,
        response_deserializer=currency__tracker__pb2.CurrencyData.FromString,
        )
    self.unsubscribe = channel.unary_unary(
        '/currency_tracker.CurrencyTracker/unsubscribe',
        request_serializer=currency__tracker__pb2.Cancelation.SerializeToString,
        response_deserializer=currency__tracker__pb2.Empty.FromString,
        )


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

  def subscribe(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 unsubscribe(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_CurrencyTrackerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'subscribe': grpc.unary_stream_rpc_method_handler(
          servicer.subscribe,
          request_deserializer=currency__tracker__pb2.Subscription.FromString,
          response_serializer=currency__tracker__pb2.CurrencyData.SerializeToString,
      ),
      'unsubscribe': grpc.unary_unary_rpc_method_handler(
          servicer.unsubscribe,
          request_deserializer=currency__tracker__pb2.Cancelation.FromString,
          response_serializer=currency__tracker__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'currency_tracker.CurrencyTracker', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
