DBCOMMONPathRootError
Objective-C
@interface DBCOMMONPathRootError : NSObject <DBSerializable, NSCopying>
Swift
class DBCOMMONPathRootError : NSObject, DBSerializable, NSCopying
The PathRootError
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) DBCOMMONPathRootErrorTag tag;
Swift
var tag: DBCOMMONPathRootErrorTag { get }
-
The root namespace id in Dropbox-API-Path-Root header is not valid. The value of this error is the user’s latest root info. - note: Ensure the
isInvalidRoot
method returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, readonly) DBCOMMONRootInfo *_Nonnull invalidRoot;
Swift
var invalidRoot: DBCOMMONRootInfo { get }
-
Initializes union class with tag state of “invalid_root”.
Description of the “invalid_root” tag state: The root namespace id in Dropbox-API-Path-Root header is not valid. The value of this error is the user’s latest root info.
Declaration
Objective-C
- (nonnull instancetype)initWithInvalidRoot: (nonnull DBCOMMONRootInfo *)invalidRoot;
Swift
init(invalidRoot: DBCOMMONRootInfo)
Parameters
invalidRoot
The root namespace id in Dropbox-API-Path-Root header is not valid. The value of this error is the user’s latest root info.
Return Value
An initialized instance.
-
Initializes union class with tag state of “no_permission”.
Description of the “no_permission” tag state: You don’t have permission to access the namespace id in Dropbox-API-Path-Root header.
Declaration
Objective-C
- (nonnull instancetype)initWithNoPermission;
Swift
init(noPermission: ())
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 “invalid_root”.
Note
Call this method and ensure it returns true before accessing the
invalidRoot
property, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isInvalidRoot;
Swift
func isInvalidRoot() -> Bool
Return Value
Whether the union’s current tag state has value “invalid_root”.
-
Retrieves whether the union’s current tag state has value “no_permission”.
Declaration
Objective-C
- (BOOL)isNoPermission;
Swift
func isNoPermission() -> Bool
Return Value
Whether the union’s current tag state has value “no_permission”.
-
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.