DBSHARINGVisibilityPolicy

Objective-C

@interface DBSHARINGVisibilityPolicy : NSObject <DBSerializable, NSCopying>

Swift

class DBSHARINGVisibilityPolicy : NSObject, DBSerializable, NSCopying

The VisibilityPolicy 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)
          initWithPolicy:(nonnull DBSHARINGRequestedVisibility *)policy
          resolvedPolicy:(nonnull DBSHARINGAlphaResolvedVisibility *)resolvedPolicy
                 allowed:(nonnull NSNumber *)allowed
        disallowedReason:
            (nullable DBSHARINGVisibilityPolicyDisallowedReason *)disallowedReason;

    Swift

    init(policy: DBSHARINGRequestedVisibility, resolvedPolicy: DBSHARINGAlphaResolvedVisibility, allowed: NSNumber, disallowedReason: DBSHARINGVisibilityPolicyDisallowedReason?)

    Parameters

    policy

    This is the value to submit when saving the visibility setting.

    resolvedPolicy

    This is what the effective policy would be, if you selected this option. The resolved policy is obtained after considering external effects such as shared folder settings and team policy. This value is guaranteed to be provided.

    allowed

    Whether the user is permitted to set the visibility to this policy.

    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)
        initWithPolicy:(nonnull DBSHARINGRequestedVisibility *)policy
        resolvedPolicy:(nonnull DBSHARINGAlphaResolvedVisibility *)resolvedPolicy
               allowed:(nonnull NSNumber *)allowed;

    Swift

    init(policy: DBSHARINGRequestedVisibility, resolvedPolicy: DBSHARINGAlphaResolvedVisibility, allowed: NSNumber)

    Parameters

    policy

    This is the value to submit when saving the visibility setting.

    resolvedPolicy

    This is what the effective policy would be, if you selected this option. The resolved policy is obtained after considering external effects such as shared folder settings and team policy. This value is guaranteed to be provided.

    allowed

    Whether the user is permitted to set the visibility to this policy.

    Return Value

    An initialized instance.