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

smartsheet / smartsheet-java-sdk / #57

29 Jul 2025 04:55PM UTC coverage: 60.803% (+0.2%) from 60.611%
#57

push

github

web-flow
Added new sharing endpoints. Deprecated old sharing endpoints. (#125)

* Added new sharing endpoints.
Deprecated old endpoints.

* Updated to 3.3.0 for deprecation date.

* Removed amp.

* fixed `&`

106 of 157 new or added lines in 9 files covered. (67.52%)

4269 of 7021 relevant lines covered (60.8%)

0.61 hits per line

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

76.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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

201
    /**
202
     * Gets the scope of the share.
203
     *
204
     * @return the scope
205
     */
206
    public String getScope() {
NEW
207
        return scope;
×
208
    }
209

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