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

smartsheet / smartsheet-java-sdk / #43

24 Aug 2023 10:26PM UTC coverage: 50.427% (-0.02%) from 50.442%
#43

push

github-actions

web-flow
Fix Checkstyle violations in api/models Classes (#57)

This will fix ~900 violations

189 of 189 new or added lines in 59 files covered. (100.0%)

3423 of 6788 relevant lines covered (50.43%)

0.5 hits per line

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

20.59
/src/main/java/com/smartsheet/api/models/SheetEmail.java
1
package com.smartsheet.api.models;
2

3
/*
4
 * #[license]
5
 * Smartsheet SDK for Java
6
 * %%
7
 * Copyright (C) 2023 Smartsheet
8
 * %%
9
 * Licensed under the Apache License, Version 2.0 (the "License");
10
 * you may not use this file except in compliance with the License.
11
 * You may obtain a copy of the License at
12
 *
13
 *      http://www.apache.org/licenses/LICENSE-2.0
14
 *
15
 * Unless required by applicable law or agreed to in writing, software
16
 * distributed under the License is distributed on an "AS IS" BASIS,
17
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
 * See the License for the specific language governing permissions and
19
 * limitations under the License.
20
 * %[license]
21
 */
22

23
import com.smartsheet.api.models.enums.SheetEmailFormat;
24

25
import java.util.List;
26

27
/**
28
 * Represents Sheet Email object used for sending a sheet by email.
29
 */
30
public class SheetEmail extends Email {
1✔
31
    /**
32
     * Represents the sheet email format (PDF or Excel).
33
     */
34
    private SheetEmailFormat format;
35

36
    /**
37
     * Represents the format details (paper dimensions).
38
     */
39
    private FormatDetails formatDetails;
40

41
    /**
42
     * Gets the sheet email format (PDF or Excel).
43
     *
44
     * @return the format
45
     */
46
    public SheetEmailFormat getFormat() {
47
        return format;
1✔
48
    }
49

50
    /**
51
     * Sets the sheet email format (PDF or Excel).
52
     *
53
     * @param format the new format
54
     */
55
    public SheetEmail setFormat(SheetEmailFormat format) {
56
        this.format = format;
1✔
57
        return this;
1✔
58
    }
59

60
    /**
61
     * Gets the format details (paper dimensions).
62
     *
63
     * @return the format details
64
     */
65
    public FormatDetails getFormatDetails() {
66
        return formatDetails;
1✔
67
    }
68

69
    /**
70
     * Sets the format details (paper dimensions).
71
     *
72
     * @param formatDetails the new format details
73
     */
74
    public SheetEmail setFormatDetails(FormatDetails formatDetails) {
75
        this.formatDetails = formatDetails;
1✔
76
        return this;
1✔
77
    }
78

79
    /**
80
     * A convenience class to help create a SheetEmail object with the appropriate fields.
81
     */
82
    public static class AddSheetEmailBuilder {
×
83
        /**
84
         * Represents the sheet email format (PDF or Excel).
85
         */
86
        private SheetEmailFormat format;
87

88
        /**
89
         * Represents the format details (paper dimensions).
90
         */
91
        private FormatDetails formatDetails;
92

93
        /**
94
         * Gets the sheet email format (PDF or Excel).
95
         *
96
         * @return the format
97
         */
98
        public SheetEmailFormat getFormat() {
99
            return format;
×
100
        }
101

102
        /**
103
         * Sets the sheet email format (PDF or Excel).
104
         *
105
         * @param format the new format
106
         * @return the builder
107
         */
108
        public AddSheetEmailBuilder setFormat(SheetEmailFormat format) {
109
            this.format = format;
×
110
            return this;
×
111
        }
112

113
        /**
114
         * Gets the format details (paper dimensions).
115
         *
116
         * @return the format details
117
         */
118
        public FormatDetails getFormatDetails() {
119
            return formatDetails;
×
120
        }
121

122
        /**
123
         * Sets the format details (paper dimensions).
124
         *
125
         * @param formatDetails the new format details
126
         * @return the builder
127
         */
128
        public AddSheetEmailBuilder setFormatDetails(FormatDetails formatDetails) {
129
            this.formatDetails = formatDetails;
×
130
            return this;
×
131
        }
132

133
        /**
134
         * Represents the list of recipients to send to
135
         */
136
        private List<Recipient> sendTo;
137

138
        /**
139
         * Represents the subject.
140
         */
141
        private String subject;
142

143
        /**
144
         * Represents the message.
145
         */
146
        private String message;
147

148
        /**
149
         * Represents the CC me flag.
150
         */
151
        private Boolean ccMe;
152

153
        /**
154
         * Gets the list of recipients to send to
155
         * @return the list of recipients
156
         */
157
        public List<Recipient> getSendTo() {
158
            return sendTo;
×
159
        }
160

161
        /**
162
         * Sets the list of recipients to send to
163
         * @param sendTo list of recipients
164
         * @return the associated builder
165
         */
166
        public AddSheetEmailBuilder setSendTo(List<Recipient> sendTo) {
167
            this.sendTo = sendTo;
×
168
            return this;
×
169
        }
170

171
        /**
172
         * Gets the subject.
173
         *
174
         * @return the subject
175
         */
176
        public String getSubject() {
177
            return subject;
×
178
        }
179

180
        /**
181
         * Sets the subject.
182
         *
183
         * @param subject the new subject
184
         * @return the associated builder
185
         */
186
        public AddSheetEmailBuilder setSubject(String subject) {
187
            this.subject = subject;
×
188
            return this;
×
189
        }
190

191
        /**
192
         * Gets the message.
193
         *
194
         * @return the message
195
         */
196
        public String getMessage() {
197
            return message;
×
198
        }
199

200
        /**
201
         * Sets the message.
202
         *
203
         * @param message the new message
204
         * @return the associated builder
205
         */
206
        public AddSheetEmailBuilder setMessage(String message) {
207
            this.message = message;
×
208
            return this;
×
209
        }
210

211
        /**
212
         * Gets the carbon copy me flag.
213
         *
214
         * @return the cc me
215
         */
216
        public Boolean getCcMe() {
217
            return ccMe;
×
218
        }
219

220
        /**
221
         * Sets the carbon copy me flag.
222
         *
223
         * @param ccMe the new cc me
224
         * @return the associated builder
225
         */
226
        public AddSheetEmailBuilder setCcMe(Boolean ccMe) {
227
            this.ccMe = ccMe;
×
228
            return this;
×
229
        }
230

231
        /**
232
         * Builds the sheetEmail.
233
         *
234
         * @return the sheetEmail
235
         */
236
        public SheetEmail build() {
237
            SheetEmail sheetEmail = new SheetEmail();
×
238
            sheetEmail.format = format;
×
239
            sheetEmail.formatDetails = formatDetails;
×
240
            sheetEmail.setSendTo(sendTo);
×
241
            sheetEmail.setSubject(subject);
×
242
            sheetEmail.setMessage(message);
×
243
            sheetEmail.setCcMe(ccMe);
×
244

245
            return sheetEmail;
×
246
        }
247
    }
248
}
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