DBFILESFileLockContent
Objective-C
@interface DBFILESFileLockContent : NSObject <DBSerializable, NSCopying>
                Swift
class DBFILESFileLockContent : NSObject, DBSerializable, NSCopying
                The FileLockContent 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) DBFILESFileLockContentTag tag;Swift
var tag: DBFILESFileLockContentTag { get } - 
                  
                  
A lock held by a single user. - note: Ensure the
isSingleUsermethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, readonly) DBFILESSingleUserLock *_Nonnull singleUser;Swift
var singleUser: DBFILESSingleUserLock { get } 
- 
                  
                  
Initializes union class with tag state of “unlocked”.
Description of the “unlocked” tag state: Empty type to indicate no lock.
Declaration
Objective-C
- (nonnull instancetype)initWithUnlocked;Swift
init(unlocked: ())Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “single_user”.
Description of the “single_user” tag state: A lock held by a single user.
Declaration
Objective-C
- (nonnull instancetype)initWithSingleUser: (nonnull DBFILESSingleUserLock *)singleUser;Swift
init(singleUser: DBFILESSingleUserLock)Parameters
singleUserA lock held by a single user.
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 “unlocked”.
Declaration
Objective-C
- (BOOL)isUnlocked;Swift
func isUnlocked() -> BoolReturn Value
Whether the union’s current tag state has value “unlocked”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “single_user”.
Note
Call this method and ensure it returns true before accessing the
singleUserproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isSingleUser;Swift
func isSingleUser() -> BoolReturn Value
Whether the union’s current tag state has value “single_user”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “other”.
Declaration
Objective-C
- (BOOL)isOther;Swift
func isOther() -> BoolReturn 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() -> StringReturn Value
A human-readable string representing the union’s current tag state.
 
View on GitHub
        DBFILESFileLockContent Class Reference