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.
-
This is the value to submit when saving the visibility setting.
Declaration
Objective-C
@property (nonatomic, readonly) DBSHARINGRequestedVisibility *_Nonnull policy;
Swift
var policy: DBSHARINGRequestedVisibility { get }
-
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.
Declaration
Objective-C
@property (nonatomic, readonly) DBSHARINGAlphaResolvedVisibility *_Nonnull resolvedPolicy;
Swift
var resolvedPolicy: DBSHARINGAlphaResolvedVisibility { get }
-
Whether the user is permitted to set the visibility to this policy.
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) DBSHARINGVisibilityPolicyDisallowedReason *disallowedReason;
Swift
var disallowedReason: DBSHARINGVisibilityPolicyDisallowedReason? { get }
-
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.