# 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.stats import query_pb2 as dydxprotocol_dot_stats_dot_query__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Params = channel.unary_unary(
                '/dydxprotocol.stats.Query/Params',
                request_serializer=dydxprotocol_dot_stats_dot_query__pb2.QueryParamsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_stats_dot_query__pb2.QueryParamsResponse.FromString,
                )
        self.StatsMetadata = channel.unary_unary(
                '/dydxprotocol.stats.Query/StatsMetadata',
                request_serializer=dydxprotocol_dot_stats_dot_query__pb2.QueryStatsMetadataRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_stats_dot_query__pb2.QueryStatsMetadataResponse.FromString,
                )
        self.GlobalStats = channel.unary_unary(
                '/dydxprotocol.stats.Query/GlobalStats',
                request_serializer=dydxprotocol_dot_stats_dot_query__pb2.QueryGlobalStatsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_stats_dot_query__pb2.QueryGlobalStatsResponse.FromString,
                )
        self.UserStats = channel.unary_unary(
                '/dydxprotocol.stats.Query/UserStats',
                request_serializer=dydxprotocol_dot_stats_dot_query__pb2.QueryUserStatsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_stats_dot_query__pb2.QueryUserStatsResponse.FromString,
                )


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

    def Params(self, request, context):
        """Queries the Params.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

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

    def UserStats(self, request, context):
        """Queries UserStats.
        """
        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 = {
            'Params': grpc.unary_unary_rpc_method_handler(
                    servicer.Params,
                    request_deserializer=dydxprotocol_dot_stats_dot_query__pb2.QueryParamsRequest.FromString,
                    response_serializer=dydxprotocol_dot_stats_dot_query__pb2.QueryParamsResponse.SerializeToString,
            ),
            'StatsMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.StatsMetadata,
                    request_deserializer=dydxprotocol_dot_stats_dot_query__pb2.QueryStatsMetadataRequest.FromString,
                    response_serializer=dydxprotocol_dot_stats_dot_query__pb2.QueryStatsMetadataResponse.SerializeToString,
            ),
            'GlobalStats': grpc.unary_unary_rpc_method_handler(
                    servicer.GlobalStats,
                    request_deserializer=dydxprotocol_dot_stats_dot_query__pb2.QueryGlobalStatsRequest.FromString,
                    response_serializer=dydxprotocol_dot_stats_dot_query__pb2.QueryGlobalStatsResponse.SerializeToString,
            ),
            'UserStats': grpc.unary_unary_rpc_method_handler(
                    servicer.UserStats,
                    request_deserializer=dydxprotocol_dot_stats_dot_query__pb2.QueryUserStatsRequest.FromString,
                    response_serializer=dydxprotocol_dot_stats_dot_query__pb2.QueryUserStatsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.stats.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 Params(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.stats.Query/Params',
            dydxprotocol_dot_stats_dot_query__pb2.QueryParamsRequest.SerializeToString,
            dydxprotocol_dot_stats_dot_query__pb2.QueryParamsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StatsMetadata(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.stats.Query/StatsMetadata',
            dydxprotocol_dot_stats_dot_query__pb2.QueryStatsMetadataRequest.SerializeToString,
            dydxprotocol_dot_stats_dot_query__pb2.QueryStatsMetadataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GlobalStats(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.stats.Query/GlobalStats',
            dydxprotocol_dot_stats_dot_query__pb2.QueryGlobalStatsRequest.SerializeToString,
            dydxprotocol_dot_stats_dot_query__pb2.QueryGlobalStatsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UserStats(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.stats.Query/UserStats',
            dydxprotocol_dot_stats_dot_query__pb2.QueryUserStatsRequest.SerializeToString,
            dydxprotocol_dot_stats_dot_query__pb2.QueryUserStatsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
