it.auties.whatsapp.model.message.button.TemplateMessageBuilder Maven / Gradle / Ivy
package it.auties.whatsapp.model.message.button;
public class TemplateMessageBuilder {
private java.lang.String id;
private it.auties.whatsapp.model.button.template.hydrated.HydratedFourRowTemplate content;
private java.util.Optional highlyStructuredFourRowTemplateFormat;
private java.util.Optional hydratedFourRowTemplateFormat;
private java.util.Optional interactiveMessageFormat;
private java.util.Optional contextInfo;
public TemplateMessageBuilder() {
id = null;
content = null;
highlyStructuredFourRowTemplateFormat = java.util.Optional.empty();
hydratedFourRowTemplateFormat = java.util.Optional.empty();
interactiveMessageFormat = java.util.Optional.empty();
contextInfo = java.util.Optional.empty();
}
public TemplateMessageBuilder id(java.lang.String id) {
this.id = id;
return this;
}
public TemplateMessageBuilder content(it.auties.whatsapp.model.button.template.hydrated.HydratedFourRowTemplate content) {
this.content = content;
return this;
}
public TemplateMessageBuilder highlyStructuredFourRowTemplateFormat(java.util.Optional highlyStructuredFourRowTemplateFormat) {
this.highlyStructuredFourRowTemplateFormat = highlyStructuredFourRowTemplateFormat;
return this;
}
public TemplateMessageBuilder highlyStructuredFourRowTemplateFormat(it.auties.whatsapp.model.button.template.hsm.HighlyStructuredFourRowTemplate highlyStructuredFourRowTemplateFormat) {
this.highlyStructuredFourRowTemplateFormat = java.util.Optional.ofNullable(highlyStructuredFourRowTemplateFormat);
return this;
}
public TemplateMessageBuilder hydratedFourRowTemplateFormat(java.util.Optional hydratedFourRowTemplateFormat) {
this.hydratedFourRowTemplateFormat = hydratedFourRowTemplateFormat;
return this;
}
public TemplateMessageBuilder hydratedFourRowTemplateFormat(it.auties.whatsapp.model.button.template.hydrated.HydratedFourRowTemplate hydratedFourRowTemplateFormat) {
this.hydratedFourRowTemplateFormat = java.util.Optional.ofNullable(hydratedFourRowTemplateFormat);
return this;
}
public TemplateMessageBuilder interactiveMessageFormat(java.util.Optional interactiveMessageFormat) {
this.interactiveMessageFormat = interactiveMessageFormat;
return this;
}
public TemplateMessageBuilder interactiveMessageFormat(it.auties.whatsapp.model.message.button.InteractiveMessage interactiveMessageFormat) {
this.interactiveMessageFormat = java.util.Optional.ofNullable(interactiveMessageFormat);
return this;
}
public TemplateMessageBuilder contextInfo(java.util.Optional contextInfo) {
this.contextInfo = contextInfo;
return this;
}
public TemplateMessageBuilder contextInfo(it.auties.whatsapp.model.info.ContextInfo contextInfo) {
this.contextInfo = java.util.Optional.ofNullable(contextInfo);
return this;
}
public it.auties.whatsapp.model.message.button.TemplateMessage build() {
return new it.auties.whatsapp.model.message.button.TemplateMessage(id, content, highlyStructuredFourRowTemplateFormat, hydratedFourRowTemplateFormat, interactiveMessageFormat, contextInfo);
}
}