# 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 yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2
from yandex.cloud.organizationmanager.v1.idp import synchronization_service_pb2 as yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2
from yandex.cloud.organizationmanager.v1.idp import synchronization_settings_pb2 as yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__settings__pb2

GRPC_GENERATED_VERSION = '1.70.0'
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 yandex/cloud/organizationmanager/v1/idp/synchronization_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 SynchronizationServiceStub(object):
    """A set of methods for managing synchronization settings.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetReplicationToken = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/SetReplicationToken',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.SetReplicationTokenRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.ResetReplicationToken = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/ResetReplicationToken',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ResetReplicationTokenRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.CreateSynchronizationSettings = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/CreateSynchronizationSettings',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.CreateSynchronizationSettingsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.UpdateSynchronizationSettings = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/UpdateSynchronizationSettings',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.UpdateSynchronizationSettingsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.DeleteSynchronizationSettings = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/DeleteSynchronizationSettings',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.DeleteSynchronizationSettingsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.GetSynchronizationSettings = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/GetSynchronizationSettings',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.GetSynchronizationSettingsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__settings__pb2.SynchronizationSettings.FromString,
                _registered_method=True)
        self.ListSupportedAttributes = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/ListSupportedAttributes',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ListSupportedAttributesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ListSupportedAttributesResponse.FromString,
                _registered_method=True)


class SynchronizationServiceServicer(object):
    """A set of methods for managing synchronization settings.
    """

    def SetReplicationToken(self, request, context):
        """Sets the replication token for synchronization.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResetReplicationToken(self, request, context):
        """Resets the replication token for synchronization.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateSynchronizationSettings(self, request, context):
        """Creates synchronization settings for a subject container.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateSynchronizationSettings(self, request, context):
        """Updates synchronization settings for a subject container.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteSynchronizationSettings(self, request, context):
        """Deletes synchronization settings for a subject container.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSynchronizationSettings(self, request, context):
        """Returns synchronization settings for a subject container.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListSupportedAttributes(self, request, context):
        """Lists supported attributes for synchronization.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SynchronizationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetReplicationToken': grpc.unary_unary_rpc_method_handler(
                    servicer.SetReplicationToken,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.SetReplicationTokenRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ResetReplicationToken': grpc.unary_unary_rpc_method_handler(
                    servicer.ResetReplicationToken,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ResetReplicationTokenRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'CreateSynchronizationSettings': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateSynchronizationSettings,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.CreateSynchronizationSettingsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'UpdateSynchronizationSettings': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateSynchronizationSettings,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.UpdateSynchronizationSettingsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'DeleteSynchronizationSettings': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteSynchronizationSettings,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.DeleteSynchronizationSettingsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'GetSynchronizationSettings': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSynchronizationSettings,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.GetSynchronizationSettingsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__settings__pb2.SynchronizationSettings.SerializeToString,
            ),
            'ListSupportedAttributes': grpc.unary_unary_rpc_method_handler(
                    servicer.ListSupportedAttributes,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ListSupportedAttributesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ListSupportedAttributesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.organizationmanager.v1.idp.SynchronizationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('yandex.cloud.organizationmanager.v1.idp.SynchronizationService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class SynchronizationService(object):
    """A set of methods for managing synchronization settings.
    """

    @staticmethod
    def SetReplicationToken(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,
            '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/SetReplicationToken',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.SetReplicationTokenRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResetReplicationToken(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,
            '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/ResetReplicationToken',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ResetReplicationTokenRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateSynchronizationSettings(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,
            '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/CreateSynchronizationSettings',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.CreateSynchronizationSettingsRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateSynchronizationSettings(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,
            '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/UpdateSynchronizationSettings',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.UpdateSynchronizationSettingsRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteSynchronizationSettings(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,
            '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/DeleteSynchronizationSettings',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.DeleteSynchronizationSettingsRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSynchronizationSettings(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,
            '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/GetSynchronizationSettings',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.GetSynchronizationSettingsRequest.SerializeToString,
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__settings__pb2.SynchronizationSettings.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListSupportedAttributes(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,
            '/yandex.cloud.organizationmanager.v1.idp.SynchronizationService/ListSupportedAttributes',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ListSupportedAttributesRequest.SerializeToString,
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_idp_dot_synchronization__service__pb2.ListSupportedAttributesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
