• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk-gen / #226

20 Jun 2025 03:14PM UTC coverage: 35.609% (-0.2%) from 35.816%
#226

push

github

web-flow
feat: Shorten builder names in Java (box/box-codegen#742) (#334)

367 of 1570 new or added lines in 984 files covered. (23.38%)

674 existing lines in 370 files now uncovered.

16125 of 45284 relevant lines covered (35.61%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

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

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.termsofservicebase.TermsOfServiceBase;
6
import com.box.sdkgen.schemas.usermini.UserMini;
7
import com.box.sdkgen.serialization.json.EnumWrapper;
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.util.Date;
12
import java.util.Objects;
13

14
public class TermsOfServiceUserStatus extends SerializableObject {
15

16
  protected final String id;
17

18
  @JsonDeserialize(
19
      using = TermsOfServiceUserStatusTypeField.TermsOfServiceUserStatusTypeFieldDeserializer.class)
20
  @JsonSerialize(
21
      using = TermsOfServiceUserStatusTypeField.TermsOfServiceUserStatusTypeFieldSerializer.class)
22
  protected EnumWrapper<TermsOfServiceUserStatusTypeField> type;
23

24
  protected TermsOfServiceBase tos;
25

26
  protected UserMini user;
27

28
  @JsonProperty("is_accepted")
29
  protected Boolean isAccepted;
30

31
  @JsonProperty("created_at")
32
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
33
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
34
  protected Date createdAt;
35

36
  @JsonProperty("modified_at")
37
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
38
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
39
  protected Date modifiedAt;
40

41
  public TermsOfServiceUserStatus(@JsonProperty("id") String id) {
42
    super();
1✔
43
    this.id = id;
1✔
44
    this.type =
1✔
45
        new EnumWrapper<TermsOfServiceUserStatusTypeField>(
46
            TermsOfServiceUserStatusTypeField.TERMS_OF_SERVICE_USER_STATUS);
47
  }
1✔
48

49
  protected TermsOfServiceUserStatus(Builder builder) {
50
    super();
×
51
    this.id = builder.id;
×
52
    this.type = builder.type;
×
53
    this.tos = builder.tos;
×
54
    this.user = builder.user;
×
55
    this.isAccepted = builder.isAccepted;
×
56
    this.createdAt = builder.createdAt;
×
57
    this.modifiedAt = builder.modifiedAt;
×
58
  }
×
59

60
  public String getId() {
61
    return id;
1✔
62
  }
63

64
  public EnumWrapper<TermsOfServiceUserStatusTypeField> getType() {
65
    return type;
1✔
66
  }
67

68
  public TermsOfServiceBase getTos() {
69
    return tos;
1✔
70
  }
71

72
  public UserMini getUser() {
73
    return user;
1✔
74
  }
75

76
  public Boolean getIsAccepted() {
77
    return isAccepted;
1✔
78
  }
79

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

84
  public Date 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
    TermsOfServiceUserStatus casted = (TermsOfServiceUserStatus) o;
×
97
    return Objects.equals(id, casted.id)
×
98
        && Objects.equals(type, casted.type)
×
99
        && Objects.equals(tos, casted.tos)
×
100
        && Objects.equals(user, casted.user)
×
101
        && Objects.equals(isAccepted, casted.isAccepted)
×
102
        && Objects.equals(createdAt, casted.createdAt)
×
103
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
104
  }
105

106
  @Override
107
  public int hashCode() {
108
    return Objects.hash(id, type, tos, user, isAccepted, createdAt, modifiedAt);
×
109
  }
110

111
  @Override
112
  public String toString() {
113
    return "TermsOfServiceUserStatus{"
×
114
        + "id='"
115
        + id
116
        + '\''
117
        + ", "
118
        + "type='"
119
        + type
120
        + '\''
121
        + ", "
122
        + "tos='"
123
        + tos
124
        + '\''
125
        + ", "
126
        + "user='"
127
        + user
128
        + '\''
129
        + ", "
130
        + "isAccepted='"
131
        + isAccepted
132
        + '\''
133
        + ", "
134
        + "createdAt='"
135
        + createdAt
136
        + '\''
137
        + ", "
138
        + "modifiedAt='"
139
        + modifiedAt
140
        + '\''
141
        + "}";
142
  }
143

144
  public static class Builder {
145

146
    protected final String id;
147

148
    protected EnumWrapper<TermsOfServiceUserStatusTypeField> type;
149

150
    protected TermsOfServiceBase tos;
151

152
    protected UserMini user;
153

154
    protected Boolean isAccepted;
155

156
    protected Date createdAt;
157

158
    protected Date modifiedAt;
159

NEW
160
    public Builder(String id) {
×
161
      this.id = id;
×
162
      this.type =
×
163
          new EnumWrapper<TermsOfServiceUserStatusTypeField>(
164
              TermsOfServiceUserStatusTypeField.TERMS_OF_SERVICE_USER_STATUS);
165
    }
×
166

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

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

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

182
    public Builder user(UserMini user) {
183
      this.user = user;
×
184
      return this;
×
185
    }
186

187
    public Builder isAccepted(Boolean isAccepted) {
188
      this.isAccepted = isAccepted;
×
189
      return this;
×
190
    }
191

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

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

202
    public TermsOfServiceUserStatus build() {
203
      return new TermsOfServiceUserStatus(this);
×
204
    }
205
  }
206
}
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