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

box / box-java-sdk-gen / #290

24 Jun 2025 01:20PM UTC coverage: 35.757% (+0.1%) from 35.632%
#290

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%)

11777 existing lines in 624 files now uncovered.

16984 of 47499 relevant lines covered (35.76%)

0.36 hits per line

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

9.76
/src/main/java/com/box/sdkgen/schemas/trashfilerestored/TrashFileRestored.java
1
package com.box.sdkgen.schemas.trashfilerestored;
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.internal.utils.DateTimeUtils;
7
import com.box.sdkgen.schemas.fileversionmini.FileVersionMini;
8
import com.box.sdkgen.schemas.foldermini.FolderMini;
9
import com.box.sdkgen.schemas.usermini.UserMini;
10
import com.box.sdkgen.serialization.json.EnumWrapper;
11
import com.fasterxml.jackson.annotation.JsonFilter;
12
import com.fasterxml.jackson.annotation.JsonProperty;
13
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
14
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
15
import java.util.Date;
16
import java.util.Objects;
17

18
@JsonFilter("nullablePropertyFilter")
19
public class TrashFileRestored extends SerializableObject {
20

21
  protected final String id;
22

23
  @Nullable protected String etag;
24

25
  @JsonDeserialize(using = TrashFileRestoredTypeField.TrashFileRestoredTypeFieldDeserializer.class)
26
  @JsonSerialize(using = TrashFileRestoredTypeField.TrashFileRestoredTypeFieldSerializer.class)
27
  protected EnumWrapper<TrashFileRestoredTypeField> type;
28

29
  @JsonProperty("sequence_id")
30
  protected final String sequenceId;
31

32
  protected String name;
33

34
  protected final String sha1;
35

36
  @JsonProperty("file_version")
37
  protected FileVersionMini fileVersion;
38

39
  protected final String description;
40

41
  protected final long size;
42

43
  @JsonProperty("path_collection")
44
  protected final TrashFileRestoredPathCollectionField pathCollection;
45

46
  @JsonProperty("created_at")
47
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
48
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
49
  protected final Date createdAt;
50

51
  @JsonProperty("modified_at")
52
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
53
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
54
  protected final Date modifiedAt;
55

56
  @JsonProperty("trashed_at")
57
  @Nullable
58
  protected String trashedAt;
59

60
  @JsonProperty("purged_at")
61
  @Nullable
62
  protected String purgedAt;
63

64
  @JsonProperty("content_created_at")
65
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
66
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
67
  @Nullable
68
  protected Date contentCreatedAt;
69

70
  @JsonProperty("content_modified_at")
71
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
72
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
73
  @Nullable
74
  protected Date contentModifiedAt;
75

76
  @JsonProperty("created_by")
77
  protected UserMini createdBy;
78

79
  @JsonProperty("modified_by")
80
  protected final UserMini modifiedBy;
81

82
  @JsonProperty("owned_by")
83
  protected final UserMini ownedBy;
84

85
  @JsonProperty("shared_link")
86
  @Nullable
87
  protected String sharedLink;
88

89
  protected FolderMini parent;
90

91
  @JsonDeserialize(
92
      using = TrashFileRestoredItemStatusField.TrashFileRestoredItemStatusFieldDeserializer.class)
93
  @JsonSerialize(
94
      using = TrashFileRestoredItemStatusField.TrashFileRestoredItemStatusFieldSerializer.class)
95
  @JsonProperty("item_status")
96
  protected final EnumWrapper<TrashFileRestoredItemStatusField> itemStatus;
97

98
  public TrashFileRestored(
99
      @JsonProperty("id") String id,
100
      @JsonProperty("sequence_id") String sequenceId,
101
      @JsonProperty("sha1") String sha1,
102
      @JsonProperty("description") String description,
103
      @JsonProperty("size") long size,
104
      @JsonProperty("path_collection") TrashFileRestoredPathCollectionField pathCollection,
105
      @JsonProperty("created_at") Date createdAt,
106
      @JsonProperty("modified_at") Date modifiedAt,
107
      @JsonProperty("modified_by") UserMini modifiedBy,
108
      @JsonProperty("owned_by") UserMini ownedBy,
109
      @JsonProperty("item_status") EnumWrapper<TrashFileRestoredItemStatusField> itemStatus) {
110
    super();
1✔
111
    this.id = id;
1✔
112
    this.sequenceId = sequenceId;
1✔
113
    this.sha1 = sha1;
1✔
114
    this.description = description;
1✔
115
    this.size = size;
1✔
116
    this.pathCollection = pathCollection;
1✔
117
    this.createdAt = createdAt;
1✔
118
    this.modifiedAt = modifiedAt;
1✔
119
    this.modifiedBy = modifiedBy;
1✔
120
    this.ownedBy = ownedBy;
1✔
121
    this.itemStatus = itemStatus;
1✔
122
    this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
1✔
123
  }
1✔
124

125
  public TrashFileRestored(
126
      String id,
127
      String sequenceId,
128
      String sha1,
129
      String description,
130
      long size,
131
      TrashFileRestoredPathCollectionField pathCollection,
132
      Date createdAt,
133
      Date modifiedAt,
134
      UserMini modifiedBy,
135
      UserMini ownedBy,
136
      TrashFileRestoredItemStatusField itemStatus) {
137
    super();
×
138
    this.id = id;
×
139
    this.sequenceId = sequenceId;
×
140
    this.sha1 = sha1;
×
141
    this.description = description;
×
UNCOV
142
    this.size = size;
×
UNCOV
143
    this.pathCollection = pathCollection;
×
144
    this.createdAt = createdAt;
×
145
    this.modifiedAt = modifiedAt;
×
146
    this.modifiedBy = modifiedBy;
×
147
    this.ownedBy = ownedBy;
×
148
    this.itemStatus = new EnumWrapper<TrashFileRestoredItemStatusField>(itemStatus);
×
149
    this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
150
  }
×
151

152
  protected TrashFileRestored(Builder builder) {
153
    super();
×
154
    this.id = builder.id;
×
155
    this.etag = builder.etag;
×
156
    this.type = builder.type;
×
157
    this.sequenceId = builder.sequenceId;
×
158
    this.name = builder.name;
×
159
    this.sha1 = builder.sha1;
×
160
    this.fileVersion = builder.fileVersion;
×
161
    this.description = builder.description;
×
162
    this.size = builder.size;
×
163
    this.pathCollection = builder.pathCollection;
×
164
    this.createdAt = builder.createdAt;
×
165
    this.modifiedAt = builder.modifiedAt;
×
166
    this.trashedAt = builder.trashedAt;
×
167
    this.purgedAt = builder.purgedAt;
×
UNCOV
168
    this.contentCreatedAt = builder.contentCreatedAt;
×
UNCOV
169
    this.contentModifiedAt = builder.contentModifiedAt;
×
UNCOV
170
    this.createdBy = builder.createdBy;
×
UNCOV
171
    this.modifiedBy = builder.modifiedBy;
×
UNCOV
172
    this.ownedBy = builder.ownedBy;
×
UNCOV
173
    this.sharedLink = builder.sharedLink;
×
174
    this.parent = builder.parent;
×
UNCOV
175
    this.itemStatus = builder.itemStatus;
×
UNCOV
176
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
177
  }
×
178

179
  public String getId() {
180
    return id;
1✔
181
  }
182

183
  public String getEtag() {
UNCOV
184
    return etag;
×
185
  }
186

187
  public EnumWrapper<TrashFileRestoredTypeField> getType() {
UNCOV
188
    return type;
×
189
  }
190

191
  public String getSequenceId() {
UNCOV
192
    return sequenceId;
×
193
  }
194

195
  public String getName() {
196
    return name;
1✔
197
  }
198

199
  public String getSha1() {
UNCOV
200
    return sha1;
×
201
  }
202

203
  public FileVersionMini getFileVersion() {
UNCOV
204
    return fileVersion;
×
205
  }
206

207
  public String getDescription() {
UNCOV
208
    return description;
×
209
  }
210

211
  public long getSize() {
UNCOV
212
    return size;
×
213
  }
214

215
  public TrashFileRestoredPathCollectionField getPathCollection() {
UNCOV
216
    return pathCollection;
×
217
  }
218

219
  public Date getCreatedAt() {
UNCOV
220
    return createdAt;
×
221
  }
222

223
  public Date getModifiedAt() {
UNCOV
224
    return modifiedAt;
×
225
  }
226

227
  public String getTrashedAt() {
UNCOV
228
    return trashedAt;
×
229
  }
230

231
  public String getPurgedAt() {
UNCOV
232
    return purgedAt;
×
233
  }
234

235
  public Date getContentCreatedAt() {
UNCOV
236
    return contentCreatedAt;
×
237
  }
238

239
  public Date getContentModifiedAt() {
UNCOV
240
    return contentModifiedAt;
×
241
  }
242

243
  public UserMini getCreatedBy() {
UNCOV
244
    return createdBy;
×
245
  }
246

247
  public UserMini getModifiedBy() {
UNCOV
248
    return modifiedBy;
×
249
  }
250

251
  public UserMini getOwnedBy() {
UNCOV
252
    return ownedBy;
×
253
  }
254

255
  public String getSharedLink() {
UNCOV
256
    return sharedLink;
×
257
  }
258

259
  public FolderMini getParent() {
260
    return parent;
×
261
  }
262

263
  public EnumWrapper<TrashFileRestoredItemStatusField> getItemStatus() {
UNCOV
264
    return itemStatus;
×
265
  }
266

267
  @Override
268
  public boolean equals(Object o) {
269
    if (this == o) {
×
270
      return true;
×
271
    }
272
    if (o == null || getClass() != o.getClass()) {
×
273
      return false;
×
274
    }
275
    TrashFileRestored casted = (TrashFileRestored) o;
×
276
    return Objects.equals(id, casted.id)
×
277
        && Objects.equals(etag, casted.etag)
×
278
        && Objects.equals(type, casted.type)
×
279
        && Objects.equals(sequenceId, casted.sequenceId)
×
280
        && Objects.equals(name, casted.name)
×
281
        && Objects.equals(sha1, casted.sha1)
×
282
        && Objects.equals(fileVersion, casted.fileVersion)
×
283
        && Objects.equals(description, casted.description)
×
284
        && Objects.equals(size, casted.size)
×
285
        && Objects.equals(pathCollection, casted.pathCollection)
×
286
        && Objects.equals(createdAt, casted.createdAt)
×
287
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
UNCOV
288
        && Objects.equals(trashedAt, casted.trashedAt)
×
UNCOV
289
        && Objects.equals(purgedAt, casted.purgedAt)
×
UNCOV
290
        && Objects.equals(contentCreatedAt, casted.contentCreatedAt)
×
UNCOV
291
        && Objects.equals(contentModifiedAt, casted.contentModifiedAt)
×
292
        && Objects.equals(createdBy, casted.createdBy)
×
UNCOV
293
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
UNCOV
294
        && Objects.equals(ownedBy, casted.ownedBy)
×
UNCOV
295
        && Objects.equals(sharedLink, casted.sharedLink)
×
UNCOV
296
        && Objects.equals(parent, casted.parent)
×
UNCOV
297
        && Objects.equals(itemStatus, casted.itemStatus);
×
298
  }
299

300
  @Override
301
  public int hashCode() {
UNCOV
302
    return Objects.hash(
×
303
        id,
304
        etag,
305
        type,
306
        sequenceId,
307
        name,
308
        sha1,
309
        fileVersion,
310
        description,
UNCOV
311
        size,
×
312
        pathCollection,
313
        createdAt,
314
        modifiedAt,
315
        trashedAt,
316
        purgedAt,
317
        contentCreatedAt,
318
        contentModifiedAt,
319
        createdBy,
320
        modifiedBy,
321
        ownedBy,
322
        sharedLink,
323
        parent,
324
        itemStatus);
325
  }
326

327
  @Override
328
  public String toString() {
UNCOV
329
    return "TrashFileRestored{"
×
330
        + "id='"
331
        + id
332
        + '\''
333
        + ", "
334
        + "etag='"
335
        + etag
336
        + '\''
337
        + ", "
338
        + "type='"
339
        + type
340
        + '\''
341
        + ", "
342
        + "sequenceId='"
343
        + sequenceId
344
        + '\''
345
        + ", "
346
        + "name='"
347
        + name
348
        + '\''
349
        + ", "
350
        + "sha1='"
351
        + sha1
352
        + '\''
353
        + ", "
354
        + "fileVersion='"
355
        + fileVersion
356
        + '\''
357
        + ", "
358
        + "description='"
359
        + description
360
        + '\''
361
        + ", "
362
        + "size='"
363
        + size
364
        + '\''
365
        + ", "
366
        + "pathCollection='"
367
        + pathCollection
368
        + '\''
369
        + ", "
370
        + "createdAt='"
371
        + createdAt
372
        + '\''
373
        + ", "
374
        + "modifiedAt='"
375
        + modifiedAt
376
        + '\''
377
        + ", "
378
        + "trashedAt='"
379
        + trashedAt
380
        + '\''
381
        + ", "
382
        + "purgedAt='"
383
        + purgedAt
384
        + '\''
385
        + ", "
386
        + "contentCreatedAt='"
387
        + contentCreatedAt
388
        + '\''
389
        + ", "
390
        + "contentModifiedAt='"
391
        + contentModifiedAt
392
        + '\''
393
        + ", "
394
        + "createdBy='"
395
        + createdBy
396
        + '\''
397
        + ", "
398
        + "modifiedBy='"
399
        + modifiedBy
400
        + '\''
401
        + ", "
402
        + "ownedBy='"
403
        + ownedBy
404
        + '\''
405
        + ", "
406
        + "sharedLink='"
407
        + sharedLink
408
        + '\''
409
        + ", "
410
        + "parent='"
411
        + parent
412
        + '\''
413
        + ", "
414
        + "itemStatus='"
415
        + itemStatus
416
        + '\''
417
        + "}";
418
  }
419

420
  public static class Builder extends NullableFieldTracker {
421

422
    protected final String id;
423

424
    protected String etag;
425

426
    protected EnumWrapper<TrashFileRestoredTypeField> type;
427

428
    protected final String sequenceId;
429

430
    protected String name;
431

432
    protected final String sha1;
433

434
    protected FileVersionMini fileVersion;
435

436
    protected final String description;
437

438
    protected final long size;
439

440
    protected final TrashFileRestoredPathCollectionField pathCollection;
441

442
    protected final Date createdAt;
443

444
    protected final Date modifiedAt;
445

446
    protected String trashedAt;
447

448
    protected String purgedAt;
449

450
    protected Date contentCreatedAt;
451

452
    protected Date contentModifiedAt;
453

454
    protected UserMini createdBy;
455

456
    protected final UserMini modifiedBy;
457

458
    protected final UserMini ownedBy;
459

460
    protected String sharedLink;
461

462
    protected FolderMini parent;
463

464
    protected final EnumWrapper<TrashFileRestoredItemStatusField> itemStatus;
465

466
    public Builder(
467
        String id,
468
        String sequenceId,
469
        String sha1,
470
        String description,
471
        long size,
472
        TrashFileRestoredPathCollectionField pathCollection,
473
        Date createdAt,
474
        Date modifiedAt,
475
        UserMini modifiedBy,
476
        UserMini ownedBy,
477
        EnumWrapper<TrashFileRestoredItemStatusField> itemStatus) {
478
      super();
×
479
      this.id = id;
×
480
      this.sequenceId = sequenceId;
×
UNCOV
481
      this.sha1 = sha1;
×
UNCOV
482
      this.description = description;
×
UNCOV
483
      this.size = size;
×
UNCOV
484
      this.pathCollection = pathCollection;
×
UNCOV
485
      this.createdAt = createdAt;
×
UNCOV
486
      this.modifiedAt = modifiedAt;
×
UNCOV
487
      this.modifiedBy = modifiedBy;
×
UNCOV
488
      this.ownedBy = ownedBy;
×
UNCOV
489
      this.itemStatus = itemStatus;
×
UNCOV
490
      this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
UNCOV
491
    }
×
492

493
    public Builder(
494
        String id,
495
        String sequenceId,
496
        String sha1,
497
        String description,
498
        long size,
499
        TrashFileRestoredPathCollectionField pathCollection,
500
        Date createdAt,
501
        Date modifiedAt,
502
        UserMini modifiedBy,
503
        UserMini ownedBy,
504
        TrashFileRestoredItemStatusField itemStatus) {
505
      super();
×
506
      this.id = id;
×
UNCOV
507
      this.sequenceId = sequenceId;
×
UNCOV
508
      this.sha1 = sha1;
×
509
      this.description = description;
×
510
      this.size = size;
×
UNCOV
511
      this.pathCollection = pathCollection;
×
UNCOV
512
      this.createdAt = createdAt;
×
UNCOV
513
      this.modifiedAt = modifiedAt;
×
514
      this.modifiedBy = modifiedBy;
×
515
      this.ownedBy = ownedBy;
×
UNCOV
516
      this.itemStatus = new EnumWrapper<TrashFileRestoredItemStatusField>(itemStatus);
×
UNCOV
517
      this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
UNCOV
518
    }
×
519

520
    public Builder etag(String etag) {
UNCOV
521
      this.etag = etag;
×
UNCOV
522
      this.markNullableFieldAsSet("etag");
×
UNCOV
523
      return this;
×
524
    }
525

526
    public Builder type(TrashFileRestoredTypeField type) {
UNCOV
527
      this.type = new EnumWrapper<TrashFileRestoredTypeField>(type);
×
UNCOV
528
      return this;
×
529
    }
530

531
    public Builder type(EnumWrapper<TrashFileRestoredTypeField> type) {
UNCOV
532
      this.type = type;
×
UNCOV
533
      return this;
×
534
    }
535

536
    public Builder name(String name) {
UNCOV
537
      this.name = name;
×
UNCOV
538
      return this;
×
539
    }
540

541
    public Builder fileVersion(FileVersionMini fileVersion) {
UNCOV
542
      this.fileVersion = fileVersion;
×
UNCOV
543
      return this;
×
544
    }
545

546
    public Builder trashedAt(String trashedAt) {
UNCOV
547
      this.trashedAt = trashedAt;
×
UNCOV
548
      this.markNullableFieldAsSet("trashed_at");
×
549
      return this;
×
550
    }
551

552
    public Builder purgedAt(String purgedAt) {
UNCOV
553
      this.purgedAt = purgedAt;
×
554
      this.markNullableFieldAsSet("purged_at");
×
555
      return this;
×
556
    }
557

558
    public Builder contentCreatedAt(Date contentCreatedAt) {
559
      this.contentCreatedAt = contentCreatedAt;
×
560
      this.markNullableFieldAsSet("content_created_at");
×
UNCOV
561
      return this;
×
562
    }
563

564
    public Builder contentModifiedAt(Date contentModifiedAt) {
565
      this.contentModifiedAt = contentModifiedAt;
×
UNCOV
566
      this.markNullableFieldAsSet("content_modified_at");
×
UNCOV
567
      return this;
×
568
    }
569

570
    public Builder createdBy(UserMini createdBy) {
UNCOV
571
      this.createdBy = createdBy;
×
UNCOV
572
      return this;
×
573
    }
574

575
    public Builder sharedLink(String sharedLink) {
UNCOV
576
      this.sharedLink = sharedLink;
×
UNCOV
577
      this.markNullableFieldAsSet("shared_link");
×
UNCOV
578
      return this;
×
579
    }
580

581
    public Builder parent(FolderMini parent) {
UNCOV
582
      this.parent = parent;
×
UNCOV
583
      return this;
×
584
    }
585

586
    public TrashFileRestored build() {
UNCOV
587
      return new TrashFileRestored(this);
×
588
    }
589
  }
590
}
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