# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from v4_proto.dydxprotocol.prices import query_pb2 as dydxprotocol_dot_prices_dot_query__pb2


class QueryStub(object):
    """Query defines the gRPC querier service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.MarketPrice = channel.unary_unary(
                '/dydxprotocol.prices.Query/MarketPrice',
                request_serializer=dydxprotocol_dot_prices_dot_query__pb2.QueryMarketPriceRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_prices_dot_query__pb2.QueryMarketPriceResponse.FromString,
                )
        self.AllMarketPrices = channel.unary_unary(
                '/dydxprotocol.prices.Query/AllMarketPrices',
                request_serializer=dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketPricesRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketPricesResponse.FromString,
                )
        self.MarketParam = channel.unary_unary(
                '/dydxprotocol.prices.Query/MarketParam',
                request_serializer=dydxprotocol_dot_prices_dot_query__pb2.QueryMarketParamRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_prices_dot_query__pb2.QueryMarketParamResponse.FromString,
                )
        self.AllMarketParams = channel.unary_unary(
                '/dydxprotocol.prices.Query/AllMarketParams',
                request_serializer=dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketParamsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketParamsResponse.FromString,
                )


class QueryServicer(object):
    """Query defines the gRPC querier service.
    """

    def MarketPrice(self, request, context):
        """Queries a MarketPrice by id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AllMarketPrices(self, request, context):
        """Queries a list of MarketPrice items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MarketParam(self, request, context):
        """Queries a MarketParam by id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AllMarketParams(self, request, context):
        """Queries a list of MarketParam items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QueryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'MarketPrice': grpc.unary_unary_rpc_method_handler(
                    servicer.MarketPrice,
                    request_deserializer=dydxprotocol_dot_prices_dot_query__pb2.QueryMarketPriceRequest.FromString,
                    response_serializer=dydxprotocol_dot_prices_dot_query__pb2.QueryMarketPriceResponse.SerializeToString,
            ),
            'AllMarketPrices': grpc.unary_unary_rpc_method_handler(
                    servicer.AllMarketPrices,
                    request_deserializer=dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketPricesRequest.FromString,
                    response_serializer=dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketPricesResponse.SerializeToString,
            ),
            'MarketParam': grpc.unary_unary_rpc_method_handler(
                    servicer.MarketParam,
                    request_deserializer=dydxprotocol_dot_prices_dot_query__pb2.QueryMarketParamRequest.FromString,
                    response_serializer=dydxprotocol_dot_prices_dot_query__pb2.QueryMarketParamResponse.SerializeToString,
            ),
            'AllMarketParams': grpc.unary_unary_rpc_method_handler(
                    servicer.AllMarketParams,
                    request_deserializer=dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketParamsRequest.FromString,
                    response_serializer=dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketParamsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.prices.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Query(object):
    """Query defines the gRPC querier service.
    """

    @staticmethod
    def MarketPrice(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dydxprotocol.prices.Query/MarketPrice',
            dydxprotocol_dot_prices_dot_query__pb2.QueryMarketPriceRequest.SerializeToString,
            dydxprotocol_dot_prices_dot_query__pb2.QueryMarketPriceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AllMarketPrices(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dydxprotocol.prices.Query/AllMarketPrices',
            dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketPricesRequest.SerializeToString,
            dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketPricesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MarketParam(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dydxprotocol.prices.Query/MarketParam',
            dydxprotocol_dot_prices_dot_query__pb2.QueryMarketParamRequest.SerializeToString,
            dydxprotocol_dot_prices_dot_query__pb2.QueryMarketParamResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AllMarketParams(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/dydxprotocol.prices.Query/AllMarketParams',
            dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketParamsRequest.SerializeToString,
            dydxprotocol_dot_prices_dot_query__pb2.QueryAllMarketParamsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
