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

from dydxprotocol.clob import query_pb2 as dydxprotocol_dot_clob_dot_query__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ClobPair = channel.unary_unary(
                '/dydxprotocol.clob.Query/ClobPair',
                request_serializer=dydxprotocol_dot_clob_dot_query__pb2.QueryGetClobPairRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_clob_dot_query__pb2.QueryClobPairResponse.FromString,
                )
        self.ClobPairAll = channel.unary_unary(
                '/dydxprotocol.clob.Query/ClobPairAll',
                request_serializer=dydxprotocol_dot_clob_dot_query__pb2.QueryAllClobPairRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_clob_dot_query__pb2.QueryClobPairAllResponse.FromString,
                )
        self.AreSubaccountsLiquidatable = channel.unary_unary(
                '/dydxprotocol.clob.Query/AreSubaccountsLiquidatable',
                request_serializer=dydxprotocol_dot_clob_dot_query__pb2.AreSubaccountsLiquidatableRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_clob_dot_query__pb2.AreSubaccountsLiquidatableResponse.FromString,
                )
        self.MevNodeToNodeCalculation = channel.unary_unary(
                '/dydxprotocol.clob.Query/MevNodeToNodeCalculation',
                request_serializer=dydxprotocol_dot_clob_dot_query__pb2.MevNodeToNodeCalculationRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_clob_dot_query__pb2.MevNodeToNodeCalculationResponse.FromString,
                )
        self.EquityTierLimitConfiguration = channel.unary_unary(
                '/dydxprotocol.clob.Query/EquityTierLimitConfiguration',
                request_serializer=dydxprotocol_dot_clob_dot_query__pb2.QueryEquityTierLimitConfigurationRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_clob_dot_query__pb2.QueryEquityTierLimitConfigurationResponse.FromString,
                )


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

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

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

    def AreSubaccountsLiquidatable(self, request, context):
        """Returns whether a subaccount is liquidatable.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MevNodeToNodeCalculation(self, request, context):
        """Runs the MEV node <> node calculation with the provided parameters.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EquityTierLimitConfiguration(self, request, context):
        """Queries EquityTierLimitConfiguration.
        """
        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 = {
            'ClobPair': grpc.unary_unary_rpc_method_handler(
                    servicer.ClobPair,
                    request_deserializer=dydxprotocol_dot_clob_dot_query__pb2.QueryGetClobPairRequest.FromString,
                    response_serializer=dydxprotocol_dot_clob_dot_query__pb2.QueryClobPairResponse.SerializeToString,
            ),
            'ClobPairAll': grpc.unary_unary_rpc_method_handler(
                    servicer.ClobPairAll,
                    request_deserializer=dydxprotocol_dot_clob_dot_query__pb2.QueryAllClobPairRequest.FromString,
                    response_serializer=dydxprotocol_dot_clob_dot_query__pb2.QueryClobPairAllResponse.SerializeToString,
            ),
            'AreSubaccountsLiquidatable': grpc.unary_unary_rpc_method_handler(
                    servicer.AreSubaccountsLiquidatable,
                    request_deserializer=dydxprotocol_dot_clob_dot_query__pb2.AreSubaccountsLiquidatableRequest.FromString,
                    response_serializer=dydxprotocol_dot_clob_dot_query__pb2.AreSubaccountsLiquidatableResponse.SerializeToString,
            ),
            'MevNodeToNodeCalculation': grpc.unary_unary_rpc_method_handler(
                    servicer.MevNodeToNodeCalculation,
                    request_deserializer=dydxprotocol_dot_clob_dot_query__pb2.MevNodeToNodeCalculationRequest.FromString,
                    response_serializer=dydxprotocol_dot_clob_dot_query__pb2.MevNodeToNodeCalculationResponse.SerializeToString,
            ),
            'EquityTierLimitConfiguration': grpc.unary_unary_rpc_method_handler(
                    servicer.EquityTierLimitConfiguration,
                    request_deserializer=dydxprotocol_dot_clob_dot_query__pb2.QueryEquityTierLimitConfigurationRequest.FromString,
                    response_serializer=dydxprotocol_dot_clob_dot_query__pb2.QueryEquityTierLimitConfigurationResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.clob.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 ClobPair(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.clob.Query/ClobPair',
            dydxprotocol_dot_clob_dot_query__pb2.QueryGetClobPairRequest.SerializeToString,
            dydxprotocol_dot_clob_dot_query__pb2.QueryClobPairResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ClobPairAll(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.clob.Query/ClobPairAll',
            dydxprotocol_dot_clob_dot_query__pb2.QueryAllClobPairRequest.SerializeToString,
            dydxprotocol_dot_clob_dot_query__pb2.QueryClobPairAllResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AreSubaccountsLiquidatable(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.clob.Query/AreSubaccountsLiquidatable',
            dydxprotocol_dot_clob_dot_query__pb2.AreSubaccountsLiquidatableRequest.SerializeToString,
            dydxprotocol_dot_clob_dot_query__pb2.AreSubaccountsLiquidatableResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MevNodeToNodeCalculation(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.clob.Query/MevNodeToNodeCalculation',
            dydxprotocol_dot_clob_dot_query__pb2.MevNodeToNodeCalculationRequest.SerializeToString,
            dydxprotocol_dot_clob_dot_query__pb2.MevNodeToNodeCalculationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EquityTierLimitConfiguration(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.clob.Query/EquityTierLimitConfiguration',
            dydxprotocol_dot_clob_dot_query__pb2.QueryEquityTierLimitConfigurationRequest.SerializeToString,
            dydxprotocol_dot_clob_dot_query__pb2.QueryEquityTierLimitConfigurationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
