• 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

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.time.OffsetDateTime;
13
import java.util.Objects;
14

15
/** A standard representation of a user, as returned from any user API endpoints by default. */
16
@JsonFilter("nullablePropertyFilter")
17
public class User extends UserMini {
18

19
  /** When the user object was created. */
20
  @JsonProperty("created_at")
21
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
22
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
23
  protected OffsetDateTime createdAt;
24

25
  /** When the user object was last modified. */
26
  @JsonProperty("modified_at")
27
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
28
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
29
  protected OffsetDateTime modifiedAt;
30

31
  /**
32
   * The language of the user, formatted in modified version of the [ISO
33
   * 639-1](/guides/api-calls/language-codes) format.
34
   */
35
  protected String language;
36

37
  /** The user's timezone. */
38
  protected String timezone;
39

40
  /** The user’s total available space amount in bytes. */
41
  @JsonProperty("space_amount")
42
  protected Long spaceAmount;
43

44
  /** The amount of space in use by the user. */
45
  @JsonProperty("space_used")
46
  protected Long spaceUsed;
47

48
  /** The maximum individual file size in bytes the user can have. */
49
  @JsonProperty("max_upload_size")
50
  protected Long maxUploadSize;
51

52
  /** The user's account status. */
53
  @JsonDeserialize(using = UserStatusField.UserStatusFieldDeserializer.class)
54
  @JsonSerialize(using = UserStatusField.UserStatusFieldSerializer.class)
55
  protected EnumWrapper<UserStatusField> status;
56

57
  /** The user’s job title. */
58
  @JsonProperty("job_title")
59
  protected String jobTitle;
60

61
  /** The user’s phone number. */
62
  protected String phone;
63

64
  /** The user’s address. */
65
  protected String address;
66

67
  /** URL of the user’s avatar image. */
68
  @JsonProperty("avatar_url")
69
  protected String avatarUrl;
70

71
  /**
72
   * An alternate notification email address to which email notifications are sent. When it's
73
   * confirmed, this will be the email address to which notifications are sent instead of to the
74
   * primary email address.
75
   */
76
  @JsonProperty("notification_email")
77
  @Nullable
78
  protected UserNotificationEmailField notificationEmail;
79

80
  public User(@JsonProperty("id") String id) {
81
    super(id);
1✔
82
  }
1✔
83

84
  protected User(Builder builder) {
85
    super(builder);
×
86
    this.createdAt = builder.createdAt;
×
87
    this.modifiedAt = builder.modifiedAt;
×
88
    this.language = builder.language;
×
89
    this.timezone = builder.timezone;
×
90
    this.spaceAmount = builder.spaceAmount;
×
91
    this.spaceUsed = builder.spaceUsed;
×
92
    this.maxUploadSize = builder.maxUploadSize;
×
93
    this.status = builder.status;
×
94
    this.jobTitle = builder.jobTitle;
×
95
    this.phone = builder.phone;
×
96
    this.address = builder.address;
×
97
    this.avatarUrl = builder.avatarUrl;
×
98
    this.notificationEmail = builder.notificationEmail;
×
99
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
×
100
  }
×
101

102
  public OffsetDateTime getCreatedAt() {
103
    return createdAt;
×
104
  }
105

106
  public OffsetDateTime getModifiedAt() {
107
    return modifiedAt;
×
108
  }
109

110
  public String getLanguage() {
111
    return language;
×
112
  }
113

114
  public String getTimezone() {
115
    return timezone;
×
116
  }
117

118
  public Long getSpaceAmount() {
119
    return spaceAmount;
×
120
  }
121

122
  public Long getSpaceUsed() {
123
    return spaceUsed;
×
124
  }
125

126
  public Long getMaxUploadSize() {
127
    return maxUploadSize;
×
128
  }
129

130
  public EnumWrapper<UserStatusField> getStatus() {
131
    return status;
×
132
  }
133

134
  public String getJobTitle() {
135
    return jobTitle;
×
136
  }
137

138
  public String getPhone() {
139
    return phone;
×
140
  }
141

142
  public String getAddress() {
143
    return address;
×
144
  }
145

146
  public String getAvatarUrl() {
147
    return avatarUrl;
×
148
  }
149

150
  public UserNotificationEmailField getNotificationEmail() {
151
    return notificationEmail;
×
152
  }
153

154
  @Override
155
  public boolean equals(Object o) {
156
    if (this == o) {
×
157
      return true;
×
158
    }
159
    if (o == null || getClass() != o.getClass()) {
×
160
      return false;
×
161
    }
162
    User casted = (User) o;
×
163
    return Objects.equals(id, casted.id)
×
164
        && Objects.equals(type, casted.type)
×
165
        && Objects.equals(name, casted.name)
×
166
        && Objects.equals(login, casted.login)
×
167
        && Objects.equals(createdAt, casted.createdAt)
×
168
        && Objects.equals(modifiedAt, casted.modifiedAt)
×
169
        && Objects.equals(language, casted.language)
×
170
        && Objects.equals(timezone, casted.timezone)
×
171
        && Objects.equals(spaceAmount, casted.spaceAmount)
×
172
        && Objects.equals(spaceUsed, casted.spaceUsed)
×
173
        && Objects.equals(maxUploadSize, casted.maxUploadSize)
×
174
        && Objects.equals(status, casted.status)
×
175
        && Objects.equals(jobTitle, casted.jobTitle)
×
176
        && Objects.equals(phone, casted.phone)
×
177
        && Objects.equals(address, casted.address)
×
178
        && Objects.equals(avatarUrl, casted.avatarUrl)
×
179
        && Objects.equals(notificationEmail, casted.notificationEmail);
×
180
  }
181

182
  @Override
183
  public int hashCode() {
184
    return Objects.hash(
×
185
        id,
186
        type,
187
        name,
188
        login,
189
        createdAt,
190
        modifiedAt,
191
        language,
192
        timezone,
193
        spaceAmount,
194
        spaceUsed,
195
        maxUploadSize,
196
        status,
197
        jobTitle,
198
        phone,
199
        address,
200
        avatarUrl,
201
        notificationEmail);
202
  }
203

204
  @Override
205
  public String toString() {
206
    return "User{"
×
207
        + "id='"
208
        + id
209
        + '\''
210
        + ", "
211
        + "type='"
212
        + type
213
        + '\''
214
        + ", "
215
        + "name='"
216
        + name
217
        + '\''
218
        + ", "
219
        + "login='"
220
        + login
221
        + '\''
222
        + ", "
223
        + "createdAt='"
224
        + createdAt
225
        + '\''
226
        + ", "
227
        + "modifiedAt='"
228
        + modifiedAt
229
        + '\''
230
        + ", "
231
        + "language='"
232
        + language
233
        + '\''
234
        + ", "
235
        + "timezone='"
236
        + timezone
237
        + '\''
238
        + ", "
239
        + "spaceAmount='"
240
        + spaceAmount
241
        + '\''
242
        + ", "
243
        + "spaceUsed='"
244
        + spaceUsed
245
        + '\''
246
        + ", "
247
        + "maxUploadSize='"
248
        + maxUploadSize
249
        + '\''
250
        + ", "
251
        + "status='"
252
        + status
253
        + '\''
254
        + ", "
255
        + "jobTitle='"
256
        + jobTitle
257
        + '\''
258
        + ", "
259
        + "phone='"
260
        + phone
261
        + '\''
262
        + ", "
263
        + "address='"
264
        + address
265
        + '\''
266
        + ", "
267
        + "avatarUrl='"
268
        + avatarUrl
269
        + '\''
270
        + ", "
271
        + "notificationEmail='"
272
        + notificationEmail
273
        + '\''
274
        + "}";
275
  }
276

277
  public static class Builder extends UserMini.Builder {
278

279
    protected OffsetDateTime createdAt;
280

281
    protected OffsetDateTime modifiedAt;
282

283
    protected String language;
284

285
    protected String timezone;
286

287
    protected Long spaceAmount;
288

289
    protected Long spaceUsed;
290

291
    protected Long maxUploadSize;
292

293
    protected EnumWrapper<UserStatusField> status;
294

295
    protected String jobTitle;
296

297
    protected String phone;
298

299
    protected String address;
300

301
    protected String avatarUrl;
302

303
    protected UserNotificationEmailField notificationEmail;
304

305
    public Builder(String id) {
306
      super(id);
×
307
    }
×
308

309
    public Builder createdAt(OffsetDateTime createdAt) {
310
      this.createdAt = createdAt;
×
311
      return this;
×
312
    }
313

314
    public Builder modifiedAt(OffsetDateTime modifiedAt) {
315
      this.modifiedAt = modifiedAt;
×
316
      return this;
×
317
    }
318

319
    public Builder language(String language) {
320
      this.language = language;
×
321
      return this;
×
322
    }
323

324
    public Builder timezone(String timezone) {
325
      this.timezone = timezone;
×
326
      return this;
×
327
    }
328

329
    public Builder spaceAmount(Long spaceAmount) {
330
      this.spaceAmount = spaceAmount;
×
331
      return this;
×
332
    }
333

334
    public Builder spaceUsed(Long spaceUsed) {
335
      this.spaceUsed = spaceUsed;
×
336
      return this;
×
337
    }
338

339
    public Builder maxUploadSize(Long maxUploadSize) {
340
      this.maxUploadSize = maxUploadSize;
×
341
      return this;
×
342
    }
343

344
    public Builder status(UserStatusField status) {
345
      this.status = new EnumWrapper<UserStatusField>(status);
×
346
      return this;
×
347
    }
348

349
    public Builder status(EnumWrapper<UserStatusField> status) {
350
      this.status = status;
×
351
      return this;
×
352
    }
353

354
    public Builder jobTitle(String jobTitle) {
355
      this.jobTitle = jobTitle;
×
356
      return this;
×
357
    }
358

359
    public Builder phone(String phone) {
360
      this.phone = phone;
×
361
      return this;
×
362
    }
363

364
    public Builder address(String address) {
365
      this.address = address;
×
366
      return this;
×
367
    }
368

369
    public Builder avatarUrl(String avatarUrl) {
370
      this.avatarUrl = avatarUrl;
×
371
      return this;
×
372
    }
373

374
    public Builder notificationEmail(UserNotificationEmailField notificationEmail) {
375
      this.notificationEmail = notificationEmail;
×
376
      this.markNullableFieldAsSet("notification_email");
×
377
      return this;
×
378
    }
379

380
    @Override
381
    public Builder type(UserBaseTypeField type) {
382
      this.type = new EnumWrapper<UserBaseTypeField>(type);
×
383
      return this;
×
384
    }
385

386
    @Override
387
    public Builder type(EnumWrapper<UserBaseTypeField> type) {
388
      this.type = type;
×
389
      return this;
×
390
    }
391

392
    @Override
393
    public Builder name(String name) {
394
      this.name = name;
×
395
      return this;
×
396
    }
397

398
    @Override
399
    public Builder login(String login) {
400
      this.login = login;
×
401
      return this;
×
402
    }
403

404
    public User build() {
405
      return new User(this);
×
406
    }
407
  }
408
}
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