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

from cs3.tx.v1beta1 import tx_api_pb2 as cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2


class TxAPIStub(object):
    """Tx API

    The Tx API provides data transfer capabilities.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a succesful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateTransfer = channel.unary_unary(
                '/cs3.tx.v1beta1.TxAPI/CreateTransfer',
                request_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CreateTransferRequest.SerializeToString,
                response_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CreateTransferResponse.FromString,
                )
        self.GetTransferStatus = channel.unary_unary(
                '/cs3.tx.v1beta1.TxAPI/GetTransferStatus',
                request_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.GetTransferStatusRequest.SerializeToString,
                response_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.GetTransferStatusResponse.FromString,
                )
        self.CancelTransfer = channel.unary_unary(
                '/cs3.tx.v1beta1.TxAPI/CancelTransfer',
                request_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CancelTransferRequest.SerializeToString,
                response_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CancelTransferResponse.FromString,
                )
        self.ListTransfers = channel.unary_unary(
                '/cs3.tx.v1beta1.TxAPI/ListTransfers',
                request_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.ListTransfersRequest.SerializeToString,
                response_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.ListTransfersResponse.FromString,
                )
        self.RetryTransfer = channel.unary_unary(
                '/cs3.tx.v1beta1.TxAPI/RetryTransfer',
                request_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.RetryTransferRequest.SerializeToString,
                response_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.RetryTransferResponse.FromString,
                )


class TxAPIServicer(object):
    """Tx API

    The Tx API provides data transfer capabilities.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a succesful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.
    """

    def CreateTransfer(self, request, context):
        """Requests creation of a transfer.
        Returns a CreateTransferResponse.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTransferStatus(self, request, context):
        """Requests a transfer status.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CancelTransfer(self, request, context):
        """Requests to cancel a transfer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListTransfers(self, request, context):
        """Requests a list of transfers received by the authenticated principle.
        If a filter is specified, only transfers satisfying the filter MUST be returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RetryTransfer(self, request, context):
        """Requests retrying a transfer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TxAPIServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateTransfer': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateTransfer,
                    request_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CreateTransferRequest.FromString,
                    response_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CreateTransferResponse.SerializeToString,
            ),
            'GetTransferStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTransferStatus,
                    request_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.GetTransferStatusRequest.FromString,
                    response_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.GetTransferStatusResponse.SerializeToString,
            ),
            'CancelTransfer': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelTransfer,
                    request_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CancelTransferRequest.FromString,
                    response_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CancelTransferResponse.SerializeToString,
            ),
            'ListTransfers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTransfers,
                    request_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.ListTransfersRequest.FromString,
                    response_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.ListTransfersResponse.SerializeToString,
            ),
            'RetryTransfer': grpc.unary_unary_rpc_method_handler(
                    servicer.RetryTransfer,
                    request_deserializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.RetryTransferRequest.FromString,
                    response_serializer=cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.RetryTransferResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cs3.tx.v1beta1.TxAPI', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class TxAPI(object):
    """Tx API

    The Tx API provides data transfer capabilities.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a succesful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.
    """

    @staticmethod
    def CreateTransfer(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, '/cs3.tx.v1beta1.TxAPI/CreateTransfer',
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CreateTransferRequest.SerializeToString,
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CreateTransferResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTransferStatus(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, '/cs3.tx.v1beta1.TxAPI/GetTransferStatus',
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.GetTransferStatusRequest.SerializeToString,
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.GetTransferStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CancelTransfer(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, '/cs3.tx.v1beta1.TxAPI/CancelTransfer',
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CancelTransferRequest.SerializeToString,
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.CancelTransferResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListTransfers(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, '/cs3.tx.v1beta1.TxAPI/ListTransfers',
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.ListTransfersRequest.SerializeToString,
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.ListTransfersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RetryTransfer(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, '/cs3.tx.v1beta1.TxAPI/RetryTransfer',
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.RetryTransferRequest.SerializeToString,
            cs3_dot_tx_dot_v1beta1_dot_tx__api__pb2.RetryTransferResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
