# 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 tx_pb2 as dydxprotocol_dot_delaymsg_dot_tx__pb2


class MsgStub(object):
    """Msg defines the Msg service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.DelayMessage = channel.unary_unary(
                '/dydxprotocol.delaymsg.Msg/DelayMessage',
                request_serializer=dydxprotocol_dot_delaymsg_dot_tx__pb2.MsgDelayMessage.SerializeToString,
                response_deserializer=dydxprotocol_dot_delaymsg_dot_tx__pb2.MsgDelayMessageResponse.FromString,
                )


class MsgServicer(object):
    """Msg defines the Msg service.
    """

    def DelayMessage(self, request, context):
        """DelayMessage delays the execution of a message for a given number of
        blocks.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MsgServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'DelayMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.DelayMessage,
                    request_deserializer=dydxprotocol_dot_delaymsg_dot_tx__pb2.MsgDelayMessage.FromString,
                    response_serializer=dydxprotocol_dot_delaymsg_dot_tx__pb2.MsgDelayMessageResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dydxprotocol.delaymsg.Msg', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Msg(object):
    """Msg defines the Msg service.
    """

    @staticmethod
    def DelayMessage(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.Msg/DelayMessage',
            dydxprotocol_dot_delaymsg_dot_tx__pb2.MsgDelayMessage.SerializeToString,
            dydxprotocol_dot_delaymsg_dot_tx__pb2.MsgDelayMessageResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
