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

from pricefeed import query_pb2 as pricefeed_dot_query__pb2


class QueryStub(object):
    """Query defines the gRPC querier service for pricefeed module
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.QueryParams = channel.unary_unary(
                '/nibiru.pricefeed.v1.Query/QueryParams',
                request_serializer=pricefeed_dot_query__pb2.QueryParamsRequest.SerializeToString,
                response_deserializer=pricefeed_dot_query__pb2.QueryParamsResponse.FromString,
                )
        self.QueryPrice = channel.unary_unary(
                '/nibiru.pricefeed.v1.Query/QueryPrice',
                request_serializer=pricefeed_dot_query__pb2.QueryPriceRequest.SerializeToString,
                response_deserializer=pricefeed_dot_query__pb2.QueryPriceResponse.FromString,
                )
        self.QueryPrices = channel.unary_unary(
                '/nibiru.pricefeed.v1.Query/QueryPrices',
                request_serializer=pricefeed_dot_query__pb2.QueryPricesRequest.SerializeToString,
                response_deserializer=pricefeed_dot_query__pb2.QueryPricesResponse.FromString,
                )
        self.QueryRawPrices = channel.unary_unary(
                '/nibiru.pricefeed.v1.Query/QueryRawPrices',
                request_serializer=pricefeed_dot_query__pb2.QueryRawPricesRequest.SerializeToString,
                response_deserializer=pricefeed_dot_query__pb2.QueryRawPricesResponse.FromString,
                )
        self.QueryOracles = channel.unary_unary(
                '/nibiru.pricefeed.v1.Query/QueryOracles',
                request_serializer=pricefeed_dot_query__pb2.QueryOraclesRequest.SerializeToString,
                response_deserializer=pricefeed_dot_query__pb2.QueryOraclesResponse.FromString,
                )
        self.QueryMarkets = channel.unary_unary(
                '/nibiru.pricefeed.v1.Query/QueryMarkets',
                request_serializer=pricefeed_dot_query__pb2.QueryMarketsRequest.SerializeToString,
                response_deserializer=pricefeed_dot_query__pb2.QueryMarketsResponse.FromString,
                )


class QueryServicer(object):
    """Query defines the gRPC querier service for pricefeed module
    """

    def QueryParams(self, request, context):
        """QueryParams queries all parameters of the pricefeed module.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryPrice(self, request, context):
        """QueryPrice queries price details for a pair
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryPrices(self, request, context):
        """QueryPrices queries all prices
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryRawPrices(self, request, context):
        """QueryRawPrices queries all raw prices for an asset pair
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryOracles(self, request, context):
        """QueryOracles queries all oracles for an asset pair
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryMarkets(self, request, context):
        """QueryMarkets queries all markets
        """
        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 = {
            'QueryParams': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryParams,
                    request_deserializer=pricefeed_dot_query__pb2.QueryParamsRequest.FromString,
                    response_serializer=pricefeed_dot_query__pb2.QueryParamsResponse.SerializeToString,
            ),
            'QueryPrice': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryPrice,
                    request_deserializer=pricefeed_dot_query__pb2.QueryPriceRequest.FromString,
                    response_serializer=pricefeed_dot_query__pb2.QueryPriceResponse.SerializeToString,
            ),
            'QueryPrices': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryPrices,
                    request_deserializer=pricefeed_dot_query__pb2.QueryPricesRequest.FromString,
                    response_serializer=pricefeed_dot_query__pb2.QueryPricesResponse.SerializeToString,
            ),
            'QueryRawPrices': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryRawPrices,
                    request_deserializer=pricefeed_dot_query__pb2.QueryRawPricesRequest.FromString,
                    response_serializer=pricefeed_dot_query__pb2.QueryRawPricesResponse.SerializeToString,
            ),
            'QueryOracles': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryOracles,
                    request_deserializer=pricefeed_dot_query__pb2.QueryOraclesRequest.FromString,
                    response_serializer=pricefeed_dot_query__pb2.QueryOraclesResponse.SerializeToString,
            ),
            'QueryMarkets': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryMarkets,
                    request_deserializer=pricefeed_dot_query__pb2.QueryMarketsRequest.FromString,
                    response_serializer=pricefeed_dot_query__pb2.QueryMarketsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nibiru.pricefeed.v1.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 for pricefeed module
    """

    @staticmethod
    def QueryParams(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, '/nibiru.pricefeed.v1.Query/QueryParams',
            pricefeed_dot_query__pb2.QueryParamsRequest.SerializeToString,
            pricefeed_dot_query__pb2.QueryParamsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def QueryPrice(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, '/nibiru.pricefeed.v1.Query/QueryPrice',
            pricefeed_dot_query__pb2.QueryPriceRequest.SerializeToString,
            pricefeed_dot_query__pb2.QueryPriceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def QueryPrices(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, '/nibiru.pricefeed.v1.Query/QueryPrices',
            pricefeed_dot_query__pb2.QueryPricesRequest.SerializeToString,
            pricefeed_dot_query__pb2.QueryPricesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def QueryRawPrices(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, '/nibiru.pricefeed.v1.Query/QueryRawPrices',
            pricefeed_dot_query__pb2.QueryRawPricesRequest.SerializeToString,
            pricefeed_dot_query__pb2.QueryRawPricesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def QueryOracles(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, '/nibiru.pricefeed.v1.Query/QueryOracles',
            pricefeed_dot_query__pb2.QueryOraclesRequest.SerializeToString,
            pricefeed_dot_query__pb2.QueryOraclesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def QueryMarkets(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, '/nibiru.pricefeed.v1.Query/QueryMarkets',
            pricefeed_dot_query__pb2.QueryMarketsRequest.SerializeToString,
            pricefeed_dot_query__pb2.QueryMarketsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
