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.

Instance fields

Constructors

  • 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.