# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cosmos.base.tendermint.v1beta1 import query_pb2 as cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2


class ServiceStub:
    """Service defines the gRPC querier service for tendermint queries.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetNodeInfo = channel.unary_unary(
            '/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo',
            request_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetNodeInfoRequest.SerializeToString,
            response_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetNodeInfoResponse.FromString,
        )
        self.GetSyncing = channel.unary_unary(
            '/cosmos.base.tendermint.v1beta1.Service/GetSyncing',
            request_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetSyncingRequest.SerializeToString,
            response_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetSyncingResponse.FromString,
        )
        self.GetLatestBlock = channel.unary_unary(
            '/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock',
            request_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestBlockRequest.SerializeToString,
            response_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestBlockResponse.FromString,
        )
        self.GetBlockByHeight = channel.unary_unary(
            '/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight',
            request_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetBlockByHeightRequest.SerializeToString,
            response_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetBlockByHeightResponse.FromString,
        )
        self.GetLatestValidatorSet = channel.unary_unary(
            '/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet',
            request_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestValidatorSetRequest.SerializeToString,
            response_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestValidatorSetResponse.FromString,
        )
        self.GetValidatorSetByHeight = channel.unary_unary(
            '/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight',
            request_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetValidatorSetByHeightRequest.SerializeToString,
            response_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetValidatorSetByHeightResponse.FromString,
        )


class ServiceServicer:
    """Service defines the gRPC querier service for tendermint queries.
    """

    def GetNodeInfo(self, request, context):
        """GetNodeInfo queries the current node info.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def GetLatestBlock(self, request, context):
        """GetLatestBlock returns the latest block.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetBlockByHeight(self, request, context):
        """GetBlockByHeight queries block for given height.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLatestValidatorSet(self, request, context):
        """GetLatestValidatorSet queries latest validator-set.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetValidatorSetByHeight(self, request, context):
        """GetValidatorSetByHeight queries validator-set at a given height.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetNodeInfo':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetNodeInfo,
            request_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetNodeInfoRequest.FromString,
            response_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetNodeInfoResponse.SerializeToString,
        ),
        'GetSyncing':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetSyncing,
            request_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetSyncingRequest.FromString,
            response_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetSyncingResponse.SerializeToString,
        ),
        'GetLatestBlock':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetLatestBlock,
            request_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestBlockRequest.FromString,
            response_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestBlockResponse.SerializeToString,
        ),
        'GetBlockByHeight':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetBlockByHeight,
            request_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetBlockByHeightRequest.FromString,
            response_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetBlockByHeightResponse.SerializeToString,
        ),
        'GetLatestValidatorSet':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetLatestValidatorSet,
            request_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestValidatorSetRequest.FromString,
            response_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestValidatorSetResponse.SerializeToString,
        ),
        'GetValidatorSetByHeight':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetValidatorSetByHeight,
            request_deserializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetValidatorSetByHeightRequest.FromString,
            response_serializer=
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetValidatorSetByHeightResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'cosmos.base.tendermint.v1beta1.Service',
        rpc_method_handlers,
    )
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class Service:
    """Service defines the gRPC querier service for tendermint queries.
    """

    @staticmethod
    def GetNodeInfo(
        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,
            '/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo',
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetNodeInfoRequest.SerializeToString,
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetNodeInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetSyncing(
        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,
            '/cosmos.base.tendermint.v1beta1.Service/GetSyncing',
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetSyncingRequest.SerializeToString,
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetSyncingResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetLatestBlock(
        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,
            '/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock',
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestBlockRequest.SerializeToString,
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestBlockResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetBlockByHeight(
        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,
            '/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight',
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetBlockByHeightRequest.SerializeToString,
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetBlockByHeightResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetLatestValidatorSet(
        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,
            '/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet',
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestValidatorSetRequest.SerializeToString,
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetLatestValidatorSetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetValidatorSetByHeight(
        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,
            '/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight',
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetValidatorSetByHeightRequest.SerializeToString,
            cosmos_dot_base_dot_tendermint_dot_v1beta1_dot_query__pb2.
            GetValidatorSetByHeightResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
