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

box / box-java-sdk-gen / #290

24 Jun 2025 01:20PM UTC coverage: 35.757% (+0.1%) from 35.632%
#290

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%)

11777 existing lines in 624 files now uncovered.

16984 of 47499 relevant lines covered (35.76%)

0.36 hits per line

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

43.12
/src/main/java/com/box/sdkgen/managers/users/CreateUserRequestBody.java
1
package com.box.sdkgen.managers.users;
2

3
import com.box.sdkgen.internal.NullableFieldTracker;
4
import com.box.sdkgen.internal.SerializableObject;
5
import com.box.sdkgen.schemas.trackingcode.TrackingCode;
6
import com.box.sdkgen.serialization.json.EnumWrapper;
7
import com.fasterxml.jackson.annotation.JsonFilter;
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.List;
12
import java.util.Objects;
13

14
@JsonFilter("nullablePropertyFilter")
15
public class CreateUserRequestBody extends SerializableObject {
16

17
  protected final String name;
18

19
  protected String login;
20

21
  @JsonProperty("is_platform_access_only")
22
  protected Boolean isPlatformAccessOnly;
23

24
  @JsonDeserialize(
25
      using = CreateUserRequestBodyRoleField.CreateUserRequestBodyRoleFieldDeserializer.class)
26
  @JsonSerialize(
27
      using = CreateUserRequestBodyRoleField.CreateUserRequestBodyRoleFieldSerializer.class)
28
  protected EnumWrapper<CreateUserRequestBodyRoleField> role;
29

30
  protected String language;
31

32
  @JsonProperty("is_sync_enabled")
33
  protected Boolean isSyncEnabled;
34

35
  @JsonProperty("job_title")
36
  protected String jobTitle;
37

38
  protected String phone;
39

40
  protected String address;
41

42
  @JsonProperty("space_amount")
43
  protected Long spaceAmount;
44

45
  @JsonProperty("tracking_codes")
46
  protected List<TrackingCode> trackingCodes;
47

48
  @JsonProperty("can_see_managed_users")
49
  protected Boolean canSeeManagedUsers;
50

51
  protected String timezone;
52

53
  @JsonProperty("is_external_collab_restricted")
54
  protected Boolean isExternalCollabRestricted;
55

56
  @JsonProperty("is_exempt_from_device_limits")
57
  protected Boolean isExemptFromDeviceLimits;
58

59
  @JsonProperty("is_exempt_from_login_verification")
60
  protected Boolean isExemptFromLoginVerification;
61

62
  @JsonDeserialize(
63
      using = CreateUserRequestBodyStatusField.CreateUserRequestBodyStatusFieldDeserializer.class)
64
  @JsonSerialize(
65
      using = CreateUserRequestBodyStatusField.CreateUserRequestBodyStatusFieldSerializer.class)
66
  protected EnumWrapper<CreateUserRequestBodyStatusField> status;
67

68
  @JsonProperty("external_app_user_id")
69
  protected String externalAppUserId;
70

71
  public CreateUserRequestBody(@JsonProperty("name") String name) {
UNCOV
72
    super();
×
UNCOV
73
    this.name = name;
×
UNCOV
74
  }
×
75

76
  protected CreateUserRequestBody(Builder builder) {
77
    super();
1✔
78
    this.name = builder.name;
1✔
79
    this.login = builder.login;
1✔
80
    this.isPlatformAccessOnly = builder.isPlatformAccessOnly;
1✔
81
    this.role = builder.role;
1✔
82
    this.language = builder.language;
1✔
83
    this.isSyncEnabled = builder.isSyncEnabled;
1✔
84
    this.jobTitle = builder.jobTitle;
1✔
85
    this.phone = builder.phone;
1✔
86
    this.address = builder.address;
1✔
87
    this.spaceAmount = builder.spaceAmount;
1✔
88
    this.trackingCodes = builder.trackingCodes;
1✔
89
    this.canSeeManagedUsers = builder.canSeeManagedUsers;
1✔
90
    this.timezone = builder.timezone;
1✔
91
    this.isExternalCollabRestricted = builder.isExternalCollabRestricted;
1✔
92
    this.isExemptFromDeviceLimits = builder.isExemptFromDeviceLimits;
1✔
93
    this.isExemptFromLoginVerification = builder.isExemptFromLoginVerification;
1✔
94
    this.status = builder.status;
1✔
95
    this.externalAppUserId = builder.externalAppUserId;
1✔
96
    markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
1✔
97
  }
1✔
98

99
  public String getName() {
100
    return name;
1✔
101
  }
102

103
  public String getLogin() {
104
    return login;
1✔
105
  }
106

107
  public Boolean getIsPlatformAccessOnly() {
108
    return isPlatformAccessOnly;
1✔
109
  }
110

111
  public EnumWrapper<CreateUserRequestBodyRoleField> getRole() {
112
    return role;
1✔
113
  }
114

115
  public String getLanguage() {
116
    return language;
1✔
117
  }
118

119
  public Boolean getIsSyncEnabled() {
120
    return isSyncEnabled;
1✔
121
  }
122

123
  public String getJobTitle() {
124
    return jobTitle;
1✔
125
  }
126

127
  public String getPhone() {
128
    return phone;
1✔
129
  }
130

131
  public String getAddress() {
132
    return address;
1✔
133
  }
134

135
  public Long getSpaceAmount() {
136
    return spaceAmount;
1✔
137
  }
138

139
  public List<TrackingCode> getTrackingCodes() {
140
    return trackingCodes;
1✔
141
  }
142

143
  public Boolean getCanSeeManagedUsers() {
144
    return canSeeManagedUsers;
1✔
145
  }
146

147
  public String getTimezone() {
148
    return timezone;
1✔
149
  }
150

151
  public Boolean getIsExternalCollabRestricted() {
152
    return isExternalCollabRestricted;
1✔
153
  }
154

155
  public Boolean getIsExemptFromDeviceLimits() {
156
    return isExemptFromDeviceLimits;
1✔
157
  }
158

159
  public Boolean getIsExemptFromLoginVerification() {
160
    return isExemptFromLoginVerification;
1✔
161
  }
162

163
  public EnumWrapper<CreateUserRequestBodyStatusField> getStatus() {
164
    return status;
1✔
165
  }
166

167
  public String getExternalAppUserId() {
168
    return externalAppUserId;
1✔
169
  }
170

171
  @Override
172
  public boolean equals(Object o) {
173
    if (this == o) {
×
UNCOV
174
      return true;
×
175
    }
176
    if (o == null || getClass() != o.getClass()) {
×
177
      return false;
×
178
    }
179
    CreateUserRequestBody casted = (CreateUserRequestBody) o;
×
180
    return Objects.equals(name, casted.name)
×
181
        && Objects.equals(login, casted.login)
×
182
        && Objects.equals(isPlatformAccessOnly, casted.isPlatformAccessOnly)
×
183
        && Objects.equals(role, casted.role)
×
184
        && Objects.equals(language, casted.language)
×
185
        && Objects.equals(isSyncEnabled, casted.isSyncEnabled)
×
186
        && Objects.equals(jobTitle, casted.jobTitle)
×
187
        && Objects.equals(phone, casted.phone)
×
188
        && Objects.equals(address, casted.address)
×
189
        && Objects.equals(spaceAmount, casted.spaceAmount)
×
190
        && Objects.equals(trackingCodes, casted.trackingCodes)
×
191
        && Objects.equals(canSeeManagedUsers, casted.canSeeManagedUsers)
×
192
        && Objects.equals(timezone, casted.timezone)
×
193
        && Objects.equals(isExternalCollabRestricted, casted.isExternalCollabRestricted)
×
UNCOV
194
        && Objects.equals(isExemptFromDeviceLimits, casted.isExemptFromDeviceLimits)
×
UNCOV
195
        && Objects.equals(isExemptFromLoginVerification, casted.isExemptFromLoginVerification)
×
UNCOV
196
        && Objects.equals(status, casted.status)
×
UNCOV
197
        && Objects.equals(externalAppUserId, casted.externalAppUserId);
×
198
  }
199

200
  @Override
201
  public int hashCode() {
UNCOV
202
    return Objects.hash(
×
203
        name,
204
        login,
205
        isPlatformAccessOnly,
206
        role,
207
        language,
208
        isSyncEnabled,
209
        jobTitle,
210
        phone,
211
        address,
212
        spaceAmount,
213
        trackingCodes,
214
        canSeeManagedUsers,
215
        timezone,
216
        isExternalCollabRestricted,
217
        isExemptFromDeviceLimits,
218
        isExemptFromLoginVerification,
219
        status,
220
        externalAppUserId);
221
  }
222

223
  @Override
224
  public String toString() {
UNCOV
225
    return "CreateUserRequestBody{"
×
226
        + "name='"
227
        + name
228
        + '\''
229
        + ", "
230
        + "login='"
231
        + login
232
        + '\''
233
        + ", "
234
        + "isPlatformAccessOnly='"
235
        + isPlatformAccessOnly
236
        + '\''
237
        + ", "
238
        + "role='"
239
        + role
240
        + '\''
241
        + ", "
242
        + "language='"
243
        + language
244
        + '\''
245
        + ", "
246
        + "isSyncEnabled='"
247
        + isSyncEnabled
248
        + '\''
249
        + ", "
250
        + "jobTitle='"
251
        + jobTitle
252
        + '\''
253
        + ", "
254
        + "phone='"
255
        + phone
256
        + '\''
257
        + ", "
258
        + "address='"
259
        + address
260
        + '\''
261
        + ", "
262
        + "spaceAmount='"
263
        + spaceAmount
264
        + '\''
265
        + ", "
266
        + "trackingCodes='"
267
        + trackingCodes
268
        + '\''
269
        + ", "
270
        + "canSeeManagedUsers='"
271
        + canSeeManagedUsers
272
        + '\''
273
        + ", "
274
        + "timezone='"
275
        + timezone
276
        + '\''
277
        + ", "
278
        + "isExternalCollabRestricted='"
279
        + isExternalCollabRestricted
280
        + '\''
281
        + ", "
282
        + "isExemptFromDeviceLimits='"
283
        + isExemptFromDeviceLimits
284
        + '\''
285
        + ", "
286
        + "isExemptFromLoginVerification='"
287
        + isExemptFromLoginVerification
288
        + '\''
289
        + ", "
290
        + "status='"
291
        + status
292
        + '\''
293
        + ", "
294
        + "externalAppUserId='"
295
        + externalAppUserId
296
        + '\''
297
        + "}";
298
  }
299

300
  public static class Builder extends NullableFieldTracker {
301

302
    protected final String name;
303

304
    protected String login;
305

306
    protected Boolean isPlatformAccessOnly;
307

308
    protected EnumWrapper<CreateUserRequestBodyRoleField> role;
309

310
    protected String language;
311

312
    protected Boolean isSyncEnabled;
313

314
    protected String jobTitle;
315

316
    protected String phone;
317

318
    protected String address;
319

320
    protected Long spaceAmount;
321

322
    protected List<TrackingCode> trackingCodes;
323

324
    protected Boolean canSeeManagedUsers;
325

326
    protected String timezone;
327

328
    protected Boolean isExternalCollabRestricted;
329

330
    protected Boolean isExemptFromDeviceLimits;
331

332
    protected Boolean isExemptFromLoginVerification;
333

334
    protected EnumWrapper<CreateUserRequestBodyStatusField> status;
335

336
    protected String externalAppUserId;
337

338
    public Builder(String name) {
339
      super();
1✔
340
      this.name = name;
1✔
341
    }
1✔
342

343
    public Builder login(String login) {
344
      this.login = login;
1✔
345
      return this;
1✔
346
    }
347

348
    public Builder isPlatformAccessOnly(Boolean isPlatformAccessOnly) {
349
      this.isPlatformAccessOnly = isPlatformAccessOnly;
1✔
350
      return this;
1✔
351
    }
352

353
    public Builder role(CreateUserRequestBodyRoleField role) {
354
      this.role = new EnumWrapper<CreateUserRequestBodyRoleField>(role);
×
355
      return this;
×
356
    }
357

358
    public Builder role(EnumWrapper<CreateUserRequestBodyRoleField> role) {
359
      this.role = role;
×
360
      return this;
×
361
    }
362

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

368
    public Builder isSyncEnabled(Boolean isSyncEnabled) {
369
      this.isSyncEnabled = isSyncEnabled;
×
370
      return this;
×
371
    }
372

373
    public Builder jobTitle(String jobTitle) {
374
      this.jobTitle = jobTitle;
×
375
      return this;
×
376
    }
377

378
    public Builder phone(String phone) {
379
      this.phone = phone;
×
380
      return this;
×
381
    }
382

383
    public Builder address(String address) {
384
      this.address = address;
×
385
      return this;
×
386
    }
387

388
    public Builder spaceAmount(Long spaceAmount) {
389
      this.spaceAmount = spaceAmount;
×
390
      return this;
×
391
    }
392

393
    public Builder trackingCodes(List<TrackingCode> trackingCodes) {
394
      this.trackingCodes = trackingCodes;
×
395
      return this;
×
396
    }
397

398
    public Builder canSeeManagedUsers(Boolean canSeeManagedUsers) {
399
      this.canSeeManagedUsers = canSeeManagedUsers;
×
400
      return this;
×
401
    }
402

403
    public Builder timezone(String timezone) {
404
      this.timezone = timezone;
×
405
      return this;
×
406
    }
407

408
    public Builder isExternalCollabRestricted(Boolean isExternalCollabRestricted) {
409
      this.isExternalCollabRestricted = isExternalCollabRestricted;
×
410
      return this;
×
411
    }
412

413
    public Builder isExemptFromDeviceLimits(Boolean isExemptFromDeviceLimits) {
414
      this.isExemptFromDeviceLimits = isExemptFromDeviceLimits;
×
415
      return this;
×
416
    }
417

418
    public Builder isExemptFromLoginVerification(Boolean isExemptFromLoginVerification) {
419
      this.isExemptFromLoginVerification = isExemptFromLoginVerification;
×
420
      return this;
×
421
    }
422

423
    public Builder status(CreateUserRequestBodyStatusField status) {
424
      this.status = new EnumWrapper<CreateUserRequestBodyStatusField>(status);
×
425
      return this;
×
426
    }
427

428
    public Builder status(EnumWrapper<CreateUserRequestBodyStatusField> status) {
429
      this.status = status;
×
430
      return this;
×
431
    }
432

433
    public Builder externalAppUserId(String externalAppUserId) {
UNCOV
434
      this.externalAppUserId = externalAppUserId;
×
UNCOV
435
      return this;
×
436
    }
437

438
    public CreateUserRequestBody build() {
439
      return new CreateUserRequestBody(this);
1✔
440
    }
441
  }
442
}
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