DBFILESRestoreError
Objective-C
@interface DBFILESRestoreError : NSObject <DBSerializable, NSCopying>
Swift
class 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.
-
Represents the union’s current tag state.
Declaration
Objective-C
@property (nonatomic, readonly) 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 (nonatomic, readonly) 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 (nonatomic, readonly) 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 not exist or may point to a deleted file.
Declaration
Objective-C
- (nonnull instancetype)initWithInvalidRevision;
Swift
init(invalidRevision: ())
Return Value
An initialized instance.
-
Initializes union class with tag state of “in_progress”.
Description of the “in_progress” tag state: The restore is currently executing, but has not yet completed.
Declaration
Objective-C
- (nonnull instancetype)initWithInProgress;
Swift
init(inProgress: ())
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 “in_progress”.
Declaration
Objective-C
- (BOOL)isInProgress;
Swift
func isInProgress() -> Bool
Return Value
Whether the union’s current tag state has value “in_progress”.
-
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.