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

smartsheet / smartsheet-java-sdk / #56

06 Jun 2025 04:28PM UTC coverage: 60.611% (+0.06%) from 60.548%
#56

push

github

web-flow
chore: Added pull request template (#121)

* Initial commit: Added pull request template

* Updated wording and grammar

* Added relevant links and removed style guide requirement

* chore: Updated pull request template and added codeowners file

* chore: Removed redundant checklist point and codeowners file

---------

Co-authored-by: Priyanka Lakhe <priyankalakhe@gmail.com>

4164 of 6870 relevant lines covered (60.61%)

0.61 hits per line

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

87.88
/src/main/java/com/smartsheet/api/models/Sight.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
import java.util.Date;
22
import java.util.List;
23

24
public class Sight extends NamedModel<Long> {
1✔
25

26
    /**
27
     * Number of columns that the Sight contains
28
     */
29
    private Integer columnCount;
30

31
    /**
32
     * Array of Widget objects
33
     */
34
    private List<Widget> widgets;
35

36
    /**
37
     * Indicates whether the User has marked the Sight as a favorite
38
     *
39
     * @deprecated As of API 3.2.2. Please use the isFavorite method in FavoritesResources instead.
40
     */
41
    @Deprecated(since = "3.2.2", forRemoval = true)
42
    private Boolean favorite;
43

44
    /**
45
     * User's permissions on the Sight.
46
     */
47
    private AccessLevel accessLevel;
48

49
    /**
50
     * URL that represents a direct link to the Sight
51
     */
52
    private String permalink;
53

54
    /**
55
     * Time of creation
56
     */
57
    private Date createdAt;
58

59
    /**
60
     * Time last modified
61
     */
62
    private Date modifiedAt;
63

64
    /**
65
     * Represents the source of the sheet.
66
     */
67
    private Source source;
68

69
    /**
70
     * A workspace object, limited to only id and Name
71
     */
72
    private Workspace workspace;
73

74
    /**
75
     * The background color of the Sight
76
     */
77
    private String backgroundColor;
78

79
    /**
80
     * Provide an 'override' of setName (returns Sight not NamedModel)
81
     *
82
     * @param name the new name
83
     */
84
    public Sight setName(String name) {
85
        super.setName(name);
×
86
        return this;
×
87
    }
88

89
    /**
90
     * Get the number of columns that the Sight contains
91
     *
92
     * @return columnCount
93
     */
94
    public Integer getColumnCount() {
95
        return columnCount;
1✔
96
    }
97

98
    /**
99
     * Set the number of columns that the Sight contains
100
     */
101
    public Sight setColumnCount(Integer columnCount) {
102
        this.columnCount = columnCount;
1✔
103
        return this;
1✔
104
    }
105

106
    /**
107
     * Get the array of Sight widgets
108
     *
109
     * @return array of widgets
110
     */
111
    public List<Widget> getWidgets() {
112
        return widgets;
1✔
113
    }
114

115
    /**
116
     * Set the array of Sight widgets
117
     */
118
    public Sight setWidgets(List<Widget> widgets) {
119
        this.widgets = widgets;
1✔
120
        return this;
1✔
121
    }
122

123
    /**
124
     * Get flag indicating whether the user has marked the Sight as a favorite
125
     *
126
     * @return favorite flag
127
     *
128
     * @deprecated As of API 3.2.2. Please use the isFavorite method in FavoritesResources instead.
129
     */
130
    @Deprecated(since = "3.2.2", forRemoval = true)
131
    public Boolean getFavorite() {
132
        return favorite;
1✔
133
    }
134

135
    /**
136
     * Set flag indicating whether the user has marked the Sight as a favorite
137
     *
138
     * @deprecated As of API 3.2.2. Please use the isFavorite method in FavoritesResources instead.
139
     */
140
    @Deprecated(since = "3.2.2", forRemoval = true)
141
    public Sight setFavorite(Boolean favorite) {
142
        this.favorite = favorite;
1✔
143
        return this;
1✔
144
    }
145

146
    /**
147
     * User's permissions on the Sight (OWNDER, ADMIN, VIEWER)
148
     *
149
     * @return accessLevel
150
     */
151
    public AccessLevel getAccessLevel() {
152
        return accessLevel;
1✔
153
    }
154

155
    /**
156
     * Set User's permissions on the Sight
157
     */
158
    public Sight setAccessLevel(AccessLevel accessLevel) {
159
        this.accessLevel = accessLevel;
1✔
160
        return this;
1✔
161
    }
162

163
    /**
164
     * URL that represents a direct link to the Sight
165
     *
166
     * @return permalink
167
     */
168
    public String getPermalink() {
169
        return permalink;
1✔
170
    }
171

172
    /**
173
     * Set URL pointing to a direct link to the Sight
174
     */
175
    public Sight setPermalink(String permalink) {
176
        this.permalink = permalink;
1✔
177
        return this;
1✔
178
    }
179

180
    /**
181
     * Get time of Sight creation
182
     *
183
     * @return createdAt (Date)
184
     */
185
    public Date getCreatedAt() {
186
        return createdAt;
1✔
187
    }
188

189
    /**
190
     * Set time of Sight creation
191
     */
192
    public Sight setCreatedAt(Date createdAt) {
193
        this.createdAt = createdAt;
1✔
194
        return this;
1✔
195
    }
196

197
    /**
198
     * Get time of last modification
199
     *
200
     * @return modifiedAt (Date)
201
     */
202
    public Date getModifiedAt() {
203
        return modifiedAt;
1✔
204
    }
205

206
    /**
207
     * Set time of last modification
208
     */
209
    public Sight setModifiedAt(Date modifiedAt) {
210
        this.modifiedAt = modifiedAt;
1✔
211
        return this;
1✔
212
    }
213

214
    /**
215
     * Gets the source.
216
     *
217
     * @return the source
218
     */
219
    public Source getSource() {
220
        return source;
1✔
221
    }
222

223
    /**
224
     * Sets the source.
225
     *
226
     * @param source the source
227
     */
228
    public Sight setSource(Source source) {
229
        this.source = source;
1✔
230
        return this;
1✔
231
    }
232

233
    /**
234
     * A workspace object limited to only id and name
235
     *
236
     * @return workspace
237
     */
238
    public Workspace getWorkspace() {
239
        return workspace;
1✔
240
    }
241

242
    /**
243
     * Set workspace object for this Sight (limited to only id and name)
244
     */
245
    public Sight setWorkspace(Workspace workspace) {
246
        this.workspace = workspace;
1✔
247
        return this;
1✔
248
    }
249

250
    /**
251
     * Get the background color of the Sight
252
     *
253
     * @return the background color
254
     */
255
    public String getBackgroundColor() {
256
        return backgroundColor;
1✔
257
    }
258

259
    /**
260
     * Set the background color of the Sight
261
     *
262
     * @param backgroundColor the background color
263
     */
264
    public Sight setBackgroundColor(String backgroundColor) {
265
        this.backgroundColor = backgroundColor;
×
266
        return this;
×
267
    }
268
}
269

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