You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -91,19 +94,24 @@ public class RetentionPoliciesModule {
91
94
/// - dispositionAction: If updating a `finite` policy, the disposition action can be `permanently_delete` or `remove_retention`.
92
95
/// For indefinite policies, disposition action must be remove_retention.
93
96
/// - status: Used to `retire` a retention policy if status is set to `retired`. If not retiring a policy, do not include or set to null.
97
+
/// - setRetentionTypeToNonModifiable: If value is `false` retention type is not changed. If value is true retention type is changed to `non_modifiable`.
94
98
/// - completion: Returns either updated retention policy object or an error.
Copy file name to clipboardExpand all lines: Sources/Responses/RetentionPolicy.swift
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,9 @@ public enum RetentionPolicyType: BoxEnum {
17
17
/// Custom value not yet implemented in this SDK version.
18
18
case customValue(String)
19
19
20
+
/// Creates a new value
21
+
///
22
+
/// - Parameter value: String representation of a RetentionPolicyType rawValue
20
23
publicinit(_ value:String){
21
24
switch value {
22
25
case"finite":
@@ -28,6 +31,7 @@ public enum RetentionPolicyType: BoxEnum {
28
31
}
29
32
}
30
33
34
+
/// Returns string representation of RetentionPolicyType
31
35
publicvardescription:String{
32
36
switchself{
33
37
case.finite:
@@ -105,6 +109,45 @@ public enum RetentionPolicyStatus: BoxEnum {
105
109
}
106
110
}
107
111
112
+
/// Specifies the retention type
113
+
publicenumRetentionType:BoxEnum{
114
+
/// You can modify the retention policy. For example, you can add or remove folders, shorten or lengthen the policy duration, or delete the assignment.
115
+
/// Use this type if your retention policy is not related to any regulatory purposes.
116
+
case modifiable
117
+
/// You can modify the retention policy only in a limited way: add a folder, lengthen the duration, retire the policy, change the disposition action or notification settings.
118
+
/// You cannot perform other actions, such as deleting the assignment or shortening the policy duration.
119
+
/// Use this type to ensure compliance with regulatory retention policies.
120
+
case nonModifiable
121
+
/// Custom value that was not yet implemented in current SDK version.
122
+
case customValue(String)
123
+
124
+
/// Creates a new value
125
+
///
126
+
/// - Parameter value: String representation of a RetentionType rawValue
127
+
publicinit(_ value:String){
128
+
switch value {
129
+
case"modifiable":
130
+
self=.modifiable
131
+
case"non_modifiable":
132
+
self=.nonModifiable
133
+
default:
134
+
self=.customValue(value)
135
+
}
136
+
}
137
+
138
+
/// Returns string representation of RetentionType
139
+
publicvardescription:String{
140
+
switchself{
141
+
case.modifiable:
142
+
return"modifiable"
143
+
case.nonModifiable:
144
+
return"non_modifiable"
145
+
caselet.customValue(value):
146
+
return value
147
+
}
148
+
}
149
+
}
150
+
108
151
/// A retention policy blocks permanent deletion of content for a specified amount of time.
109
152
publicclassRetentionPolicy:BoxModel{
110
153
@@ -139,6 +182,8 @@ public class RetentionPolicy: BoxModel {
139
182
publicletareOwnersNotified:Bool?
140
183
/// Other users notified about retention policy changes.
141
184
publicletcustomNotificationRecipients:[User]?
185
+
/// Specifies the retention type which can be `modifiable` or `non-modifiable`
186
+
publicletretentionType:RetentionType?
142
187
143
188
publicrequiredinit(json:[String:Any])throws{
144
189
guardlet itemType =json["type"]as?Stringelse{
@@ -164,5 +209,6 @@ public class RetentionPolicy: BoxModel {
0 commit comments