DBSHARINGLinkAudienceOption
Objective-C
@interface DBSHARINGLinkAudienceOption : NSObject <DBSerializable, NSCopying>
Swift
class DBSHARINGLinkAudienceOption : NSObject, DBSerializable, NSCopying
The LinkAudienceOption
struct.
This class implements the DBSerializable
protocol (serialize and
deserialize instance methods), which is required for all Obj-C SDK API route
objects.
-
Specifies who can access the link.
Declaration
Objective-C
@property (nonatomic, readonly) DBSHARINGLinkAudience *_Nonnull audience;
Swift
var audience: DBSHARINGLinkAudience { get }
-
Whether the user calling this API can select this audience option.
Declaration
Objective-C
@property (nonatomic, readonly) NSNumber *_Nonnull allowed;
Swift
var allowed: NSNumber { get }
-
If allowed is false, this will provide the reason that the user is not permitted to set the visibility to this policy.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) DBSHARINGLinkAudienceDisallowedReason *disallowedReason;
Swift
var disallowedReason: DBSHARINGLinkAudienceDisallowedReason? { get }
-
Full constructor for the struct (exposes all instance variables).
Declaration
Objective-C
- (nonnull instancetype) initWithAudience:(nonnull DBSHARINGLinkAudience *)audience allowed:(nonnull NSNumber *)allowed disallowedReason: (nullable DBSHARINGLinkAudienceDisallowedReason *)disallowedReason;
Swift
init(audience: DBSHARINGLinkAudience, allowed: NSNumber, disallowedReason: DBSHARINGLinkAudienceDisallowedReason?)
Parameters
audience
Specifies who can access the link.
allowed
Whether the user calling this API can select this audience option.
disallowedReason
If allowed is false, this will provide the reason that the user is not permitted to set the visibility to this policy.
Return Value
An initialized instance.
-
Convenience constructor (exposes only non-nullable instance variables with no default value).
Declaration
Objective-C
- (nonnull instancetype)initWithAudience: (nonnull DBSHARINGLinkAudience *)audience allowed:(nonnull NSNumber *)allowed;
Swift
init(audience: DBSHARINGLinkAudience, allowed: NSNumber)
Parameters
audience
Specifies who can access the link.
allowed
Whether the user calling this API can select this audience option.
Return Value
An initialized instance.