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

box / box-java-sdk / #7460

03 Aug 2026 08:17AM UTC coverage: 34.727% (-0.2%) from 34.932%
#7460

push

github

web-flow
feat: add `is_collaborated_content_available_when_owner_inactive` property (box/box-openapi#613) (#1946)

Co-authored-by: box-sdk-build <box-sdk-build@box.com>

2 of 10 new or added lines in 2 files covered. (20.0%)

655 existing lines in 14 files now uncovered.

19663 of 56622 relevant lines covered (34.73%)

0.35 hits per line

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

6.92
/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.collection.Collection;
6
import com.box.sdkgen.schemas.foldermini.FolderMini;
7
import com.box.sdkgen.schemas.usermini.UserMini;
8
import com.box.sdkgen.schemas.weblinkbase.WebLinkBaseTypeField;
9
import com.box.sdkgen.schemas.weblinkmini.WebLinkMini;
10
import com.box.sdkgen.serialization.json.EnumWrapper;
11
import com.box.sdkgen.serialization.json.Valuable;
12
import com.fasterxml.jackson.annotation.JsonFilter;
13
import com.fasterxml.jackson.annotation.JsonProperty;
14
import com.fasterxml.jackson.core.JsonGenerator;
15
import com.fasterxml.jackson.core.JsonParser;
16
import com.fasterxml.jackson.databind.DeserializationContext;
17
import com.fasterxml.jackson.databind.JsonDeserializer;
18
import com.fasterxml.jackson.databind.JsonNode;
19
import com.fasterxml.jackson.databind.JsonSerializer;
20
import com.fasterxml.jackson.databind.SerializerProvider;
21
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
22
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
23
import java.io.IOException;
24
import java.time.OffsetDateTime;
25
import java.util.ArrayList;
26
import java.util.List;
27
import java.util.Objects;
28

29
/**
30
 * Web links are objects that point to URLs. These objects are also known as bookmarks within the
31
 * Box web application.
32
 *
33
 * <p>Web link objects are treated similarly to file objects, they will also support most actions
34
 * that apply to regular files.
35
 */
36
@JsonFilter("nullablePropertyFilter")
37
public class WebLink extends WebLinkMini {
38

39
  protected FolderMini parent;
40

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

44
  @JsonProperty("path_collection")
45
  protected WebLinkPathCollectionField pathCollection;
46

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

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

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

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

73
  @JsonProperty("created_by")
74
  protected UserMini createdBy;
75

76
  @JsonProperty("modified_by")
77
  protected UserMini modifiedBy;
78

79
  @JsonProperty("owned_by")
80
  protected UserMini ownedBy;
81

82
  @JsonProperty("shared_link")
83
  protected WebLinkSharedLinkField sharedLink;
84

85
  /**
86
   * Whether this item is deleted or not. Values include `active`, `trashed` if the file has been
87
   * moved to the trash, and `deleted` if the file has been permanently deleted.
88
   */
89
  @JsonDeserialize(using = WebLinkItemStatusField.WebLinkItemStatusFieldDeserializer.class)
90
  @JsonSerialize(using = WebLinkItemStatusField.WebLinkItemStatusFieldSerializer.class)
91
  @JsonProperty("item_status")
92
  protected EnumWrapper<WebLinkItemStatusField> itemStatus;
93

94
  /**
95
   * The collections that this web link belongs to.
96
   *
97
   * <p>For more information, see the [collections
98
   * guide](https://developer.box.com/guides/collections).
99
   */
100
  protected List<Collection> collections;
101

102
  /**
103
   * The shared link access levels the authenticated user is allowed to use when creating or
104
   * updating a shared link for this web link.
105
   *
106
   * <p>The list depends on item policy and user authorization, so it may be narrower than the
107
   * levels available to the owner. An empty array means no access level is available to this user.
108
   */
109
  @JsonDeserialize(using = AllowedSharedLinkAccessLevelsDeserializer.class)
110
  @JsonSerialize(using = AllowedSharedLinkAccessLevelsSerializer.class)
111
  @JsonProperty("allowed_shared_link_access_levels")
112
  protected List<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>>
113
      allowedSharedLinkAccessLevels;
114

115
  public WebLink(@JsonProperty("id") String id) {
116
    super(id);
1✔
117
  }
1✔
118

119
  protected WebLink(Builder builder) {
120
    super(builder);
×
UNCOV
121
    this.parent = builder.parent;
×
UNCOV
122
    this.description = builder.description;
×
UNCOV
123
    this.pathCollection = builder.pathCollection;
×
124
    this.createdAt = builder.createdAt;
×
UNCOV
125
    this.modifiedAt = builder.modifiedAt;
×
UNCOV
126
    this.trashedAt = builder.trashedAt;
×
UNCOV
127
    this.purgedAt = builder.purgedAt;
×
128
    this.createdBy = builder.createdBy;
×
UNCOV
129
    this.modifiedBy = builder.modifiedBy;
×
UNCOV
130
    this.ownedBy = builder.ownedBy;
×
UNCOV
131
    this.sharedLink = builder.sharedLink;
×
132
    this.itemStatus = builder.itemStatus;
×
UNCOV
133
    this.collections = builder.collections;
×
UNCOV
134
    this.allowedSharedLinkAccessLevels = builder.allowedSharedLinkAccessLevels;
×
UNCOV
135
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
136
  }
×
137

138
  public FolderMini getParent() {
139
    return parent;
1✔
140
  }
141

142
  public String getDescription() {
143
    return description;
1✔
144
  }
145

146
  public WebLinkPathCollectionField getPathCollection() {
UNCOV
147
    return pathCollection;
×
148
  }
149

150
  public OffsetDateTime getCreatedAt() {
UNCOV
151
    return createdAt;
×
152
  }
153

154
  public OffsetDateTime getModifiedAt() {
UNCOV
155
    return modifiedAt;
×
156
  }
157

158
  public OffsetDateTime getTrashedAt() {
159
    return trashedAt;
×
160
  }
161

162
  public OffsetDateTime getPurgedAt() {
163
    return purgedAt;
×
164
  }
165

166
  public UserMini getCreatedBy() {
167
    return createdBy;
×
168
  }
169

170
  public UserMini getModifiedBy() {
171
    return modifiedBy;
×
172
  }
173

174
  public UserMini getOwnedBy() {
175
    return ownedBy;
×
176
  }
177

178
  public WebLinkSharedLinkField getSharedLink() {
179
    return sharedLink;
1✔
180
  }
181

182
  public EnumWrapper<WebLinkItemStatusField> getItemStatus() {
183
    return itemStatus;
1✔
184
  }
185

186
  public List<Collection> getCollections() {
UNCOV
187
    return collections;
×
188
  }
189

190
  public List<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>>
191
      getAllowedSharedLinkAccessLevels() {
UNCOV
192
    return allowedSharedLinkAccessLevels;
×
193
  }
194

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

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

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

336
  public static class Builder extends WebLinkMini.Builder {
337

338
    protected FolderMini parent;
339

340
    protected String description;
341

342
    protected WebLinkPathCollectionField pathCollection;
343

344
    protected OffsetDateTime createdAt;
345

346
    protected OffsetDateTime modifiedAt;
347

348
    protected OffsetDateTime trashedAt;
349

350
    protected OffsetDateTime purgedAt;
351

352
    protected UserMini createdBy;
353

354
    protected UserMini modifiedBy;
355

356
    protected UserMini ownedBy;
357

358
    protected WebLinkSharedLinkField sharedLink;
359

360
    protected EnumWrapper<WebLinkItemStatusField> itemStatus;
361

362
    protected List<Collection> collections;
363

364
    protected List<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>>
365
        allowedSharedLinkAccessLevels;
366

367
    public Builder(String id) {
368
      super(id);
×
369
    }
×
370

371
    public Builder parent(FolderMini parent) {
UNCOV
372
      this.parent = parent;
×
373
      return this;
×
374
    }
375

376
    public Builder description(String description) {
UNCOV
377
      this.description = description;
×
UNCOV
378
      return this;
×
379
    }
380

381
    public Builder pathCollection(WebLinkPathCollectionField pathCollection) {
UNCOV
382
      this.pathCollection = pathCollection;
×
UNCOV
383
      return this;
×
384
    }
385

386
    public Builder createdAt(OffsetDateTime createdAt) {
UNCOV
387
      this.createdAt = createdAt;
×
UNCOV
388
      return this;
×
389
    }
390

391
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
392
      this.modifiedAt = modifiedAt;
×
UNCOV
393
      return this;
×
394
    }
395

396
    public Builder trashedAt(OffsetDateTime trashedAt) {
397
      this.trashedAt = trashedAt;
×
398
      this.markNullableFieldAsSet("trashed_at");
×
UNCOV
399
      return this;
×
400
    }
401

402
    public Builder purgedAt(OffsetDateTime purgedAt) {
403
      this.purgedAt = purgedAt;
×
404
      this.markNullableFieldAsSet("purged_at");
×
UNCOV
405
      return this;
×
406
    }
407

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

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

418
    public Builder ownedBy(UserMini ownedBy) {
UNCOV
419
      this.ownedBy = ownedBy;
×
UNCOV
420
      return this;
×
421
    }
422

423
    public Builder sharedLink(WebLinkSharedLinkField sharedLink) {
UNCOV
424
      this.sharedLink = sharedLink;
×
UNCOV
425
      return this;
×
426
    }
427

428
    public Builder itemStatus(WebLinkItemStatusField itemStatus) {
UNCOV
429
      this.itemStatus = new EnumWrapper<WebLinkItemStatusField>(itemStatus);
×
UNCOV
430
      return this;
×
431
    }
432

433
    public Builder itemStatus(EnumWrapper<WebLinkItemStatusField> itemStatus) {
UNCOV
434
      this.itemStatus = itemStatus;
×
UNCOV
435
      return this;
×
436
    }
437

438
    public Builder collections(List<Collection> collections) {
UNCOV
439
      this.collections = collections;
×
UNCOV
440
      return this;
×
441
    }
442

443
    public Builder allowedSharedLinkAccessLevels(
444
        List<? extends Valuable> allowedSharedLinkAccessLevels) {
UNCOV
445
      this.allowedSharedLinkAccessLevels =
×
UNCOV
446
          EnumWrapper.wrapValuableEnumList(
×
447
              allowedSharedLinkAccessLevels, WebLinkAllowedSharedLinkAccessLevelsField.class);
UNCOV
448
      return this;
×
449
    }
450

451
    @Override
452
    public Builder type(WebLinkBaseTypeField type) {
UNCOV
453
      this.type = new EnumWrapper<WebLinkBaseTypeField>(type);
×
UNCOV
454
      return this;
×
455
    }
456

457
    @Override
458
    public Builder type(EnumWrapper<WebLinkBaseTypeField> type) {
UNCOV
459
      this.type = type;
×
UNCOV
460
      return this;
×
461
    }
462

463
    @Override
464
    public Builder etag(String etag) {
UNCOV
465
      this.etag = etag;
×
UNCOV
466
      return this;
×
467
    }
468

469
    @Override
470
    public Builder url(String url) {
UNCOV
471
      this.url = url;
×
UNCOV
472
      return this;
×
473
    }
474

475
    @Override
476
    public Builder sequenceId(String sequenceId) {
UNCOV
477
      this.sequenceId = sequenceId;
×
UNCOV
478
      return this;
×
479
    }
480

481
    @Override
482
    public Builder name(String name) {
UNCOV
483
      this.name = name;
×
UNCOV
484
      return this;
×
485
    }
486

487
    public WebLink build() {
UNCOV
488
      if (this.type == null) {
×
UNCOV
489
        this.type = new EnumWrapper<WebLinkBaseTypeField>(WebLinkBaseTypeField.WEB_LINK);
×
490
      }
UNCOV
491
      return new WebLink(this);
×
492
    }
493
  }
494

495
  public static class AllowedSharedLinkAccessLevelsDeserializer
496
      extends JsonDeserializer<List<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>>> {
497

498
    public final JsonDeserializer<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>>
499
        elementDeserializer;
500

501
    public AllowedSharedLinkAccessLevelsDeserializer() {
502
      super();
1✔
503
      this.elementDeserializer =
1✔
504
          new WebLinkAllowedSharedLinkAccessLevelsField
505
              .WebLinkAllowedSharedLinkAccessLevelsFieldDeserializer();
506
    }
1✔
507

508
    @Override
509
    public List<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>> deserialize(
510
        JsonParser p, DeserializationContext ctxt) throws IOException {
UNCOV
511
      JsonNode node = p.getCodec().readTree(p);
×
UNCOV
512
      List<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>> elements = new ArrayList<>();
×
UNCOV
513
      for (JsonNode item : node) {
×
UNCOV
514
        JsonParser pa = item.traverse(p.getCodec());
×
UNCOV
515
        pa.nextToken();
×
UNCOV
516
        elements.add(elementDeserializer.deserialize(pa, ctxt));
×
UNCOV
517
      }
×
UNCOV
518
      return elements;
×
519
    }
520
  }
521

522
  public static class AllowedSharedLinkAccessLevelsSerializer
523
      extends JsonSerializer<List<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>>> {
524

525
    public final JsonSerializer<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>>
526
        elementSerializer;
527

528
    public AllowedSharedLinkAccessLevelsSerializer() {
UNCOV
529
      super();
×
UNCOV
530
      this.elementSerializer =
×
531
          new WebLinkAllowedSharedLinkAccessLevelsField
532
              .WebLinkAllowedSharedLinkAccessLevelsFieldSerializer();
UNCOV
533
    }
×
534

535
    @Override
536
    public void serialize(
537
        List<EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField>> value,
538
        JsonGenerator gen,
539
        SerializerProvider serializers)
540
        throws IOException {
UNCOV
541
      gen.writeStartArray();
×
UNCOV
542
      for (EnumWrapper<WebLinkAllowedSharedLinkAccessLevelsField> item : value) {
×
UNCOV
543
        elementSerializer.serialize(item, gen, serializers);
×
UNCOV
544
      }
×
UNCOV
545
      gen.writeEndArray();
×
UNCOV
546
    }
×
547
  }
548
}
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