-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add folder lock functionality (#725)
- Loading branch information
1 parent
895cc91
commit 6927cc8
Showing
12 changed files
with
303 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace Box.V2.Models | ||
{ | ||
/// <summary> | ||
/// Box representation of a folder lock in box | ||
/// </summary> | ||
public class BoxFolderLock : BoxEntity | ||
{ | ||
public const string FieldCreatedAt = "created_at"; | ||
public const string FieldCreatedBy = "created_by"; | ||
public const string FieldFolder = "folder"; | ||
public const string FieldLockType = "lock_type"; | ||
public const string FieldLockedOperations = "locked_operations"; | ||
|
||
/// <summary> | ||
/// The time the lock was created | ||
/// </summary> | ||
[JsonProperty(PropertyName = FieldCreatedAt)] | ||
public DateTime? CreatedAt { get; private set; } | ||
|
||
/// <summary> | ||
/// The user who created this lock | ||
/// </summary> | ||
[JsonProperty(PropertyName = FieldCreatedBy)] | ||
public BoxUser CreatedBy { get; private set; } | ||
|
||
/// <summary> | ||
/// The folder that the lock applies to | ||
/// </summary> | ||
[JsonProperty(PropertyName = FieldFolder)] | ||
public BoxFolder Folder { get; private set; } | ||
|
||
/// <summary> | ||
/// The lock type | ||
/// </summary> | ||
[JsonProperty(PropertyName = FieldLockType)] | ||
public string LockType { get; private set; } | ||
|
||
/// <summary> | ||
/// The operations locked by a folder lock | ||
/// </summary> | ||
[JsonProperty(PropertyName = FieldLockedOperations)] | ||
public BoxFolderLockOperations LockedOperations { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace Box.V2.Models | ||
{ | ||
/// <summary> | ||
/// Box representation of a operations that have been locked on a folder lock in box | ||
/// </summary> | ||
public class BoxFolderLockOperations | ||
{ | ||
public const string FieldDelete = "delete"; | ||
public const string FieldMove = "move"; | ||
|
||
/// <summary> | ||
/// Whether deleting the folder is restricted | ||
/// </summary> | ||
[JsonProperty(PropertyName = FieldDelete)] | ||
public bool Delete { get; private set; } | ||
|
||
/// <summary> | ||
/// Whether deleting the folder is restricted | ||
/// </summary> | ||
[JsonProperty(PropertyName = FieldMove)] | ||
public bool Move { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.