• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

45.21
/src/main/java/com/box/sdkgen/managers/folders/UpdateFolderByIdRequestBody.java
1
package com.box.sdkgen.managers.folders;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.internal.NullableFieldTracker;
5
import com.box.sdkgen.internal.SerializableObject;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.util.List;
12
import java.util.Objects;
13

14
@JsonFilter("nullablePropertyFilter")
15
public class UpdateFolderByIdRequestBody extends SerializableObject {
16

17
  /**
18
   * The optional new name for this folder.
19
   *
20
   * <p>The following restrictions to folder names apply: names containing non-printable ASCII
21
   * characters, forward and backward slashes (`/`, `\`), names with trailing spaces, and names `.`
22
   * and `..` are not allowed.
23
   *
24
   * <p>Folder names must be unique within their parent folder. The name check is case-insensitive,
25
   * so a folder named `New Folder` cannot be created in a parent folder that already contains a
26
   * folder named `new folder`.
27
   */
28
  protected String name;
29

30
  /** The optional description of this folder. */
31
  protected String description;
32

33
  /**
34
   * Specifies whether a folder should be synced to a user's device or not. This is used by Box Sync
35
   * (discontinued) and is not used by Box Drive.
36
   */
37
  @JsonDeserialize(
38
      using =
39
          UpdateFolderByIdRequestBodySyncStateField
40
              .UpdateFolderByIdRequestBodySyncStateFieldDeserializer.class)
41
  @JsonSerialize(
42
      using =
43
          UpdateFolderByIdRequestBodySyncStateField
44
              .UpdateFolderByIdRequestBodySyncStateFieldSerializer.class)
45
  @JsonProperty("sync_state")
46
  protected EnumWrapper<UpdateFolderByIdRequestBodySyncStateField> syncState;
47

48
  /**
49
   * Specifies if users who are not the owner of the folder can invite new collaborators to the
50
   * folder.
51
   */
52
  @JsonProperty("can_non_owners_invite")
53
  protected Boolean canNonOwnersInvite;
54

55
  protected UpdateFolderByIdRequestBodyParentField parent;
56

57
  @JsonProperty("shared_link")
58
  protected UpdateFolderByIdRequestBodySharedLinkField sharedLink;
59

60
  @JsonProperty("folder_upload_email")
61
  @Nullable
62
  protected UpdateFolderByIdRequestBodyFolderUploadEmailField folderUploadEmail;
63

64
  /**
65
   * The tags for this item. These tags are shown in the Box web app and mobile apps next to an
66
   * item.
67
   *
68
   * <p>To add or remove a tag, retrieve the item's current tags, modify them, and then update this
69
   * field.
70
   *
71
   * <p>There is a limit of 100 tags per item, and 10,000 unique tags per enterprise.
72
   */
73
  protected List<String> tags;
74

75
  /**
76
   * Specifies if new invites to this folder are restricted to users within the enterprise. This
77
   * does not affect existing collaborations.
78
   */
79
  @JsonProperty("is_collaboration_restricted_to_enterprise")
80
  protected Boolean isCollaborationRestrictedToEnterprise;
81

82
  /**
83
   * An array of collections to make this folder a member of. Currently we only support the
84
   * `favorites` collection.
85
   *
86
   * <p>To get the ID for a collection, use the [List all collections][1] endpoint.
87
   *
88
   * <p>Passing an empty array `[]` or `null` will remove the folder from all collections.
89
   *
90
   * <p>[1]: e://get-collections
91
   */
92
  @Nullable protected List<UpdateFolderByIdRequestBodyCollectionsField> collections;
93

94
  /**
95
   * Restricts collaborators who are not the owner of this folder from viewing other collaborations
96
   * on this folder.
97
   *
98
   * <p>It also restricts non-owners from inviting new collaborators.
99
   *
100
   * <p>When setting this field to `false`, it is required to also set
101
   * `can_non_owners_invite_collaborators` to `false` if it has not already been set.
102
   */
103
  @JsonProperty("can_non_owners_view_collaborators")
104
  protected Boolean canNonOwnersViewCollaborators;
105

106
  public UpdateFolderByIdRequestBody() {
107
    super();
×
108
  }
×
109

110
  protected UpdateFolderByIdRequestBody(Builder builder) {
111
    super();
1✔
112
    this.name = builder.name;
1✔
113
    this.description = builder.description;
1✔
114
    this.syncState = builder.syncState;
1✔
115
    this.canNonOwnersInvite = builder.canNonOwnersInvite;
1✔
116
    this.parent = builder.parent;
1✔
117
    this.sharedLink = builder.sharedLink;
1✔
118
    this.folderUploadEmail = builder.folderUploadEmail;
1✔
119
    this.tags = builder.tags;
1✔
120
    this.isCollaborationRestrictedToEnterprise = builder.isCollaborationRestrictedToEnterprise;
1✔
121
    this.collections = builder.collections;
1✔
122
    this.canNonOwnersViewCollaborators = builder.canNonOwnersViewCollaborators;
1✔
123
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
124
  }
1✔
125

126
  public String getName() {
127
    return name;
1✔
128
  }
129

130
  public String getDescription() {
131
    return description;
1✔
132
  }
133

134
  public EnumWrapper<UpdateFolderByIdRequestBodySyncStateField> getSyncState() {
135
    return syncState;
1✔
136
  }
137

138
  public Boolean getCanNonOwnersInvite() {
139
    return canNonOwnersInvite;
1✔
140
  }
141

142
  public UpdateFolderByIdRequestBodyParentField getParent() {
143
    return parent;
1✔
144
  }
145

146
  public UpdateFolderByIdRequestBodySharedLinkField getSharedLink() {
147
    return sharedLink;
1✔
148
  }
149

150
  public UpdateFolderByIdRequestBodyFolderUploadEmailField getFolderUploadEmail() {
151
    return folderUploadEmail;
1✔
152
  }
153

154
  public List<String> getTags() {
155
    return tags;
1✔
156
  }
157

158
  public Boolean getIsCollaborationRestrictedToEnterprise() {
159
    return isCollaborationRestrictedToEnterprise;
1✔
160
  }
161

162
  public List<UpdateFolderByIdRequestBodyCollectionsField> getCollections() {
163
    return collections;
1✔
164
  }
165

166
  public Boolean getCanNonOwnersViewCollaborators() {
167
    return canNonOwnersViewCollaborators;
1✔
168
  }
169

170
  @Override
171
  public boolean equals(Object o) {
172
    if (this == o) {
×
173
      return true;
×
174
    }
175
    if (o == null || getClass() != o.getClass()) {
×
176
      return false;
×
177
    }
178
    UpdateFolderByIdRequestBody casted = (UpdateFolderByIdRequestBody) o;
×
179
    return Objects.equals(name, casted.name)
×
180
        && Objects.equals(description, casted.description)
×
181
        && Objects.equals(syncState, casted.syncState)
×
182
        && Objects.equals(canNonOwnersInvite, casted.canNonOwnersInvite)
×
183
        && Objects.equals(parent, casted.parent)
×
184
        && Objects.equals(sharedLink, casted.sharedLink)
×
185
        && Objects.equals(folderUploadEmail, casted.folderUploadEmail)
×
186
        && Objects.equals(tags, casted.tags)
×
187
        && Objects.equals(
×
188
            isCollaborationRestrictedToEnterprise, casted.isCollaborationRestrictedToEnterprise)
189
        && Objects.equals(collections, casted.collections)
×
190
        && Objects.equals(canNonOwnersViewCollaborators, casted.canNonOwnersViewCollaborators);
×
191
  }
192

193
  @Override
194
  public int hashCode() {
195
    return Objects.hash(
×
196
        name,
197
        description,
198
        syncState,
199
        canNonOwnersInvite,
200
        parent,
201
        sharedLink,
202
        folderUploadEmail,
203
        tags,
204
        isCollaborationRestrictedToEnterprise,
205
        collections,
206
        canNonOwnersViewCollaborators);
207
  }
208

209
  @Override
210
  public String toString() {
211
    return "UpdateFolderByIdRequestBody{"
×
212
        + "name='"
213
        + name
214
        + '\''
215
        + ", "
216
        + "description='"
217
        + description
218
        + '\''
219
        + ", "
220
        + "syncState='"
221
        + syncState
222
        + '\''
223
        + ", "
224
        + "canNonOwnersInvite='"
225
        + canNonOwnersInvite
226
        + '\''
227
        + ", "
228
        + "parent='"
229
        + parent
230
        + '\''
231
        + ", "
232
        + "sharedLink='"
233
        + sharedLink
234
        + '\''
235
        + ", "
236
        + "folderUploadEmail='"
237
        + folderUploadEmail
238
        + '\''
239
        + ", "
240
        + "tags='"
241
        + tags
242
        + '\''
243
        + ", "
244
        + "isCollaborationRestrictedToEnterprise='"
245
        + isCollaborationRestrictedToEnterprise
246
        + '\''
247
        + ", "
248
        + "collections='"
249
        + collections
250
        + '\''
251
        + ", "
252
        + "canNonOwnersViewCollaborators='"
253
        + canNonOwnersViewCollaborators
254
        + '\''
255
        + "}";
256
  }
257

258
  public static class Builder extends NullableFieldTracker {
1✔
259

260
    protected String name;
261

262
    protected String description;
263

264
    protected EnumWrapper<UpdateFolderByIdRequestBodySyncStateField> syncState;
265

266
    protected Boolean canNonOwnersInvite;
267

268
    protected UpdateFolderByIdRequestBodyParentField parent;
269

270
    protected UpdateFolderByIdRequestBodySharedLinkField sharedLink;
271

272
    protected UpdateFolderByIdRequestBodyFolderUploadEmailField folderUploadEmail;
273

274
    protected List<String> tags;
275

276
    protected Boolean isCollaborationRestrictedToEnterprise;
277

278
    protected List<UpdateFolderByIdRequestBodyCollectionsField> collections;
279

280
    protected Boolean canNonOwnersViewCollaborators;
281

282
    public Builder name(String name) {
283
      this.name = name;
1✔
284
      return this;
1✔
285
    }
286

287
    public Builder description(String description) {
288
      this.description = description;
1✔
289
      return this;
1✔
290
    }
291

292
    public Builder syncState(UpdateFolderByIdRequestBodySyncStateField syncState) {
293
      this.syncState = new EnumWrapper<UpdateFolderByIdRequestBodySyncStateField>(syncState);
×
294
      return this;
×
295
    }
296

297
    public Builder syncState(EnumWrapper<UpdateFolderByIdRequestBodySyncStateField> syncState) {
298
      this.syncState = syncState;
×
299
      return this;
×
300
    }
301

302
    public Builder canNonOwnersInvite(Boolean canNonOwnersInvite) {
303
      this.canNonOwnersInvite = canNonOwnersInvite;
×
304
      return this;
×
305
    }
306

307
    public Builder parent(UpdateFolderByIdRequestBodyParentField parent) {
308
      this.parent = parent;
1✔
309
      return this;
1✔
310
    }
311

312
    public Builder sharedLink(UpdateFolderByIdRequestBodySharedLinkField sharedLink) {
313
      this.sharedLink = sharedLink;
×
314
      return this;
×
315
    }
316

317
    public Builder folderUploadEmail(
318
        UpdateFolderByIdRequestBodyFolderUploadEmailField folderUploadEmail) {
319
      this.folderUploadEmail = folderUploadEmail;
×
320
      this.markNullableFieldAsSet("folder_upload_email");
×
321
      return this;
×
322
    }
323

324
    public Builder tags(List<String> tags) {
325
      this.tags = tags;
×
326
      return this;
×
327
    }
328

329
    public Builder isCollaborationRestrictedToEnterprise(
330
        Boolean isCollaborationRestrictedToEnterprise) {
331
      this.isCollaborationRestrictedToEnterprise = isCollaborationRestrictedToEnterprise;
×
332
      return this;
×
333
    }
334

335
    public Builder collections(List<UpdateFolderByIdRequestBodyCollectionsField> collections) {
336
      this.collections = collections;
×
337
      this.markNullableFieldAsSet("collections");
×
338
      return this;
×
339
    }
340

341
    public Builder canNonOwnersViewCollaborators(Boolean canNonOwnersViewCollaborators) {
342
      this.canNonOwnersViewCollaborators = canNonOwnersViewCollaborators;
×
343
      return this;
×
344
    }
345

346
    public UpdateFolderByIdRequestBody build() {
347
      return new UpdateFolderByIdRequestBody(this);
1✔
348
    }
349
  }
350
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc