• 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

20.59
/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();
1✔
35
    this.id = id;
1✔
36
    this.type = new EnumWrapper<WebLinkBaseTypeField>(WebLinkBaseTypeField.WEB_LINK);
1✔
37
  }
1✔
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;
1✔
49
  }
50

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

55
  public String getEtag() {
56
    return etag;
1✔
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
      this.type = new EnumWrapper<WebLinkBaseTypeField>(WebLinkBaseTypeField.WEB_LINK);
×
107
    }
×
108

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

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

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

124
    public WebLinkBase build() {
125
      return new WebLinkBase(this);
×
126
    }
127
  }
128
}
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