# 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 query_pb2 as hyperlane_dot_core_dot_v1_dot_query__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Mailboxes = channel.unary_unary(
                '/hyperlane.core.v1.Query/Mailboxes',
                request_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxesRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxesResponse.FromString,
                _registered_method=True)
        self.Mailbox = channel.unary_unary(
                '/hyperlane.core.v1.Query/Mailbox',
                request_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxResponse.FromString,
                _registered_method=True)
        self.Delivered = channel.unary_unary(
                '/hyperlane.core.v1.Query/Delivered',
                request_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryDeliveredRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryDeliveredResponse.FromString,
                _registered_method=True)
        self.RecipientIsm = channel.unary_unary(
                '/hyperlane.core.v1.Query/RecipientIsm',
                request_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRecipientIsmRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRecipientIsmResponse.FromString,
                _registered_method=True)
        self.VerifyDryRun = channel.unary_unary(
                '/hyperlane.core.v1.Query/VerifyDryRun',
                request_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryVerifyDryRunRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryVerifyDryRunResponse.FromString,
                _registered_method=True)
        self.RegisteredISMs = channel.unary_unary(
                '/hyperlane.core.v1.Query/RegisteredISMs',
                request_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredISMs.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredISMsResponse.FromString,
                _registered_method=True)
        self.RegisteredHooks = channel.unary_unary(
                '/hyperlane.core.v1.Query/RegisteredHooks',
                request_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredHooks.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredHooksResponse.FromString,
                _registered_method=True)
        self.RegisteredApps = channel.unary_unary(
                '/hyperlane.core.v1.Query/RegisteredApps',
                request_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredApps.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredAppsResponse.FromString,
                _registered_method=True)


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

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

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

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

    def RecipientIsm(self, request, context):
        """RecipientIsm returns the recipient ISM ID for a registered application.

        The recipient is globally unique as every application ID registered on the
        core module is unique. This means that one application cannot be registered
        to two mailboxes, resulting in a mailbox-independent lookup.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

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

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

    def RegisteredApps(self, request, context):
        """RegisteredApps ...
        """
        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 = {
            'Mailboxes': grpc.unary_unary_rpc_method_handler(
                    servicer.Mailboxes,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxesRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxesResponse.SerializeToString,
            ),
            'Mailbox': grpc.unary_unary_rpc_method_handler(
                    servicer.Mailbox,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxResponse.SerializeToString,
            ),
            'Delivered': grpc.unary_unary_rpc_method_handler(
                    servicer.Delivered,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryDeliveredRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryDeliveredResponse.SerializeToString,
            ),
            'RecipientIsm': grpc.unary_unary_rpc_method_handler(
                    servicer.RecipientIsm,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRecipientIsmRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRecipientIsmResponse.SerializeToString,
            ),
            'VerifyDryRun': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyDryRun,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryVerifyDryRunRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryVerifyDryRunResponse.SerializeToString,
            ),
            'RegisteredISMs': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisteredISMs,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredISMs.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredISMsResponse.SerializeToString,
            ),
            'RegisteredHooks': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisteredHooks,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredHooks.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredHooksResponse.SerializeToString,
            ),
            'RegisteredApps': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisteredApps,
                    request_deserializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredApps.FromString,
                    response_serializer=hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredAppsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'hyperlane.core.v1.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('hyperlane.core.v1.Query', rpc_method_handlers)


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

    @staticmethod
    def Mailboxes(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.Query/Mailboxes',
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxesRequest.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Mailbox(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.Query/Mailbox',
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxRequest.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryMailboxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Delivered(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.Query/Delivered',
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryDeliveredRequest.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryDeliveredResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RecipientIsm(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.Query/RecipientIsm',
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRecipientIsmRequest.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRecipientIsmResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VerifyDryRun(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.Query/VerifyDryRun',
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryVerifyDryRunRequest.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryVerifyDryRunResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RegisteredISMs(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.Query/RegisteredISMs',
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredISMs.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredISMsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RegisteredHooks(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.Query/RegisteredHooks',
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredHooks.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredHooksResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RegisteredApps(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.Query/RegisteredApps',
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredApps.SerializeToString,
            hyperlane_dot_core_dot_v1_dot_query__pb2.QueryRegisteredAppsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
