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

from agntcy.dir.store.v1 import sync_service_pb2 as agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2


class SyncServiceStub(object):
    """SyncService provides functionality for synchronizing objects between Directory nodes.

    This service enables one-way synchronization from a remote Directory node to the local node,
    allowing distributed Directory instances to share and replicate objects. The service supports
    both on-demand synchronization and tracking of sync operations through their lifecycle.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateSync = channel.unary_unary(
                '/agntcy.dir.store.v1.SyncService/CreateSync',
                request_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.CreateSyncRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.CreateSyncResponse.FromString,
                _registered_method=True)
        self.ListSyncs = channel.unary_stream(
                '/agntcy.dir.store.v1.SyncService/ListSyncs',
                request_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.ListSyncsRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.ListSyncsItem.FromString,
                _registered_method=True)
        self.GetSync = channel.unary_unary(
                '/agntcy.dir.store.v1.SyncService/GetSync',
                request_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.GetSyncRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.GetSyncResponse.FromString,
                _registered_method=True)
        self.DeleteSync = channel.unary_unary(
                '/agntcy.dir.store.v1.SyncService/DeleteSync',
                request_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.DeleteSyncRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.DeleteSyncResponse.FromString,
                _registered_method=True)
        self.RequestRegistryCredentials = channel.unary_unary(
                '/agntcy.dir.store.v1.SyncService/RequestRegistryCredentials',
                request_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.RequestRegistryCredentialsRequest.SerializeToString,
                response_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.RequestRegistryCredentialsResponse.FromString,
                _registered_method=True)


class SyncServiceServicer(object):
    """SyncService provides functionality for synchronizing objects between Directory nodes.

    This service enables one-way synchronization from a remote Directory node to the local node,
    allowing distributed Directory instances to share and replicate objects. The service supports
    both on-demand synchronization and tracking of sync operations through their lifecycle.
    """

    def CreateSync(self, request, context):
        """CreateSync initiates a new synchronization operation from a remote Directory node.

        The operation is non-blocking and returns immediately with a sync ID that can be used
        to track progress and manage the sync operation.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListSyncs(self, request, context):
        """ListSyncs returns a stream of all sync operations known to the system.

        This includes active, completed, and failed synchronizations.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSync(self, request, context):
        """GetSync retrieves detailed status information for a specific synchronization.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteSync(self, request, context):
        """DeleteSync removes a synchronization operation from the system.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RequestRegistryCredentials(self, request, context):
        """RequestRegistryCredentials requests registry credentials between two Directory nodes.

        This RPC allows a requesting node to authenticate with this node and obtain
        temporary registry credentials for secure Zot-based synchronization.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SyncServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateSync': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateSync,
                    request_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.CreateSyncRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.CreateSyncResponse.SerializeToString,
            ),
            'ListSyncs': grpc.unary_stream_rpc_method_handler(
                    servicer.ListSyncs,
                    request_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.ListSyncsRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.ListSyncsItem.SerializeToString,
            ),
            'GetSync': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSync,
                    request_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.GetSyncRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.GetSyncResponse.SerializeToString,
            ),
            'DeleteSync': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteSync,
                    request_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.DeleteSyncRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.DeleteSyncResponse.SerializeToString,
            ),
            'RequestRegistryCredentials': grpc.unary_unary_rpc_method_handler(
                    servicer.RequestRegistryCredentials,
                    request_deserializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.RequestRegistryCredentialsRequest.FromString,
                    response_serializer=agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.RequestRegistryCredentialsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'agntcy.dir.store.v1.SyncService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('agntcy.dir.store.v1.SyncService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class SyncService(object):
    """SyncService provides functionality for synchronizing objects between Directory nodes.

    This service enables one-way synchronization from a remote Directory node to the local node,
    allowing distributed Directory instances to share and replicate objects. The service supports
    both on-demand synchronization and tracking of sync operations through their lifecycle.
    """

    @staticmethod
    def CreateSync(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,
            '/agntcy.dir.store.v1.SyncService/CreateSync',
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.CreateSyncRequest.SerializeToString,
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.CreateSyncResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListSyncs(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,
            '/agntcy.dir.store.v1.SyncService/ListSyncs',
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.ListSyncsRequest.SerializeToString,
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.ListSyncsItem.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSync(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,
            '/agntcy.dir.store.v1.SyncService/GetSync',
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.GetSyncRequest.SerializeToString,
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.GetSyncResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteSync(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,
            '/agntcy.dir.store.v1.SyncService/DeleteSync',
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.DeleteSyncRequest.SerializeToString,
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.DeleteSyncResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RequestRegistryCredentials(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,
            '/agntcy.dir.store.v1.SyncService/RequestRegistryCredentials',
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.RequestRegistryCredentialsRequest.SerializeToString,
            agntcy_dot_dir_dot_store_dot_v1_dot_sync__service__pb2.RequestRegistryCredentialsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
