• 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

89.47
/src/main/java/com/smartsheet/api/models/GroupMember.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
/**
20
 * Represents the Group Member object.
21
 *
22
 * @see <a href="http://help.smartsheet.com/customer/portal/articles/1554165-managing-groups-team-enterprise-only-">Help
23
 * Managing Groups</a>
24
 */
25
public class GroupMember extends UserModelWithName {
1✔
26

27
    /**
28
     * Represents the Group Member’s email address
29
     */
30
    private String email;
31

32
    /**
33
     * Represents the Group Member’s first name
34
     */
35
    private String firstName;
36

37
    /**
38
     * Represents the Group Member’s last name
39
     */
40
    private String lastName;
41

42
    /**
43
     * Gets the Group Member’s email address
44
     *
45
     * @return the email
46
     */
47
    public String getEmail() {
48
        return email;
1✔
49
    }
50

51
    /**
52
     * @param email the group member's email address to set
53
     */
54
    public UserModel setEmail(String email) {
55
        this.email = email;
1✔
56
        return null;
1✔
57
    }
58

59
    /**
60
     * Gets the Group Member’s first name
61
     *
62
     * @return the firstname
63
     */
64
    public String getFirstName() {
65
        return firstName;
1✔
66
    }
67

68
    /**
69
     * @param firstName the Group Member's first name to set
70
     */
71
    public UserModel setFirstName(String firstName) {
72
        this.firstName = firstName;
1✔
73
        return null;
1✔
74
    }
75

76
    /**
77
     * Gets the Group Member’s last name
78
     *
79
     * @return the last name
80
     */
81
    public String getLastName() {
82
        return lastName;
1✔
83
    }
84

85
    /**
86
     * @param lastName the Group Member’s last name to set
87
     */
88
    public UserModel setLastName(String lastName) {
89
        this.lastName = lastName;
1✔
90
        return null;
1✔
91
    }
92

93
    /**
94
     * A convenience class for making a {@link GroupMember} object with the appropriate fields for adding to a {@link Group}.
95
     */
96
    public static class AddGroupMemberBuilder {
1✔
97
        private String email;
98

99
        /**
100
         * Get the email of the group member
101
         *
102
         * @return the email
103
         */
104
        public String getEmail() {
105
            return email;
×
106
        }
107

108
        /**
109
         * Set the id of the group member
110
         *
111
         * @param email the email
112
         * @return the builder
113
         */
114
        public AddGroupMemberBuilder setEmail(String email) {
115
            this.email = email;
1✔
116
            return this;
1✔
117
        }
118

119
        /**
120
         * Build a GroupMember
121
         */
122
        public GroupMember build() {
123
            if (email == null) {
1✔
124
                throw new InstantiationError("An email address must be set.");
×
125
            }
126

127
            GroupMember groupMember = new GroupMember();
1✔
128
            groupMember.setEmail(email);
1✔
129
            return groupMember;
1✔
130
        }
131
    }
132
}
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