• 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

16.67
/src/main/java/com/box/sdkgen/schemas/termsofserviceuserstatus/TermsOfServiceUserStatus.java
1
package com.box.sdkgen.schemas.termsofserviceuserstatus;
2

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

16
/** The association between a Terms of Service and a user. */
17
@JsonFilter("nullablePropertyFilter")
18
public class TermsOfServiceUserStatus extends SerializableObject {
19

20
  /** The unique identifier for this terms of service user status. */
21
  protected final String id;
22

23
  /** The value will always be `terms_of_service_user_status`. */
24
  @JsonDeserialize(
25
      using = TermsOfServiceUserStatusTypeField.TermsOfServiceUserStatusTypeFieldDeserializer.class)
26
  @JsonSerialize(
27
      using = TermsOfServiceUserStatusTypeField.TermsOfServiceUserStatusTypeFieldSerializer.class)
28
  protected EnumWrapper<TermsOfServiceUserStatusTypeField> type;
29

30
  protected TermsOfServiceBase tos;
31

32
  protected UserMini user;
33

34
  /** If the user has accepted the terms of services. */
35
  @JsonProperty("is_accepted")
36
  protected Boolean isAccepted;
37

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

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

50
  public TermsOfServiceUserStatus(@JsonProperty("id") String id) {
51
    super();
1✔
52
    this.id = id;
1✔
53
    this.type =
1✔
54
        new EnumWrapper<TermsOfServiceUserStatusTypeField>(
55
            TermsOfServiceUserStatusTypeField.TERMS_OF_SERVICE_USER_STATUS);
56
  }
1✔
57

58
  protected TermsOfServiceUserStatus(Builder builder) {
59
    super();
×
60
    this.id = builder.id;
×
61
    this.type = builder.type;
×
62
    this.tos = builder.tos;
×
63
    this.user = builder.user;
×
64
    this.isAccepted = builder.isAccepted;
×
65
    this.createdAt = builder.createdAt;
×
66
    this.modifiedAt = builder.modifiedAt;
×
67
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
68
  }
×
69

70
  public String getId() {
71
    return id;
1✔
72
  }
73

74
  public EnumWrapper<TermsOfServiceUserStatusTypeField> getType() {
75
    return type;
1✔
76
  }
77

78
  public TermsOfServiceBase getTos() {
79
    return tos;
1✔
80
  }
81

82
  public UserMini getUser() {
83
    return user;
1✔
84
  }
85

86
  public Boolean getIsAccepted() {
87
    return isAccepted;
1✔
88
  }
89

90
  public OffsetDateTime getCreatedAt() {
91
    return createdAt;
×
92
  }
93

94
  public OffsetDateTime getModifiedAt() {
95
    return modifiedAt;
×
96
  }
97

98
  @Override
99
  public boolean equals(Object o) {
100
    if (this == o) {
×
101
      return true;
×
102
    }
103
    if (o == null || getClass() != o.getClass()) {
×
104
      return false;
×
105
    }
106
    TermsOfServiceUserStatus casted = (TermsOfServiceUserStatus) o;
×
107
    return Objects.equals(id, casted.id)
×
108
        && Objects.equals(type, casted.type)
×
109
        && Objects.equals(tos, casted.tos)
×
110
        && Objects.equals(user, casted.user)
×
111
        && Objects.equals(isAccepted, casted.isAccepted)
×
112
        && Objects.equals(createdAt, casted.createdAt)
×
113
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
114
  }
115

116
  @Override
117
  public int hashCode() {
118
    return Objects.hash(id, type, tos, user, isAccepted, createdAt, modifiedAt);
×
119
  }
120

121
  @Override
122
  public String toString() {
123
    return "TermsOfServiceUserStatus{"
×
124
        + "id='"
125
        + id
126
        + '\''
127
        + ", "
128
        + "type='"
129
        + type
130
        + '\''
131
        + ", "
132
        + "tos='"
133
        + tos
134
        + '\''
135
        + ", "
136
        + "user='"
137
        + user
138
        + '\''
139
        + ", "
140
        + "isAccepted='"
141
        + isAccepted
142
        + '\''
143
        + ", "
144
        + "createdAt='"
145
        + createdAt
146
        + '\''
147
        + ", "
148
        + "modifiedAt='"
149
        + modifiedAt
150
        + '\''
151
        + "}";
152
  }
153

154
  public static class Builder extends NullableFieldTracker {
155

156
    protected final String id;
157

158
    protected EnumWrapper<TermsOfServiceUserStatusTypeField> type;
159

160
    protected TermsOfServiceBase tos;
161

162
    protected UserMini user;
163

164
    protected Boolean isAccepted;
165

166
    protected OffsetDateTime createdAt;
167

168
    protected OffsetDateTime modifiedAt;
169

170
    public Builder(String id) {
171
      super();
×
172
      this.id = id;
×
173
      this.type =
×
174
          new EnumWrapper<TermsOfServiceUserStatusTypeField>(
175
              TermsOfServiceUserStatusTypeField.TERMS_OF_SERVICE_USER_STATUS);
176
    }
×
177

178
    public Builder type(TermsOfServiceUserStatusTypeField type) {
179
      this.type = new EnumWrapper<TermsOfServiceUserStatusTypeField>(type);
×
180
      return this;
×
181
    }
182

183
    public Builder type(EnumWrapper<TermsOfServiceUserStatusTypeField> type) {
184
      this.type = type;
×
185
      return this;
×
186
    }
187

188
    public Builder tos(TermsOfServiceBase tos) {
189
      this.tos = tos;
×
190
      return this;
×
191
    }
192

193
    public Builder user(UserMini user) {
194
      this.user = user;
×
195
      return this;
×
196
    }
197

198
    public Builder isAccepted(Boolean isAccepted) {
199
      this.isAccepted = isAccepted;
×
200
      return this;
×
201
    }
202

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

208
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
209
      this.modifiedAt = modifiedAt;
×
210
      return this;
×
211
    }
212

213
    public TermsOfServiceUserStatus build() {
214
      return new TermsOfServiceUserStatus(this);
×
215
    }
216
  }
217
}
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