DBFILESUploadSessionLookupError

@interface DBFILESUploadSessionLookupError
    : NSObject <DBSerializable, NSCopying>

The UploadSessionLookupError union.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

  • tag

    Represents the union’s current tag state.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBFILESUploadSessionLookupErrorTag tag;

    Swift

    var tag: DBFILESUploadSessionLookupErrorTag { get }
  • The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error. - note: Ensure the isIncorrectOffset method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        DBFILESUploadSessionOffsetError *_Nonnull incorrectOffset;

    Swift

    var incorrectOffset: DBFILESUploadSessionOffsetError { get }
  • Initializes union class with tag state of not_found.

    Description of the not_found tag state: The upload session ID was not found or has expired. Upload sessions are valid for 48 hours.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithNotFound;

    Swift

    init(notFound: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of incorrect_offset.

    Description of the incorrect_offset tag state: The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithIncorrectOffset:
        (nonnull DBFILESUploadSessionOffsetError *)incorrectOffset;

    Swift

    init(incorrectOffset: DBFILESUploadSessionOffsetError)

    Parameters

    incorrectOffset

    The specified offset was incorrect. See the value for the correct offset. This error may occur when a previous request was received and processed successfully but the client did not receive the response, e.g. due to a network error.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of closed.

    Description of the closed tag state: You are attempting to append data to an upload session that has alread been closed (i.e. committed).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithClosed;

    Swift

    init(closed: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of not_closed.

    Description of the not_closed tag state: The session must be closed before calling upload_session/finish_batch.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithNotClosed;

    Swift

    init(notClosed: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of other.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOther;

    Swift

    init(other: ())

    Return Value

    An initialized instance.

  • Retrieves whether the union’s current tag state has value not_found.

    Declaration

    Objective-C

    - (BOOL)isNotFound;

    Swift

    func isNotFound() -> Bool

    Return Value

    Whether the union’s current tag state has value not_found.

  • Retrieves whether the union’s current tag state has value incorrect_offset.

    Note

    Call this method and ensure it returns true before accessing the incorrectOffset property, otherwise a runtime exception will be thrown.

    Declaration

    Objective-C

    - (BOOL)isIncorrectOffset;

    Swift

    func isIncorrectOffset() -> Bool

    Return Value

    Whether the union’s current tag state has value incorrect_offset.

  • Retrieves whether the union’s current tag state has value closed.

    Declaration

    Objective-C

    - (BOOL)isClosed;

    Swift

    func isClosed() -> Bool

    Return Value

    Whether the union’s current tag state has value closed.

  • Retrieves whether the union’s current tag state has value not_closed.

    Declaration

    Objective-C

    - (BOOL)isNotClosed;

    Swift

    func isNotClosed() -> Bool

    Return Value

    Whether the union’s current tag state has value not_closed.

  • Retrieves whether the union’s current tag state has value other.

    Declaration

    Objective-C

    - (BOOL)isOther;

    Swift

    func isOther() -> Bool

    Return Value

    Whether the union’s current tag state has value other.

  • Retrieves string value of union’s current tag state.

    Declaration

    Objective-C

    - (nonnull NSString *)tagName;

    Swift

    func tagName() -> String

    Return Value

    A human-readable string representing the union’s current tag state.