# 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.ratelimit import query_pb2 as dydxprotocol_dot_ratelimit_dot_query__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListLimitParams = channel.unary_unary(
                '/dydxprotocol.ratelimit.Query/ListLimitParams',
                request_serializer=dydxprotocol_dot_ratelimit_dot_query__pb2.ListLimitParamsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_ratelimit_dot_query__pb2.ListLimitParamsResponse.FromString,
                )
        self.CapacityByDenom = channel.unary_unary(
                '/dydxprotocol.ratelimit.Query/CapacityByDenom',
                request_serializer=dydxprotocol_dot_ratelimit_dot_query__pb2.QueryCapacityByDenomRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_ratelimit_dot_query__pb2.QueryCapacityByDenomResponse.FromString,
                )
        self.AllPendingSendPackets = channel.unary_unary(
                '/dydxprotocol.ratelimit.Query/AllPendingSendPackets',
                request_serializer=dydxprotocol_dot_ratelimit_dot_query__pb2.QueryAllPendingSendPacketsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_ratelimit_dot_query__pb2.QueryAllPendingSendPacketsResponse.FromString,
                )


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

    def ListLimitParams(self, request, context):
        """List all limit params.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CapacityByDenom(self, request, context):
        """Query capacity by denom.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AllPendingSendPackets(self, request, context):
        """Get all pending send packets
        """
        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 = {
            'ListLimitParams': grpc.unary_unary_rpc_method_handler(
                    servicer.ListLimitParams,
                    request_deserializer=dydxprotocol_dot_ratelimit_dot_query__pb2.ListLimitParamsRequest.FromString,
                    response_serializer=dydxprotocol_dot_ratelimit_dot_query__pb2.ListLimitParamsResponse.SerializeToString,
            ),
            'CapacityByDenom': grpc.unary_unary_rpc_method_handler(
                    servicer.CapacityByDenom,
                    request_deserializer=dydxprotocol_dot_ratelimit_dot_query__pb2.QueryCapacityByDenomRequest.FromString,
                    response_serializer=dydxprotocol_dot_ratelimit_dot_query__pb2.QueryCapacityByDenomResponse.SerializeToString,
            ),
            'AllPendingSendPackets': grpc.unary_unary_rpc_method_handler(
                    servicer.AllPendingSendPackets,
                    request_deserializer=dydxprotocol_dot_ratelimit_dot_query__pb2.QueryAllPendingSendPacketsRequest.FromString,
                    response_serializer=dydxprotocol_dot_ratelimit_dot_query__pb2.QueryAllPendingSendPacketsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.ratelimit.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 ListLimitParams(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.ratelimit.Query/ListLimitParams',
            dydxprotocol_dot_ratelimit_dot_query__pb2.ListLimitParamsRequest.SerializeToString,
            dydxprotocol_dot_ratelimit_dot_query__pb2.ListLimitParamsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CapacityByDenom(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.ratelimit.Query/CapacityByDenom',
            dydxprotocol_dot_ratelimit_dot_query__pb2.QueryCapacityByDenomRequest.SerializeToString,
            dydxprotocol_dot_ratelimit_dot_query__pb2.QueryCapacityByDenomResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AllPendingSendPackets(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.ratelimit.Query/AllPendingSendPackets',
            dydxprotocol_dot_ratelimit_dot_query__pb2.QueryAllPendingSendPacketsRequest.SerializeToString,
            dydxprotocol_dot_ratelimit_dot_query__pb2.QueryAllPendingSendPacketsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
