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

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

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

3.74
/src/main/java/com/box/sdkgen/schemas/trashweblink/TrashWebLink.java
1
package com.box.sdkgen.schemas.trashweblink;
2

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

14
public class TrashWebLink extends SerializableObject {
15

16
  @JsonDeserialize(using = TrashWebLinkTypeField.TrashWebLinkTypeFieldDeserializer.class)
17
  @JsonSerialize(using = TrashWebLinkTypeField.TrashWebLinkTypeFieldSerializer.class)
18
  protected EnumWrapper<TrashWebLinkTypeField> type;
19

20
  protected String id;
21

22
  @JsonProperty("sequence_id")
23
  protected String sequenceId;
24

25
  protected String etag;
26

27
  protected String name;
28

29
  protected String url;
30

31
  protected FolderMini parent;
32

33
  protected String description;
34

35
  @JsonProperty("path_collection")
36
  protected TrashWebLinkPathCollectionField pathCollection;
37

38
  @JsonProperty("created_at")
39
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
40
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
41
  protected Date createdAt;
42

43
  @JsonProperty("modified_at")
44
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
45
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
46
  protected Date modifiedAt;
47

48
  @JsonProperty("trashed_at")
49
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
50
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
51
  protected Date trashedAt;
52

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

58
  @JsonProperty("created_by")
59
  protected UserMini createdBy;
60

61
  @JsonProperty("modified_by")
62
  protected UserMini modifiedBy;
63

64
  @JsonProperty("owned_by")
65
  protected UserMini ownedBy;
66

67
  @JsonProperty("shared_link")
68
  protected String sharedLink;
69

70
  @JsonDeserialize(
71
      using = TrashWebLinkItemStatusField.TrashWebLinkItemStatusFieldDeserializer.class)
72
  @JsonSerialize(using = TrashWebLinkItemStatusField.TrashWebLinkItemStatusFieldSerializer.class)
73
  @JsonProperty("item_status")
74
  protected EnumWrapper<TrashWebLinkItemStatusField> itemStatus;
75

76
  public TrashWebLink() {
77
    super();
1✔
78
  }
1✔
79

80
  protected TrashWebLink(Builder builder) {
81
    super();
×
82
    this.type = builder.type;
×
83
    this.id = builder.id;
×
84
    this.sequenceId = builder.sequenceId;
×
85
    this.etag = builder.etag;
×
86
    this.name = builder.name;
×
87
    this.url = builder.url;
×
88
    this.parent = builder.parent;
×
89
    this.description = builder.description;
×
90
    this.pathCollection = builder.pathCollection;
×
91
    this.createdAt = builder.createdAt;
×
92
    this.modifiedAt = builder.modifiedAt;
×
93
    this.trashedAt = builder.trashedAt;
×
94
    this.purgedAt = builder.purgedAt;
×
95
    this.createdBy = builder.createdBy;
×
96
    this.modifiedBy = builder.modifiedBy;
×
97
    this.ownedBy = builder.ownedBy;
×
98
    this.sharedLink = builder.sharedLink;
×
99
    this.itemStatus = builder.itemStatus;
×
100
  }
×
101

102
  public EnumWrapper<TrashWebLinkTypeField> getType() {
103
    return type;
×
104
  }
105

106
  public String getId() {
107
    return id;
1✔
108
  }
109

110
  public String getSequenceId() {
111
    return sequenceId;
×
112
  }
113

114
  public String getEtag() {
115
    return etag;
×
116
  }
117

118
  public String getName() {
119
    return name;
1✔
120
  }
121

122
  public String getUrl() {
123
    return url;
×
124
  }
125

126
  public FolderMini getParent() {
127
    return parent;
×
128
  }
129

130
  public String getDescription() {
131
    return description;
×
132
  }
133

134
  public TrashWebLinkPathCollectionField getPathCollection() {
135
    return pathCollection;
×
136
  }
137

138
  public Date getCreatedAt() {
139
    return createdAt;
×
140
  }
141

142
  public Date getModifiedAt() {
143
    return modifiedAt;
×
144
  }
145

146
  public Date getTrashedAt() {
147
    return trashedAt;
×
148
  }
149

150
  public Date getPurgedAt() {
151
    return purgedAt;
×
152
  }
153

154
  public UserMini getCreatedBy() {
155
    return createdBy;
×
156
  }
157

158
  public UserMini getModifiedBy() {
159
    return modifiedBy;
×
160
  }
161

162
  public UserMini getOwnedBy() {
163
    return ownedBy;
×
164
  }
165

166
  public String getSharedLink() {
167
    return sharedLink;
×
168
  }
169

170
  public EnumWrapper<TrashWebLinkItemStatusField> getItemStatus() {
171
    return itemStatus;
×
172
  }
173

174
  @Override
175
  public boolean equals(Object o) {
176
    if (this == o) {
×
177
      return true;
×
178
    }
179
    if (o == null || getClass() != o.getClass()) {
×
180
      return false;
×
181
    }
182
    TrashWebLink casted = (TrashWebLink) o;
×
183
    return Objects.equals(type, casted.type)
×
184
        && Objects.equals(id, casted.id)
×
185
        && Objects.equals(sequenceId, casted.sequenceId)
×
186
        && Objects.equals(etag, casted.etag)
×
187
        && Objects.equals(name, casted.name)
×
188
        && Objects.equals(url, casted.url)
×
189
        && Objects.equals(parent, casted.parent)
×
190
        && Objects.equals(description, casted.description)
×
191
        && Objects.equals(pathCollection, casted.pathCollection)
×
192
        && Objects.equals(createdAt, casted.createdAt)
×
193
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
194
        && Objects.equals(trashedAt, casted.trashedAt)
×
195
        && Objects.equals(purgedAt, casted.purgedAt)
×
196
        && Objects.equals(createdBy, casted.createdBy)
×
197
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
198
        && Objects.equals(ownedBy, casted.ownedBy)
×
199
        && Objects.equals(sharedLink, casted.sharedLink)
×
200
        && Objects.equals(itemStatus, casted.itemStatus);
×
201
  }
202

203
  @Override
204
  public int hashCode() {
205
    return Objects.hash(
×
206
        type,
207
        id,
208
        sequenceId,
209
        etag,
210
        name,
211
        url,
212
        parent,
213
        description,
214
        pathCollection,
215
        createdAt,
216
        modifiedAt,
217
        trashedAt,
218
        purgedAt,
219
        createdBy,
220
        modifiedBy,
221
        ownedBy,
222
        sharedLink,
223
        itemStatus);
224
  }
225

226
  @Override
227
  public String toString() {
228
    return "TrashWebLink{"
×
229
        + "type='"
230
        + type
231
        + '\''
232
        + ", "
233
        + "id='"
234
        + id
235
        + '\''
236
        + ", "
237
        + "sequenceId='"
238
        + sequenceId
239
        + '\''
240
        + ", "
241
        + "etag='"
242
        + etag
243
        + '\''
244
        + ", "
245
        + "name='"
246
        + name
247
        + '\''
248
        + ", "
249
        + "url='"
250
        + url
251
        + '\''
252
        + ", "
253
        + "parent='"
254
        + parent
255
        + '\''
256
        + ", "
257
        + "description='"
258
        + description
259
        + '\''
260
        + ", "
261
        + "pathCollection='"
262
        + pathCollection
263
        + '\''
264
        + ", "
265
        + "createdAt='"
266
        + createdAt
267
        + '\''
268
        + ", "
269
        + "modifiedAt='"
270
        + modifiedAt
271
        + '\''
272
        + ", "
273
        + "trashedAt='"
274
        + trashedAt
275
        + '\''
276
        + ", "
277
        + "purgedAt='"
278
        + purgedAt
279
        + '\''
280
        + ", "
281
        + "createdBy='"
282
        + createdBy
283
        + '\''
284
        + ", "
285
        + "modifiedBy='"
286
        + modifiedBy
287
        + '\''
288
        + ", "
289
        + "ownedBy='"
290
        + ownedBy
291
        + '\''
292
        + ", "
293
        + "sharedLink='"
294
        + sharedLink
295
        + '\''
296
        + ", "
297
        + "itemStatus='"
298
        + itemStatus
299
        + '\''
300
        + "}";
301
  }
302

NEW
303
  public static class Builder {
×
304

305
    protected EnumWrapper<TrashWebLinkTypeField> type;
306

307
    protected String id;
308

309
    protected String sequenceId;
310

311
    protected String etag;
312

313
    protected String name;
314

315
    protected String url;
316

317
    protected FolderMini parent;
318

319
    protected String description;
320

321
    protected TrashWebLinkPathCollectionField pathCollection;
322

323
    protected Date createdAt;
324

325
    protected Date modifiedAt;
326

327
    protected Date trashedAt;
328

329
    protected Date purgedAt;
330

331
    protected UserMini createdBy;
332

333
    protected UserMini modifiedBy;
334

335
    protected UserMini ownedBy;
336

337
    protected String sharedLink;
338

339
    protected EnumWrapper<TrashWebLinkItemStatusField> itemStatus;
340

341
    public Builder type(TrashWebLinkTypeField type) {
342
      this.type = new EnumWrapper<TrashWebLinkTypeField>(type);
×
343
      return this;
×
344
    }
345

346
    public Builder type(EnumWrapper<TrashWebLinkTypeField> type) {
347
      this.type = type;
×
348
      return this;
×
349
    }
350

351
    public Builder id(String id) {
352
      this.id = id;
×
353
      return this;
×
354
    }
355

356
    public Builder sequenceId(String sequenceId) {
357
      this.sequenceId = sequenceId;
×
358
      return this;
×
359
    }
360

361
    public Builder etag(String etag) {
362
      this.etag = etag;
×
363
      return this;
×
364
    }
365

366
    public Builder name(String name) {
367
      this.name = name;
×
368
      return this;
×
369
    }
370

371
    public Builder url(String url) {
372
      this.url = url;
×
373
      return this;
×
374
    }
375

376
    public Builder parent(FolderMini parent) {
377
      this.parent = parent;
×
378
      return this;
×
379
    }
380

381
    public Builder description(String description) {
382
      this.description = description;
×
383
      return this;
×
384
    }
385

386
    public Builder pathCollection(TrashWebLinkPathCollectionField pathCollection) {
387
      this.pathCollection = pathCollection;
×
388
      return this;
×
389
    }
390

391
    public Builder createdAt(Date createdAt) {
392
      this.createdAt = createdAt;
×
393
      return this;
×
394
    }
395

396
    public Builder modifiedAt(Date modifiedAt) {
397
      this.modifiedAt = modifiedAt;
×
398
      return this;
×
399
    }
400

401
    public Builder trashedAt(Date trashedAt) {
402
      this.trashedAt = trashedAt;
×
403
      return this;
×
404
    }
405

406
    public Builder purgedAt(Date purgedAt) {
407
      this.purgedAt = purgedAt;
×
408
      return this;
×
409
    }
410

411
    public Builder createdBy(UserMini createdBy) {
412
      this.createdBy = createdBy;
×
413
      return this;
×
414
    }
415

416
    public Builder modifiedBy(UserMini modifiedBy) {
417
      this.modifiedBy = modifiedBy;
×
418
      return this;
×
419
    }
420

421
    public Builder ownedBy(UserMini ownedBy) {
422
      this.ownedBy = ownedBy;
×
423
      return this;
×
424
    }
425

426
    public Builder sharedLink(String sharedLink) {
427
      this.sharedLink = sharedLink;
×
428
      return this;
×
429
    }
430

431
    public Builder itemStatus(TrashWebLinkItemStatusField itemStatus) {
432
      this.itemStatus = new EnumWrapper<TrashWebLinkItemStatusField>(itemStatus);
×
433
      return this;
×
434
    }
435

436
    public Builder itemStatus(EnumWrapper<TrashWebLinkItemStatusField> itemStatus) {
437
      this.itemStatus = itemStatus;
×
438
      return this;
×
439
    }
440

441
    public TrashWebLink build() {
442
      return new TrashWebLink(this);
×
443
    }
444
  }
445
}
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