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

from vpool.v1 import query_pb2 as vpool_dot_v1_dot_query__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ReserveAssets = channel.unary_unary(
                '/nibiru.vpool.v1.Query/ReserveAssets',
                request_serializer=vpool_dot_v1_dot_query__pb2.QueryReserveAssetsRequest.SerializeToString,
                response_deserializer=vpool_dot_v1_dot_query__pb2.QueryReserveAssetsResponse.FromString,
                )
        self.AllPools = channel.unary_unary(
                '/nibiru.vpool.v1.Query/AllPools',
                request_serializer=vpool_dot_v1_dot_query__pb2.QueryAllPoolsRequest.SerializeToString,
                response_deserializer=vpool_dot_v1_dot_query__pb2.QueryAllPoolsResponse.FromString,
                )
        self.BaseAssetPrice = channel.unary_unary(
                '/nibiru.vpool.v1.Query/BaseAssetPrice',
                request_serializer=vpool_dot_v1_dot_query__pb2.QueryBaseAssetPriceRequest.SerializeToString,
                response_deserializer=vpool_dot_v1_dot_query__pb2.QueryBaseAssetPriceResponse.FromString,
                )


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

    def ReserveAssets(self, request, context):
        """Queries the reserve assets in a given pool, identified by a token pair.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AllPools(self, request, context):
        """Queries all virtual pools.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BaseAssetPrice(self, request, context):
        """Queries prices
        """
        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 = {
            'ReserveAssets': grpc.unary_unary_rpc_method_handler(
                    servicer.ReserveAssets,
                    request_deserializer=vpool_dot_v1_dot_query__pb2.QueryReserveAssetsRequest.FromString,
                    response_serializer=vpool_dot_v1_dot_query__pb2.QueryReserveAssetsResponse.SerializeToString,
            ),
            'AllPools': grpc.unary_unary_rpc_method_handler(
                    servicer.AllPools,
                    request_deserializer=vpool_dot_v1_dot_query__pb2.QueryAllPoolsRequest.FromString,
                    response_serializer=vpool_dot_v1_dot_query__pb2.QueryAllPoolsResponse.SerializeToString,
            ),
            'BaseAssetPrice': grpc.unary_unary_rpc_method_handler(
                    servicer.BaseAssetPrice,
                    request_deserializer=vpool_dot_v1_dot_query__pb2.QueryBaseAssetPriceRequest.FromString,
                    response_serializer=vpool_dot_v1_dot_query__pb2.QueryBaseAssetPriceResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nibiru.vpool.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.
    """

    @staticmethod
    def ReserveAssets(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.vpool.v1.Query/ReserveAssets',
            vpool_dot_v1_dot_query__pb2.QueryReserveAssetsRequest.SerializeToString,
            vpool_dot_v1_dot_query__pb2.QueryReserveAssetsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AllPools(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.vpool.v1.Query/AllPools',
            vpool_dot_v1_dot_query__pb2.QueryAllPoolsRequest.SerializeToString,
            vpool_dot_v1_dot_query__pb2.QueryAllPoolsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BaseAssetPrice(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.vpool.v1.Query/BaseAssetPrice',
            vpool_dot_v1_dot_query__pb2.QueryBaseAssetPriceRequest.SerializeToString,
            vpool_dot_v1_dot_query__pb2.QueryBaseAssetPriceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
