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

box / box-java-sdk-gen / #155

30 May 2025 01:03PM UTC coverage: 35.646% (+0.3%) from 35.311%
#155

push

github

web-flow
fix: Fix downscope token to use `retrieveToken` method for token retrieval (box/box-codegen#731) (#320)

4 of 4 new or added lines in 4 files covered. (100.0%)

2952 existing lines in 99 files now uncovered.

15628 of 43842 relevant lines covered (35.65%)

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(TermsOfServiceUserStatusBuilder builder) {
50
    super();
×
51
    this.id = builder.id;
×
52
    this.type = builder.type;
×
UNCOV
53
    this.tos = builder.tos;
×
UNCOV
54
    this.user = builder.user;
×
UNCOV
55
    this.isAccepted = builder.isAccepted;
×
UNCOV
56
    this.createdAt = builder.createdAt;
×
UNCOV
57
    this.modifiedAt = builder.modifiedAt;
×
UNCOV
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() {
UNCOV
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)
×
UNCOV
98
        && Objects.equals(type, casted.type)
×
UNCOV
99
        && Objects.equals(tos, casted.tos)
×
UNCOV
100
        && Objects.equals(user, casted.user)
×
UNCOV
101
        && Objects.equals(isAccepted, casted.isAccepted)
×
102
        && Objects.equals(createdAt, casted.createdAt)
×
UNCOV
103
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
104
  }
105

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

111
  @Override
112
  public String toString() {
UNCOV
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 TermsOfServiceUserStatusBuilder {
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

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

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

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

178
    public TermsOfServiceUserStatusBuilder tos(TermsOfServiceBase tos) {
179
      this.tos = tos;
×
UNCOV
180
      return this;
×
181
    }
182

183
    public TermsOfServiceUserStatusBuilder user(UserMini user) {
184
      this.user = user;
×
UNCOV
185
      return this;
×
186
    }
187

188
    public TermsOfServiceUserStatusBuilder isAccepted(Boolean isAccepted) {
189
      this.isAccepted = isAccepted;
×
UNCOV
190
      return this;
×
191
    }
192

193
    public TermsOfServiceUserStatusBuilder createdAt(Date createdAt) {
194
      this.createdAt = createdAt;
×
UNCOV
195
      return this;
×
196
    }
197

198
    public TermsOfServiceUserStatusBuilder modifiedAt(Date modifiedAt) {
UNCOV
199
      this.modifiedAt = modifiedAt;
×
UNCOV
200
      return this;
×
201
    }
202

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