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

from nebius.api.nebius.common.v1 import metadata_pb2 as nebius_dot_common_dot_v1_dot_metadata__pb2
from nebius.api.nebius.common.v1 import operation_pb2 as nebius_dot_common_dot_v1_dot_operation__pb2
from nebius.api.nebius.storage.v1alpha1 import transfer_pb2 as nebius_dot_storage_dot_v1alpha1_dot_transfer__pb2
from nebius.api.nebius.storage.v1alpha1 import transfer_service_pb2 as nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2


class TransferServiceStub(object):
    """TransferService provides functionality for creating and managing transfers
    that migrate data from other S3 providers or across different regions of Nebius Object Storage.
    Each transfer consists of consecutive iterations where the service lists objects in the source bucket and
    moves those that need to be transferred according to the specified overwrite strategy.
    After an iteration completes, the transfer will stop if its stop condition is met. Otherwise,
    it will wait for the defined inter-iteration interval before starting the next iteration.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/Get',
                request_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetTransferRequest.SerializeToString,
                response_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__pb2.Transfer.FromString,
                )
        self.GetByName = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/GetByName',
                request_serializer=nebius_dot_common_dot_v1_dot_metadata__pb2.GetByNameRequest.SerializeToString,
                response_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__pb2.Transfer.FromString,
                )
        self.List = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/List',
                request_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ListTransfersRequest.SerializeToString,
                response_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ListTransfersResponse.FromString,
                )
        self.Create = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/Create',
                request_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.CreateTransferRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Update = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/Update',
                request_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.UpdateTransferRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Stop = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/Stop',
                request_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.StopTransferRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Resume = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/Resume',
                request_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ResumeTransferRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/Delete',
                request_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.DeleteTransferRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.GetIterationHistory = channel.unary_unary(
                '/nebius.storage.v1alpha1.TransferService/GetIterationHistory',
                request_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetIterationHistoryRequest.SerializeToString,
                response_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetIterationHistoryResponse.FromString,
                )


class TransferServiceServicer(object):
    """TransferService provides functionality for creating and managing transfers
    that migrate data from other S3 providers or across different regions of Nebius Object Storage.
    Each transfer consists of consecutive iterations where the service lists objects in the source bucket and
    moves those that need to be transferred according to the specified overwrite strategy.
    After an iteration completes, the transfer will stop if its stop condition is met. Otherwise,
    it will wait for the defined inter-iteration interval before starting the next iteration.
    """

    def Get(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 GetByName(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 List(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 Create(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 Update(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 Stop(self, request, context):
        """Stop active transfer. If the transfer is currently moving data,
        it will be transitioned to the Stopping state and will move to the Stopped state once all processes have been stopped.
        If the transfer is waiting between iterations, it will stop immediately.
        Only transfer in Active state can be stopped.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Resume(self, request, context):
        """Resume stopped or failed transfer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Fully delete a transfer along with its history. Only stopped or failed transfers can be deleted.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetIterationHistory(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 add_TransferServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetTransferRequest.FromString,
                    response_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__pb2.Transfer.SerializeToString,
            ),
            'GetByName': grpc.unary_unary_rpc_method_handler(
                    servicer.GetByName,
                    request_deserializer=nebius_dot_common_dot_v1_dot_metadata__pb2.GetByNameRequest.FromString,
                    response_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__pb2.Transfer.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ListTransfersRequest.FromString,
                    response_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ListTransfersResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.CreateTransferRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.UpdateTransferRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Stop': grpc.unary_unary_rpc_method_handler(
                    servicer.Stop,
                    request_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.StopTransferRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Resume': grpc.unary_unary_rpc_method_handler(
                    servicer.Resume,
                    request_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ResumeTransferRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.DeleteTransferRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'GetIterationHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIterationHistory,
                    request_deserializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetIterationHistoryRequest.FromString,
                    response_serializer=nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetIterationHistoryResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nebius.storage.v1alpha1.TransferService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class TransferService(object):
    """TransferService provides functionality for creating and managing transfers
    that migrate data from other S3 providers or across different regions of Nebius Object Storage.
    Each transfer consists of consecutive iterations where the service lists objects in the source bucket and
    moves those that need to be transferred according to the specified overwrite strategy.
    After an iteration completes, the transfer will stop if its stop condition is met. Otherwise,
    it will wait for the defined inter-iteration interval before starting the next iteration.
    """

    @staticmethod
    def Get(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, '/nebius.storage.v1alpha1.TransferService/Get',
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetTransferRequest.SerializeToString,
            nebius_dot_storage_dot_v1alpha1_dot_transfer__pb2.Transfer.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetByName(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, '/nebius.storage.v1alpha1.TransferService/GetByName',
            nebius_dot_common_dot_v1_dot_metadata__pb2.GetByNameRequest.SerializeToString,
            nebius_dot_storage_dot_v1alpha1_dot_transfer__pb2.Transfer.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def List(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, '/nebius.storage.v1alpha1.TransferService/List',
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ListTransfersRequest.SerializeToString,
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ListTransfersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Create(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, '/nebius.storage.v1alpha1.TransferService/Create',
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.CreateTransferRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Update(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, '/nebius.storage.v1alpha1.TransferService/Update',
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.UpdateTransferRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Stop(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, '/nebius.storage.v1alpha1.TransferService/Stop',
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.StopTransferRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Resume(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, '/nebius.storage.v1alpha1.TransferService/Resume',
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.ResumeTransferRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/nebius.storage.v1alpha1.TransferService/Delete',
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.DeleteTransferRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetIterationHistory(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, '/nebius.storage.v1alpha1.TransferService/GetIterationHistory',
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetIterationHistoryRequest.SerializeToString,
            nebius_dot_storage_dot_v1alpha1_dot_transfer__service__pb2.GetIterationHistoryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
