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