it.auties.whatsapp.model.message.button.ButtonsResponseMessageBuilder Maven / Gradle / Ivy
package it.auties.whatsapp.model.message.button;
public class ButtonsResponseMessageBuilder {
private java.lang.String buttonId;
private java.util.Optional buttonText;
private java.util.Optional contextInfo;
private it.auties.whatsapp.model.message.button.ButtonsResponseMessage.ResponseType responseType;
public ButtonsResponseMessageBuilder() {
buttonId = null;
buttonText = java.util.Optional.empty();
contextInfo = java.util.Optional.empty();
responseType = null;
}
public ButtonsResponseMessageBuilder buttonId(java.lang.String buttonId) {
this.buttonId = buttonId;
return this;
}
public ButtonsResponseMessageBuilder buttonText(java.util.Optional buttonText) {
this.buttonText = buttonText;
return this;
}
public ButtonsResponseMessageBuilder buttonText(java.lang.String buttonText) {
this.buttonText = java.util.Optional.ofNullable(buttonText);
return this;
}
public ButtonsResponseMessageBuilder contextInfo(java.util.Optional contextInfo) {
this.contextInfo = contextInfo;
return this;
}
public ButtonsResponseMessageBuilder contextInfo(it.auties.whatsapp.model.info.ContextInfo contextInfo) {
this.contextInfo = java.util.Optional.ofNullable(contextInfo);
return this;
}
public ButtonsResponseMessageBuilder responseType(it.auties.whatsapp.model.message.button.ButtonsResponseMessage.ResponseType responseType) {
this.responseType = responseType;
return this;
}
public it.auties.whatsapp.model.message.button.ButtonsResponseMessage build() {
return new it.auties.whatsapp.model.message.button.ButtonsResponseMessage(buttonId, buttonText, contextInfo, responseType);
}
}