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

smartsheet / smartsheet-java-sdk / #55

02 Oct 2024 07:40PM UTC coverage: 60.548% (+0.7%) from 59.836%
#55

push

github

web-flow
Release prep for 3.2.1 (#103)

4156 of 6864 relevant lines covered (60.55%)

0.61 hits per line

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

62.07
/src/main/java/com/smartsheet/api/models/UserModel.java
1
/*
2
 * Copyright (C) 2024 Smartsheet
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.smartsheet.api.models;
18

19
import com.smartsheet.api.models.enums.UserStatus;
20

21
import java.util.Date;
22
import java.util.List;
23

24
public abstract class UserModel extends IdentifiableModel<Long> {
1✔
25
    /**
26
     * Represents the email address.
27
     */
28
    private String email;
29

30
    /**
31
     * Represents the first name.
32
     */
33
    private String firstName;
34

35
    /**
36
     * Represents the last name.
37
     */
38
    private String lastName;
39

40
    /**
41
     * Represents the admin flag which allows managing users and accounts.
42
     */
43
    private Boolean admin;
44

45
    /**
46
     * Represents the licensed sheet creator flag which allows creating and owning sheets.
47
     */
48
    private Boolean licensedSheetCreator;
49

50
    /**
51
     * Represents the resource manager flag which allows the user access to the Resource Manager functionality.
52
     */
53
    private Boolean resourceViewer;
54

55
    /**
56
     * Represents the group admin flag which allows users to create and modify groups.
57
     */
58
    private Boolean groupAdmin;
59

60
    /**
61
     * Represents the user status (active, pending, declined).
62
     */
63
    private UserStatus status;
64

65
    /**
66
     * An array of AlternateEmail Objects representing the alternate email addresses associated with the User account
67
     */
68
    private List<AlternateEmail> alternateEmails;
69

70
    /**
71
     * The number of sheets owned by the current user within the organization
72
     */
73
    private Integer sheetCount;
74

75
    /**
76
     * Last login time of the current user
77
     */
78
    private Date lastLogin;
79

80
    /**
81
     * Timestamp of viewing an Enterprise Custom Welcome Screen by the current user
82
     */
83
    private Date customWelcomeScreenViewed;
84

85
    /**
86
     * Company name from the user's profile
87
     */
88
    private String company;
89

90
    /**
91
     * Department name from the user's profile
92
     */
93
    private String department;
94

95
    /**
96
     * User's mobile phone number from the profile
97
     */
98
    private String mobilePhone;
99

100
    /**
101
     * Link to the user's profile image
102
     */
103
    private ProfileImage profileImage;
104

105
    /**
106
     * User's role
107
     */
108
    private String role;
109

110
    /**
111
     * User's title
112
     */
113
    private String title;
114

115
    /**
116
     * Work phone number from the user's profile
117
     */
118
    private String workPhone;
119

120
    /**
121
     * Gets the email address.
122
     *
123
     * @return the email address
124
     */
125
    public String getEmail() {
126
        return email;
1✔
127
    }
128

129
    /**
130
     * Sets the email address.
131
     *
132
     * @param email the new email address
133
     */
134
    public UserModel setEmail(String email) {
135
        this.email = email;
1✔
136
        return this;
1✔
137
    }
138

139
    /**
140
     * Gets the first name.
141
     *
142
     * @return the first name
143
     */
144
    public String getFirstName() {
145
        return firstName;
1✔
146
    }
147

148
    /**
149
     * Sets the first name.
150
     *
151
     * @param firstName the new first name
152
     */
153
    public UserModel setFirstName(String firstName) {
154
        this.firstName = firstName;
1✔
155
        return this;
1✔
156
    }
157

158
    /**
159
     * Gets the last name.
160
     *
161
     * @return the last name
162
     */
163
    public String getLastName() {
164
        return lastName;
1✔
165
    }
166

167
    /**
168
     * Sets the last name.
169
     *
170
     * @param lastName the new last name
171
     */
172
    public UserModel setLastName(String lastName) {
173
        this.lastName = lastName;
1✔
174
        return this;
1✔
175
    }
176

177
    /**
178
     * Gets the admin flag which allows managing users and accounts.
179
     *
180
     * @return the admin
181
     */
182
    public Boolean getAdmin() {
183
        return admin;
1✔
184
    }
185

186
    /**
187
     * Sets the admin flag which allows managing users and accounts.
188
     *
189
     * @param admin the new admin
190
     */
191
    public UserModel setAdmin(Boolean admin) {
192
        this.admin = admin;
1✔
193
        return this;
1✔
194
    }
195

196
    /**
197
     * Gets the licensed sheet creator flag that allows creating and owning sheets.
198
     *
199
     * @return the licensed sheet creator
200
     */
201
    public Boolean getLicensedSheetCreator() {
202
        return licensedSheetCreator;
1✔
203
    }
204

205
    /**
206
     * Sets the licensed sheet creator flag that allows creating and owning sheets.
207
     *
208
     * @param licensedSheetCreator the new licensed sheet creator
209
     */
210
    public UserModel setLicensedSheetCreator(Boolean licensedSheetCreator) {
211
        this.licensedSheetCreator = licensedSheetCreator;
1✔
212
        return this;
1✔
213
    }
214

215
    /**
216
     * Gets the status of the user (active, pending, declined).
217
     *
218
     * @return the status
219
     */
220
    public UserStatus getStatus() {
221
        return status;
1✔
222
    }
223

224
    /**
225
     * Sets the status of the user.
226
     *
227
     * @param status the new status
228
     */
229
    public UserModel setStatus(UserStatus status) {
230
        this.status = status;
1✔
231
        return this;
1✔
232
    }
233

234
    /**
235
     * @return the flag indicating if someone is a resource manager
236
     */
237
    public Boolean getResourceViewer() {
238
        return resourceViewer;
1✔
239
    }
240

241
    /**
242
     * Sets the resource manager flag.
243
     *
244
     * @param resourceViewer the flag
245
     */
246
    public UserModel setResourceViewer(Boolean resourceViewer) {
247
        this.resourceViewer = resourceViewer;
1✔
248
        return this;
1✔
249
    }
250

251
    /**
252
     * @return the flag indicating if the user is able to administer group.
253
     */
254
    public Boolean getGroupAdmin() {
255
        return groupAdmin;
1✔
256
    }
257

258
    /**
259
     * @param groupAdmin sets the flag that indicates if someone is a groupAdmin
260
     */
261
    public UserModel setGroupAdmin(Boolean groupAdmin) {
262
        this.groupAdmin = groupAdmin;
1✔
263
        return this;
1✔
264
    }
265

266
    /**
267
     * Gets the list of alternateEmails
268
     *
269
     * @return the list of alternateEmails
270
     */
271
    public List<AlternateEmail> getAlternateEmails() {
272
        return alternateEmails;
1✔
273
    }
274

275
    /**
276
     * Sets the list of alternateEmails
277
     *
278
     * @param alternateEmails the new list of alternateEmails
279
     * @return the UserModel
280
     */
281
    public UserModel setAlternateEmails(List<AlternateEmail> alternateEmails) {
282
        this.alternateEmails = alternateEmails;
×
283
        return this;
×
284
    }
285

286
    /**
287
     * Gets the sheetCount.
288
     *
289
     * @return sheetCount
290
     */
291
    public Integer getSheetCount() {
292
        return sheetCount;
1✔
293
    }
294

295
    /**
296
     * Sets the sheetCount
297
     *
298
     * @param sheetCount the new sheetCount
299
     * @return the UserModel
300
     */
301
    public UserModel setSheetCount(Integer sheetCount) {
302
        this.sheetCount = sheetCount;
×
303
        return this;
×
304
    }
305

306
    /**
307
     * Gets the lastLogin date
308
     *
309
     * @return the lastLogin date
310
     */
311
    public Date getLastLogin() {
312
        return lastLogin;
1✔
313
    }
314

315
    /**
316
     * Sets the lastLogin date
317
     *
318
     * @param lastLogin the new lastLogin date
319
     * @return the UserModel
320
     */
321
    public UserModel setLastLogin(Date lastLogin) {
322
        this.lastLogin = lastLogin;
×
323
        return this;
×
324
    }
325

326
    /**
327
     * Gets the customWelcomeScreenViewed date
328
     *
329
     * @return the customerWelcomeScreenViewed date
330
     */
331
    public Date getCustomWelcomeScreenViewed() {
332
        return customWelcomeScreenViewed;
1✔
333
    }
334

335
    /**
336
     * Sets the customWelcomeScreenViewed date
337
     *
338
     * @param customWelcomeScreenViewed the new customWelcomeScreenViewed date
339
     * @return the UserModel
340
     */
341
    public UserModel setCustomWelcomeScreenViewed(Date customWelcomeScreenViewed) {
342
        this.customWelcomeScreenViewed = customWelcomeScreenViewed;
×
343
        return this;
×
344
    }
345

346
    /**
347
     * Gets the user's company name
348
     *
349
     * @return the company name
350
     */
351
    public String getCompany() {
352
        return company;
1✔
353
    }
354

355
    /**
356
     * Sets the user's company name
357
     *
358
     * @param company the company name
359
     */
360
    public UserModel setCompany(String company) {
361
        this.company = company;
×
362
        return this;
×
363
    }
364

365
    /**
366
     * Gets the user's department
367
     *
368
     * @return the department
369
     */
370
    public String getDepartment() {
371
        return department;
1✔
372
    }
373

374
    /**
375
     * Sets the user's department
376
     *
377
     * @param department the department
378
     */
379
    public UserModel setDepartment(String department) {
380
        this.department = department;
×
381
        return this;
×
382
    }
383

384
    /**
385
     * Gets the user's mobile phone number
386
     *
387
     * @return the phone number
388
     */
389
    public String getMobilePhone() {
390
        return mobilePhone;
1✔
391
    }
392

393
    /**
394
     * Sets the user's mobile phone number
395
     *
396
     * @param mobilePhone the phone number
397
     */
398
    public UserModel setMobilePhone(String mobilePhone) {
399
        this.mobilePhone = mobilePhone;
×
400
        return this;
×
401
    }
402

403
    /**
404
     * Gets the user's profile image
405
     *
406
     * @return the ProfileImage
407
     */
408
    public ProfileImage getProfileImage() {
409
        return profileImage;
1✔
410
    }
411

412
    /**
413
     * Sets the user's profile image
414
     *
415
     * @param profileImage the ProfileImage
416
     */
417
    public UserModel setProfileImage(ProfileImage profileImage) {
418
        this.profileImage = profileImage;
×
419
        return this;
×
420
    }
421

422
    /**
423
     * Gets the user's role
424
     *
425
     * @return the role
426
     */
427
    public String getRole() {
428
        return role;
1✔
429
    }
430

431
    /**
432
     * Sets the user's role
433
     *
434
     * @param role the role
435
     */
436
    public UserModel setRole(String role) {
437
        this.role = role;
×
438
        return this;
×
439
    }
440

441
    /**
442
     * Gets the user's title
443
     *
444
     * @return the title
445
     */
446
    public String getTitle() {
447
        return title;
1✔
448
    }
449

450
    /**
451
     * Sets the user's title
452
     *
453
     * @param title the title
454
     */
455
    public UserModel setTitle(String title) {
456
        this.title = title;
×
457
        return this;
×
458
    }
459

460
    /**
461
     * Gets the user's work phone number
462
     *
463
     * @return the phone number
464
     */
465
    public String getWorkPhone() {
466
        return workPhone;
1✔
467
    }
468

469
    /**
470
     * Sets the user's work phone number
471
     *
472
     * @param workPhone the phone number
473
     */
474
    public UserModel setWorkPhone(String workPhone) {
475
        this.workPhone = workPhone;
×
476
        return this;
×
477
    }
478
}
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

© 2025 Coveralls, Inc