001package com.box.sdk;
002
003import java.util.Map;
004
005/**
006 * Contains optional parameters for creating a new enterprise user on Box.
007 */
008public class CreateUserParams {
009    private boolean canSeeManagedUsers;
010    private boolean isExemptFromDeviceLimits;
011    private boolean isExemptFromLoginVerification;
012    private boolean isPlatformAccessOnly;
013    private boolean isSyncEnabled;
014    private boolean isExternalCollabRestricted;
015    private BoxUser.Role role;
016    private BoxUser.Status status;
017    private long spaceAmount;
018    private String address;
019    private String jobTitle;
020    private String language;
021    private String phone;
022    private String timezone;
023    private String externalAppUserId;
024    private Map<String, String> trackingCodes;
025
026    /**
027     * Gets whether or not the new user will be able to see other enterprise users in their contact list.
028     * @return true if the new user will be able to see other enterprise users in their contact list; otherwise false.
029     */
030    public boolean getCanSeeManagedUsers() {
031        return this.canSeeManagedUsers;
032    }
033
034    /**
035     * Sets whether or not the new user will be able to see other enterprise users in their contact list.
036     * @param  canSeeManagedUsers whether or not the new user will be able to see other enterprise users in their
037     *                            contact list.
038     * @return                    this CreateUserParams object for chaining.
039     */
040    public CreateUserParams setCanSeeManagedUsers(boolean canSeeManagedUsers) {
041        this.canSeeManagedUsers = canSeeManagedUsers;
042        return this;
043    }
044
045    /**
046     * Gets whether or not the new user will be exempt from Enterprise device limits.
047     * @return true if the new user will be exempt from Enterprise device limits; otherwise false.
048     */
049    public boolean getIsExemptFromDeviceLimits() {
050        return this.isExemptFromDeviceLimits;
051    }
052
053    /**
054     * Sets whether or not the new user will be exempt from Enterprise device limits.
055     * @param  isExemptFromDeviceLimits whether or not the new user will be exempt from Enterprise device limits.
056     * @return                          this CreateUserParams object for chaining.
057     */
058    public CreateUserParams setIsExemptFromDeviceLimits(boolean isExemptFromDeviceLimits) {
059        this.isExemptFromDeviceLimits = isExemptFromDeviceLimits;
060        return this;
061    }
062
063    /**
064     * Gets whether or not the new user will be required to use two-factor authentication.
065     * @return true if the new user will be required to use two-factor authentication; otherwise false.
066     */
067    public boolean getIsExemptFromLoginVerification() {
068        return this.isExemptFromLoginVerification;
069    }
070
071    /**
072     * Sets whether or not the new user will be required to use two-factor authentication.
073     * @param  isExemptFromLoginVerification whether or not the new user will be required to use two-factor
074     *                                       authentication.
075     * @return                               this CreateUserParams object for chaining.
076     */
077    public CreateUserParams setIsExemptFromLoginVerification(boolean isExemptFromLoginVerification) {
078        this.isExemptFromLoginVerification = isExemptFromLoginVerification;
079        return this;
080    }
081
082    /**
083    * Gets whether or not the user we are creating is an app user with Box Developer Edition.
084    * @return true if the new user is an app user for Box Developer Addition; otherwise false.
085    */
086    public boolean getIsPlatformAccessOnly() {
087        return this.isPlatformAccessOnly;
088    }
089
090   /**
091    * Sets whether or not the user we are creating is an app user with Box Developer Edition.
092    * @param  isPlatformAccessOnly whether or not the user we are creating is an app user with Box Developer
093    *                              Edition.
094    * @return                      this CreateUserParams object for chaining.
095    */
096    public CreateUserParams setIsPlatformAccessOnly(boolean isPlatformAccessOnly) {
097        this.isPlatformAccessOnly = isPlatformAccessOnly;
098        return this;
099    }
100
101    /**
102     * Gets whether or not the new user will be able to use Box Sync.
103     * @return true if the new user will be able to use Box Sync; otherwise false.
104     */
105    public boolean getIsSyncEnabled() {
106        return this.isSyncEnabled;
107    }
108
109    /**
110     * Sets whether or not the new user will be able to use Box Sync.
111     * @param  isSyncEnabled whether or not the new user will be able to use Box Sync.
112     * @return               this CreateUserParams object for chaining.
113     */
114    public CreateUserParams setIsSyncEnabled(boolean isSyncEnabled) {
115        this.isSyncEnabled = isSyncEnabled;
116        return this;
117    }
118
119    /**
120     * Gets what the new user's enterprise role will be.
121     * @return what the new user's enterprise role will be.
122     */
123    public BoxUser.Role getRole() {
124        return this.role;
125    }
126
127    /**
128     * Sets what the new user's enterprise role will be.
129     * @param  role what the new user's enterprise role will be.
130     * @return      this CreateUserParams object for chaining.
131     */
132    public CreateUserParams setRole(BoxUser.Role role) {
133        this.role = role;
134        return this;
135    }
136
137    /**
138     * Gets what the new user's account status will be.
139     * @return what the new user's account status will be.
140     */
141    public BoxUser.Status getStatus() {
142        return this.status;
143    }
144
145    /**
146     * Sets what the new user's account status will be.
147     * @param  status what the new user's account status will be.
148     * @return        this CreateUserParams object for chaining.
149     */
150    public CreateUserParams setStatus(BoxUser.Status status) {
151        this.status = status;
152        return this;
153    }
154
155    /**
156     * Gets what the new user's total available space will be in bytes.
157     * @return what the new user's total available space will be in bytes.
158     */
159    public long getSpaceAmount() {
160        return this.spaceAmount;
161    }
162
163    /**
164     * Sets what the new user's total available space will be in bytes.
165     * @param  spaceAmount what the new user's total available space will be in bytes.
166     * @return             this CreateUserParams object for chaining.
167     */
168    public CreateUserParams setSpaceAmount(long spaceAmount) {
169        this.spaceAmount = spaceAmount;
170        return this;
171    }
172
173    /**
174     * Gets what the address of the new user will be.
175     * @return what the address of the new user will be.
176     */
177    public String getAddress() {
178        return this.address;
179    }
180
181    /**
182     * Sets what the address of the new user will be.
183     * @param  address what the address of the new user will be.
184     * @return         this CreateUserParams object for chaining.
185     */
186    public CreateUserParams setAddress(String address) {
187        this.address = address;
188        return this;
189    }
190
191    /**
192     * Gets what the job title of the new user will be.
193     * @return what the job title of the new user will be.
194     */
195    public String getJobTitle() {
196        return this.jobTitle;
197    }
198
199    /**
200     * Sets what the job title of the new user will be.
201     * @param  jobTitle what the job title of the new user will be.
202     * @return          this CreateUserParams object for chaining.
203     */
204    public CreateUserParams setJobTitle(String jobTitle) {
205        this.jobTitle = jobTitle;
206        return this;
207    }
208
209    /**
210     * Gets what the language of the new user will be.
211     * @return what the language of the new user will be.
212     */
213    public String getLanguage() {
214        return this.language;
215    }
216
217    /**
218     * Sets what the language of the new user will be.
219     * @param  language what the language of the new user will be.
220     * @return          this CreateUserParams object for chaining.
221     */
222    public CreateUserParams setLanguage(String language) {
223        this.language = language;
224        return this;
225    }
226
227    /**
228     * Gets what the phone number of the new user will be.
229     * @return what the phone number of the new user will be.
230     */
231    public String getPhone() {
232        return this.phone;
233    }
234
235    /**
236     * Sets what the phone number of the new user will be.
237     * @param  phone what the phone number of the new user will be.
238     * @return       this CreateUserParams object for chaining.
239     */
240    public CreateUserParams setPhone(String phone) {
241        this.phone = phone;
242        return this;
243    }
244
245    /**
246     * Gets what the timezone of the new user will be.
247     * @return what the timezone of the new user will be.
248     */
249    public String getTimezone() {
250        return this.timezone;
251    }
252
253    /**
254     * Sets what the timezone of the new user will be.
255     * @param  timezone what the timezone of the new user will be.
256     * @return          this CreateUserParams object for chaining.
257     */
258    public CreateUserParams setTimezone(String timezone) {
259        this.timezone = timezone;
260        return this;
261    }
262
263    /**
264     * Gets the external app user id that has been set for the app user.
265     * @return the external app user id.
266     */
267    public String getExternalAppUserId() {
268        return this.externalAppUserId;
269    }
270
271    /**
272     * Sets the external app user id.
273     * @param externalAppUserId external app user id.
274     * @return                  this CreateUserParams object for chaining.
275     */
276    public CreateUserParams setExternalAppUserId(String externalAppUserId) {
277        this.externalAppUserId = externalAppUserId;
278        return this;
279    }
280
281    /**
282     * Gets whether this user is allowed or not to collaborate with users outside their enterprise.
283     * @return true if the user is not able to collaborate with users outside their enterpise; otherwise false.
284     */
285    public boolean getIsExternalCollabRestricted() {
286        return this.isExternalCollabRestricted;
287    }
288
289    /**
290     * Sets whether this user is allowed or not to collaborate with users outside their enterprise.
291     * @param isExternalCollabRestricted whether the user is allowed to collaborate with users outside their enterprise.
292     * @return                  this CreateUserParams object for chaining.
293     */
294    public CreateUserParams setIsExternalCollabRestricted(boolean isExternalCollabRestricted) {
295        this.isExternalCollabRestricted = isExternalCollabRestricted;
296        return this;
297    }
298
299    /**
300     * Gets the map of tracking codes. Tracking codes allow an admin to generate reports from the admin console and
301     * assign an attribute to a specific group of users. This setting must be enabled for an
302     * enterprise before it can be used.
303     *
304     * @return map of tracking codes.
305     */
306    public Map<String, String> getTrackingCodes() {
307        return this.trackingCodes;
308    }
309
310    /**
311     * Sets the map of tracking codes. Tracking codes allow an admin to generate reports from the admin console and
312     * assign an attribute to a specific group of users. This setting must be enabled for an
313     * enterprise before it can be used.
314     *
315     * @param trackingCodes map of tracking codes.
316     * @return this CreateUserParams object for chaining.
317     */
318    public CreateUserParams setTrackingCodes(Map<String, String> trackingCodes) {
319        this.trackingCodes = trackingCodes;
320        return this;
321    }
322}