DBFILESRestoreError

@interface DBFILESRestoreError : NSObject <DBSerializable, NSCopying>

The RestoreError 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) DBFILESRestoreErrorTag tag;

    Swift

    var tag: DBFILESRestoreErrorTag { get }
  • An error occurs when downloading metadata for the file. - note: Ensure the isPathLookup method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBFILESLookupError *_Nonnull pathLookup;

    Swift

    var pathLookup: DBFILESLookupError { get }
  • An error occurs when trying to restore the file to that path. - note: Ensure the isPathWrite method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBFILESWriteError *_Nonnull pathWrite;

    Swift

    var pathWrite: DBFILESWriteError { get }
  • Initializes union class with tag state of path_lookup.

    Description of the path_lookup tag state: An error occurs when downloading metadata for the file.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPathLookup:
        (nonnull DBFILESLookupError *)pathLookup;

    Swift

    init(pathLookup: DBFILESLookupError)

    Parameters

    pathLookup

    An error occurs when downloading metadata for the file.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of path_write.

    Description of the path_write tag state: An error occurs when trying to restore the file to that path.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPathWrite:
        (nonnull DBFILESWriteError *)pathWrite;

    Swift

    init(pathWrite: DBFILESWriteError)

    Parameters

    pathWrite

    An error occurs when trying to restore the file to that path.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of invalid_revision.

    Description of the invalid_revision tag state: The revision is invalid. It may point to a different file.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithInvalidRevision;

    Swift

    init(invalidRevision: ())

    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 path_lookup.

    Note

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

    Declaration

    Objective-C

    - (BOOL)isPathLookup;

    Swift

    func isPathLookup() -> Bool

    Return Value

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

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

    Note

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

    Declaration

    Objective-C

    - (BOOL)isPathWrite;

    Swift

    func isPathWrite() -> Bool

    Return Value

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

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

    Declaration

    Objective-C

    - (BOOL)isInvalidRevision;

    Swift

    func isInvalidRevision() -> Bool

    Return Value

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

  • 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.