• 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

21.43
/src/main/java/com/box/sdkgen/schemas/termsofservicebase/TermsOfServiceBase.java
1
package com.box.sdkgen.schemas.termsofservicebase;
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
/** The root-level record that is supposed to represent a single Terms of Service. */
13
@JsonFilter("nullablePropertyFilter")
14
public class TermsOfServiceBase extends SerializableObject {
15

16
  /** The unique identifier for this terms of service. */
17
  protected final String id;
18

19
  /** The value will always be `terms_of_service`. */
20
  @JsonDeserialize(
21
      using = TermsOfServiceBaseTypeField.TermsOfServiceBaseTypeFieldDeserializer.class)
22
  @JsonSerialize(using = TermsOfServiceBaseTypeField.TermsOfServiceBaseTypeFieldSerializer.class)
23
  protected EnumWrapper<TermsOfServiceBaseTypeField> type;
24

25
  public TermsOfServiceBase(@JsonProperty("id") String id) {
26
    super();
1✔
27
    this.id = id;
1✔
28
    this.type =
1✔
29
        new EnumWrapper<TermsOfServiceBaseTypeField>(TermsOfServiceBaseTypeField.TERMS_OF_SERVICE);
30
  }
1✔
31

32
  protected TermsOfServiceBase(Builder builder) {
33
    super();
×
34
    this.id = builder.id;
×
35
    this.type = builder.type;
×
36
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
37
  }
×
38

39
  public String getId() {
40
    return id;
1✔
41
  }
42

43
  public EnumWrapper<TermsOfServiceBaseTypeField> getType() {
44
    return type;
1✔
45
  }
46

47
  @Override
48
  public boolean equals(Object o) {
49
    if (this == o) {
×
50
      return true;
×
51
    }
52
    if (o == null || getClass() != o.getClass()) {
×
53
      return false;
×
54
    }
55
    TermsOfServiceBase casted = (TermsOfServiceBase) o;
×
56
    return Objects.equals(id, casted.id) && Objects.equals(type, casted.type);
×
57
  }
58

59
  @Override
60
  public int hashCode() {
61
    return Objects.hash(id, type);
×
62
  }
63

64
  @Override
65
  public String toString() {
66
    return "TermsOfServiceBase{" + "id='" + id + '\'' + ", " + "type='" + type + '\'' + "}";
×
67
  }
68

69
  public static class Builder extends NullableFieldTracker {
70

71
    protected final String id;
72

73
    protected EnumWrapper<TermsOfServiceBaseTypeField> type;
74

75
    public Builder(String id) {
76
      super();
×
77
      this.id = id;
×
78
      this.type =
×
79
          new EnumWrapper<TermsOfServiceBaseTypeField>(
80
              TermsOfServiceBaseTypeField.TERMS_OF_SERVICE);
81
    }
×
82

83
    public Builder type(TermsOfServiceBaseTypeField type) {
84
      this.type = new EnumWrapper<TermsOfServiceBaseTypeField>(type);
×
85
      return this;
×
86
    }
87

88
    public Builder type(EnumWrapper<TermsOfServiceBaseTypeField> type) {
89
      this.type = type;
×
90
      return this;
×
91
    }
92

93
    public TermsOfServiceBase build() {
94
      return new TermsOfServiceBase(this);
×
95
    }
96
  }
97
}
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