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

import yafa_grpc.data_warehouse_pb2 as data__warehouse__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
        self.get_price = channel.unary_unary(
            '/data_warehouse.StockPrice/get_price',
            request_serializer=data__warehouse__pb2.PriceRequest.SerializeToString,
            response_deserializer=data__warehouse__pb2.DOHLC.FromString,
        )


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

    def get_price(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_StockPriceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'get_price':
            grpc.unary_unary_rpc_method_handler(
                servicer.get_price,
                request_deserializer=data__warehouse__pb2.PriceRequest.FromString,
                response_serializer=data__warehouse__pb2.DOHLC.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler('data_warehouse.StockPrice',
                                                           rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
