com.smartsheet.api.models.SheetEmail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartsheet-sdk-java Show documentation
Show all versions of smartsheet-sdk-java Show documentation
Library for connecting to Smartsheet Services
/*
* Copyright (C) 2023 Smartsheet
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.smartsheet.api.models;
import com.smartsheet.api.models.enums.SheetEmailFormat;
import java.util.List;
/**
* Represents Sheet Email object used for sending a sheet by email.
*/
public class SheetEmail extends Email {
/**
* Represents the sheet email format (PDF or Excel).
*/
private SheetEmailFormat format;
/**
* Represents the format details (paper dimensions).
*/
private FormatDetails formatDetails;
/**
* Gets the sheet email format (PDF or Excel).
*
* @return the format
*/
public SheetEmailFormat getFormat() {
return format;
}
/**
* Sets the sheet email format (PDF or Excel).
*
* @param format the new format
*/
public SheetEmail setFormat(SheetEmailFormat format) {
this.format = format;
return this;
}
/**
* Gets the format details (paper dimensions).
*
* @return the format details
*/
public FormatDetails getFormatDetails() {
return formatDetails;
}
/**
* Sets the format details (paper dimensions).
*
* @param formatDetails the new format details
*/
public SheetEmail setFormatDetails(FormatDetails formatDetails) {
this.formatDetails = formatDetails;
return this;
}
/**
* A convenience class to help create a SheetEmail object with the appropriate fields.
*/
public static class AddSheetEmailBuilder {
/**
* Represents the sheet email format (PDF or Excel).
*/
private SheetEmailFormat format;
/**
* Represents the format details (paper dimensions).
*/
private FormatDetails formatDetails;
/**
* Gets the sheet email format (PDF or Excel).
*
* @return the format
*/
public SheetEmailFormat getFormat() {
return format;
}
/**
* Sets the sheet email format (PDF or Excel).
*
* @param format the new format
* @return the builder
*/
public AddSheetEmailBuilder setFormat(SheetEmailFormat format) {
this.format = format;
return this;
}
/**
* Gets the format details (paper dimensions).
*
* @return the format details
*/
public FormatDetails getFormatDetails() {
return formatDetails;
}
/**
* Sets the format details (paper dimensions).
*
* @param formatDetails the new format details
* @return the builder
*/
public AddSheetEmailBuilder setFormatDetails(FormatDetails formatDetails) {
this.formatDetails = formatDetails;
return this;
}
/**
* Represents the list of recipients to send to
*/
private List sendTo;
/**
* Represents the subject.
*/
private String subject;
/**
* Represents the message.
*/
private String message;
/**
* Represents the CC me flag.
*/
private Boolean ccMe;
/**
* Gets the list of recipients to send to
* @return the list of recipients
*/
public List getSendTo() {
return sendTo;
}
/**
* Sets the list of recipients to send to
* @param sendTo list of recipients
* @return the associated builder
*/
public AddSheetEmailBuilder setSendTo(List sendTo) {
this.sendTo = sendTo;
return this;
}
/**
* Gets the subject.
*
* @return the subject
*/
public String getSubject() {
return subject;
}
/**
* Sets the subject.
*
* @param subject the new subject
* @return the associated builder
*/
public AddSheetEmailBuilder setSubject(String subject) {
this.subject = subject;
return this;
}
/**
* Gets the message.
*
* @return the message
*/
public String getMessage() {
return message;
}
/**
* Sets the message.
*
* @param message the new message
* @return the associated builder
*/
public AddSheetEmailBuilder setMessage(String message) {
this.message = message;
return this;
}
/**
* Gets the carbon copy me flag.
*
* @return the cc me
*/
public Boolean getCcMe() {
return ccMe;
}
/**
* Sets the carbon copy me flag.
*
* @param ccMe the new cc me
* @return the associated builder
*/
public AddSheetEmailBuilder setCcMe(Boolean ccMe) {
this.ccMe = ccMe;
return this;
}
/**
* Builds the sheetEmail.
*
* @return the sheetEmail
*/
public SheetEmail build() {
SheetEmail sheetEmail = new SheetEmail();
sheetEmail.format = format;
sheetEmail.formatDetails = formatDetails;
sheetEmail.setSendTo(sendTo);
sheetEmail.setSubject(subject);
sheetEmail.setMessage(message);
sheetEmail.setCcMe(ccMe);
return sheetEmail;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy