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

box / box-java-sdk / #6244

10 Feb 2026 05:27PM UTC coverage: 40.749% (+22.6%) from 18.192%
#6244

push

github

web-flow
fix(boxsdkgen): Move assigning default values from builder constructor to `build()` method (box/box-codegen#922) (#1712)

0 of 1677 new or added lines in 569 files covered. (0.0%)

2146 existing lines in 544 files now uncovered.

7382 of 18116 relevant lines covered (40.75%)

0.46 hits per line

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

0.0
/src/main/java/com/box/sdkgen/schemas/weblinkbase/WebLinkBase.java
1
package com.box.sdkgen.schemas.weblinkbase;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonFilter;
7
import com.fasterxml.jackson.annotation.JsonProperty;
8
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
9
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
10
import java.util.Objects;
11

12
/**
13
 * Web links are objects that point to URLs. These objects are also known as bookmarks within the
14
 * Box web application.
15
 *
16
 * <p>Web link objects are treated similarly to file objects, they will also support most actions
17
 * that apply to regular files.
18
 */
19
@JsonFilter("nullablePropertyFilter")
20
public class WebLinkBase extends SerializableObject {
21

22
  /** The unique identifier for this web link. */
23
  protected final String id;
24

25
  /** The value will always be `web_link`. */
26
  @JsonDeserialize(using = WebLinkBaseTypeField.WebLinkBaseTypeFieldDeserializer.class)
27
  @JsonSerialize(using = WebLinkBaseTypeField.WebLinkBaseTypeFieldSerializer.class)
28
  protected EnumWrapper<WebLinkBaseTypeField> type;
29

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

33
  public WebLinkBase(@JsonProperty("id") String id) {
34
    super();
×
35
    this.id = id;
×
36
    this.type = new EnumWrapper<WebLinkBaseTypeField>(WebLinkBaseTypeField.WEB_LINK);
×
37
  }
×
38

39
  protected WebLinkBase(Builder builder) {
40
    super();
×
41
    this.id = builder.id;
×
42
    this.type = builder.type;
×
43
    this.etag = builder.etag;
×
44
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
45
  }
×
46

47
  public String getId() {
48
    return id;
×
49
  }
50

51
  public EnumWrapper<WebLinkBaseTypeField> getType() {
52
    return type;
×
53
  }
54

55
  public String getEtag() {
56
    return etag;
×
57
  }
58

59
  @Override
60
  public boolean equals(Object o) {
61
    if (this == o) {
×
62
      return true;
×
63
    }
64
    if (o == null || getClass() != o.getClass()) {
×
65
      return false;
×
66
    }
67
    WebLinkBase casted = (WebLinkBase) o;
×
68
    return Objects.equals(id, casted.id)
×
69
        && Objects.equals(type, casted.type)
×
70
        && Objects.equals(etag, casted.etag);
×
71
  }
72

73
  @Override
74
  public int hashCode() {
75
    return Objects.hash(id, type, etag);
×
76
  }
77

78
  @Override
79
  public String toString() {
80
    return "WebLinkBase{"
×
81
        + "id='"
82
        + id
83
        + '\''
84
        + ", "
85
        + "type='"
86
        + type
87
        + '\''
88
        + ", "
89
        + "etag='"
90
        + etag
91
        + '\''
92
        + "}";
93
  }
94

95
  public static class Builder extends NullableFieldTracker {
96

97
    protected final String id;
98

99
    protected EnumWrapper<WebLinkBaseTypeField> type;
100

101
    protected String etag;
102

103
    public Builder(String id) {
104
      super();
×
105
      this.id = id;
×
106
    }
×
107

108
    public Builder type(WebLinkBaseTypeField type) {
109
      this.type = new EnumWrapper<WebLinkBaseTypeField>(type);
×
UNCOV
110
      return this;
×
111
    }
112

113
    public Builder type(EnumWrapper<WebLinkBaseTypeField> type) {
114
      this.type = type;
×
UNCOV
115
      return this;
×
116
    }
117

118
    public Builder etag(String etag) {
119
      this.etag = etag;
×
UNCOV
120
      return this;
×
121
    }
122

123
    public WebLinkBase build() {
NEW
124
      if (this.type == null) {
×
NEW
125
        this.type = new EnumWrapper<WebLinkBaseTypeField>(WebLinkBaseTypeField.WEB_LINK);
×
126
      }
UNCOV
127
      return new WebLinkBase(this);
×
128
    }
129
  }
130
}
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