DBSHARINGLinkExpiry
Objective-C
@interface DBSHARINGLinkExpiry : NSObject <DBSerializable, NSCopying>
                Swift
class DBSHARINGLinkExpiry : NSObject, DBSerializable, NSCopying
                The LinkExpiry 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) DBSHARINGLinkExpiryTag tag;Swift
var tag: DBSHARINGLinkExpiryTag { get } - 
                  
                  
Set a new expiry or change an existing expiry. - note: Ensure the
isSetExpirymethod returns true before accessing, otherwise a runtime exception will be raised.Declaration
Objective-C
@property (nonatomic, readonly) NSDate *_Nonnull setExpiry;Swift
var setExpiry: Date { get } 
- 
                  
                  
Initializes union class with tag state of “remove_expiry”.
Description of the “remove_expiry” tag state: Remove the currently set expiry for the link.
Declaration
Objective-C
- (nonnull instancetype)initWithRemoveExpiry;Swift
init(removeExpiry: ())Return Value
An initialized instance.
 - 
                  
                  
Initializes union class with tag state of “set_expiry”.
Description of the “set_expiry” tag state: Set a new expiry or change an existing expiry.
Declaration
Objective-C
- (nonnull instancetype)initWithSetExpiry:(nonnull NSDate *)setExpiry;Swift
init(setExpiry: Date)Parameters
setExpirySet a new expiry or change an existing expiry.
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 “remove_expiry”.
Declaration
Objective-C
- (BOOL)isRemoveExpiry;Swift
func isRemove() -> BoolReturn Value
Whether the union’s current tag state has value “remove_expiry”.
 - 
                  
                  
Retrieves whether the union’s current tag state has value “set_expiry”.
Note
Call this method and ensure it returns true before accessing the
setExpiryproperty, otherwise a runtime exception will be thrown.Declaration
Objective-C
- (BOOL)isSetExpiry;Swift
func isSetExpiry() -> BoolReturn Value
Whether the union’s current tag state has value “set_expiry”.
 - 
                  
                  
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
        DBSHARINGLinkExpiry Class Reference