# 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.delaymsg import query_pb2 as dydxprotocol_dot_delaymsg_dot_query__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.NextDelayedMessageId = channel.unary_unary(
                '/dydxprotocol.delaymsg.Query/NextDelayedMessageId',
                request_serializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryNextDelayedMessageIdRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryNextDelayedMessageIdResponse.FromString,
                )
        self.Message = channel.unary_unary(
                '/dydxprotocol.delaymsg.Query/Message',
                request_serializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryMessageRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryMessageResponse.FromString,
                )
        self.BlockMessageIds = channel.unary_unary(
                '/dydxprotocol.delaymsg.Query/BlockMessageIds',
                request_serializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryBlockMessageIdsRequest.SerializeToString,
                response_deserializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryBlockMessageIdsResponse.FromString,
                )


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

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

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

    def BlockMessageIds(self, request, context):
        """Queries the DelayedMessages at a given block height.
        """
        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 = {
            'NextDelayedMessageId': grpc.unary_unary_rpc_method_handler(
                    servicer.NextDelayedMessageId,
                    request_deserializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryNextDelayedMessageIdRequest.FromString,
                    response_serializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryNextDelayedMessageIdResponse.SerializeToString,
            ),
            'Message': grpc.unary_unary_rpc_method_handler(
                    servicer.Message,
                    request_deserializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryMessageRequest.FromString,
                    response_serializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryMessageResponse.SerializeToString,
            ),
            'BlockMessageIds': grpc.unary_unary_rpc_method_handler(
                    servicer.BlockMessageIds,
                    request_deserializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryBlockMessageIdsRequest.FromString,
                    response_serializer=dydxprotocol_dot_delaymsg_dot_query__pb2.QueryBlockMessageIdsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.delaymsg.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 NextDelayedMessageId(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.delaymsg.Query/NextDelayedMessageId',
            dydxprotocol_dot_delaymsg_dot_query__pb2.QueryNextDelayedMessageIdRequest.SerializeToString,
            dydxprotocol_dot_delaymsg_dot_query__pb2.QueryNextDelayedMessageIdResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Message(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.delaymsg.Query/Message',
            dydxprotocol_dot_delaymsg_dot_query__pb2.QueryMessageRequest.SerializeToString,
            dydxprotocol_dot_delaymsg_dot_query__pb2.QueryMessageResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BlockMessageIds(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.delaymsg.Query/BlockMessageIds',
            dydxprotocol_dot_delaymsg_dot_query__pb2.QueryBlockMessageIdsRequest.SerializeToString,
            dydxprotocol_dot_delaymsg_dot_query__pb2.QueryBlockMessageIdsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
