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

from . import nats_service_pb2 as nats__service__pb2

GRPC_GENERATED_VERSION = '1.75.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in nats_service_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class NATSServiceStub(object):
    """========================================
    NATS 消息流服务
    ========================================
    这是一个统一的消息流服务，为所有后端服务提供事件总线能力
    支持：
    - 用户和组织级别的主题隔离
    - Pub/Sub 消息
    - 请求/响应模式
    - JetStream 持久化
    - 流管理
    - 消费者管理
    - 队列组

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Publish = channel.unary_unary(
                '/isa.nats.NATSService/Publish',
                request_serializer=nats__service__pb2.PublishRequest.SerializeToString,
                response_deserializer=nats__service__pb2.PublishResponse.FromString,
                _registered_method=True)
        self.PublishBatch = channel.unary_unary(
                '/isa.nats.NATSService/PublishBatch',
                request_serializer=nats__service__pb2.PublishBatchRequest.SerializeToString,
                response_deserializer=nats__service__pb2.PublishBatchResponse.FromString,
                _registered_method=True)
        self.Subscribe = channel.unary_stream(
                '/isa.nats.NATSService/Subscribe',
                request_serializer=nats__service__pb2.SubscribeRequest.SerializeToString,
                response_deserializer=nats__service__pb2.MessageResponse.FromString,
                _registered_method=True)
        self.Unsubscribe = channel.unary_unary(
                '/isa.nats.NATSService/Unsubscribe',
                request_serializer=nats__service__pb2.UnsubscribeRequest.SerializeToString,
                response_deserializer=nats__service__pb2.UnsubscribeResponse.FromString,
                _registered_method=True)
        self.Request = channel.unary_unary(
                '/isa.nats.NATSService/Request',
                request_serializer=nats__service__pb2.RequestRequest.SerializeToString,
                response_deserializer=nats__service__pb2.RequestResponse.FromString,
                _registered_method=True)
        self.QueueSubscribe = channel.unary_stream(
                '/isa.nats.NATSService/QueueSubscribe',
                request_serializer=nats__service__pb2.QueueSubscribeRequest.SerializeToString,
                response_deserializer=nats__service__pb2.MessageResponse.FromString,
                _registered_method=True)
        self.CreateStream = channel.unary_unary(
                '/isa.nats.NATSService/CreateStream',
                request_serializer=nats__service__pb2.CreateStreamRequest.SerializeToString,
                response_deserializer=nats__service__pb2.CreateStreamResponse.FromString,
                _registered_method=True)
        self.DeleteStream = channel.unary_unary(
                '/isa.nats.NATSService/DeleteStream',
                request_serializer=nats__service__pb2.DeleteStreamRequest.SerializeToString,
                response_deserializer=nats__service__pb2.DeleteStreamResponse.FromString,
                _registered_method=True)
        self.GetStreamInfo = channel.unary_unary(
                '/isa.nats.NATSService/GetStreamInfo',
                request_serializer=nats__service__pb2.GetStreamInfoRequest.SerializeToString,
                response_deserializer=nats__service__pb2.GetStreamInfoResponse.FromString,
                _registered_method=True)
        self.ListStreams = channel.unary_unary(
                '/isa.nats.NATSService/ListStreams',
                request_serializer=nats__service__pb2.ListStreamsRequest.SerializeToString,
                response_deserializer=nats__service__pb2.ListStreamsResponse.FromString,
                _registered_method=True)
        self.UpdateStream = channel.unary_unary(
                '/isa.nats.NATSService/UpdateStream',
                request_serializer=nats__service__pb2.UpdateStreamRequest.SerializeToString,
                response_deserializer=nats__service__pb2.UpdateStreamResponse.FromString,
                _registered_method=True)
        self.PurgeStream = channel.unary_unary(
                '/isa.nats.NATSService/PurgeStream',
                request_serializer=nats__service__pb2.PurgeStreamRequest.SerializeToString,
                response_deserializer=nats__service__pb2.PurgeStreamResponse.FromString,
                _registered_method=True)
        self.CreateConsumer = channel.unary_unary(
                '/isa.nats.NATSService/CreateConsumer',
                request_serializer=nats__service__pb2.CreateConsumerRequest.SerializeToString,
                response_deserializer=nats__service__pb2.CreateConsumerResponse.FromString,
                _registered_method=True)
        self.DeleteConsumer = channel.unary_unary(
                '/isa.nats.NATSService/DeleteConsumer',
                request_serializer=nats__service__pb2.DeleteConsumerRequest.SerializeToString,
                response_deserializer=nats__service__pb2.DeleteConsumerResponse.FromString,
                _registered_method=True)
        self.GetConsumerInfo = channel.unary_unary(
                '/isa.nats.NATSService/GetConsumerInfo',
                request_serializer=nats__service__pb2.GetConsumerInfoRequest.SerializeToString,
                response_deserializer=nats__service__pb2.GetConsumerInfoResponse.FromString,
                _registered_method=True)
        self.ListConsumers = channel.unary_unary(
                '/isa.nats.NATSService/ListConsumers',
                request_serializer=nats__service__pb2.ListConsumersRequest.SerializeToString,
                response_deserializer=nats__service__pb2.ListConsumersResponse.FromString,
                _registered_method=True)
        self.PublishToStream = channel.unary_unary(
                '/isa.nats.NATSService/PublishToStream',
                request_serializer=nats__service__pb2.PublishToStreamRequest.SerializeToString,
                response_deserializer=nats__service__pb2.PublishToStreamResponse.FromString,
                _registered_method=True)
        self.PullMessages = channel.unary_unary(
                '/isa.nats.NATSService/PullMessages',
                request_serializer=nats__service__pb2.PullMessagesRequest.SerializeToString,
                response_deserializer=nats__service__pb2.PullMessagesResponse.FromString,
                _registered_method=True)
        self.AckMessage = channel.unary_unary(
                '/isa.nats.NATSService/AckMessage',
                request_serializer=nats__service__pb2.AckMessageRequest.SerializeToString,
                response_deserializer=nats__service__pb2.AckMessageResponse.FromString,
                _registered_method=True)
        self.NakMessage = channel.unary_unary(
                '/isa.nats.NATSService/NakMessage',
                request_serializer=nats__service__pb2.NakMessageRequest.SerializeToString,
                response_deserializer=nats__service__pb2.NakMessageResponse.FromString,
                _registered_method=True)
        self.KVPut = channel.unary_unary(
                '/isa.nats.NATSService/KVPut',
                request_serializer=nats__service__pb2.KVPutRequest.SerializeToString,
                response_deserializer=nats__service__pb2.KVPutResponse.FromString,
                _registered_method=True)
        self.KVGet = channel.unary_unary(
                '/isa.nats.NATSService/KVGet',
                request_serializer=nats__service__pb2.KVGetRequest.SerializeToString,
                response_deserializer=nats__service__pb2.KVGetResponse.FromString,
                _registered_method=True)
        self.KVDelete = channel.unary_unary(
                '/isa.nats.NATSService/KVDelete',
                request_serializer=nats__service__pb2.KVDeleteRequest.SerializeToString,
                response_deserializer=nats__service__pb2.KVDeleteResponse.FromString,
                _registered_method=True)
        self.KVKeys = channel.unary_unary(
                '/isa.nats.NATSService/KVKeys',
                request_serializer=nats__service__pb2.KVKeysRequest.SerializeToString,
                response_deserializer=nats__service__pb2.KVKeysResponse.FromString,
                _registered_method=True)
        self.ObjectPut = channel.unary_unary(
                '/isa.nats.NATSService/ObjectPut',
                request_serializer=nats__service__pb2.ObjectPutRequest.SerializeToString,
                response_deserializer=nats__service__pb2.ObjectPutResponse.FromString,
                _registered_method=True)
        self.ObjectGet = channel.unary_unary(
                '/isa.nats.NATSService/ObjectGet',
                request_serializer=nats__service__pb2.ObjectGetRequest.SerializeToString,
                response_deserializer=nats__service__pb2.ObjectGetResponse.FromString,
                _registered_method=True)
        self.ObjectDelete = channel.unary_unary(
                '/isa.nats.NATSService/ObjectDelete',
                request_serializer=nats__service__pb2.ObjectDeleteRequest.SerializeToString,
                response_deserializer=nats__service__pb2.ObjectDeleteResponse.FromString,
                _registered_method=True)
        self.ObjectList = channel.unary_unary(
                '/isa.nats.NATSService/ObjectList',
                request_serializer=nats__service__pb2.ObjectListRequest.SerializeToString,
                response_deserializer=nats__service__pb2.ObjectListResponse.FromString,
                _registered_method=True)
        self.GetStatistics = channel.unary_unary(
                '/isa.nats.NATSService/GetStatistics',
                request_serializer=nats__service__pb2.GetStatisticsRequest.SerializeToString,
                response_deserializer=nats__service__pb2.GetStatisticsResponse.FromString,
                _registered_method=True)
        self.GetStreamStats = channel.unary_unary(
                '/isa.nats.NATSService/GetStreamStats',
                request_serializer=nats__service__pb2.GetStreamStatsRequest.SerializeToString,
                response_deserializer=nats__service__pb2.GetStreamStatsResponse.FromString,
                _registered_method=True)
        self.HealthCheck = channel.unary_unary(
                '/isa.nats.NATSService/HealthCheck',
                request_serializer=nats__service__pb2.NATSHealthCheckRequest.SerializeToString,
                response_deserializer=nats__service__pb2.NATSHealthCheckResponse.FromString,
                _registered_method=True)


class NATSServiceServicer(object):
    """========================================
    NATS 消息流服务
    ========================================
    这是一个统一的消息流服务，为所有后端服务提供事件总线能力
    支持：
    - 用户和组织级别的主题隔离
    - Pub/Sub 消息
    - 请求/响应模式
    - JetStream 持久化
    - 流管理
    - 消费者管理
    - 队列组

    """

    def Publish(self, request, context):
        """========== 基础 Pub/Sub ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PublishBatch(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Subscribe(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Unsubscribe(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Request(self, request, context):
        """========== 请求/响应模式 ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueueSubscribe(self, request, context):
        """========== 队列组订阅 ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateStream(self, request, context):
        """========== JetStream 流管理 ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteStream(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetStreamInfo(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListStreams(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateStream(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PurgeStream(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateConsumer(self, request, context):
        """========== JetStream 消费者管理 ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteConsumer(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetConsumerInfo(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListConsumers(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PublishToStream(self, request, context):
        """========== JetStream 消息操作 ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PullMessages(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AckMessage(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def NakMessage(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def KVPut(self, request, context):
        """========== 键值存储 (KV Store) ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def KVGet(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def KVDelete(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def KVKeys(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ObjectPut(self, request, context):
        """========== 对象存储 (Object Store) ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ObjectGet(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ObjectDelete(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ObjectList(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetStatistics(self, request, context):
        """========== 统计和监控 ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetStreamStats(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def HealthCheck(self, request, context):
        """========== 健康检查 ==========
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_NATSServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Publish': grpc.unary_unary_rpc_method_handler(
                    servicer.Publish,
                    request_deserializer=nats__service__pb2.PublishRequest.FromString,
                    response_serializer=nats__service__pb2.PublishResponse.SerializeToString,
            ),
            'PublishBatch': grpc.unary_unary_rpc_method_handler(
                    servicer.PublishBatch,
                    request_deserializer=nats__service__pb2.PublishBatchRequest.FromString,
                    response_serializer=nats__service__pb2.PublishBatchResponse.SerializeToString,
            ),
            'Subscribe': grpc.unary_stream_rpc_method_handler(
                    servicer.Subscribe,
                    request_deserializer=nats__service__pb2.SubscribeRequest.FromString,
                    response_serializer=nats__service__pb2.MessageResponse.SerializeToString,
            ),
            'Unsubscribe': grpc.unary_unary_rpc_method_handler(
                    servicer.Unsubscribe,
                    request_deserializer=nats__service__pb2.UnsubscribeRequest.FromString,
                    response_serializer=nats__service__pb2.UnsubscribeResponse.SerializeToString,
            ),
            'Request': grpc.unary_unary_rpc_method_handler(
                    servicer.Request,
                    request_deserializer=nats__service__pb2.RequestRequest.FromString,
                    response_serializer=nats__service__pb2.RequestResponse.SerializeToString,
            ),
            'QueueSubscribe': grpc.unary_stream_rpc_method_handler(
                    servicer.QueueSubscribe,
                    request_deserializer=nats__service__pb2.QueueSubscribeRequest.FromString,
                    response_serializer=nats__service__pb2.MessageResponse.SerializeToString,
            ),
            'CreateStream': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateStream,
                    request_deserializer=nats__service__pb2.CreateStreamRequest.FromString,
                    response_serializer=nats__service__pb2.CreateStreamResponse.SerializeToString,
            ),
            'DeleteStream': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteStream,
                    request_deserializer=nats__service__pb2.DeleteStreamRequest.FromString,
                    response_serializer=nats__service__pb2.DeleteStreamResponse.SerializeToString,
            ),
            'GetStreamInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStreamInfo,
                    request_deserializer=nats__service__pb2.GetStreamInfoRequest.FromString,
                    response_serializer=nats__service__pb2.GetStreamInfoResponse.SerializeToString,
            ),
            'ListStreams': grpc.unary_unary_rpc_method_handler(
                    servicer.ListStreams,
                    request_deserializer=nats__service__pb2.ListStreamsRequest.FromString,
                    response_serializer=nats__service__pb2.ListStreamsResponse.SerializeToString,
            ),
            'UpdateStream': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateStream,
                    request_deserializer=nats__service__pb2.UpdateStreamRequest.FromString,
                    response_serializer=nats__service__pb2.UpdateStreamResponse.SerializeToString,
            ),
            'PurgeStream': grpc.unary_unary_rpc_method_handler(
                    servicer.PurgeStream,
                    request_deserializer=nats__service__pb2.PurgeStreamRequest.FromString,
                    response_serializer=nats__service__pb2.PurgeStreamResponse.SerializeToString,
            ),
            'CreateConsumer': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateConsumer,
                    request_deserializer=nats__service__pb2.CreateConsumerRequest.FromString,
                    response_serializer=nats__service__pb2.CreateConsumerResponse.SerializeToString,
            ),
            'DeleteConsumer': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteConsumer,
                    request_deserializer=nats__service__pb2.DeleteConsumerRequest.FromString,
                    response_serializer=nats__service__pb2.DeleteConsumerResponse.SerializeToString,
            ),
            'GetConsumerInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConsumerInfo,
                    request_deserializer=nats__service__pb2.GetConsumerInfoRequest.FromString,
                    response_serializer=nats__service__pb2.GetConsumerInfoResponse.SerializeToString,
            ),
            'ListConsumers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListConsumers,
                    request_deserializer=nats__service__pb2.ListConsumersRequest.FromString,
                    response_serializer=nats__service__pb2.ListConsumersResponse.SerializeToString,
            ),
            'PublishToStream': grpc.unary_unary_rpc_method_handler(
                    servicer.PublishToStream,
                    request_deserializer=nats__service__pb2.PublishToStreamRequest.FromString,
                    response_serializer=nats__service__pb2.PublishToStreamResponse.SerializeToString,
            ),
            'PullMessages': grpc.unary_unary_rpc_method_handler(
                    servicer.PullMessages,
                    request_deserializer=nats__service__pb2.PullMessagesRequest.FromString,
                    response_serializer=nats__service__pb2.PullMessagesResponse.SerializeToString,
            ),
            'AckMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.AckMessage,
                    request_deserializer=nats__service__pb2.AckMessageRequest.FromString,
                    response_serializer=nats__service__pb2.AckMessageResponse.SerializeToString,
            ),
            'NakMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.NakMessage,
                    request_deserializer=nats__service__pb2.NakMessageRequest.FromString,
                    response_serializer=nats__service__pb2.NakMessageResponse.SerializeToString,
            ),
            'KVPut': grpc.unary_unary_rpc_method_handler(
                    servicer.KVPut,
                    request_deserializer=nats__service__pb2.KVPutRequest.FromString,
                    response_serializer=nats__service__pb2.KVPutResponse.SerializeToString,
            ),
            'KVGet': grpc.unary_unary_rpc_method_handler(
                    servicer.KVGet,
                    request_deserializer=nats__service__pb2.KVGetRequest.FromString,
                    response_serializer=nats__service__pb2.KVGetResponse.SerializeToString,
            ),
            'KVDelete': grpc.unary_unary_rpc_method_handler(
                    servicer.KVDelete,
                    request_deserializer=nats__service__pb2.KVDeleteRequest.FromString,
                    response_serializer=nats__service__pb2.KVDeleteResponse.SerializeToString,
            ),
            'KVKeys': grpc.unary_unary_rpc_method_handler(
                    servicer.KVKeys,
                    request_deserializer=nats__service__pb2.KVKeysRequest.FromString,
                    response_serializer=nats__service__pb2.KVKeysResponse.SerializeToString,
            ),
            'ObjectPut': grpc.unary_unary_rpc_method_handler(
                    servicer.ObjectPut,
                    request_deserializer=nats__service__pb2.ObjectPutRequest.FromString,
                    response_serializer=nats__service__pb2.ObjectPutResponse.SerializeToString,
            ),
            'ObjectGet': grpc.unary_unary_rpc_method_handler(
                    servicer.ObjectGet,
                    request_deserializer=nats__service__pb2.ObjectGetRequest.FromString,
                    response_serializer=nats__service__pb2.ObjectGetResponse.SerializeToString,
            ),
            'ObjectDelete': grpc.unary_unary_rpc_method_handler(
                    servicer.ObjectDelete,
                    request_deserializer=nats__service__pb2.ObjectDeleteRequest.FromString,
                    response_serializer=nats__service__pb2.ObjectDeleteResponse.SerializeToString,
            ),
            'ObjectList': grpc.unary_unary_rpc_method_handler(
                    servicer.ObjectList,
                    request_deserializer=nats__service__pb2.ObjectListRequest.FromString,
                    response_serializer=nats__service__pb2.ObjectListResponse.SerializeToString,
            ),
            'GetStatistics': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStatistics,
                    request_deserializer=nats__service__pb2.GetStatisticsRequest.FromString,
                    response_serializer=nats__service__pb2.GetStatisticsResponse.SerializeToString,
            ),
            'GetStreamStats': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStreamStats,
                    request_deserializer=nats__service__pb2.GetStreamStatsRequest.FromString,
                    response_serializer=nats__service__pb2.GetStreamStatsResponse.SerializeToString,
            ),
            'HealthCheck': grpc.unary_unary_rpc_method_handler(
                    servicer.HealthCheck,
                    request_deserializer=nats__service__pb2.NATSHealthCheckRequest.FromString,
                    response_serializer=nats__service__pb2.NATSHealthCheckResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'isa.nats.NATSService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('isa.nats.NATSService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class NATSService(object):
    """========================================
    NATS 消息流服务
    ========================================
    这是一个统一的消息流服务，为所有后端服务提供事件总线能力
    支持：
    - 用户和组织级别的主题隔离
    - Pub/Sub 消息
    - 请求/响应模式
    - JetStream 持久化
    - 流管理
    - 消费者管理
    - 队列组

    """

    @staticmethod
    def Publish(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,
            '/isa.nats.NATSService/Publish',
            nats__service__pb2.PublishRequest.SerializeToString,
            nats__service__pb2.PublishResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PublishBatch(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,
            '/isa.nats.NATSService/PublishBatch',
            nats__service__pb2.PublishBatchRequest.SerializeToString,
            nats__service__pb2.PublishBatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Subscribe(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_stream(
            request,
            target,
            '/isa.nats.NATSService/Subscribe',
            nats__service__pb2.SubscribeRequest.SerializeToString,
            nats__service__pb2.MessageResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Unsubscribe(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,
            '/isa.nats.NATSService/Unsubscribe',
            nats__service__pb2.UnsubscribeRequest.SerializeToString,
            nats__service__pb2.UnsubscribeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Request(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,
            '/isa.nats.NATSService/Request',
            nats__service__pb2.RequestRequest.SerializeToString,
            nats__service__pb2.RequestResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def QueueSubscribe(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_stream(
            request,
            target,
            '/isa.nats.NATSService/QueueSubscribe',
            nats__service__pb2.QueueSubscribeRequest.SerializeToString,
            nats__service__pb2.MessageResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateStream(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,
            '/isa.nats.NATSService/CreateStream',
            nats__service__pb2.CreateStreamRequest.SerializeToString,
            nats__service__pb2.CreateStreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteStream(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,
            '/isa.nats.NATSService/DeleteStream',
            nats__service__pb2.DeleteStreamRequest.SerializeToString,
            nats__service__pb2.DeleteStreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetStreamInfo(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,
            '/isa.nats.NATSService/GetStreamInfo',
            nats__service__pb2.GetStreamInfoRequest.SerializeToString,
            nats__service__pb2.GetStreamInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListStreams(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,
            '/isa.nats.NATSService/ListStreams',
            nats__service__pb2.ListStreamsRequest.SerializeToString,
            nats__service__pb2.ListStreamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateStream(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,
            '/isa.nats.NATSService/UpdateStream',
            nats__service__pb2.UpdateStreamRequest.SerializeToString,
            nats__service__pb2.UpdateStreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PurgeStream(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,
            '/isa.nats.NATSService/PurgeStream',
            nats__service__pb2.PurgeStreamRequest.SerializeToString,
            nats__service__pb2.PurgeStreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateConsumer(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,
            '/isa.nats.NATSService/CreateConsumer',
            nats__service__pb2.CreateConsumerRequest.SerializeToString,
            nats__service__pb2.CreateConsumerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteConsumer(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,
            '/isa.nats.NATSService/DeleteConsumer',
            nats__service__pb2.DeleteConsumerRequest.SerializeToString,
            nats__service__pb2.DeleteConsumerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetConsumerInfo(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,
            '/isa.nats.NATSService/GetConsumerInfo',
            nats__service__pb2.GetConsumerInfoRequest.SerializeToString,
            nats__service__pb2.GetConsumerInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListConsumers(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,
            '/isa.nats.NATSService/ListConsumers',
            nats__service__pb2.ListConsumersRequest.SerializeToString,
            nats__service__pb2.ListConsumersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PublishToStream(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,
            '/isa.nats.NATSService/PublishToStream',
            nats__service__pb2.PublishToStreamRequest.SerializeToString,
            nats__service__pb2.PublishToStreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PullMessages(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,
            '/isa.nats.NATSService/PullMessages',
            nats__service__pb2.PullMessagesRequest.SerializeToString,
            nats__service__pb2.PullMessagesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AckMessage(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,
            '/isa.nats.NATSService/AckMessage',
            nats__service__pb2.AckMessageRequest.SerializeToString,
            nats__service__pb2.AckMessageResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def NakMessage(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,
            '/isa.nats.NATSService/NakMessage',
            nats__service__pb2.NakMessageRequest.SerializeToString,
            nats__service__pb2.NakMessageResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def KVPut(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,
            '/isa.nats.NATSService/KVPut',
            nats__service__pb2.KVPutRequest.SerializeToString,
            nats__service__pb2.KVPutResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def KVGet(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,
            '/isa.nats.NATSService/KVGet',
            nats__service__pb2.KVGetRequest.SerializeToString,
            nats__service__pb2.KVGetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def KVDelete(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,
            '/isa.nats.NATSService/KVDelete',
            nats__service__pb2.KVDeleteRequest.SerializeToString,
            nats__service__pb2.KVDeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def KVKeys(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,
            '/isa.nats.NATSService/KVKeys',
            nats__service__pb2.KVKeysRequest.SerializeToString,
            nats__service__pb2.KVKeysResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ObjectPut(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,
            '/isa.nats.NATSService/ObjectPut',
            nats__service__pb2.ObjectPutRequest.SerializeToString,
            nats__service__pb2.ObjectPutResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ObjectGet(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,
            '/isa.nats.NATSService/ObjectGet',
            nats__service__pb2.ObjectGetRequest.SerializeToString,
            nats__service__pb2.ObjectGetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ObjectDelete(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,
            '/isa.nats.NATSService/ObjectDelete',
            nats__service__pb2.ObjectDeleteRequest.SerializeToString,
            nats__service__pb2.ObjectDeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ObjectList(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,
            '/isa.nats.NATSService/ObjectList',
            nats__service__pb2.ObjectListRequest.SerializeToString,
            nats__service__pb2.ObjectListResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetStatistics(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,
            '/isa.nats.NATSService/GetStatistics',
            nats__service__pb2.GetStatisticsRequest.SerializeToString,
            nats__service__pb2.GetStatisticsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetStreamStats(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,
            '/isa.nats.NATSService/GetStreamStats',
            nats__service__pb2.GetStreamStatsRequest.SerializeToString,
            nats__service__pb2.GetStreamStatsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HealthCheck(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,
            '/isa.nats.NATSService/HealthCheck',
            nats__service__pb2.NATSHealthCheckRequest.SerializeToString,
            nats__service__pb2.NATSHealthCheckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
