• 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

6.19
/src/main/java/com/box/sdkgen/schemas/weblink/WebLink.java
1
package com.box.sdkgen.schemas.weblink;
2

3
import com.box.sdkgen.internal.Nullable;
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.schemas.weblinkbase.WebLinkBaseTypeField;
8
import com.box.sdkgen.schemas.weblinkmini.WebLinkMini;
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
/**
18
 * Web links are objects that point to URLs. These objects are also known as bookmarks within the
19
 * Box web application.
20
 *
21
 * <p>Web link objects are treated similarly to file objects, they will also support most actions
22
 * that apply to regular files.
23
 */
24
@JsonFilter("nullablePropertyFilter")
25
public class WebLink extends WebLinkMini {
26

27
  protected FolderMini parent;
28

29
  /** The description accompanying the web link. This is visible within the Box web application. */
30
  protected String description;
31

32
  @JsonProperty("path_collection")
33
  protected WebLinkPathCollectionField pathCollection;
34

35
  /** When this file was created on Box’s servers. */
36
  @JsonProperty("created_at")
37
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
38
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
39
  protected OffsetDateTime createdAt;
40

41
  /** When this file was last updated on the Box servers. */
42
  @JsonProperty("modified_at")
43
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
44
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
45
  protected OffsetDateTime modifiedAt;
46

47
  /** When this file was moved to the trash. */
48
  @JsonProperty("trashed_at")
49
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
50
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
51
  @Nullable
52
  protected OffsetDateTime trashedAt;
53

54
  /** When this file will be permanently deleted. */
55
  @JsonProperty("purged_at")
56
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
57
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
58
  @Nullable
59
  protected OffsetDateTime purgedAt;
60

61
  @JsonProperty("created_by")
62
  protected UserMini createdBy;
63

64
  @JsonProperty("modified_by")
65
  protected UserMini modifiedBy;
66

67
  @JsonProperty("owned_by")
68
  protected UserMini ownedBy;
69

70
  @JsonProperty("shared_link")
71
  protected WebLinkSharedLinkField sharedLink;
72

73
  /**
74
   * Whether this item is deleted or not. Values include `active`, `trashed` if the file has been
75
   * moved to the trash, and `deleted` if the file has been permanently deleted.
76
   */
77
  @JsonDeserialize(using = WebLinkItemStatusField.WebLinkItemStatusFieldDeserializer.class)
78
  @JsonSerialize(using = WebLinkItemStatusField.WebLinkItemStatusFieldSerializer.class)
79
  @JsonProperty("item_status")
80
  protected EnumWrapper<WebLinkItemStatusField> itemStatus;
81

82
  public WebLink(@JsonProperty("id") String id) {
83
    super(id);
1✔
84
  }
1✔
85

86
  protected WebLink(Builder builder) {
87
    super(builder);
×
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
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
101
  }
×
102

103
  public FolderMini getParent() {
104
    return parent;
1✔
105
  }
106

107
  public String getDescription() {
108
    return description;
1✔
109
  }
110

111
  public WebLinkPathCollectionField getPathCollection() {
112
    return pathCollection;
×
113
  }
114

115
  public OffsetDateTime getCreatedAt() {
116
    return createdAt;
×
117
  }
118

119
  public OffsetDateTime getModifiedAt() {
120
    return modifiedAt;
×
121
  }
122

123
  public OffsetDateTime getTrashedAt() {
124
    return trashedAt;
×
125
  }
126

127
  public OffsetDateTime getPurgedAt() {
128
    return purgedAt;
×
129
  }
130

131
  public UserMini getCreatedBy() {
132
    return createdBy;
×
133
  }
134

135
  public UserMini getModifiedBy() {
136
    return modifiedBy;
×
137
  }
138

139
  public UserMini getOwnedBy() {
140
    return ownedBy;
×
141
  }
142

143
  public WebLinkSharedLinkField getSharedLink() {
144
    return sharedLink;
1✔
145
  }
146

147
  public EnumWrapper<WebLinkItemStatusField> getItemStatus() {
148
    return itemStatus;
1✔
149
  }
150

151
  @Override
152
  public boolean equals(Object o) {
153
    if (this == o) {
×
154
      return true;
×
155
    }
156
    if (o == null || getClass() != o.getClass()) {
×
157
      return false;
×
158
    }
159
    WebLink casted = (WebLink) o;
×
160
    return Objects.equals(id, casted.id)
×
161
        && Objects.equals(type, casted.type)
×
162
        && Objects.equals(etag, casted.etag)
×
163
        && Objects.equals(url, casted.url)
×
164
        && Objects.equals(sequenceId, casted.sequenceId)
×
165
        && Objects.equals(name, casted.name)
×
166
        && Objects.equals(parent, casted.parent)
×
167
        && Objects.equals(description, casted.description)
×
168
        && Objects.equals(pathCollection, casted.pathCollection)
×
169
        && Objects.equals(createdAt, casted.createdAt)
×
170
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
171
        && Objects.equals(trashedAt, casted.trashedAt)
×
172
        && Objects.equals(purgedAt, casted.purgedAt)
×
173
        && Objects.equals(createdBy, casted.createdBy)
×
174
        && Objects.equals(modifiedBy, casted.modifiedBy)
×
175
        && Objects.equals(ownedBy, casted.ownedBy)
×
176
        && Objects.equals(sharedLink, casted.sharedLink)
×
177
        && Objects.equals(itemStatus, casted.itemStatus);
×
178
  }
179

180
  @Override
181
  public int hashCode() {
182
    return Objects.hash(
×
183
        id,
184
        type,
185
        etag,
186
        url,
187
        sequenceId,
188
        name,
189
        parent,
190
        description,
191
        pathCollection,
192
        createdAt,
193
        modifiedAt,
194
        trashedAt,
195
        purgedAt,
196
        createdBy,
197
        modifiedBy,
198
        ownedBy,
199
        sharedLink,
200
        itemStatus);
201
  }
202

203
  @Override
204
  public String toString() {
205
    return "WebLink{"
×
206
        + "id='"
207
        + id
208
        + '\''
209
        + ", "
210
        + "type='"
211
        + type
212
        + '\''
213
        + ", "
214
        + "etag='"
215
        + etag
216
        + '\''
217
        + ", "
218
        + "url='"
219
        + url
220
        + '\''
221
        + ", "
222
        + "sequenceId='"
223
        + sequenceId
224
        + '\''
225
        + ", "
226
        + "name='"
227
        + name
228
        + '\''
229
        + ", "
230
        + "parent='"
231
        + parent
232
        + '\''
233
        + ", "
234
        + "description='"
235
        + description
236
        + '\''
237
        + ", "
238
        + "pathCollection='"
239
        + pathCollection
240
        + '\''
241
        + ", "
242
        + "createdAt='"
243
        + createdAt
244
        + '\''
245
        + ", "
246
        + "modifiedAt='"
247
        + modifiedAt
248
        + '\''
249
        + ", "
250
        + "trashedAt='"
251
        + trashedAt
252
        + '\''
253
        + ", "
254
        + "purgedAt='"
255
        + purgedAt
256
        + '\''
257
        + ", "
258
        + "createdBy='"
259
        + createdBy
260
        + '\''
261
        + ", "
262
        + "modifiedBy='"
263
        + modifiedBy
264
        + '\''
265
        + ", "
266
        + "ownedBy='"
267
        + ownedBy
268
        + '\''
269
        + ", "
270
        + "sharedLink='"
271
        + sharedLink
272
        + '\''
273
        + ", "
274
        + "itemStatus='"
275
        + itemStatus
276
        + '\''
277
        + "}";
278
  }
279

280
  public static class Builder extends WebLinkMini.Builder {
281

282
    protected FolderMini parent;
283

284
    protected String description;
285

286
    protected WebLinkPathCollectionField pathCollection;
287

288
    protected OffsetDateTime createdAt;
289

290
    protected OffsetDateTime modifiedAt;
291

292
    protected OffsetDateTime trashedAt;
293

294
    protected OffsetDateTime purgedAt;
295

296
    protected UserMini createdBy;
297

298
    protected UserMini modifiedBy;
299

300
    protected UserMini ownedBy;
301

302
    protected WebLinkSharedLinkField sharedLink;
303

304
    protected EnumWrapper<WebLinkItemStatusField> itemStatus;
305

306
    public Builder(String id) {
307
      super(id);
×
308
    }
×
309

310
    public Builder parent(FolderMini parent) {
311
      this.parent = parent;
×
312
      return this;
×
313
    }
314

315
    public Builder description(String description) {
316
      this.description = description;
×
317
      return this;
×
318
    }
319

320
    public Builder pathCollection(WebLinkPathCollectionField pathCollection) {
321
      this.pathCollection = pathCollection;
×
322
      return this;
×
323
    }
324

325
    public Builder createdAt(OffsetDateTime createdAt) {
326
      this.createdAt = createdAt;
×
327
      return this;
×
328
    }
329

330
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
331
      this.modifiedAt = modifiedAt;
×
332
      return this;
×
333
    }
334

335
    public Builder trashedAt(OffsetDateTime trashedAt) {
336
      this.trashedAt = trashedAt;
×
337
      this.markNullableFieldAsSet("trashed_at");
×
338
      return this;
×
339
    }
340

341
    public Builder purgedAt(OffsetDateTime purgedAt) {
342
      this.purgedAt = purgedAt;
×
343
      this.markNullableFieldAsSet("purged_at");
×
344
      return this;
×
345
    }
346

347
    public Builder createdBy(UserMini createdBy) {
348
      this.createdBy = createdBy;
×
349
      return this;
×
350
    }
351

352
    public Builder modifiedBy(UserMini modifiedBy) {
353
      this.modifiedBy = modifiedBy;
×
354
      return this;
×
355
    }
356

357
    public Builder ownedBy(UserMini ownedBy) {
358
      this.ownedBy = ownedBy;
×
359
      return this;
×
360
    }
361

362
    public Builder sharedLink(WebLinkSharedLinkField sharedLink) {
363
      this.sharedLink = sharedLink;
×
364
      return this;
×
365
    }
366

367
    public Builder itemStatus(WebLinkItemStatusField itemStatus) {
368
      this.itemStatus = new EnumWrapper<WebLinkItemStatusField>(itemStatus);
×
369
      return this;
×
370
    }
371

372
    public Builder itemStatus(EnumWrapper<WebLinkItemStatusField> itemStatus) {
373
      this.itemStatus = itemStatus;
×
374
      return this;
×
375
    }
376

377
    @Override
378
    public Builder type(WebLinkBaseTypeField type) {
379
      this.type = new EnumWrapper<WebLinkBaseTypeField>(type);
×
380
      return this;
×
381
    }
382

383
    @Override
384
    public Builder type(EnumWrapper<WebLinkBaseTypeField> type) {
385
      this.type = type;
×
386
      return this;
×
387
    }
388

389
    @Override
390
    public Builder etag(String etag) {
391
      this.etag = etag;
×
392
      return this;
×
393
    }
394

395
    @Override
396
    public Builder url(String url) {
397
      this.url = url;
×
398
      return this;
×
399
    }
400

401
    @Override
402
    public Builder sequenceId(String sequenceId) {
403
      this.sequenceId = sequenceId;
×
404
      return this;
×
405
    }
406

407
    @Override
408
    public Builder name(String name) {
409
      this.name = name;
×
410
      return this;
×
411
    }
412

413
    public WebLink build() {
414
      return new WebLink(this);
×
415
    }
416
  }
417
}
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