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

smartsheet / smartsheet-java-sdk / #66

26 Jun 2026 09:41AM UTC coverage: 59.997% (-0.006%) from 60.003%
#66

push

github

web-flow
Prepare for release v4.1.0 (#180)

4510 of 7517 relevant lines covered (60.0%)

0.6 hits per line

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

88.0
/src/main/java/com/smartsheet/api/models/ShareResponse.java
1
/*
2
 * Copyright (C) 2025 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.AccessLevel;
20
import com.smartsheet.api.models.enums.ShareScope;
21

22
/**
23
 * Represents a ShareResponse object in the Smartsheet API.
24
 */
25
public class ShareResponse {
1✔
26
    /**
27
     * The id of the share.
28
     */
29
    private String id;
30

31
    /**
32
     * User's primary email address for user shares.
33
     */
34
    private String email;
35

36
    /**
37
     * User Id if the share is a user share.
38
     */
39
    private Long userId;
40

41
    /**
42
     * Group Id if the share is a group share.
43
     */
44
    private Long groupId;
45

46
    /**
47
     * If present, the name of the user or group to which the asset is shared.
48
     */
49
    private String name;
50

51
    /**
52
     * The type of this share. One of the following values: GROUP or USER.
53
     */
54
    private String type;
55

56
    /**
57
     * The access level of the share.
58
     */
59
    private AccessLevel accessLevel;
60

61
    /**
62
     * The scope of this share. One of the following values:
63
     * ITEM: an item-level share (that is, the specific object to which the share applies is shared with the user or group).
64
     * WORKSPACE: a workspace-level share (that is, the workspace that contains the asset to which the share applies
65
     * is shared with the user or group).
66
     */
67
    private ShareScope scope;
68

69
    /**
70
     * Gets the id of the share.
71
     *
72
     * @return the id
73
     */
74
    public String getId() {
75
        return id;
1✔
76
    }
77

78
    /**
79
     * Sets the id of the share.
80
     *
81
     * @param id the id
82
     */
83
    public ShareResponse setId(String id) {
84
        this.id = id;
1✔
85
        return this;
1✔
86
    }
87

88
    /**
89
     * Gets the email of the user.
90
     *
91
     * @return the email
92
     */
93
    public String getEmail() {
94
        return email;
1✔
95
    }
96

97
    /**
98
     * Sets the email of the user.
99
     *
100
     * @param email the email
101
     */
102
    public ShareResponse setEmail(String email) {
103
        this.email = email;
1✔
104
        return this;
1✔
105
    }
106

107
    /**
108
     * Gets the user id.
109
     *
110
     * @return the user id
111
     */
112
    public Long getUserId() {
113
        return userId;
×
114
    }
115

116
    /**
117
     * Sets the user id.
118
     *
119
     * @param userId the user id
120
     */
121
    public ShareResponse setUserId(Long userId) {
122
        this.userId = userId;
1✔
123
        return this;
1✔
124
    }
125

126
    /**
127
     * Gets the group id.
128
     *
129
     * @return the group id
130
     */
131
    public Long getGroupId() {
132
        return groupId;
×
133
    }
134

135
    /**
136
     * Sets the group id.
137
     *
138
     * @param groupId the group id
139
     */
140
    public ShareResponse setGroupId(Long groupId) {
141
        this.groupId = groupId;
1✔
142
        return this;
1✔
143
    }
144

145
    /**
146
     * Gets the name of the user or group.
147
     *
148
     * @return the name
149
     */
150
    public String getName() {
151
        return name;
1✔
152
    }
153

154
    /**
155
     * Sets the name of the user or group.
156
     *
157
     * @param name the name
158
     */
159
    public ShareResponse setName(String name) {
160
        this.name = name;
1✔
161
        return this;
1✔
162
    }
163

164
    /**
165
     * Gets the type of the share.
166
     *
167
     * @return the type
168
     */
169
    public String getType() {
170
        return type;
×
171
    }
172

173
    /**
174
     * Sets the type of the share.
175
     *
176
     * @param type the type
177
     */
178
    public ShareResponse setType(String type) {
179
        this.type = type;
1✔
180
        return this;
1✔
181
    }
182

183
    /**
184
     * Gets the access level of the share.
185
     *
186
     * @return the access level
187
     */
188
    public AccessLevel getAccessLevel() {
189
        return accessLevel;
1✔
190
    }
191

192
    /**
193
     * Sets the access level of the share.
194
     *
195
     * @param accessLevel the access level
196
     */
197
    public ShareResponse setAccessLevel(AccessLevel accessLevel) {
198
        this.accessLevel = accessLevel;
1✔
199
        return this;
1✔
200
    }
201

202
    /**
203
     * Gets the scope of the share.
204
     *
205
     * @return the scope
206
     */
207
    public ShareScope getScope() {
208
        return scope;
1✔
209
    }
210

211
    /**
212
     * Sets the scope of the share.
213
     *
214
     * @param scope the scope
215
     */
216
    public ShareResponse setScope(ShareScope scope) {
217
        this.scope = scope;
1✔
218
        return this;
1✔
219
    }
220
}
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

© 2026 Coveralls, Inc