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

box / box-java-sdk-gen / #360

14 Jul 2025 11:20AM UTC coverage: 38.091% (+2.5%) from 35.58%
#360

push

github

web-flow
feat: Support common union fields and implicit union conversion (box/box-codegen#758) (#361)

288 of 1203 new or added lines in 106 files covered. (23.94%)

167 existing lines in 45 files now uncovered.

18543 of 48681 relevant lines covered (38.09%)

0.38 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
      String id,
100
      String sequenceId,
101
      String sha1,
102
      String description,
103
      long size,
104
      TrashFileRestoredPathCollectionField pathCollection,
105
      Date createdAt,
106
      Date modifiedAt,
107
      UserMini modifiedBy,
108
      UserMini ownedBy,
109
      TrashFileRestoredItemStatusField itemStatus) {
UNCOV
110
    super();
×
UNCOV
111
    this.id = id;
×
UNCOV
112
    this.sequenceId = sequenceId;
×
UNCOV
113
    this.sha1 = sha1;
×
UNCOV
114
    this.description = description;
×
UNCOV
115
    this.size = size;
×
UNCOV
116
    this.pathCollection = pathCollection;
×
UNCOV
117
    this.createdAt = createdAt;
×
UNCOV
118
    this.modifiedAt = modifiedAt;
×
UNCOV
119
    this.modifiedBy = modifiedBy;
×
UNCOV
120
    this.ownedBy = ownedBy;
×
NEW
121
    this.itemStatus = new EnumWrapper<TrashFileRestoredItemStatusField>(itemStatus);
×
UNCOV
122
    this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
UNCOV
123
  }
×
124

125
  public TrashFileRestored(
126
      @JsonProperty("id") String id,
127
      @JsonProperty("sequence_id") String sequenceId,
128
      @JsonProperty("sha1") String sha1,
129
      @JsonProperty("description") String description,
130
      @JsonProperty("size") long size,
131
      @JsonProperty("path_collection") TrashFileRestoredPathCollectionField pathCollection,
132
      @JsonProperty("created_at") Date createdAt,
133
      @JsonProperty("modified_at") Date modifiedAt,
134
      @JsonProperty("modified_by") UserMini modifiedBy,
135
      @JsonProperty("owned_by") UserMini ownedBy,
136
      @JsonProperty("item_status") EnumWrapper<TrashFileRestoredItemStatusField> itemStatus) {
137
    super();
1✔
138
    this.id = id;
1✔
139
    this.sequenceId = sequenceId;
1✔
140
    this.sha1 = sha1;
1✔
141
    this.description = description;
1✔
142
    this.size = size;
1✔
143
    this.pathCollection = pathCollection;
1✔
144
    this.createdAt = createdAt;
1✔
145
    this.modifiedAt = modifiedAt;
1✔
146
    this.modifiedBy = modifiedBy;
1✔
147
    this.ownedBy = ownedBy;
1✔
148
    this.itemStatus = itemStatus;
1✔
149
    this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
1✔
150
  }
1✔
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;
×
168
    this.contentCreatedAt = builder.contentCreatedAt;
×
169
    this.contentModifiedAt = builder.contentModifiedAt;
×
170
    this.createdBy = builder.createdBy;
×
171
    this.modifiedBy = builder.modifiedBy;
×
172
    this.ownedBy = builder.ownedBy;
×
173
    this.sharedLink = builder.sharedLink;
×
174
    this.parent = builder.parent;
×
175
    this.itemStatus = builder.itemStatus;
×
176
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
177
  }
×
178

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

263
  public EnumWrapper<TrashFileRestoredItemStatusField> getItemStatus() {
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)
×
288
        && Objects.equals(trashedAt, casted.trashedAt)
×
289
        && Objects.equals(purgedAt, casted.purgedAt)
×
290
        && Objects.equals(contentCreatedAt, casted.contentCreatedAt)
×
291
        && Objects.equals(contentModifiedAt, casted.contentModifiedAt)
×
292
        && Objects.equals(createdBy, casted.createdBy)
×
293
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
294
        && Objects.equals(ownedBy, casted.ownedBy)
×
295
        && Objects.equals(sharedLink, casted.sharedLink)
×
296
        && Objects.equals(parent, casted.parent)
×
297
        && Objects.equals(itemStatus, casted.itemStatus);
×
298
  }
299

300
  @Override
301
  public int hashCode() {
302
    return Objects.hash(
×
303
        id,
304
        etag,
305
        type,
306
        sequenceId,
307
        name,
308
        sha1,
309
        fileVersion,
310
        description,
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() {
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
        TrashFileRestoredItemStatusField itemStatus) {
478
      super();
×
479
      this.id = id;
×
480
      this.sequenceId = sequenceId;
×
481
      this.sha1 = sha1;
×
482
      this.description = description;
×
483
      this.size = size;
×
484
      this.pathCollection = pathCollection;
×
485
      this.createdAt = createdAt;
×
486
      this.modifiedAt = modifiedAt;
×
487
      this.modifiedBy = modifiedBy;
×
488
      this.ownedBy = ownedBy;
×
NEW
489
      this.itemStatus = new EnumWrapper<TrashFileRestoredItemStatusField>(itemStatus);
×
490
      this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
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
        EnumWrapper<TrashFileRestoredItemStatusField> itemStatus) {
505
      super();
×
506
      this.id = id;
×
507
      this.sequenceId = sequenceId;
×
508
      this.sha1 = sha1;
×
509
      this.description = description;
×
510
      this.size = size;
×
511
      this.pathCollection = pathCollection;
×
512
      this.createdAt = createdAt;
×
513
      this.modifiedAt = modifiedAt;
×
514
      this.modifiedBy = modifiedBy;
×
515
      this.ownedBy = ownedBy;
×
NEW
516
      this.itemStatus = itemStatus;
×
517
      this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
518
    }
×
519

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

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

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

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

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

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

552
    public Builder purgedAt(String purgedAt) {
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");
×
561
      return this;
×
562
    }
563

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

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

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

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

586
    public TrashFileRestored build() {
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