-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathCreateUserRequestBody.java
More file actions
474 lines (391 loc) · 12.7 KB
/
CreateUserRequestBody.java
File metadata and controls
474 lines (391 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
package com.box.sdkgen.managers.users;
import com.box.sdkgen.internal.NullableFieldTracker;
import com.box.sdkgen.internal.SerializableObject;
import com.box.sdkgen.schemas.trackingcode.TrackingCode;
import com.box.sdkgen.serialization.json.EnumWrapper;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.List;
import java.util.Objects;
@JsonFilter("nullablePropertyFilter")
public class CreateUserRequestBody extends SerializableObject {
/** The name of the user. */
protected final String name;
/**
* The email address the user uses to log in
*
* <p>Required, unless `is_platform_access_only` is set to `true`.
*/
protected String login;
/** Specifies that the user is an app user. */
@JsonProperty("is_platform_access_only")
protected Boolean isPlatformAccessOnly;
/** The user’s enterprise role. */
@JsonDeserialize(
using = CreateUserRequestBodyRoleField.CreateUserRequestBodyRoleFieldDeserializer.class)
@JsonSerialize(
using = CreateUserRequestBodyRoleField.CreateUserRequestBodyRoleFieldSerializer.class)
protected EnumWrapper<CreateUserRequestBodyRoleField> role;
/**
* The language of the user, formatted in modified version of the [ISO
* 639-1](https://developer.box.com/guides/api-calls/language-codes) format.
*/
protected String language;
/** Whether the user can use Box Sync. */
@JsonProperty("is_sync_enabled")
protected Boolean isSyncEnabled;
/** The user’s job title. */
@JsonProperty("job_title")
protected String jobTitle;
/** The user’s phone number. */
protected String phone;
/** The user’s address. */
protected String address;
/** The user’s total available space in bytes. Set this to `-1` to indicate unlimited storage. */
@JsonProperty("space_amount")
protected Long spaceAmount;
/**
* Tracking codes allow an admin to generate reports from the admin console and assign an
* attribute to a specific group of users. This setting must be enabled for an enterprise before
* it can be used.
*/
@JsonProperty("tracking_codes")
protected List<TrackingCode> trackingCodes;
/** Whether the user can see other enterprise users in their contact list. */
@JsonProperty("can_see_managed_users")
protected Boolean canSeeManagedUsers;
/** The user's timezone. */
protected String timezone;
/** Whether the user is allowed to collaborate with users outside their enterprise. */
@JsonProperty("is_external_collab_restricted")
protected Boolean isExternalCollabRestricted;
/** Whether to exempt the user from enterprise device limits. */
@JsonProperty("is_exempt_from_device_limits")
protected Boolean isExemptFromDeviceLimits;
/** Whether the user must use two-factor authentication. */
@JsonProperty("is_exempt_from_login_verification")
protected Boolean isExemptFromLoginVerification;
/** The user's account status. */
@JsonDeserialize(
using = CreateUserRequestBodyStatusField.CreateUserRequestBodyStatusFieldDeserializer.class)
@JsonSerialize(
using = CreateUserRequestBodyStatusField.CreateUserRequestBodyStatusFieldSerializer.class)
protected EnumWrapper<CreateUserRequestBodyStatusField> status;
/**
* An external identifier for an app user, which can be used to look up the user. This can be used
* to tie user IDs from external identity providers to Box users.
*/
@JsonProperty("external_app_user_id")
protected String externalAppUserId;
public CreateUserRequestBody(@JsonProperty("name") String name) {
super();
this.name = name;
}
protected CreateUserRequestBody(Builder builder) {
super();
this.name = builder.name;
this.login = builder.login;
this.isPlatformAccessOnly = builder.isPlatformAccessOnly;
this.role = builder.role;
this.language = builder.language;
this.isSyncEnabled = builder.isSyncEnabled;
this.jobTitle = builder.jobTitle;
this.phone = builder.phone;
this.address = builder.address;
this.spaceAmount = builder.spaceAmount;
this.trackingCodes = builder.trackingCodes;
this.canSeeManagedUsers = builder.canSeeManagedUsers;
this.timezone = builder.timezone;
this.isExternalCollabRestricted = builder.isExternalCollabRestricted;
this.isExemptFromDeviceLimits = builder.isExemptFromDeviceLimits;
this.isExemptFromLoginVerification = builder.isExemptFromLoginVerification;
this.status = builder.status;
this.externalAppUserId = builder.externalAppUserId;
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
}
public String getName() {
return name;
}
public String getLogin() {
return login;
}
public Boolean getIsPlatformAccessOnly() {
return isPlatformAccessOnly;
}
public EnumWrapper<CreateUserRequestBodyRoleField> getRole() {
return role;
}
public String getLanguage() {
return language;
}
public Boolean getIsSyncEnabled() {
return isSyncEnabled;
}
public String getJobTitle() {
return jobTitle;
}
public String getPhone() {
return phone;
}
public String getAddress() {
return address;
}
public Long getSpaceAmount() {
return spaceAmount;
}
public List<TrackingCode> getTrackingCodes() {
return trackingCodes;
}
public Boolean getCanSeeManagedUsers() {
return canSeeManagedUsers;
}
public String getTimezone() {
return timezone;
}
public Boolean getIsExternalCollabRestricted() {
return isExternalCollabRestricted;
}
public Boolean getIsExemptFromDeviceLimits() {
return isExemptFromDeviceLimits;
}
public Boolean getIsExemptFromLoginVerification() {
return isExemptFromLoginVerification;
}
public EnumWrapper<CreateUserRequestBodyStatusField> getStatus() {
return status;
}
public String getExternalAppUserId() {
return externalAppUserId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateUserRequestBody casted = (CreateUserRequestBody) o;
return Objects.equals(name, casted.name)
&& Objects.equals(login, casted.login)
&& Objects.equals(isPlatformAccessOnly, casted.isPlatformAccessOnly)
&& Objects.equals(role, casted.role)
&& Objects.equals(language, casted.language)
&& Objects.equals(isSyncEnabled, casted.isSyncEnabled)
&& Objects.equals(jobTitle, casted.jobTitle)
&& Objects.equals(phone, casted.phone)
&& Objects.equals(address, casted.address)
&& Objects.equals(spaceAmount, casted.spaceAmount)
&& Objects.equals(trackingCodes, casted.trackingCodes)
&& Objects.equals(canSeeManagedUsers, casted.canSeeManagedUsers)
&& Objects.equals(timezone, casted.timezone)
&& Objects.equals(isExternalCollabRestricted, casted.isExternalCollabRestricted)
&& Objects.equals(isExemptFromDeviceLimits, casted.isExemptFromDeviceLimits)
&& Objects.equals(isExemptFromLoginVerification, casted.isExemptFromLoginVerification)
&& Objects.equals(status, casted.status)
&& Objects.equals(externalAppUserId, casted.externalAppUserId);
}
@Override
public int hashCode() {
return Objects.hash(
name,
login,
isPlatformAccessOnly,
role,
language,
isSyncEnabled,
jobTitle,
phone,
address,
spaceAmount,
trackingCodes,
canSeeManagedUsers,
timezone,
isExternalCollabRestricted,
isExemptFromDeviceLimits,
isExemptFromLoginVerification,
status,
externalAppUserId);
}
@Override
public String toString() {
return "CreateUserRequestBody{"
+ "name='"
+ name
+ '\''
+ ", "
+ "login='"
+ login
+ '\''
+ ", "
+ "isPlatformAccessOnly='"
+ isPlatformAccessOnly
+ '\''
+ ", "
+ "role='"
+ role
+ '\''
+ ", "
+ "language='"
+ language
+ '\''
+ ", "
+ "isSyncEnabled='"
+ isSyncEnabled
+ '\''
+ ", "
+ "jobTitle='"
+ jobTitle
+ '\''
+ ", "
+ "phone='"
+ phone
+ '\''
+ ", "
+ "address='"
+ address
+ '\''
+ ", "
+ "spaceAmount='"
+ spaceAmount
+ '\''
+ ", "
+ "trackingCodes='"
+ trackingCodes
+ '\''
+ ", "
+ "canSeeManagedUsers='"
+ canSeeManagedUsers
+ '\''
+ ", "
+ "timezone='"
+ timezone
+ '\''
+ ", "
+ "isExternalCollabRestricted='"
+ isExternalCollabRestricted
+ '\''
+ ", "
+ "isExemptFromDeviceLimits='"
+ isExemptFromDeviceLimits
+ '\''
+ ", "
+ "isExemptFromLoginVerification='"
+ isExemptFromLoginVerification
+ '\''
+ ", "
+ "status='"
+ status
+ '\''
+ ", "
+ "externalAppUserId='"
+ externalAppUserId
+ '\''
+ "}";
}
public static class Builder extends NullableFieldTracker {
protected final String name;
protected String login;
protected Boolean isPlatformAccessOnly;
protected EnumWrapper<CreateUserRequestBodyRoleField> role;
protected String language;
protected Boolean isSyncEnabled;
protected String jobTitle;
protected String phone;
protected String address;
protected Long spaceAmount;
protected List<TrackingCode> trackingCodes;
protected Boolean canSeeManagedUsers;
protected String timezone;
protected Boolean isExternalCollabRestricted;
protected Boolean isExemptFromDeviceLimits;
protected Boolean isExemptFromLoginVerification;
protected EnumWrapper<CreateUserRequestBodyStatusField> status;
protected String externalAppUserId;
public Builder(String name) {
super();
this.name = name;
}
public Builder login(String login) {
this.login = login;
return this;
}
public Builder isPlatformAccessOnly(Boolean isPlatformAccessOnly) {
this.isPlatformAccessOnly = isPlatformAccessOnly;
return this;
}
public Builder role(CreateUserRequestBodyRoleField role) {
this.role = new EnumWrapper<CreateUserRequestBodyRoleField>(role);
return this;
}
public Builder role(EnumWrapper<CreateUserRequestBodyRoleField> role) {
this.role = role;
return this;
}
public Builder language(String language) {
this.language = language;
return this;
}
public Builder isSyncEnabled(Boolean isSyncEnabled) {
this.isSyncEnabled = isSyncEnabled;
return this;
}
public Builder jobTitle(String jobTitle) {
this.jobTitle = jobTitle;
return this;
}
public Builder phone(String phone) {
this.phone = phone;
return this;
}
public Builder address(String address) {
this.address = address;
return this;
}
public Builder spaceAmount(Long spaceAmount) {
this.spaceAmount = spaceAmount;
return this;
}
public Builder trackingCodes(List<TrackingCode> trackingCodes) {
this.trackingCodes = trackingCodes;
return this;
}
public Builder canSeeManagedUsers(Boolean canSeeManagedUsers) {
this.canSeeManagedUsers = canSeeManagedUsers;
return this;
}
public Builder timezone(String timezone) {
this.timezone = timezone;
return this;
}
public Builder isExternalCollabRestricted(Boolean isExternalCollabRestricted) {
this.isExternalCollabRestricted = isExternalCollabRestricted;
return this;
}
public Builder isExemptFromDeviceLimits(Boolean isExemptFromDeviceLimits) {
this.isExemptFromDeviceLimits = isExemptFromDeviceLimits;
return this;
}
public Builder isExemptFromLoginVerification(Boolean isExemptFromLoginVerification) {
this.isExemptFromLoginVerification = isExemptFromLoginVerification;
return this;
}
public Builder status(CreateUserRequestBodyStatusField status) {
this.status = new EnumWrapper<CreateUserRequestBodyStatusField>(status);
return this;
}
public Builder status(EnumWrapper<CreateUserRequestBodyStatusField> status) {
this.status = status;
return this;
}
public Builder externalAppUserId(String externalAppUserId) {
this.externalAppUserId = externalAppUserId;
return this;
}
public CreateUserRequestBody build() {
return new CreateUserRequestBody(this);
}
}
}