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

from ydb._grpc.v5.draft.protos import ydb_dynamic_config_pb2 as draft_dot_protos_dot_ydb__dynamic__config__pb2


class DynamicConfigServiceStub(object):
    """Dynamic Config is the configuration applied to dynamic nodes without static configuration
    and is utilized by certain services, such as logging, which can update their settings
    seamlessly without requiring any restarts.

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetConfig = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/SetConfig',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigResponse.FromString,
                )
        self.ReplaceConfig = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/ReplaceConfig',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigResponse.FromString,
                )
        self.GetMetadata = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/GetMetadata',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataResponse.FromString,
                )
        self.GetConfig = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/GetConfig',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigResponse.FromString,
                )
        self.DropConfig = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/DropConfig',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigResponse.FromString,
                )
        self.AddVolatileConfig = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/AddVolatileConfig',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigResponse.FromString,
                )
        self.RemoveVolatileConfig = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/RemoveVolatileConfig',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigResponse.FromString,
                )
        self.GetNodeLabels = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/GetNodeLabels',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsResponse.FromString,
                )
        self.ResolveConfig = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/ResolveConfig',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigResponse.FromString,
                )
        self.ResolveAllConfig = channel.unary_unary(
                '/Ydb.DynamicConfig.V1.DynamicConfigService/ResolveAllConfig',
                request_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigRequest.SerializeToString,
                response_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigResponse.FromString,
                )


class DynamicConfigServiceServicer(object):
    """Dynamic Config is the configuration applied to dynamic nodes without static configuration
    and is utilized by certain services, such as logging, which can update their settings
    seamlessly without requiring any restarts.

    """

    def SetConfig(self, request, context):
        """Apply new version of config.
        Overwrites previous version.
        This call is idempotent:
        - Two subsequent identical calls will return success,
        - After applying next version another identical call will result in an error.
        The field version within the YAML in the request must strictly be set to the current version increment by one.
        The field cluster within the YAML should be identical to the one configured on the node used by the console tablet.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReplaceConfig(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 GetMetadata(self, request, context):
        """Get current configs metadata.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def DropConfig(self, request, context):
        """Drop current config.
        This call is idempotent.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

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

    def GetNodeLabels(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 ResolveConfig(self, request, context):
        """Resolve config for particular labels.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResolveAllConfig(self, request, context):
        """Resolve config for all possible labels combinations.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DynamicConfigServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.SetConfig,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigResponse.SerializeToString,
            ),
            'ReplaceConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.ReplaceConfig,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigResponse.SerializeToString,
            ),
            'GetMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMetadata,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataResponse.SerializeToString,
            ),
            'GetConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConfig,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigResponse.SerializeToString,
            ),
            'DropConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.DropConfig,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigResponse.SerializeToString,
            ),
            'AddVolatileConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.AddVolatileConfig,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigResponse.SerializeToString,
            ),
            'RemoveVolatileConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveVolatileConfig,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigResponse.SerializeToString,
            ),
            'GetNodeLabels': grpc.unary_unary_rpc_method_handler(
                    servicer.GetNodeLabels,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsResponse.SerializeToString,
            ),
            'ResolveConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveConfig,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigResponse.SerializeToString,
            ),
            'ResolveAllConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveAllConfig,
                    request_deserializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigRequest.FromString,
                    response_serializer=draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Ydb.DynamicConfig.V1.DynamicConfigService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class DynamicConfigService(object):
    """Dynamic Config is the configuration applied to dynamic nodes without static configuration
    and is utilized by certain services, such as logging, which can update their settings
    seamlessly without requiring any restarts.

    """

    @staticmethod
    def SetConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/SetConfig',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.SetConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReplaceConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/ReplaceConfig',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.ReplaceConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMetadata(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/GetMetadata',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.GetMetadataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/GetConfig',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.GetConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DropConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/DropConfig',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.DropConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddVolatileConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/AddVolatileConfig',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.AddVolatileConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveVolatileConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/RemoveVolatileConfig',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.RemoveVolatileConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetNodeLabels(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/GetNodeLabels',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.GetNodeLabelsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ResolveConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/ResolveConfig',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ResolveAllConfig(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, '/Ydb.DynamicConfig.V1.DynamicConfigService/ResolveAllConfig',
            draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigRequest.SerializeToString,
            draft_dot_protos_dot_ydb__dynamic__config__pb2.ResolveAllConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
