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

box / box-java-sdk-gen / #295

24 Jun 2025 01:20PM UTC coverage: 35.661% (+0.03%) from 35.632%
#295

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

68 of 82 new or added lines in 2 files covered. (82.93%)

11794 existing lines in 627 files now uncovered.

16937 of 47495 relevant lines covered (35.66%)

0.36 hits per line

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

3.94
/src/main/java/com/box/sdkgen/schemas/folder/Folder.java
1
package com.box.sdkgen.schemas.folder;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.folderbase.FolderBaseTypeField;
6
import com.box.sdkgen.schemas.foldermini.FolderMini;
7
import com.box.sdkgen.schemas.items.Items;
8
import com.box.sdkgen.schemas.usermini.UserMini;
9
import com.box.sdkgen.serialization.json.EnumWrapper;
10
import com.fasterxml.jackson.annotation.JsonFilter;
11
import com.fasterxml.jackson.annotation.JsonProperty;
12
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
13
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
14
import java.util.Date;
15
import java.util.Objects;
16

17
@JsonFilter("nullablePropertyFilter")
18
public class Folder extends FolderMini {
19

20
  @JsonProperty("created_at")
21
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
22
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
23
  @Nullable
24
  protected Date createdAt;
25

26
  @JsonProperty("modified_at")
27
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
28
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
29
  @Nullable
30
  protected Date modifiedAt;
31

32
  protected String description;
33

34
  protected Long size;
35

36
  @JsonProperty("path_collection")
37
  protected FolderPathCollectionField pathCollection;
38

39
  @JsonProperty("created_by")
40
  protected UserMini createdBy;
41

42
  @JsonProperty("modified_by")
43
  protected UserMini modifiedBy;
44

45
  @JsonProperty("trashed_at")
46
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
47
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
48
  @Nullable
49
  protected Date trashedAt;
50

51
  @JsonProperty("purged_at")
52
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
53
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
54
  @Nullable
55
  protected Date purgedAt;
56

57
  @JsonProperty("content_created_at")
58
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
59
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
60
  @Nullable
61
  protected Date contentCreatedAt;
62

63
  @JsonProperty("content_modified_at")
64
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
65
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
66
  @Nullable
67
  protected Date contentModifiedAt;
68

69
  @JsonProperty("owned_by")
70
  protected UserMini ownedBy;
71

72
  @JsonProperty("shared_link")
73
  @Nullable
74
  protected FolderSharedLinkField sharedLink;
75

76
  @JsonProperty("folder_upload_email")
77
  @Nullable
78
  protected FolderFolderUploadEmailField folderUploadEmail;
79

80
  @Nullable protected FolderMini parent;
81

82
  @JsonDeserialize(using = FolderItemStatusField.FolderItemStatusFieldDeserializer.class)
83
  @JsonSerialize(using = FolderItemStatusField.FolderItemStatusFieldSerializer.class)
84
  @JsonProperty("item_status")
85
  protected EnumWrapper<FolderItemStatusField> itemStatus;
86

87
  @JsonProperty("item_collection")
88
  protected Items itemCollection;
89

90
  public Folder(@JsonProperty("id") String id) {
91
    super(id);
1✔
92
  }
1✔
93

94
  protected Folder(Builder builder) {
95
    super(builder);
×
96
    this.createdAt = builder.createdAt;
×
97
    this.modifiedAt = builder.modifiedAt;
×
98
    this.description = builder.description;
×
99
    this.size = builder.size;
×
100
    this.pathCollection = builder.pathCollection;
×
101
    this.createdBy = builder.createdBy;
×
102
    this.modifiedBy = builder.modifiedBy;
×
UNCOV
103
    this.trashedAt = builder.trashedAt;
×
UNCOV
104
    this.purgedAt = builder.purgedAt;
×
105
    this.contentCreatedAt = builder.contentCreatedAt;
×
UNCOV
106
    this.contentModifiedAt = builder.contentModifiedAt;
×
UNCOV
107
    this.ownedBy = builder.ownedBy;
×
UNCOV
108
    this.sharedLink = builder.sharedLink;
×
109
    this.folderUploadEmail = builder.folderUploadEmail;
×
UNCOV
110
    this.parent = builder.parent;
×
UNCOV
111
    this.itemStatus = builder.itemStatus;
×
UNCOV
112
    this.itemCollection = builder.itemCollection;
×
UNCOV
113
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
114
  }
×
115

116
  public Date getCreatedAt() {
117
    return createdAt;
×
118
  }
119

120
  public Date getModifiedAt() {
121
    return modifiedAt;
×
122
  }
123

124
  public String getDescription() {
125
    return description;
1✔
126
  }
127

128
  public Long getSize() {
129
    return size;
×
130
  }
131

132
  public FolderPathCollectionField getPathCollection() {
133
    return pathCollection;
×
134
  }
135

136
  public UserMini getCreatedBy() {
137
    return createdBy;
×
138
  }
139

140
  public UserMini getModifiedBy() {
141
    return modifiedBy;
×
142
  }
143

144
  public Date getTrashedAt() {
145
    return trashedAt;
×
146
  }
147

148
  public Date getPurgedAt() {
149
    return purgedAt;
×
150
  }
151

152
  public Date getContentCreatedAt() {
UNCOV
153
    return contentCreatedAt;
×
154
  }
155

156
  public Date getContentModifiedAt() {
157
    return contentModifiedAt;
×
158
  }
159

160
  public UserMini getOwnedBy() {
UNCOV
161
    return ownedBy;
×
162
  }
163

164
  public FolderSharedLinkField getSharedLink() {
165
    return sharedLink;
1✔
166
  }
167

168
  public FolderFolderUploadEmailField getFolderUploadEmail() {
169
    return folderUploadEmail;
×
170
  }
171

172
  public FolderMini getParent() {
173
    return parent;
1✔
174
  }
175

176
  public EnumWrapper<FolderItemStatusField> getItemStatus() {
177
    return itemStatus;
×
178
  }
179

180
  public Items getItemCollection() {
181
    return itemCollection;
×
182
  }
183

184
  @Override
185
  public boolean equals(Object o) {
186
    if (this == o) {
×
187
      return true;
×
188
    }
189
    if (o == null || getClass() != o.getClass()) {
×
190
      return false;
×
191
    }
192
    Folder casted = (Folder) o;
×
193
    return Objects.equals(id, casted.id)
×
194
        && Objects.equals(etag, casted.etag)
×
195
        && Objects.equals(type, casted.type)
×
196
        && Objects.equals(sequenceId, casted.sequenceId)
×
197
        && Objects.equals(name, casted.name)
×
198
        && Objects.equals(createdAt, casted.createdAt)
×
199
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
200
        && Objects.equals(description, casted.description)
×
201
        && Objects.equals(size, casted.size)
×
202
        && Objects.equals(pathCollection, casted.pathCollection)
×
UNCOV
203
        && Objects.equals(createdBy, casted.createdBy)
×
UNCOV
204
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
UNCOV
205
        && Objects.equals(trashedAt, casted.trashedAt)
×
UNCOV
206
        && Objects.equals(purgedAt, casted.purgedAt)
×
207
        && Objects.equals(contentCreatedAt, casted.contentCreatedAt)
×
UNCOV
208
        && Objects.equals(contentModifiedAt, casted.contentModifiedAt)
×
UNCOV
209
        && Objects.equals(ownedBy, casted.ownedBy)
×
UNCOV
210
        && Objects.equals(sharedLink, casted.sharedLink)
×
UNCOV
211
        && Objects.equals(folderUploadEmail, casted.folderUploadEmail)
×
UNCOV
212
        && Objects.equals(parent, casted.parent)
×
UNCOV
213
        && Objects.equals(itemStatus, casted.itemStatus)
×
UNCOV
214
        && Objects.equals(itemCollection, casted.itemCollection);
×
215
  }
216

217
  @Override
218
  public int hashCode() {
UNCOV
219
    return Objects.hash(
×
220
        id,
221
        etag,
222
        type,
223
        sequenceId,
224
        name,
225
        createdAt,
226
        modifiedAt,
227
        description,
228
        size,
229
        pathCollection,
230
        createdBy,
231
        modifiedBy,
232
        trashedAt,
233
        purgedAt,
234
        contentCreatedAt,
235
        contentModifiedAt,
236
        ownedBy,
237
        sharedLink,
238
        folderUploadEmail,
239
        parent,
240
        itemStatus,
241
        itemCollection);
242
  }
243

244
  @Override
245
  public String toString() {
UNCOV
246
    return "Folder{"
×
247
        + "id='"
248
        + id
249
        + '\''
250
        + ", "
251
        + "etag='"
252
        + etag
253
        + '\''
254
        + ", "
255
        + "type='"
256
        + type
257
        + '\''
258
        + ", "
259
        + "sequenceId='"
260
        + sequenceId
261
        + '\''
262
        + ", "
263
        + "name='"
264
        + name
265
        + '\''
266
        + ", "
267
        + "createdAt='"
268
        + createdAt
269
        + '\''
270
        + ", "
271
        + "modifiedAt='"
272
        + modifiedAt
273
        + '\''
274
        + ", "
275
        + "description='"
276
        + description
277
        + '\''
278
        + ", "
279
        + "size='"
280
        + size
281
        + '\''
282
        + ", "
283
        + "pathCollection='"
284
        + pathCollection
285
        + '\''
286
        + ", "
287
        + "createdBy='"
288
        + createdBy
289
        + '\''
290
        + ", "
291
        + "modifiedBy='"
292
        + modifiedBy
293
        + '\''
294
        + ", "
295
        + "trashedAt='"
296
        + trashedAt
297
        + '\''
298
        + ", "
299
        + "purgedAt='"
300
        + purgedAt
301
        + '\''
302
        + ", "
303
        + "contentCreatedAt='"
304
        + contentCreatedAt
305
        + '\''
306
        + ", "
307
        + "contentModifiedAt='"
308
        + contentModifiedAt
309
        + '\''
310
        + ", "
311
        + "ownedBy='"
312
        + ownedBy
313
        + '\''
314
        + ", "
315
        + "sharedLink='"
316
        + sharedLink
317
        + '\''
318
        + ", "
319
        + "folderUploadEmail='"
320
        + folderUploadEmail
321
        + '\''
322
        + ", "
323
        + "parent='"
324
        + parent
325
        + '\''
326
        + ", "
327
        + "itemStatus='"
328
        + itemStatus
329
        + '\''
330
        + ", "
331
        + "itemCollection='"
332
        + itemCollection
333
        + '\''
334
        + "}";
335
  }
336

337
  public static class Builder extends FolderMini.Builder {
338

339
    protected Date createdAt;
340

341
    protected Date modifiedAt;
342

343
    protected String description;
344

345
    protected Long size;
346

347
    protected FolderPathCollectionField pathCollection;
348

349
    protected UserMini createdBy;
350

351
    protected UserMini modifiedBy;
352

353
    protected Date trashedAt;
354

355
    protected Date purgedAt;
356

357
    protected Date contentCreatedAt;
358

359
    protected Date contentModifiedAt;
360

361
    protected UserMini ownedBy;
362

363
    protected FolderSharedLinkField sharedLink;
364

365
    protected FolderFolderUploadEmailField folderUploadEmail;
366

367
    protected FolderMini parent;
368

369
    protected EnumWrapper<FolderItemStatusField> itemStatus;
370

371
    protected Items itemCollection;
372

373
    public Builder(String id) {
UNCOV
374
      super(id);
×
UNCOV
375
    }
×
376

377
    public Builder createdAt(Date createdAt) {
UNCOV
378
      this.createdAt = createdAt;
×
UNCOV
379
      this.markNullableFieldAsSet("created_at");
×
UNCOV
380
      return this;
×
381
    }
382

383
    public Builder modifiedAt(Date modifiedAt) {
UNCOV
384
      this.modifiedAt = modifiedAt;
×
UNCOV
385
      this.markNullableFieldAsSet("modified_at");
×
386
      return this;
×
387
    }
388

389
    public Builder description(String description) {
UNCOV
390
      this.description = description;
×
391
      return this;
×
392
    }
393

394
    public Builder size(Long size) {
UNCOV
395
      this.size = size;
×
396
      return this;
×
397
    }
398

399
    public Builder pathCollection(FolderPathCollectionField pathCollection) {
UNCOV
400
      this.pathCollection = pathCollection;
×
401
      return this;
×
402
    }
403

404
    public Builder createdBy(UserMini createdBy) {
UNCOV
405
      this.createdBy = createdBy;
×
406
      return this;
×
407
    }
408

409
    public Builder modifiedBy(UserMini modifiedBy) {
UNCOV
410
      this.modifiedBy = modifiedBy;
×
411
      return this;
×
412
    }
413

414
    public Builder trashedAt(Date trashedAt) {
UNCOV
415
      this.trashedAt = trashedAt;
×
416
      this.markNullableFieldAsSet("trashed_at");
×
417
      return this;
×
418
    }
419

420
    public Builder purgedAt(Date purgedAt) {
421
      this.purgedAt = purgedAt;
×
422
      this.markNullableFieldAsSet("purged_at");
×
UNCOV
423
      return this;
×
424
    }
425

426
    public Builder contentCreatedAt(Date contentCreatedAt) {
427
      this.contentCreatedAt = contentCreatedAt;
×
UNCOV
428
      this.markNullableFieldAsSet("content_created_at");
×
UNCOV
429
      return this;
×
430
    }
431

432
    public Builder contentModifiedAt(Date contentModifiedAt) {
UNCOV
433
      this.contentModifiedAt = contentModifiedAt;
×
UNCOV
434
      this.markNullableFieldAsSet("content_modified_at");
×
UNCOV
435
      return this;
×
436
    }
437

438
    public Builder ownedBy(UserMini ownedBy) {
UNCOV
439
      this.ownedBy = ownedBy;
×
UNCOV
440
      return this;
×
441
    }
442

443
    public Builder sharedLink(FolderSharedLinkField sharedLink) {
UNCOV
444
      this.sharedLink = sharedLink;
×
UNCOV
445
      this.markNullableFieldAsSet("shared_link");
×
446
      return this;
×
447
    }
448

449
    public Builder folderUploadEmail(FolderFolderUploadEmailField folderUploadEmail) {
UNCOV
450
      this.folderUploadEmail = folderUploadEmail;
×
451
      this.markNullableFieldAsSet("folder_upload_email");
×
452
      return this;
×
453
    }
454

455
    public Builder parent(FolderMini parent) {
UNCOV
456
      this.parent = parent;
×
457
      this.markNullableFieldAsSet("parent");
×
458
      return this;
×
459
    }
460

461
    public Builder itemStatus(FolderItemStatusField itemStatus) {
UNCOV
462
      this.itemStatus = new EnumWrapper<FolderItemStatusField>(itemStatus);
×
463
      return this;
×
464
    }
465

466
    public Builder itemStatus(EnumWrapper<FolderItemStatusField> itemStatus) {
UNCOV
467
      this.itemStatus = itemStatus;
×
UNCOV
468
      return this;
×
469
    }
470

471
    public Builder itemCollection(Items itemCollection) {
UNCOV
472
      this.itemCollection = itemCollection;
×
UNCOV
473
      return this;
×
474
    }
475

476
    @Override
477
    public Builder etag(String etag) {
UNCOV
478
      this.etag = etag;
×
UNCOV
479
      this.markNullableFieldAsSet("etag");
×
UNCOV
480
      return this;
×
481
    }
482

483
    @Override
484
    public Builder type(FolderBaseTypeField type) {
UNCOV
485
      this.type = new EnumWrapper<FolderBaseTypeField>(type);
×
486
      return this;
×
487
    }
488

489
    @Override
490
    public Builder type(EnumWrapper<FolderBaseTypeField> type) {
UNCOV
491
      this.type = type;
×
UNCOV
492
      return this;
×
493
    }
494

495
    @Override
496
    public Builder sequenceId(String sequenceId) {
UNCOV
497
      this.sequenceId = sequenceId;
×
UNCOV
498
      return this;
×
499
    }
500

501
    @Override
502
    public Builder name(String name) {
UNCOV
503
      this.name = name;
×
UNCOV
504
      return this;
×
505
    }
506

507
    public Folder build() {
UNCOV
508
      return new Folder(this);
×
509
    }
510
  }
511
}
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