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

from hyperlane.core.v1 import tx_pb2 as hyperlane_dot_core_dot_v1_dot_tx__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateMailbox = channel.unary_unary(
                '/hyperlane.core.v1.Msg/CreateMailbox',
                request_serializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgCreateMailbox.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgCreateMailboxResponse.FromString,
                _registered_method=True)
        self.SetMailbox = channel.unary_unary(
                '/hyperlane.core.v1.Msg/SetMailbox',
                request_serializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgSetMailbox.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgSetMailboxResponse.FromString,
                _registered_method=True)
        self.ProcessMessage = channel.unary_unary(
                '/hyperlane.core.v1.Msg/ProcessMessage',
                request_serializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgProcessMessage.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgProcessMessageResponse.FromString,
                _registered_method=True)


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

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

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

    def ProcessMessage(self, request, context):
        """ProcessMessage ...
        """
        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 = {
            'CreateMailbox': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateMailbox,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgCreateMailbox.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgCreateMailboxResponse.SerializeToString,
            ),
            'SetMailbox': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMailbox,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgSetMailbox.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgSetMailboxResponse.SerializeToString,
            ),
            'ProcessMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.ProcessMessage,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgProcessMessage.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgProcessMessageResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'hyperlane.core.v1.Msg', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('hyperlane.core.v1.Msg', rpc_method_handlers)


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

    @staticmethod
    def CreateMailbox(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,
            '/hyperlane.core.v1.Msg/CreateMailbox',
            hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgCreateMailbox.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgCreateMailboxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetMailbox(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,
            '/hyperlane.core.v1.Msg/SetMailbox',
            hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgSetMailbox.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgSetMailboxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ProcessMessage(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,
            '/hyperlane.core.v1.Msg/ProcessMessage',
            hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgProcessMessage.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_tx__pb2.MsgProcessMessageResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
