# 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.interchain_security.v1 import query_pb2 as hyperlane_dot_core_dot_interchain__security_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.Isms = channel.unary_unary(
                '/hyperlane.core.interchain_security.v1.Query/Isms',
                request_serializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmsRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmsResponse.FromString,
                _registered_method=True)
        self.Ism = channel.unary_unary(
                '/hyperlane.core.interchain_security.v1.Query/Ism',
                request_serializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmResponse.FromString,
                _registered_method=True)
        self.AnnouncedStorageLocations = channel.unary_unary(
                '/hyperlane.core.interchain_security.v1.Query/AnnouncedStorageLocations',
                request_serializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryAnnouncedStorageLocationsRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryAnnouncedStorageLocationsResponse.FromString,
                _registered_method=True)
        self.LatestAnnouncedStorageLocation = channel.unary_unary(
                '/hyperlane.core.interchain_security.v1.Query/LatestAnnouncedStorageLocation',
                request_serializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryLatestAnnouncedStorageLocationRequest.SerializeToString,
                response_deserializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryLatestAnnouncedStorageLocationResponse.FromString,
                _registered_method=True)


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

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

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

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

    def LatestAnnouncedStorageLocation(self, request, context):
        """LatestAnnouncedStorageLocation ...
        """
        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 = {
            'Isms': grpc.unary_unary_rpc_method_handler(
                    servicer.Isms,
                    request_deserializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmsRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmsResponse.SerializeToString,
            ),
            'Ism': grpc.unary_unary_rpc_method_handler(
                    servicer.Ism,
                    request_deserializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmResponse.SerializeToString,
            ),
            'AnnouncedStorageLocations': grpc.unary_unary_rpc_method_handler(
                    servicer.AnnouncedStorageLocations,
                    request_deserializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryAnnouncedStorageLocationsRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryAnnouncedStorageLocationsResponse.SerializeToString,
            ),
            'LatestAnnouncedStorageLocation': grpc.unary_unary_rpc_method_handler(
                    servicer.LatestAnnouncedStorageLocation,
                    request_deserializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryLatestAnnouncedStorageLocationRequest.FromString,
                    response_serializer=hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryLatestAnnouncedStorageLocationResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'hyperlane.core.interchain_security.v1.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('hyperlane.core.interchain_security.v1.Query', rpc_method_handlers)


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

    @staticmethod
    def Isms(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.interchain_security.v1.Query/Isms',
            hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmsRequest.SerializeToString,
            hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Ism(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.interchain_security.v1.Query/Ism',
            hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmRequest.SerializeToString,
            hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryIsmResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AnnouncedStorageLocations(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.interchain_security.v1.Query/AnnouncedStorageLocations',
            hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryAnnouncedStorageLocationsRequest.SerializeToString,
            hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryAnnouncedStorageLocationsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def LatestAnnouncedStorageLocation(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.interchain_security.v1.Query/LatestAnnouncedStorageLocation',
            hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryLatestAnnouncedStorageLocationRequest.SerializeToString,
            hyperlane_dot_core_dot_interchain__security_dot_v1_dot_query__pb2.QueryLatestAnnouncedStorageLocationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
