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

box / box-java-sdk-gen / #294

24 Jun 2025 01:20PM UTC coverage: 35.662% (+0.03%) from 35.632%
#294

Pull #347

github

web-flow
Merge 2c100d09c into d8480ee6c
Pull Request #347: feat: Add Webhook Validation In Java (box/box-codegen#745)

68 of 82 new or added lines in 2 files covered. (82.93%)

11791 existing lines in 624 files now uncovered.

16939 of 47499 relevant lines covered (35.66%)

0.36 hits per line

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

2.11
/src/main/java/com/box/sdkgen/schemas/user/User.java
1
package com.box.sdkgen.schemas.user;
2

3
import com.box.sdkgen.internal.Nullable;
4
import com.box.sdkgen.internal.utils.DateTimeUtils;
5
import com.box.sdkgen.schemas.userbase.UserBaseTypeField;
6
import com.box.sdkgen.schemas.usermini.UserMini;
7
import com.box.sdkgen.serialization.json.EnumWrapper;
8
import com.fasterxml.jackson.annotation.JsonFilter;
9
import com.fasterxml.jackson.annotation.JsonProperty;
10
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
12
import java.util.Date;
13
import java.util.Objects;
14

15
@JsonFilter("nullablePropertyFilter")
16
public class User extends UserMini {
17

18
  @JsonProperty("created_at")
19
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
20
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
21
  protected Date createdAt;
22

23
  @JsonProperty("modified_at")
24
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
25
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
26
  protected Date modifiedAt;
27

28
  protected String language;
29

30
  protected String timezone;
31

32
  @JsonProperty("space_amount")
33
  protected Long spaceAmount;
34

35
  @JsonProperty("space_used")
36
  protected Long spaceUsed;
37

38
  @JsonProperty("max_upload_size")
39
  protected Long maxUploadSize;
40

41
  @JsonDeserialize(using = UserStatusField.UserStatusFieldDeserializer.class)
42
  @JsonSerialize(using = UserStatusField.UserStatusFieldSerializer.class)
43
  protected EnumWrapper<UserStatusField> status;
44

45
  @JsonProperty("job_title")
46
  protected String jobTitle;
47

48
  protected String phone;
49

50
  protected String address;
51

52
  @JsonProperty("avatar_url")
53
  protected String avatarUrl;
54

55
  @JsonProperty("notification_email")
56
  @Nullable
57
  protected UserNotificationEmailField notificationEmail;
58

59
  public User(@JsonProperty("id") String id) {
60
    super(id);
1✔
61
  }
1✔
62

63
  protected User(Builder builder) {
64
    super(builder);
×
65
    this.createdAt = builder.createdAt;
×
66
    this.modifiedAt = builder.modifiedAt;
×
67
    this.language = builder.language;
×
68
    this.timezone = builder.timezone;
×
69
    this.spaceAmount = builder.spaceAmount;
×
70
    this.spaceUsed = builder.spaceUsed;
×
71
    this.maxUploadSize = builder.maxUploadSize;
×
72
    this.status = builder.status;
×
73
    this.jobTitle = builder.jobTitle;
×
74
    this.phone = builder.phone;
×
UNCOV
75
    this.address = builder.address;
×
UNCOV
76
    this.avatarUrl = builder.avatarUrl;
×
77
    this.notificationEmail = builder.notificationEmail;
×
UNCOV
78
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
UNCOV
79
  }
×
80

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

85
  public Date getModifiedAt() {
UNCOV
86
    return modifiedAt;
×
87
  }
88

89
  public String getLanguage() {
UNCOV
90
    return language;
×
91
  }
92

93
  public String getTimezone() {
UNCOV
94
    return timezone;
×
95
  }
96

97
  public Long getSpaceAmount() {
UNCOV
98
    return spaceAmount;
×
99
  }
100

101
  public Long getSpaceUsed() {
UNCOV
102
    return spaceUsed;
×
103
  }
104

105
  public Long getMaxUploadSize() {
UNCOV
106
    return maxUploadSize;
×
107
  }
108

109
  public EnumWrapper<UserStatusField> getStatus() {
UNCOV
110
    return status;
×
111
  }
112

113
  public String getJobTitle() {
UNCOV
114
    return jobTitle;
×
115
  }
116

117
  public String getPhone() {
UNCOV
118
    return phone;
×
119
  }
120

121
  public String getAddress() {
UNCOV
122
    return address;
×
123
  }
124

125
  public String getAvatarUrl() {
UNCOV
126
    return avatarUrl;
×
127
  }
128

129
  public UserNotificationEmailField getNotificationEmail() {
130
    return notificationEmail;
×
131
  }
132

133
  @Override
134
  public boolean equals(Object o) {
UNCOV
135
    if (this == o) {
×
136
      return true;
×
137
    }
138
    if (o == null || getClass() != o.getClass()) {
×
139
      return false;
×
140
    }
141
    User casted = (User) o;
×
142
    return Objects.equals(id, casted.id)
×
143
        && Objects.equals(type, casted.type)
×
144
        && Objects.equals(name, casted.name)
×
145
        && Objects.equals(login, casted.login)
×
146
        && Objects.equals(createdAt, casted.createdAt)
×
147
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
148
        && Objects.equals(language, casted.language)
×
149
        && Objects.equals(timezone, casted.timezone)
×
150
        && Objects.equals(spaceAmount, casted.spaceAmount)
×
151
        && Objects.equals(spaceUsed, casted.spaceUsed)
×
152
        && Objects.equals(maxUploadSize, casted.maxUploadSize)
×
153
        && Objects.equals(status, casted.status)
×
UNCOV
154
        && Objects.equals(jobTitle, casted.jobTitle)
×
UNCOV
155
        && Objects.equals(phone, casted.phone)
×
UNCOV
156
        && Objects.equals(address, casted.address)
×
UNCOV
157
        && Objects.equals(avatarUrl, casted.avatarUrl)
×
158
        && Objects.equals(notificationEmail, casted.notificationEmail);
×
159
  }
160

161
  @Override
162
  public int hashCode() {
UNCOV
163
    return Objects.hash(
×
164
        id,
165
        type,
166
        name,
167
        login,
168
        createdAt,
169
        modifiedAt,
170
        language,
171
        timezone,
172
        spaceAmount,
173
        spaceUsed,
174
        maxUploadSize,
175
        status,
176
        jobTitle,
177
        phone,
178
        address,
179
        avatarUrl,
180
        notificationEmail);
181
  }
182

183
  @Override
184
  public String toString() {
UNCOV
185
    return "User{"
×
186
        + "id='"
187
        + id
188
        + '\''
189
        + ", "
190
        + "type='"
191
        + type
192
        + '\''
193
        + ", "
194
        + "name='"
195
        + name
196
        + '\''
197
        + ", "
198
        + "login='"
199
        + login
200
        + '\''
201
        + ", "
202
        + "createdAt='"
203
        + createdAt
204
        + '\''
205
        + ", "
206
        + "modifiedAt='"
207
        + modifiedAt
208
        + '\''
209
        + ", "
210
        + "language='"
211
        + language
212
        + '\''
213
        + ", "
214
        + "timezone='"
215
        + timezone
216
        + '\''
217
        + ", "
218
        + "spaceAmount='"
219
        + spaceAmount
220
        + '\''
221
        + ", "
222
        + "spaceUsed='"
223
        + spaceUsed
224
        + '\''
225
        + ", "
226
        + "maxUploadSize='"
227
        + maxUploadSize
228
        + '\''
229
        + ", "
230
        + "status='"
231
        + status
232
        + '\''
233
        + ", "
234
        + "jobTitle='"
235
        + jobTitle
236
        + '\''
237
        + ", "
238
        + "phone='"
239
        + phone
240
        + '\''
241
        + ", "
242
        + "address='"
243
        + address
244
        + '\''
245
        + ", "
246
        + "avatarUrl='"
247
        + avatarUrl
248
        + '\''
249
        + ", "
250
        + "notificationEmail='"
251
        + notificationEmail
252
        + '\''
253
        + "}";
254
  }
255

256
  public static class Builder extends UserMini.Builder {
257

258
    protected Date createdAt;
259

260
    protected Date modifiedAt;
261

262
    protected String language;
263

264
    protected String timezone;
265

266
    protected Long spaceAmount;
267

268
    protected Long spaceUsed;
269

270
    protected Long maxUploadSize;
271

272
    protected EnumWrapper<UserStatusField> status;
273

274
    protected String jobTitle;
275

276
    protected String phone;
277

278
    protected String address;
279

280
    protected String avatarUrl;
281

282
    protected UserNotificationEmailField notificationEmail;
283

284
    public Builder(String id) {
285
      super(id);
×
UNCOV
286
    }
×
287

288
    public Builder createdAt(Date createdAt) {
289
      this.createdAt = createdAt;
×
290
      return this;
×
291
    }
292

293
    public Builder modifiedAt(Date modifiedAt) {
294
      this.modifiedAt = modifiedAt;
×
295
      return this;
×
296
    }
297

298
    public Builder language(String language) {
299
      this.language = language;
×
300
      return this;
×
301
    }
302

303
    public Builder timezone(String timezone) {
304
      this.timezone = timezone;
×
305
      return this;
×
306
    }
307

308
    public Builder spaceAmount(Long spaceAmount) {
309
      this.spaceAmount = spaceAmount;
×
310
      return this;
×
311
    }
312

313
    public Builder spaceUsed(Long spaceUsed) {
314
      this.spaceUsed = spaceUsed;
×
315
      return this;
×
316
    }
317

318
    public Builder maxUploadSize(Long maxUploadSize) {
319
      this.maxUploadSize = maxUploadSize;
×
320
      return this;
×
321
    }
322

323
    public Builder status(UserStatusField status) {
324
      this.status = new EnumWrapper<UserStatusField>(status);
×
325
      return this;
×
326
    }
327

328
    public Builder status(EnumWrapper<UserStatusField> status) {
329
      this.status = status;
×
330
      return this;
×
331
    }
332

333
    public Builder jobTitle(String jobTitle) {
334
      this.jobTitle = jobTitle;
×
335
      return this;
×
336
    }
337

338
    public Builder phone(String phone) {
339
      this.phone = phone;
×
340
      return this;
×
341
    }
342

343
    public Builder address(String address) {
344
      this.address = address;
×
345
      return this;
×
346
    }
347

348
    public Builder avatarUrl(String avatarUrl) {
349
      this.avatarUrl = avatarUrl;
×
350
      return this;
×
351
    }
352

353
    public Builder notificationEmail(UserNotificationEmailField notificationEmail) {
UNCOV
354
      this.notificationEmail = notificationEmail;
×
355
      this.markNullableFieldAsSet("notification_email");
×
356
      return this;
×
357
    }
358

359
    @Override
360
    public Builder type(UserBaseTypeField type) {
361
      this.type = new EnumWrapper<UserBaseTypeField>(type);
×
362
      return this;
×
363
    }
364

365
    @Override
366
    public Builder type(EnumWrapper<UserBaseTypeField> type) {
367
      this.type = type;
×
368
      return this;
×
369
    }
370

371
    @Override
372
    public Builder name(String name) {
373
      this.name = name;
×
374
      return this;
×
375
    }
376

377
    @Override
378
    public Builder login(String login) {
UNCOV
379
      this.login = login;
×
UNCOV
380
      return this;
×
381
    }
382

383
    public User build() {
UNCOV
384
      return new User(this);
×
385
    }
386
  }
387
}
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