• 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

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

3
import com.box.sdkgen.internal.SerializableObject;
4
import com.box.sdkgen.schemas.trackingcode.TrackingCode;
5
import com.box.sdkgen.serialization.json.EnumWrapper;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
8
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
9
import java.util.List;
10
import java.util.Objects;
11

12
public class CreateUserRequestBody extends SerializableObject {
13

14
  protected final String name;
15

16
  protected String login;
17

18
  @JsonProperty("is_platform_access_only")
19
  protected Boolean isPlatformAccessOnly;
20

21
  @JsonDeserialize(
22
      using = CreateUserRequestBodyRoleField.CreateUserRequestBodyRoleFieldDeserializer.class)
23
  @JsonSerialize(
24
      using = CreateUserRequestBodyRoleField.CreateUserRequestBodyRoleFieldSerializer.class)
25
  protected EnumWrapper<CreateUserRequestBodyRoleField> role;
26

27
  protected String language;
28

29
  @JsonProperty("is_sync_enabled")
30
  protected Boolean isSyncEnabled;
31

32
  @JsonProperty("job_title")
33
  protected String jobTitle;
34

35
  protected String phone;
36

37
  protected String address;
38

39
  @JsonProperty("space_amount")
40
  protected Long spaceAmount;
41

42
  @JsonProperty("tracking_codes")
43
  protected List<TrackingCode> trackingCodes;
44

45
  @JsonProperty("can_see_managed_users")
46
  protected Boolean canSeeManagedUsers;
47

48
  protected String timezone;
49

50
  @JsonProperty("is_external_collab_restricted")
51
  protected Boolean isExternalCollabRestricted;
52

53
  @JsonProperty("is_exempt_from_device_limits")
54
  protected Boolean isExemptFromDeviceLimits;
55

56
  @JsonProperty("is_exempt_from_login_verification")
57
  protected Boolean isExemptFromLoginVerification;
58

59
  @JsonDeserialize(
60
      using = CreateUserRequestBodyStatusField.CreateUserRequestBodyStatusFieldDeserializer.class)
61
  @JsonSerialize(
62
      using = CreateUserRequestBodyStatusField.CreateUserRequestBodyStatusFieldSerializer.class)
63
  protected EnumWrapper<CreateUserRequestBodyStatusField> status;
64

65
  @JsonProperty("external_app_user_id")
66
  protected String externalAppUserId;
67

68
  public CreateUserRequestBody(@JsonProperty("name") String name) {
69
    super();
×
70
    this.name = name;
×
71
  }
×
72

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

95
  public String getName() {
96
    return name;
1✔
97
  }
98

99
  public String getLogin() {
100
    return login;
1✔
101
  }
102

103
  public Boolean getIsPlatformAccessOnly() {
104
    return isPlatformAccessOnly;
1✔
105
  }
106

107
  public EnumWrapper<CreateUserRequestBodyRoleField> getRole() {
108
    return role;
1✔
109
  }
110

111
  public String getLanguage() {
112
    return language;
1✔
113
  }
114

115
  public Boolean getIsSyncEnabled() {
116
    return isSyncEnabled;
1✔
117
  }
118

119
  public String getJobTitle() {
120
    return jobTitle;
1✔
121
  }
122

123
  public String getPhone() {
124
    return phone;
1✔
125
  }
126

127
  public String getAddress() {
128
    return address;
1✔
129
  }
130

131
  public Long getSpaceAmount() {
132
    return spaceAmount;
1✔
133
  }
134

135
  public List<TrackingCode> getTrackingCodes() {
136
    return trackingCodes;
1✔
137
  }
138

139
  public Boolean getCanSeeManagedUsers() {
140
    return canSeeManagedUsers;
1✔
141
  }
142

143
  public String getTimezone() {
144
    return timezone;
1✔
145
  }
146

147
  public Boolean getIsExternalCollabRestricted() {
148
    return isExternalCollabRestricted;
1✔
149
  }
150

151
  public Boolean getIsExemptFromDeviceLimits() {
152
    return isExemptFromDeviceLimits;
1✔
153
  }
154

155
  public Boolean getIsExemptFromLoginVerification() {
156
    return isExemptFromLoginVerification;
1✔
157
  }
158

159
  public EnumWrapper<CreateUserRequestBodyStatusField> getStatus() {
160
    return status;
1✔
161
  }
162

163
  public String getExternalAppUserId() {
164
    return externalAppUserId;
1✔
165
  }
166

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

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

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

296
  public static class Builder {
297

298
    protected final String name;
299

300
    protected String login;
301

302
    protected Boolean isPlatformAccessOnly;
303

304
    protected EnumWrapper<CreateUserRequestBodyRoleField> role;
305

306
    protected String language;
307

308
    protected Boolean isSyncEnabled;
309

310
    protected String jobTitle;
311

312
    protected String phone;
313

314
    protected String address;
315

316
    protected Long spaceAmount;
317

318
    protected List<TrackingCode> trackingCodes;
319

320
    protected Boolean canSeeManagedUsers;
321

322
    protected String timezone;
323

324
    protected Boolean isExternalCollabRestricted;
325

326
    protected Boolean isExemptFromDeviceLimits;
327

328
    protected Boolean isExemptFromLoginVerification;
329

330
    protected EnumWrapper<CreateUserRequestBodyStatusField> status;
331

332
    protected String externalAppUserId;
333

334
    public Builder(String name) {
1✔
335
      this.name = name;
1✔
336
    }
1✔
337

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

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

348
    public Builder role(CreateUserRequestBodyRoleField role) {
349
      this.role = new EnumWrapper<CreateUserRequestBodyRoleField>(role);
×
350
      return this;
×
351
    }
352

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

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

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

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

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

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

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

388
    public Builder trackingCodes(List<TrackingCode> trackingCodes) {
389
      this.trackingCodes = trackingCodes;
×
390
      return this;
×
391
    }
392

393
    public Builder canSeeManagedUsers(Boolean canSeeManagedUsers) {
394
      this.canSeeManagedUsers = canSeeManagedUsers;
×
395
      return this;
×
396
    }
397

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

403
    public Builder isExternalCollabRestricted(Boolean isExternalCollabRestricted) {
UNCOV
404
      this.isExternalCollabRestricted = isExternalCollabRestricted;
×
405
      return this;
×
406
    }
407

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

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

418
    public Builder status(CreateUserRequestBodyStatusField status) {
419
      this.status = new EnumWrapper<CreateUserRequestBodyStatusField>(status);
×
420
      return this;
×
421
    }
422

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

428
    public Builder externalAppUserId(String externalAppUserId) {
429
      this.externalAppUserId = externalAppUserId;
×
430
      return this;
×
431
    }
432

433
    public CreateUserRequestBody build() {
434
      return new CreateUserRequestBody(this);
1✔
435
    }
436
  }
437
}
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