• 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

20.59
/src/main/java/com/smartsheet/api/models/SheetEmail.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
import com.smartsheet.api.models.enums.SheetEmailFormat;
20

21
import java.util.List;
22

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

32
    /**
33
     * Represents the format details (paper dimensions).
34
     */
35
    private FormatDetails formatDetails;
36

37
    /**
38
     * Gets the sheet email format (PDF or Excel).
39
     *
40
     * @return the format
41
     */
42
    public SheetEmailFormat getFormat() {
43
        return format;
1✔
44
    }
45

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

56
    /**
57
     * Gets the format details (paper dimensions).
58
     *
59
     * @return the format details
60
     */
61
    public FormatDetails getFormatDetails() {
62
        return formatDetails;
1✔
63
    }
64

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

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

84
        /**
85
         * Represents the format details (paper dimensions).
86
         */
87
        private FormatDetails formatDetails;
88

89
        /**
90
         * Gets the sheet email format (PDF or Excel).
91
         *
92
         * @return the format
93
         */
94
        public SheetEmailFormat getFormat() {
95
            return format;
×
96
        }
97

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

109
        /**
110
         * Gets the format details (paper dimensions).
111
         *
112
         * @return the format details
113
         */
114
        public FormatDetails getFormatDetails() {
115
            return formatDetails;
×
116
        }
117

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

129
        /**
130
         * Represents the list of recipients to send to
131
         */
132
        private List<Recipient> sendTo;
133

134
        /**
135
         * Represents the subject.
136
         */
137
        private String subject;
138

139
        /**
140
         * Represents the message.
141
         */
142
        private String message;
143

144
        /**
145
         * Represents the CC me flag.
146
         */
147
        private Boolean ccMe;
148

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

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

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

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

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

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

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

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

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

243
            return sheetEmail;
×
244
        }
245
    }
246
}
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