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

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

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

3.6
/src/main/java/com/box/sdkgen/schemas/trashweblink/TrashWebLink.java
1
package com.box.sdkgen.schemas.trashweblink;
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.time.OffsetDateTime;
15
import java.util.Objects;
16

17
/** Represents a trashed web link. */
18
@JsonFilter("nullablePropertyFilter")
19
public class TrashWebLink extends SerializableObject {
20

21
  /** The value will always be `web_link`. */
22
  @JsonDeserialize(using = TrashWebLinkTypeField.TrashWebLinkTypeFieldDeserializer.class)
23
  @JsonSerialize(using = TrashWebLinkTypeField.TrashWebLinkTypeFieldSerializer.class)
24
  protected EnumWrapper<TrashWebLinkTypeField> type;
25

26
  /** The unique identifier for this web link. */
27
  protected String id;
28

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

32
  /** The entity tag of this web link. Used with `If-Match` headers. */
33
  protected String etag;
34

35
  /** The name of the web link. */
36
  protected String name;
37

38
  /** The URL this web link points to. */
39
  protected String url;
40

41
  protected FolderMini parent;
42

43
  /** The description accompanying the web link. This is visible within the Box web application. */
44
  protected String description;
45

46
  @JsonProperty("path_collection")
47
  protected TrashWebLinkPathCollectionField pathCollection;
48

49
  /** When this file was created on Box’s servers. */
50
  @JsonProperty("created_at")
51
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
52
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
53
  protected OffsetDateTime createdAt;
54

55
  /** When this file was last updated on the Box servers. */
56
  @JsonProperty("modified_at")
57
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
58
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
59
  protected OffsetDateTime modifiedAt;
60

61
  /** When this file was last moved to the trash. */
62
  @JsonProperty("trashed_at")
63
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
64
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
65
  @Nullable
66
  protected OffsetDateTime trashedAt;
67

68
  /** When this file will be permanently deleted. */
69
  @JsonProperty("purged_at")
70
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
71
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
72
  @Nullable
73
  protected OffsetDateTime purgedAt;
74

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

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

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

84
  /**
85
   * The shared link for this bookmark. This will be `null` if a bookmark has been trashed, since
86
   * the link will no longer be active.
87
   */
88
  @JsonProperty("shared_link")
89
  @Nullable
90
  protected String sharedLink;
91

92
  /**
93
   * Whether this item is deleted or not. Values include `active`, `trashed` if the file has been
94
   * moved to the trash, and `deleted` if the file has been permanently deleted.
95
   */
96
  @JsonDeserialize(
97
      using = TrashWebLinkItemStatusField.TrashWebLinkItemStatusFieldDeserializer.class)
98
  @JsonSerialize(using = TrashWebLinkItemStatusField.TrashWebLinkItemStatusFieldSerializer.class)
99
  @JsonProperty("item_status")
100
  protected EnumWrapper<TrashWebLinkItemStatusField> itemStatus;
101

102
  public TrashWebLink() {
103
    super();
1✔
104
  }
1✔
105

106
  protected TrashWebLink(Builder builder) {
107
    super();
×
108
    this.type = builder.type;
×
109
    this.id = builder.id;
×
110
    this.sequenceId = builder.sequenceId;
×
111
    this.etag = builder.etag;
×
112
    this.name = builder.name;
×
113
    this.url = builder.url;
×
114
    this.parent = builder.parent;
×
115
    this.description = builder.description;
×
116
    this.pathCollection = builder.pathCollection;
×
117
    this.createdAt = builder.createdAt;
×
118
    this.modifiedAt = builder.modifiedAt;
×
119
    this.trashedAt = builder.trashedAt;
×
120
    this.purgedAt = builder.purgedAt;
×
121
    this.createdBy = builder.createdBy;
×
122
    this.modifiedBy = builder.modifiedBy;
×
123
    this.ownedBy = builder.ownedBy;
×
124
    this.sharedLink = builder.sharedLink;
×
125
    this.itemStatus = builder.itemStatus;
×
126
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
127
  }
×
128

129
  public EnumWrapper<TrashWebLinkTypeField> getType() {
130
    return type;
×
131
  }
132

133
  public String getId() {
134
    return id;
1✔
135
  }
136

137
  public String getSequenceId() {
138
    return sequenceId;
×
139
  }
140

141
  public String getEtag() {
142
    return etag;
×
143
  }
144

145
  public String getName() {
146
    return name;
1✔
147
  }
148

149
  public String getUrl() {
150
    return url;
×
151
  }
152

153
  public FolderMini getParent() {
154
    return parent;
×
155
  }
156

157
  public String getDescription() {
158
    return description;
×
159
  }
160

161
  public TrashWebLinkPathCollectionField getPathCollection() {
162
    return pathCollection;
×
163
  }
164

165
  public OffsetDateTime getCreatedAt() {
166
    return createdAt;
×
167
  }
168

169
  public OffsetDateTime getModifiedAt() {
170
    return modifiedAt;
×
171
  }
172

173
  public OffsetDateTime getTrashedAt() {
174
    return trashedAt;
×
175
  }
176

177
  public OffsetDateTime getPurgedAt() {
178
    return purgedAt;
×
179
  }
180

181
  public UserMini getCreatedBy() {
182
    return createdBy;
×
183
  }
184

185
  public UserMini getModifiedBy() {
186
    return modifiedBy;
×
187
  }
188

189
  public UserMini getOwnedBy() {
190
    return ownedBy;
×
191
  }
192

193
  public String getSharedLink() {
194
    return sharedLink;
×
195
  }
196

197
  public EnumWrapper<TrashWebLinkItemStatusField> getItemStatus() {
198
    return itemStatus;
×
199
  }
200

201
  @Override
202
  public boolean equals(Object o) {
203
    if (this == o) {
×
204
      return true;
×
205
    }
206
    if (o == null || getClass() != o.getClass()) {
×
207
      return false;
×
208
    }
209
    TrashWebLink casted = (TrashWebLink) o;
×
210
    return Objects.equals(type, casted.type)
×
211
        && Objects.equals(id, casted.id)
×
212
        && Objects.equals(sequenceId, casted.sequenceId)
×
213
        && Objects.equals(etag, casted.etag)
×
214
        && Objects.equals(name, casted.name)
×
215
        && Objects.equals(url, casted.url)
×
216
        && Objects.equals(parent, casted.parent)
×
217
        && Objects.equals(description, casted.description)
×
218
        && Objects.equals(pathCollection, casted.pathCollection)
×
219
        && Objects.equals(createdAt, casted.createdAt)
×
220
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
221
        && Objects.equals(trashedAt, casted.trashedAt)
×
222
        && Objects.equals(purgedAt, casted.purgedAt)
×
223
        && Objects.equals(createdBy, casted.createdBy)
×
224
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
225
        && Objects.equals(ownedBy, casted.ownedBy)
×
226
        && Objects.equals(sharedLink, casted.sharedLink)
×
227
        && Objects.equals(itemStatus, casted.itemStatus);
×
228
  }
229

230
  @Override
231
  public int hashCode() {
232
    return Objects.hash(
×
233
        type,
234
        id,
235
        sequenceId,
236
        etag,
237
        name,
238
        url,
239
        parent,
240
        description,
241
        pathCollection,
242
        createdAt,
243
        modifiedAt,
244
        trashedAt,
245
        purgedAt,
246
        createdBy,
247
        modifiedBy,
248
        ownedBy,
249
        sharedLink,
250
        itemStatus);
251
  }
252

253
  @Override
254
  public String toString() {
255
    return "TrashWebLink{"
×
256
        + "type='"
257
        + type
258
        + '\''
259
        + ", "
260
        + "id='"
261
        + id
262
        + '\''
263
        + ", "
264
        + "sequenceId='"
265
        + sequenceId
266
        + '\''
267
        + ", "
268
        + "etag='"
269
        + etag
270
        + '\''
271
        + ", "
272
        + "name='"
273
        + name
274
        + '\''
275
        + ", "
276
        + "url='"
277
        + url
278
        + '\''
279
        + ", "
280
        + "parent='"
281
        + parent
282
        + '\''
283
        + ", "
284
        + "description='"
285
        + description
286
        + '\''
287
        + ", "
288
        + "pathCollection='"
289
        + pathCollection
290
        + '\''
291
        + ", "
292
        + "createdAt='"
293
        + createdAt
294
        + '\''
295
        + ", "
296
        + "modifiedAt='"
297
        + modifiedAt
298
        + '\''
299
        + ", "
300
        + "trashedAt='"
301
        + trashedAt
302
        + '\''
303
        + ", "
304
        + "purgedAt='"
305
        + purgedAt
306
        + '\''
307
        + ", "
308
        + "createdBy='"
309
        + createdBy
310
        + '\''
311
        + ", "
312
        + "modifiedBy='"
313
        + modifiedBy
314
        + '\''
315
        + ", "
316
        + "ownedBy='"
317
        + ownedBy
318
        + '\''
319
        + ", "
320
        + "sharedLink='"
321
        + sharedLink
322
        + '\''
323
        + ", "
324
        + "itemStatus='"
325
        + itemStatus
326
        + '\''
327
        + "}";
328
  }
329

330
  public static class Builder extends NullableFieldTracker {
×
331

332
    protected EnumWrapper<TrashWebLinkTypeField> type;
333

334
    protected String id;
335

336
    protected String sequenceId;
337

338
    protected String etag;
339

340
    protected String name;
341

342
    protected String url;
343

344
    protected FolderMini parent;
345

346
    protected String description;
347

348
    protected TrashWebLinkPathCollectionField pathCollection;
349

350
    protected OffsetDateTime createdAt;
351

352
    protected OffsetDateTime modifiedAt;
353

354
    protected OffsetDateTime trashedAt;
355

356
    protected OffsetDateTime purgedAt;
357

358
    protected UserMini createdBy;
359

360
    protected UserMini modifiedBy;
361

362
    protected UserMini ownedBy;
363

364
    protected String sharedLink;
365

366
    protected EnumWrapper<TrashWebLinkItemStatusField> itemStatus;
367

368
    public Builder type(TrashWebLinkTypeField type) {
369
      this.type = new EnumWrapper<TrashWebLinkTypeField>(type);
×
370
      return this;
×
371
    }
372

373
    public Builder type(EnumWrapper<TrashWebLinkTypeField> type) {
374
      this.type = type;
×
375
      return this;
×
376
    }
377

378
    public Builder id(String id) {
379
      this.id = id;
×
380
      return this;
×
381
    }
382

383
    public Builder sequenceId(String sequenceId) {
384
      this.sequenceId = sequenceId;
×
385
      return this;
×
386
    }
387

388
    public Builder etag(String etag) {
389
      this.etag = etag;
×
390
      return this;
×
391
    }
392

393
    public Builder name(String name) {
394
      this.name = name;
×
395
      return this;
×
396
    }
397

398
    public Builder url(String url) {
399
      this.url = url;
×
400
      return this;
×
401
    }
402

403
    public Builder parent(FolderMini parent) {
404
      this.parent = parent;
×
405
      return this;
×
406
    }
407

408
    public Builder description(String description) {
409
      this.description = description;
×
410
      return this;
×
411
    }
412

413
    public Builder pathCollection(TrashWebLinkPathCollectionField pathCollection) {
414
      this.pathCollection = pathCollection;
×
415
      return this;
×
416
    }
417

418
    public Builder createdAt(OffsetDateTime createdAt) {
419
      this.createdAt = createdAt;
×
420
      return this;
×
421
    }
422

423
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
424
      this.modifiedAt = modifiedAt;
×
425
      return this;
×
426
    }
427

428
    public Builder trashedAt(OffsetDateTime trashedAt) {
429
      this.trashedAt = trashedAt;
×
430
      this.markNullableFieldAsSet("trashed_at");
×
431
      return this;
×
432
    }
433

434
    public Builder purgedAt(OffsetDateTime purgedAt) {
435
      this.purgedAt = purgedAt;
×
436
      this.markNullableFieldAsSet("purged_at");
×
437
      return this;
×
438
    }
439

440
    public Builder createdBy(UserMini createdBy) {
441
      this.createdBy = createdBy;
×
442
      return this;
×
443
    }
444

445
    public Builder modifiedBy(UserMini modifiedBy) {
446
      this.modifiedBy = modifiedBy;
×
447
      return this;
×
448
    }
449

450
    public Builder ownedBy(UserMini ownedBy) {
451
      this.ownedBy = ownedBy;
×
452
      return this;
×
453
    }
454

455
    public Builder sharedLink(String sharedLink) {
456
      this.sharedLink = sharedLink;
×
457
      this.markNullableFieldAsSet("shared_link");
×
458
      return this;
×
459
    }
460

461
    public Builder itemStatus(TrashWebLinkItemStatusField itemStatus) {
462
      this.itemStatus = new EnumWrapper<TrashWebLinkItemStatusField>(itemStatus);
×
463
      return this;
×
464
    }
465

466
    public Builder itemStatus(EnumWrapper<TrashWebLinkItemStatusField> itemStatus) {
467
      this.itemStatus = itemStatus;
×
468
      return this;
×
469
    }
470

471
    public TrashWebLink build() {
472
      return new TrashWebLink(this);
×
473
    }
474
  }
475
}
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