com.hubspot.imap.protocol.message.Envelope Maven / Gradle / Ivy
package com.hubspot.imap.protocol.message;
import java.time.ZonedDateTime;
import java.util.List;
import java.util.Optional;
public interface Envelope {
Optional getDate();
String getDateString();
String getSubject();
List getFrom();
List getSender();
List getReplyTo();
List getTo();
List getCc();
List getBcc();
String getInReplyTo();
String getMessageId();
class Builder implements Envelope {
private Optional date = Optional.empty();
private String dateString;
private String subject;
private List from;
private List sender;
private List replyTo;
private List to;
private List cc;
private List bcc;
private String inReplyTo;
private String messageId;
public Envelope build() {
return this;
}
public Optional getDate() {
return this.date;
}
public Builder setDate(ZonedDateTime date) {
this.date = Optional.ofNullable(date);
return this;
}
public String getDateString() {
return this.dateString;
}
public Builder setDateString(String dateString) {
this.dateString = dateString;
return this;
}
public String getSubject() {
return this.subject;
}
public Builder setSubject(String subject) {
this.subject = subject;
return this;
}
public List getFrom() {
return this.from;
}
public Builder setFrom(List from) {
this.from = from;
return this;
}
public List getSender() {
return this.sender;
}
public Builder setSender(List sender) {
this.sender = sender;
return this;
}
public List getReplyTo() {
return this.replyTo;
}
public Builder setReplyTo(List replyTo) {
this.replyTo = replyTo;
return this;
}
public List getTo() {
return this.to;
}
public Builder setTo(List to) {
this.to = to;
return this;
}
public List getCc() {
return this.cc;
}
public Builder setCc(List cc) {
this.cc = cc;
return this;
}
public List getBcc() {
return this.bcc;
}
public Builder setBcc(List bcc) {
this.bcc = bcc;
return this;
}
public String getInReplyTo() {
return this.inReplyTo;
}
public Builder setInReplyTo(String inReplyTo) {
this.inReplyTo = inReplyTo;
return this;
}
public String getMessageId() {
return this.messageId;
}
public Builder setMessageId(String messageId) {
this.messageId = messageId;
return this;
}
}
}