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

box / box-java-sdk-gen / #155

30 May 2025 01:03PM UTC coverage: 35.646% (+0.3%) from 35.311%
#155

push

github

web-flow
fix: Fix downscope token to use `retrieveToken` method for token retrieval (box/box-codegen#731) (#320)

4 of 4 new or added lines in 4 files covered. (100.0%)

2952 existing lines in 99 files now uncovered.

15628 of 43842 relevant lines covered (35.65%)

0.36 hits per line

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

10.19
/src/main/java/com/box/sdkgen/schemas/trashfilerestored/TrashFileRestored.java
1
package com.box.sdkgen.schemas.trashfilerestored;
2

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.fileversionmini.FileVersionMini;
6
import com.box.sdkgen.schemas.foldermini.FolderMini;
7
import com.box.sdkgen.schemas.usermini.UserMini;
8
import com.box.sdkgen.serialization.json.EnumWrapper;
9
import com.fasterxml.jackson.annotation.JsonProperty;
10
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
12
import java.util.Date;
13
import java.util.Objects;
14

15
public class TrashFileRestored extends SerializableObject {
16

17
  protected final String id;
18

19
  protected String etag;
20

21
  @JsonDeserialize(using = TrashFileRestoredTypeField.TrashFileRestoredTypeFieldDeserializer.class)
22
  @JsonSerialize(using = TrashFileRestoredTypeField.TrashFileRestoredTypeFieldSerializer.class)
23
  protected EnumWrapper<TrashFileRestoredTypeField> type;
24

25
  @JsonProperty("sequence_id")
26
  protected final String sequenceId;
27

28
  protected String name;
29

30
  protected final String sha1;
31

32
  @JsonProperty("file_version")
33
  protected FileVersionMini fileVersion;
34

35
  protected final String description;
36

37
  protected final long size;
38

39
  @JsonProperty("path_collection")
40
  protected final TrashFileRestoredPathCollectionField pathCollection;
41

42
  @JsonProperty("created_at")
43
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
44
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
45
  protected final Date createdAt;
46

47
  @JsonProperty("modified_at")
48
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
49
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
50
  protected final Date modifiedAt;
51

52
  @JsonProperty("trashed_at")
53
  protected String trashedAt;
54

55
  @JsonProperty("purged_at")
56
  protected String purgedAt;
57

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

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

68
  @JsonProperty("created_by")
69
  protected UserMini createdBy;
70

71
  @JsonProperty("modified_by")
72
  protected final UserMini modifiedBy;
73

74
  @JsonProperty("owned_by")
75
  protected final UserMini ownedBy;
76

77
  @JsonProperty("shared_link")
78
  protected String sharedLink;
79

80
  protected FolderMini parent;
81

82
  @JsonDeserialize(
83
      using = TrashFileRestoredItemStatusField.TrashFileRestoredItemStatusFieldDeserializer.class)
84
  @JsonSerialize(
85
      using = TrashFileRestoredItemStatusField.TrashFileRestoredItemStatusFieldSerializer.class)
86
  @JsonProperty("item_status")
87
  protected final EnumWrapper<TrashFileRestoredItemStatusField> itemStatus;
88

89
  public TrashFileRestored(
90
      @JsonProperty("id") String id,
91
      @JsonProperty("sequence_id") String sequenceId,
92
      @JsonProperty("sha1") String sha1,
93
      @JsonProperty("description") String description,
94
      @JsonProperty("size") long size,
95
      @JsonProperty("path_collection") TrashFileRestoredPathCollectionField pathCollection,
96
      @JsonProperty("created_at") Date createdAt,
97
      @JsonProperty("modified_at") Date modifiedAt,
98
      @JsonProperty("modified_by") UserMini modifiedBy,
99
      @JsonProperty("owned_by") UserMini ownedBy,
100
      @JsonProperty("item_status") EnumWrapper<TrashFileRestoredItemStatusField> itemStatus) {
101
    super();
1✔
102
    this.id = id;
1✔
103
    this.sequenceId = sequenceId;
1✔
104
    this.sha1 = sha1;
1✔
105
    this.description = description;
1✔
106
    this.size = size;
1✔
107
    this.pathCollection = pathCollection;
1✔
108
    this.createdAt = createdAt;
1✔
109
    this.modifiedAt = modifiedAt;
1✔
110
    this.modifiedBy = modifiedBy;
1✔
111
    this.ownedBy = ownedBy;
1✔
112
    this.itemStatus = itemStatus;
1✔
113
    this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
1✔
114
  }
1✔
115

116
  public TrashFileRestored(
117
      String id,
118
      String sequenceId,
119
      String sha1,
120
      String description,
121
      long size,
122
      TrashFileRestoredPathCollectionField pathCollection,
123
      Date createdAt,
124
      Date modifiedAt,
125
      UserMini modifiedBy,
126
      UserMini ownedBy,
127
      TrashFileRestoredItemStatusField itemStatus) {
128
    super();
×
129
    this.id = id;
×
130
    this.sequenceId = sequenceId;
×
131
    this.sha1 = sha1;
×
UNCOV
132
    this.description = description;
×
UNCOV
133
    this.size = size;
×
134
    this.pathCollection = pathCollection;
×
135
    this.createdAt = createdAt;
×
136
    this.modifiedAt = modifiedAt;
×
137
    this.modifiedBy = modifiedBy;
×
138
    this.ownedBy = ownedBy;
×
139
    this.itemStatus = new EnumWrapper<TrashFileRestoredItemStatusField>(itemStatus);
×
140
    this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
141
  }
×
142

143
  protected TrashFileRestored(TrashFileRestoredBuilder builder) {
144
    super();
×
145
    this.id = builder.id;
×
146
    this.etag = builder.etag;
×
147
    this.type = builder.type;
×
148
    this.sequenceId = builder.sequenceId;
×
149
    this.name = builder.name;
×
150
    this.sha1 = builder.sha1;
×
151
    this.fileVersion = builder.fileVersion;
×
152
    this.description = builder.description;
×
153
    this.size = builder.size;
×
154
    this.pathCollection = builder.pathCollection;
×
155
    this.createdAt = builder.createdAt;
×
156
    this.modifiedAt = builder.modifiedAt;
×
157
    this.trashedAt = builder.trashedAt;
×
UNCOV
158
    this.purgedAt = builder.purgedAt;
×
UNCOV
159
    this.contentCreatedAt = builder.contentCreatedAt;
×
UNCOV
160
    this.contentModifiedAt = builder.contentModifiedAt;
×
UNCOV
161
    this.createdBy = builder.createdBy;
×
UNCOV
162
    this.modifiedBy = builder.modifiedBy;
×
UNCOV
163
    this.ownedBy = builder.ownedBy;
×
164
    this.sharedLink = builder.sharedLink;
×
UNCOV
165
    this.parent = builder.parent;
×
UNCOV
166
    this.itemStatus = builder.itemStatus;
×
UNCOV
167
  }
×
168

169
  public String getId() {
170
    return id;
1✔
171
  }
172

173
  public String getEtag() {
UNCOV
174
    return etag;
×
175
  }
176

177
  public EnumWrapper<TrashFileRestoredTypeField> getType() {
UNCOV
178
    return type;
×
179
  }
180

181
  public String getSequenceId() {
UNCOV
182
    return sequenceId;
×
183
  }
184

185
  public String getName() {
186
    return name;
1✔
187
  }
188

189
  public String getSha1() {
UNCOV
190
    return sha1;
×
191
  }
192

193
  public FileVersionMini getFileVersion() {
UNCOV
194
    return fileVersion;
×
195
  }
196

197
  public String getDescription() {
UNCOV
198
    return description;
×
199
  }
200

201
  public long getSize() {
UNCOV
202
    return size;
×
203
  }
204

205
  public TrashFileRestoredPathCollectionField getPathCollection() {
UNCOV
206
    return pathCollection;
×
207
  }
208

209
  public Date getCreatedAt() {
UNCOV
210
    return createdAt;
×
211
  }
212

213
  public Date getModifiedAt() {
UNCOV
214
    return modifiedAt;
×
215
  }
216

217
  public String getTrashedAt() {
UNCOV
218
    return trashedAt;
×
219
  }
220

221
  public String getPurgedAt() {
UNCOV
222
    return purgedAt;
×
223
  }
224

225
  public Date getContentCreatedAt() {
UNCOV
226
    return contentCreatedAt;
×
227
  }
228

229
  public Date getContentModifiedAt() {
UNCOV
230
    return contentModifiedAt;
×
231
  }
232

233
  public UserMini getCreatedBy() {
UNCOV
234
    return createdBy;
×
235
  }
236

237
  public UserMini getModifiedBy() {
UNCOV
238
    return modifiedBy;
×
239
  }
240

241
  public UserMini getOwnedBy() {
UNCOV
242
    return ownedBy;
×
243
  }
244

245
  public String getSharedLink() {
UNCOV
246
    return sharedLink;
×
247
  }
248

249
  public FolderMini getParent() {
250
    return parent;
×
251
  }
252

253
  public EnumWrapper<TrashFileRestoredItemStatusField> getItemStatus() {
UNCOV
254
    return itemStatus;
×
255
  }
256

257
  @Override
258
  public boolean equals(Object o) {
259
    if (this == o) {
×
260
      return true;
×
261
    }
262
    if (o == null || getClass() != o.getClass()) {
×
263
      return false;
×
264
    }
265
    TrashFileRestored casted = (TrashFileRestored) o;
×
266
    return Objects.equals(id, casted.id)
×
267
        && Objects.equals(etag, casted.etag)
×
268
        && Objects.equals(type, casted.type)
×
269
        && Objects.equals(sequenceId, casted.sequenceId)
×
270
        && Objects.equals(name, casted.name)
×
271
        && Objects.equals(sha1, casted.sha1)
×
272
        && Objects.equals(fileVersion, casted.fileVersion)
×
273
        && Objects.equals(description, casted.description)
×
274
        && Objects.equals(size, casted.size)
×
275
        && Objects.equals(pathCollection, casted.pathCollection)
×
276
        && Objects.equals(createdAt, casted.createdAt)
×
277
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
UNCOV
278
        && Objects.equals(trashedAt, casted.trashedAt)
×
UNCOV
279
        && Objects.equals(purgedAt, casted.purgedAt)
×
UNCOV
280
        && Objects.equals(contentCreatedAt, casted.contentCreatedAt)
×
UNCOV
281
        && Objects.equals(contentModifiedAt, casted.contentModifiedAt)
×
282
        && Objects.equals(createdBy, casted.createdBy)
×
UNCOV
283
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
UNCOV
284
        && Objects.equals(ownedBy, casted.ownedBy)
×
UNCOV
285
        && Objects.equals(sharedLink, casted.sharedLink)
×
UNCOV
286
        && Objects.equals(parent, casted.parent)
×
UNCOV
287
        && Objects.equals(itemStatus, casted.itemStatus);
×
288
  }
289

290
  @Override
291
  public int hashCode() {
UNCOV
292
    return Objects.hash(
×
293
        id,
294
        etag,
295
        type,
296
        sequenceId,
297
        name,
298
        sha1,
299
        fileVersion,
300
        description,
UNCOV
301
        size,
×
302
        pathCollection,
303
        createdAt,
304
        modifiedAt,
305
        trashedAt,
306
        purgedAt,
307
        contentCreatedAt,
308
        contentModifiedAt,
309
        createdBy,
310
        modifiedBy,
311
        ownedBy,
312
        sharedLink,
313
        parent,
314
        itemStatus);
315
  }
316

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

410
  public static class TrashFileRestoredBuilder {
411

412
    protected final String id;
413

414
    protected String etag;
415

416
    protected EnumWrapper<TrashFileRestoredTypeField> type;
417

418
    protected final String sequenceId;
419

420
    protected String name;
421

422
    protected final String sha1;
423

424
    protected FileVersionMini fileVersion;
425

426
    protected final String description;
427

428
    protected final long size;
429

430
    protected final TrashFileRestoredPathCollectionField pathCollection;
431

432
    protected final Date createdAt;
433

434
    protected final Date modifiedAt;
435

436
    protected String trashedAt;
437

438
    protected String purgedAt;
439

440
    protected Date contentCreatedAt;
441

442
    protected Date contentModifiedAt;
443

444
    protected UserMini createdBy;
445

446
    protected final UserMini modifiedBy;
447

448
    protected final UserMini ownedBy;
449

450
    protected String sharedLink;
451

452
    protected FolderMini parent;
453

454
    protected final EnumWrapper<TrashFileRestoredItemStatusField> itemStatus;
455

456
    public TrashFileRestoredBuilder(
457
        String id,
458
        String sequenceId,
459
        String sha1,
460
        String description,
461
        long size,
462
        TrashFileRestoredPathCollectionField pathCollection,
463
        Date createdAt,
464
        Date modifiedAt,
465
        UserMini modifiedBy,
466
        UserMini ownedBy,
467
        EnumWrapper<TrashFileRestoredItemStatusField> itemStatus) {
×
468
      this.id = id;
×
469
      this.sequenceId = sequenceId;
×
470
      this.sha1 = sha1;
×
UNCOV
471
      this.description = description;
×
UNCOV
472
      this.size = size;
×
UNCOV
473
      this.pathCollection = pathCollection;
×
UNCOV
474
      this.createdAt = createdAt;
×
UNCOV
475
      this.modifiedAt = modifiedAt;
×
UNCOV
476
      this.modifiedBy = modifiedBy;
×
UNCOV
477
      this.ownedBy = ownedBy;
×
UNCOV
478
      this.itemStatus = itemStatus;
×
UNCOV
479
      this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
UNCOV
480
    }
×
481

482
    public TrashFileRestoredBuilder(
483
        String id,
484
        String sequenceId,
485
        String sha1,
486
        String description,
487
        long size,
488
        TrashFileRestoredPathCollectionField pathCollection,
489
        Date createdAt,
490
        Date modifiedAt,
491
        UserMini modifiedBy,
492
        UserMini ownedBy,
493
        TrashFileRestoredItemStatusField itemStatus) {
×
494
      this.id = id;
×
495
      this.sequenceId = sequenceId;
×
496
      this.sha1 = sha1;
×
UNCOV
497
      this.description = description;
×
UNCOV
498
      this.size = size;
×
499
      this.pathCollection = pathCollection;
×
500
      this.createdAt = createdAt;
×
UNCOV
501
      this.modifiedAt = modifiedAt;
×
UNCOV
502
      this.modifiedBy = modifiedBy;
×
UNCOV
503
      this.ownedBy = ownedBy;
×
504
      this.itemStatus = new EnumWrapper<TrashFileRestoredItemStatusField>(itemStatus);
×
505
      this.type = new EnumWrapper<TrashFileRestoredTypeField>(TrashFileRestoredTypeField.FILE);
×
UNCOV
506
    }
×
507

508
    public TrashFileRestoredBuilder etag(String etag) {
509
      this.etag = etag;
×
510
      return this;
×
511
    }
512

513
    public TrashFileRestoredBuilder type(TrashFileRestoredTypeField type) {
514
      this.type = new EnumWrapper<TrashFileRestoredTypeField>(type);
×
515
      return this;
×
516
    }
517

518
    public TrashFileRestoredBuilder type(EnumWrapper<TrashFileRestoredTypeField> type) {
519
      this.type = type;
×
520
      return this;
×
521
    }
522

523
    public TrashFileRestoredBuilder name(String name) {
524
      this.name = name;
×
525
      return this;
×
526
    }
527

528
    public TrashFileRestoredBuilder fileVersion(FileVersionMini fileVersion) {
529
      this.fileVersion = fileVersion;
×
530
      return this;
×
531
    }
532

533
    public TrashFileRestoredBuilder trashedAt(String trashedAt) {
534
      this.trashedAt = trashedAt;
×
535
      return this;
×
536
    }
537

538
    public TrashFileRestoredBuilder purgedAt(String purgedAt) {
539
      this.purgedAt = purgedAt;
×
540
      return this;
×
541
    }
542

543
    public TrashFileRestoredBuilder contentCreatedAt(Date contentCreatedAt) {
544
      this.contentCreatedAt = contentCreatedAt;
×
545
      return this;
×
546
    }
547

548
    public TrashFileRestoredBuilder contentModifiedAt(Date contentModifiedAt) {
549
      this.contentModifiedAt = contentModifiedAt;
×
550
      return this;
×
551
    }
552

553
    public TrashFileRestoredBuilder createdBy(UserMini createdBy) {
554
      this.createdBy = createdBy;
×
555
      return this;
×
556
    }
557

558
    public TrashFileRestoredBuilder sharedLink(String sharedLink) {
559
      this.sharedLink = sharedLink;
×
UNCOV
560
      return this;
×
561
    }
562

563
    public TrashFileRestoredBuilder parent(FolderMini parent) {
UNCOV
564
      this.parent = parent;
×
UNCOV
565
      return this;
×
566
    }
567

568
    public TrashFileRestored build() {
UNCOV
569
      return new TrashFileRestored(this);
×
570
    }
571
  }
572
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc