• 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

0.0
/src/main/java/com/box/sdkgen/schemas/trackingcode/TrackingCode.java
1
package com.box.sdkgen.schemas.trackingcode;
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.databind.annotation.JsonDeserialize;
8
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9
import java.util.Objects;
10

11
/**
12
 * Tracking codes allow an admin to generate reports from the admin console and assign an attribute
13
 * to a specific group of users. This setting must be enabled for an enterprise before it can be
14
 * used.
15
 */
16
@JsonFilter("nullablePropertyFilter")
17
public class TrackingCode extends SerializableObject {
18

19
  /** The value will always be `tracking_code`. */
20
  @JsonDeserialize(using = TrackingCodeTypeField.TrackingCodeTypeFieldDeserializer.class)
21
  @JsonSerialize(using = TrackingCodeTypeField.TrackingCodeTypeFieldSerializer.class)
22
  protected EnumWrapper<TrackingCodeTypeField> type;
23

24
  /** The name of the tracking code, which must be preconfigured in the Admin Console. */
25
  protected String name;
26

27
  /** The value of the tracking code. */
28
  protected String value;
29

30
  public TrackingCode() {
31
    super();
×
32
  }
×
33

34
  protected TrackingCode(Builder builder) {
35
    super();
×
36
    this.type = builder.type;
×
37
    this.name = builder.name;
×
38
    this.value = builder.value;
×
39
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
40
  }
×
41

42
  public EnumWrapper<TrackingCodeTypeField> getType() {
43
    return type;
×
44
  }
45

46
  public String getName() {
47
    return name;
×
48
  }
49

50
  public String getValue() {
51
    return value;
×
52
  }
53

54
  @Override
55
  public boolean equals(Object o) {
56
    if (this == o) {
×
57
      return true;
×
58
    }
59
    if (o == null || getClass() != o.getClass()) {
×
60
      return false;
×
61
    }
62
    TrackingCode casted = (TrackingCode) o;
×
63
    return Objects.equals(type, casted.type)
×
64
        && Objects.equals(name, casted.name)
×
65
        && Objects.equals(value, casted.value);
×
66
  }
67

68
  @Override
69
  public int hashCode() {
70
    return Objects.hash(type, name, value);
×
71
  }
72

73
  @Override
74
  public String toString() {
75
    return "TrackingCode{"
×
76
        + "type='"
77
        + type
78
        + '\''
79
        + ", "
80
        + "name='"
81
        + name
82
        + '\''
83
        + ", "
84
        + "value='"
85
        + value
86
        + '\''
87
        + "}";
88
  }
89

90
  public static class Builder extends NullableFieldTracker {
×
91

92
    protected EnumWrapper<TrackingCodeTypeField> type;
93

94
    protected String name;
95

96
    protected String value;
97

98
    public Builder type(TrackingCodeTypeField type) {
99
      this.type = new EnumWrapper<TrackingCodeTypeField>(type);
×
100
      return this;
×
101
    }
102

103
    public Builder type(EnumWrapper<TrackingCodeTypeField> type) {
104
      this.type = type;
×
105
      return this;
×
106
    }
107

108
    public Builder name(String name) {
109
      this.name = name;
×
110
      return this;
×
111
    }
112

113
    public Builder value(String value) {
114
      this.value = value;
×
115
      return this;
×
116
    }
117

118
    public TrackingCode build() {
119
      return new TrackingCode(this);
×
120
    }
121
  }
122
}
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