Skip to content

Commit f9e3d5e

Browse files
fix: Correct enum value for legal hold policy changes (box/box-openapi#581) (#1695)
1 parent 9327feb commit f9e3d5e

File tree

6 files changed

+51
-9
lines changed

6 files changed

+51
-9
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "3e11b6f", "specHash": "ad08e8c", "version": "10.4.0" }
1+
{ "engineHash": "f9e2519", "specHash": "f8fb08c", "version": "10.4.0" }

docs/legalholdpolicyassignments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Returns a list of legal hold policy assignments.
3838

3939
## Assign legal hold policy
4040

41-
Assign a legal hold to a file, file version, folder, or user.
41+
Assign a legal hold to an item type of: file, file version, folder, user, ownership, or interactions.
4242

4343
This operation is performed by calling function `createLegalHoldPolicyAssignment`.
4444

src/main/java/com/box/sdkgen/managers/legalholdpolicyassignments/CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public enum CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField implemen
1717
FOLDER("folder"),
1818
USER("user"),
1919
OWNERSHIP("ownership"),
20-
INTERACTION("interaction");
20+
INTERACTIONS("interactions");
2121

2222
private final String value;
2323

src/main/java/com/box/sdkgen/managers/legalholdpolicyassignments/LegalHoldPolicyAssignmentsManager.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public LegalHoldPolicyAssignments getLegalHoldPolicyAssignments(
8181
}
8282

8383
/**
84-
* Assign a legal hold to a file, file version, folder, or user.
84+
* Assign a legal hold to an item type of: file, file version, folder, user, ownership, or
85+
* interactions.
8586
*
8687
* @param requestBody Request body of createLegalHoldPolicyAssignment method
8788
*/
@@ -92,7 +93,8 @@ public LegalHoldPolicyAssignment createLegalHoldPolicyAssignment(
9293
}
9394

9495
/**
95-
* Assign a legal hold to a file, file version, folder, or user.
96+
* Assign a legal hold to an item type of: file, file version, folder, user, ownership, or
97+
* interactions.
9698
*
9799
* @param requestBody Request body of createLegalHoldPolicyAssignment method
98100
* @param headers Headers of createLegalHoldPolicyAssignment method

src/main/java/com/box/sdkgen/schemas/legalholdpolicy/LegalHoldPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class LegalHoldPolicy extends LegalHoldPolicyMini {
3535
@JsonSerialize(using = LegalHoldPolicyStatusField.LegalHoldPolicyStatusFieldSerializer.class)
3636
protected EnumWrapper<LegalHoldPolicyStatusField> status;
3737

38-
/** Counts of assignments within this a legal hold policy by item type. */
38+
/** Counts of assignments within a legal hold policy by item type. */
3939
@JsonProperty("assignment_counts")
4040
protected LegalHoldPolicyAssignmentCountsField assignmentCounts;
4141

src/main/java/com/box/sdkgen/schemas/legalholdpolicy/LegalHoldPolicyAssignmentCountsField.java

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@JsonFilter("nullablePropertyFilter")
1010
public class LegalHoldPolicyAssignmentCountsField extends SerializableObject {
1111

12-
/** The number of users this policy is applied to. */
12+
/** The number of users this policy is applied to with the `access` type assignment. */
1313
protected Long user;
1414

1515
/** The number of folders this policy is applied to. */
@@ -22,6 +22,12 @@ public class LegalHoldPolicyAssignmentCountsField extends SerializableObject {
2222
@JsonProperty("file_version")
2323
protected Long fileVersion;
2424

25+
/** The number of users this policy is applied to with the `ownership` type assignment. */
26+
protected Long ownership;
27+
28+
/** The number of users this policy is applied to with the `interactions` type assignment. */
29+
protected Long interactions;
30+
2531
public LegalHoldPolicyAssignmentCountsField() {
2632
super();
2733
}
@@ -32,6 +38,8 @@ protected LegalHoldPolicyAssignmentCountsField(Builder builder) {
3238
this.folder = builder.folder;
3339
this.file = builder.file;
3440
this.fileVersion = builder.fileVersion;
41+
this.ownership = builder.ownership;
42+
this.interactions = builder.interactions;
3543
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
3644
}
3745

@@ -51,6 +59,14 @@ public Long getFileVersion() {
5159
return fileVersion;
5260
}
5361

62+
public Long getOwnership() {
63+
return ownership;
64+
}
65+
66+
public Long getInteractions() {
67+
return interactions;
68+
}
69+
5470
@Override
5571
public boolean equals(Object o) {
5672
if (this == o) {
@@ -63,12 +79,14 @@ public boolean equals(Object o) {
6379
return Objects.equals(user, casted.user)
6480
&& Objects.equals(folder, casted.folder)
6581
&& Objects.equals(file, casted.file)
66-
&& Objects.equals(fileVersion, casted.fileVersion);
82+
&& Objects.equals(fileVersion, casted.fileVersion)
83+
&& Objects.equals(ownership, casted.ownership)
84+
&& Objects.equals(interactions, casted.interactions);
6785
}
6886

6987
@Override
7088
public int hashCode() {
71-
return Objects.hash(user, folder, file, fileVersion);
89+
return Objects.hash(user, folder, file, fileVersion, ownership, interactions);
7290
}
7391

7492
@Override
@@ -89,6 +107,14 @@ public String toString() {
89107
+ "fileVersion='"
90108
+ fileVersion
91109
+ '\''
110+
+ ", "
111+
+ "ownership='"
112+
+ ownership
113+
+ '\''
114+
+ ", "
115+
+ "interactions='"
116+
+ interactions
117+
+ '\''
92118
+ "}";
93119
}
94120

@@ -102,6 +128,10 @@ public static class Builder extends NullableFieldTracker {
102128

103129
protected Long fileVersion;
104130

131+
protected Long ownership;
132+
133+
protected Long interactions;
134+
105135
public Builder user(Long user) {
106136
this.user = user;
107137
return this;
@@ -122,6 +152,16 @@ public Builder fileVersion(Long fileVersion) {
122152
return this;
123153
}
124154

155+
public Builder ownership(Long ownership) {
156+
this.ownership = ownership;
157+
return this;
158+
}
159+
160+
public Builder interactions(Long interactions) {
161+
this.interactions = interactions;
162+
return this;
163+
}
164+
125165
public LegalHoldPolicyAssignmentCountsField build() {
126166
return new LegalHoldPolicyAssignmentCountsField(this);
127167
}

0 commit comments

Comments
 (0)