• 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

9.09
/src/main/java/com/box/sdkgen/schemas/termsofservice/TermsOfService.java
1
package com.box.sdkgen.schemas.termsofservice;
2

3
import com.box.sdkgen.internal.utils.DateTimeUtils;
4
import com.box.sdkgen.schemas.termsofservicebase.TermsOfServiceBase;
5
import com.box.sdkgen.schemas.termsofservicebase.TermsOfServiceBaseTypeField;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
7
import com.fasterxml.jackson.annotation.JsonFilter;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.time.OffsetDateTime;
12
import java.util.Objects;
13

14
/** The root-level record that is supposed to represent a single Terms of Service. */
15
@JsonFilter("nullablePropertyFilter")
16
public class TermsOfService extends TermsOfServiceBase {
17

18
  /** Whether these terms are enabled or not. */
19
  @JsonDeserialize(using = TermsOfServiceStatusField.TermsOfServiceStatusFieldDeserializer.class)
20
  @JsonSerialize(using = TermsOfServiceStatusField.TermsOfServiceStatusFieldSerializer.class)
21
  protected EnumWrapper<TermsOfServiceStatusField> status;
22

23
  protected TermsOfServiceEnterpriseField enterprise;
24

25
  /** Whether to apply these terms to managed users or external users. */
26
  @JsonDeserialize(using = TermsOfServiceTosTypeField.TermsOfServiceTosTypeFieldDeserializer.class)
27
  @JsonSerialize(using = TermsOfServiceTosTypeField.TermsOfServiceTosTypeFieldSerializer.class)
28
  @JsonProperty("tos_type")
29
  protected EnumWrapper<TermsOfServiceTosTypeField> tosType;
30

31
  /**
32
   * The text for your terms and conditions. This text could be empty if the `status` is set to
33
   * `disabled`.
34
   */
35
  protected String text;
36

37
  /** When the legal item was created. */
38
  @JsonProperty("created_at")
39
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
40
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
41
  protected OffsetDateTime createdAt;
42

43
  /** When the legal item was modified. */
44
  @JsonProperty("modified_at")
45
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
46
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
47
  protected OffsetDateTime modifiedAt;
48

49
  public TermsOfService(@JsonProperty("id") String id) {
50
    super(id);
1✔
51
  }
1✔
52

53
  protected TermsOfService(Builder builder) {
54
    super(builder);
×
55
    this.status = builder.status;
×
56
    this.enterprise = builder.enterprise;
×
57
    this.tosType = builder.tosType;
×
58
    this.text = builder.text;
×
59
    this.createdAt = builder.createdAt;
×
60
    this.modifiedAt = builder.modifiedAt;
×
61
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
62
  }
×
63

64
  public EnumWrapper<TermsOfServiceStatusField> getStatus() {
65
    return status;
1✔
66
  }
67

68
  public TermsOfServiceEnterpriseField getEnterprise() {
69
    return enterprise;
×
70
  }
71

72
  public EnumWrapper<TermsOfServiceTosTypeField> getTosType() {
73
    return tosType;
1✔
74
  }
75

76
  public String getText() {
77
    return text;
1✔
78
  }
79

80
  public OffsetDateTime getCreatedAt() {
81
    return createdAt;
×
82
  }
83

84
  public OffsetDateTime getModifiedAt() {
85
    return modifiedAt;
×
86
  }
87

88
  @Override
89
  public boolean equals(Object o) {
90
    if (this == o) {
×
91
      return true;
×
92
    }
93
    if (o == null || getClass() != o.getClass()) {
×
94
      return false;
×
95
    }
96
    TermsOfService casted = (TermsOfService) o;
×
97
    return Objects.equals(id, casted.id)
×
98
        && Objects.equals(type, casted.type)
×
99
        && Objects.equals(status, casted.status)
×
100
        && Objects.equals(enterprise, casted.enterprise)
×
101
        && Objects.equals(tosType, casted.tosType)
×
102
        && Objects.equals(text, casted.text)
×
103
        && Objects.equals(createdAt, casted.createdAt)
×
104
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
105
  }
106

107
  @Override
108
  public int hashCode() {
109
    return Objects.hash(id, type, status, enterprise, tosType, text, createdAt, modifiedAt);
×
110
  }
111

112
  @Override
113
  public String toString() {
114
    return "TermsOfService{"
×
115
        + "id='"
116
        + id
117
        + '\''
118
        + ", "
119
        + "type='"
120
        + type
121
        + '\''
122
        + ", "
123
        + "status='"
124
        + status
125
        + '\''
126
        + ", "
127
        + "enterprise='"
128
        + enterprise
129
        + '\''
130
        + ", "
131
        + "tosType='"
132
        + tosType
133
        + '\''
134
        + ", "
135
        + "text='"
136
        + text
137
        + '\''
138
        + ", "
139
        + "createdAt='"
140
        + createdAt
141
        + '\''
142
        + ", "
143
        + "modifiedAt='"
144
        + modifiedAt
145
        + '\''
146
        + "}";
147
  }
148

149
  public static class Builder extends TermsOfServiceBase.Builder {
150

151
    protected EnumWrapper<TermsOfServiceStatusField> status;
152

153
    protected TermsOfServiceEnterpriseField enterprise;
154

155
    protected EnumWrapper<TermsOfServiceTosTypeField> tosType;
156

157
    protected String text;
158

159
    protected OffsetDateTime createdAt;
160

161
    protected OffsetDateTime modifiedAt;
162

163
    public Builder(String id) {
164
      super(id);
×
165
    }
×
166

167
    public Builder status(TermsOfServiceStatusField status) {
168
      this.status = new EnumWrapper<TermsOfServiceStatusField>(status);
×
169
      return this;
×
170
    }
171

172
    public Builder status(EnumWrapper<TermsOfServiceStatusField> status) {
173
      this.status = status;
×
174
      return this;
×
175
    }
176

177
    public Builder enterprise(TermsOfServiceEnterpriseField enterprise) {
178
      this.enterprise = enterprise;
×
179
      return this;
×
180
    }
181

182
    public Builder tosType(TermsOfServiceTosTypeField tosType) {
183
      this.tosType = new EnumWrapper<TermsOfServiceTosTypeField>(tosType);
×
184
      return this;
×
185
    }
186

187
    public Builder tosType(EnumWrapper<TermsOfServiceTosTypeField> tosType) {
188
      this.tosType = tosType;
×
189
      return this;
×
190
    }
191

192
    public Builder text(String text) {
193
      this.text = text;
×
194
      return this;
×
195
    }
196

197
    public Builder createdAt(OffsetDateTime createdAt) {
198
      this.createdAt = createdAt;
×
199
      return this;
×
200
    }
201

202
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
203
      this.modifiedAt = modifiedAt;
×
204
      return this;
×
205
    }
206

207
    @Override
208
    public Builder type(TermsOfServiceBaseTypeField type) {
209
      this.type = new EnumWrapper<TermsOfServiceBaseTypeField>(type);
×
210
      return this;
×
211
    }
212

213
    @Override
214
    public Builder type(EnumWrapper<TermsOfServiceBaseTypeField> type) {
215
      this.type = type;
×
216
      return this;
×
217
    }
218

219
    public TermsOfService build() {
220
      return new TermsOfService(this);
×
221
    }
222
  }
223
}
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