DBSHARINGFolderPermission
Objective-C
@interface DBSHARINGFolderPermission : NSObject <DBSerializable, NSCopying>
Swift
class DBSHARINGFolderPermission : NSObject, DBSerializable, NSCopying
The FolderPermission
struct.
Whether the user is allowed to take the action on the shared folder.
This class implements the DBSerializable
protocol (serialize and
deserialize instance methods), which is required for all Obj-C SDK API route
objects.
-
The action that the user may wish to take on the folder.
Declaration
Objective-C
@property (nonatomic, readonly) DBSHARINGFolderAction *_Nonnull action;
Swift
var action: DBSHARINGFolderAction { get }
-
True if the user is allowed to take the action.
Declaration
Objective-C
@property (nonatomic, readonly) NSNumber *_Nonnull allow;
Swift
var allow: NSNumber { get }
-
The reason why the user is denied the permission. Not present if the action is allowed, or if no reason is available.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) DBSHARINGPermissionDeniedReason *reason;
Swift
var reason: DBSHARINGPermissionDeniedReason? { get }
-
Full constructor for the struct (exposes all instance variables).
Declaration
Objective-C
- (nonnull instancetype) initWithAction:(nonnull DBSHARINGFolderAction *)action allow:(nonnull NSNumber *)allow reason:(nullable DBSHARINGPermissionDeniedReason *)reason;
Swift
init(action: DBSHARINGFolderAction, allow: NSNumber, reason: DBSHARINGPermissionDeniedReason?)
Parameters
action
The action that the user may wish to take on the folder.
allow
True if the user is allowed to take the action.
reason
The reason why the user is denied the permission. Not present if the action is allowed, or if no reason is available.
Return Value
An initialized instance.
-
Convenience constructor (exposes only non-nullable instance variables with no default value).
Declaration
Objective-C
- (nonnull instancetype)initWithAction:(nonnull DBSHARINGFolderAction *)action allow:(nonnull NSNumber *)allow;
Swift
init(action: DBSHARINGFolderAction, allow: NSNumber)
Parameters
action
The action that the user may wish to take on the folder.
allow
True if the user is allowed to take the action.
Return Value
An initialized instance.