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

box / box-java-sdk-gen / #296

25 Jun 2025 10:12AM UTC coverage: 35.677% (-0.05%) from 35.723%
#296

Pull #348

github

web-flow
Merge d48b178e0 into d8480ee6c
Pull Request #348: chore: Update .codegen.json with commit hash of codegen and openapi spec

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

11820 existing lines in 631 files now uncovered.

16946 of 47499 relevant lines covered (35.68%)

0.36 hits per line

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

8.86
/src/main/java/com/box/sdkgen/schemas/trashfolder/TrashFolder.java
1
package com.box.sdkgen.schemas.trashfolder;
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.foldermini.FolderMini;
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 TrashFolder extends SerializableObject {
19

20
  protected final String id;
21

22
  @Nullable protected String etag;
23

24
  @JsonDeserialize(using = TrashFolderTypeField.TrashFolderTypeFieldDeserializer.class)
25
  @JsonSerialize(using = TrashFolderTypeField.TrashFolderTypeFieldSerializer.class)
26
  protected EnumWrapper<TrashFolderTypeField> type;
27

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

31
  protected final String name;
32

33
  @JsonProperty("created_at")
34
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
35
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
36
  @Nullable
37
  protected Date createdAt;
38

39
  @JsonProperty("modified_at")
40
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
41
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
42
  @Nullable
43
  protected Date modifiedAt;
44

45
  protected final String description;
46

47
  protected final long size;
48

49
  @JsonProperty("path_collection")
50
  protected final TrashFolderPathCollectionField pathCollection;
51

52
  @JsonProperty("created_by")
53
  protected final UserMini createdBy;
54

55
  @JsonProperty("modified_by")
56
  protected final UserMini modifiedBy;
57

58
  @JsonProperty("trashed_at")
59
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
60
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
61
  @Nullable
62
  protected Date trashedAt;
63

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

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

76
  @JsonProperty("content_modified_at")
77
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
78
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
79
  @Nullable
80
  protected Date contentModifiedAt;
81

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

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

89
  @JsonProperty("folder_upload_email")
90
  @Nullable
91
  protected String folderUploadEmail;
92

93
  protected FolderMini parent;
94

95
  @JsonDeserialize(using = TrashFolderItemStatusField.TrashFolderItemStatusFieldDeserializer.class)
96
  @JsonSerialize(using = TrashFolderItemStatusField.TrashFolderItemStatusFieldSerializer.class)
97
  @JsonProperty("item_status")
98
  protected final EnumWrapper<TrashFolderItemStatusField> itemStatus;
99

100
  public TrashFolder(
101
      @JsonProperty("id") String id,
102
      @JsonProperty("name") String name,
103
      @JsonProperty("description") String description,
104
      @JsonProperty("size") long size,
105
      @JsonProperty("path_collection") TrashFolderPathCollectionField pathCollection,
106
      @JsonProperty("created_by") UserMini createdBy,
107
      @JsonProperty("modified_by") UserMini modifiedBy,
108
      @JsonProperty("owned_by") UserMini ownedBy,
109
      @JsonProperty("item_status") EnumWrapper<TrashFolderItemStatusField> itemStatus) {
110
    super();
1✔
111
    this.id = id;
1✔
112
    this.name = name;
1✔
113
    this.description = description;
1✔
114
    this.size = size;
1✔
115
    this.pathCollection = pathCollection;
1✔
116
    this.createdBy = createdBy;
1✔
117
    this.modifiedBy = modifiedBy;
1✔
118
    this.ownedBy = ownedBy;
1✔
119
    this.itemStatus = itemStatus;
1✔
120
    this.type = new EnumWrapper<TrashFolderTypeField>(TrashFolderTypeField.FOLDER);
1✔
121
  }
1✔
122

123
  public TrashFolder(
124
      String id,
125
      String name,
126
      String description,
127
      long size,
128
      TrashFolderPathCollectionField pathCollection,
129
      UserMini createdBy,
130
      UserMini modifiedBy,
131
      UserMini ownedBy,
132
      TrashFolderItemStatusField itemStatus) {
UNCOV
133
    super();
×
UNCOV
134
    this.id = id;
×
135
    this.name = name;
×
136
    this.description = description;
×
137
    this.size = size;
×
138
    this.pathCollection = pathCollection;
×
139
    this.createdBy = createdBy;
×
140
    this.modifiedBy = modifiedBy;
×
141
    this.ownedBy = ownedBy;
×
142
    this.itemStatus = new EnumWrapper<TrashFolderItemStatusField>(itemStatus);
×
143
    this.type = new EnumWrapper<TrashFolderTypeField>(TrashFolderTypeField.FOLDER);
×
144
  }
×
145

146
  protected TrashFolder(Builder builder) {
147
    super();
×
148
    this.id = builder.id;
×
149
    this.etag = builder.etag;
×
150
    this.type = builder.type;
×
151
    this.sequenceId = builder.sequenceId;
×
152
    this.name = builder.name;
×
153
    this.createdAt = builder.createdAt;
×
154
    this.modifiedAt = builder.modifiedAt;
×
155
    this.description = builder.description;
×
156
    this.size = builder.size;
×
157
    this.pathCollection = builder.pathCollection;
×
UNCOV
158
    this.createdBy = builder.createdBy;
×
UNCOV
159
    this.modifiedBy = builder.modifiedBy;
×
UNCOV
160
    this.trashedAt = builder.trashedAt;
×
UNCOV
161
    this.purgedAt = builder.purgedAt;
×
UNCOV
162
    this.contentCreatedAt = builder.contentCreatedAt;
×
UNCOV
163
    this.contentModifiedAt = builder.contentModifiedAt;
×
164
    this.ownedBy = builder.ownedBy;
×
UNCOV
165
    this.sharedLink = builder.sharedLink;
×
UNCOV
166
    this.folderUploadEmail = builder.folderUploadEmail;
×
UNCOV
167
    this.parent = builder.parent;
×
168
    this.itemStatus = builder.itemStatus;
×
UNCOV
169
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
170
  }
×
171

172
  public String getId() {
173
    return id;
1✔
174
  }
175

176
  public String getEtag() {
UNCOV
177
    return etag;
×
178
  }
179

180
  public EnumWrapper<TrashFolderTypeField> getType() {
UNCOV
181
    return type;
×
182
  }
183

184
  public String getSequenceId() {
UNCOV
185
    return sequenceId;
×
186
  }
187

188
  public String getName() {
189
    return name;
1✔
190
  }
191

192
  public Date getCreatedAt() {
UNCOV
193
    return createdAt;
×
194
  }
195

196
  public Date getModifiedAt() {
UNCOV
197
    return modifiedAt;
×
198
  }
199

200
  public String getDescription() {
UNCOV
201
    return description;
×
202
  }
203

204
  public long getSize() {
UNCOV
205
    return size;
×
206
  }
207

208
  public TrashFolderPathCollectionField getPathCollection() {
UNCOV
209
    return pathCollection;
×
210
  }
211

212
  public UserMini getCreatedBy() {
UNCOV
213
    return createdBy;
×
214
  }
215

216
  public UserMini getModifiedBy() {
UNCOV
217
    return modifiedBy;
×
218
  }
219

220
  public Date getTrashedAt() {
UNCOV
221
    return trashedAt;
×
222
  }
223

224
  public Date getPurgedAt() {
UNCOV
225
    return purgedAt;
×
226
  }
227

228
  public Date getContentCreatedAt() {
UNCOV
229
    return contentCreatedAt;
×
230
  }
231

232
  public Date getContentModifiedAt() {
UNCOV
233
    return contentModifiedAt;
×
234
  }
235

236
  public UserMini getOwnedBy() {
UNCOV
237
    return ownedBy;
×
238
  }
239

240
  public String getSharedLink() {
UNCOV
241
    return sharedLink;
×
242
  }
243

244
  public String getFolderUploadEmail() {
245
    return folderUploadEmail;
×
246
  }
247

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

252
  public EnumWrapper<TrashFolderItemStatusField> getItemStatus() {
253
    return itemStatus;
×
254
  }
255

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

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

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

403
  public static class Builder extends NullableFieldTracker {
404

405
    protected final String id;
406

407
    protected String etag;
408

409
    protected EnumWrapper<TrashFolderTypeField> type;
410

411
    protected String sequenceId;
412

413
    protected final String name;
414

415
    protected Date createdAt;
416

417
    protected Date modifiedAt;
418

419
    protected final String description;
420

421
    protected final long size;
422

423
    protected final TrashFolderPathCollectionField pathCollection;
424

425
    protected final UserMini createdBy;
426

427
    protected final UserMini modifiedBy;
428

429
    protected Date trashedAt;
430

431
    protected Date purgedAt;
432

433
    protected Date contentCreatedAt;
434

435
    protected Date contentModifiedAt;
436

437
    protected final UserMini ownedBy;
438

439
    protected String sharedLink;
440

441
    protected String folderUploadEmail;
442

443
    protected FolderMini parent;
444

445
    protected final EnumWrapper<TrashFolderItemStatusField> itemStatus;
446

447
    public Builder(
448
        String id,
449
        String name,
450
        String description,
451
        long size,
452
        TrashFolderPathCollectionField pathCollection,
453
        UserMini createdBy,
454
        UserMini modifiedBy,
455
        UserMini ownedBy,
456
        EnumWrapper<TrashFolderItemStatusField> itemStatus) {
UNCOV
457
      super();
×
UNCOV
458
      this.id = id;
×
UNCOV
459
      this.name = name;
×
UNCOV
460
      this.description = description;
×
UNCOV
461
      this.size = size;
×
UNCOV
462
      this.pathCollection = pathCollection;
×
UNCOV
463
      this.createdBy = createdBy;
×
UNCOV
464
      this.modifiedBy = modifiedBy;
×
465
      this.ownedBy = ownedBy;
×
466
      this.itemStatus = itemStatus;
×
467
      this.type = new EnumWrapper<TrashFolderTypeField>(TrashFolderTypeField.FOLDER);
×
468
    }
×
469

470
    public Builder(
471
        String id,
472
        String name,
473
        String description,
474
        long size,
475
        TrashFolderPathCollectionField pathCollection,
476
        UserMini createdBy,
477
        UserMini modifiedBy,
478
        UserMini ownedBy,
479
        TrashFolderItemStatusField itemStatus) {
480
      super();
×
UNCOV
481
      this.id = id;
×
UNCOV
482
      this.name = name;
×
UNCOV
483
      this.description = description;
×
484
      this.size = size;
×
485
      this.pathCollection = pathCollection;
×
UNCOV
486
      this.createdBy = createdBy;
×
UNCOV
487
      this.modifiedBy = modifiedBy;
×
UNCOV
488
      this.ownedBy = ownedBy;
×
489
      this.itemStatus = new EnumWrapper<TrashFolderItemStatusField>(itemStatus);
×
490
      this.type = new EnumWrapper<TrashFolderTypeField>(TrashFolderTypeField.FOLDER);
×
UNCOV
491
    }
×
492

493
    public Builder etag(String etag) {
494
      this.etag = etag;
×
495
      this.markNullableFieldAsSet("etag");
×
UNCOV
496
      return this;
×
497
    }
498

499
    public Builder type(TrashFolderTypeField type) {
500
      this.type = new EnumWrapper<TrashFolderTypeField>(type);
×
UNCOV
501
      return this;
×
502
    }
503

504
    public Builder type(EnumWrapper<TrashFolderTypeField> type) {
505
      this.type = type;
×
UNCOV
506
      return this;
×
507
    }
508

509
    public Builder sequenceId(String sequenceId) {
510
      this.sequenceId = sequenceId;
×
UNCOV
511
      return this;
×
512
    }
513

514
    public Builder createdAt(Date createdAt) {
515
      this.createdAt = createdAt;
×
UNCOV
516
      this.markNullableFieldAsSet("created_at");
×
UNCOV
517
      return this;
×
518
    }
519

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

526
    public Builder trashedAt(Date trashedAt) {
UNCOV
527
      this.trashedAt = trashedAt;
×
UNCOV
528
      this.markNullableFieldAsSet("trashed_at");
×
529
      return this;
×
530
    }
531

532
    public Builder purgedAt(Date purgedAt) {
UNCOV
533
      this.purgedAt = purgedAt;
×
534
      this.markNullableFieldAsSet("purged_at");
×
535
      return this;
×
536
    }
537

538
    public Builder contentCreatedAt(Date contentCreatedAt) {
539
      this.contentCreatedAt = contentCreatedAt;
×
540
      this.markNullableFieldAsSet("content_created_at");
×
UNCOV
541
      return this;
×
542
    }
543

544
    public Builder contentModifiedAt(Date contentModifiedAt) {
UNCOV
545
      this.contentModifiedAt = contentModifiedAt;
×
UNCOV
546
      this.markNullableFieldAsSet("content_modified_at");
×
UNCOV
547
      return this;
×
548
    }
549

550
    public Builder sharedLink(String sharedLink) {
UNCOV
551
      this.sharedLink = sharedLink;
×
UNCOV
552
      this.markNullableFieldAsSet("shared_link");
×
UNCOV
553
      return this;
×
554
    }
555

556
    public Builder folderUploadEmail(String folderUploadEmail) {
UNCOV
557
      this.folderUploadEmail = folderUploadEmail;
×
UNCOV
558
      this.markNullableFieldAsSet("folder_upload_email");
×
UNCOV
559
      return this;
×
560
    }
561

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

567
    public TrashFolder build() {
UNCOV
568
      return new TrashFolder(this);
×
569
    }
570
  }
571
}
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