net.optionfactory.whatsapp.dto.messages.ButtonTextParameter Maven / Gradle / Ivy
package net.optionfactory.whatsapp.dto.messages;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import net.optionfactory.whatsapp.dto.messages.type.ParameterType;
/**
* The type Button text parameter.
* Required for URL buttons.
* Developer-provided suffix that is appended to the predefined prefix URL in the template.
*
* @see Api reference
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ButtonTextParameter extends Parameter {
@JsonProperty("text")
private String text;
/**
* Instantiates a new Button text parameter.
*/
public ButtonTextParameter() {
super(ParameterType.TEXT);
}
/**
* Instantiates a new Button text parameter.
*
* @param text the text. Required for URL buttons. Developer-provided suffix that is appended to the predefined prefix URL in the template.
*/
public ButtonTextParameter(String text) {
super(ParameterType.TEXT);
this.text = text;
}
/**
* Gets text.
*
* @return the text
*/
public String getText() {
return text;
}
/**
* Sets text.
*
* @param text the text. Required for URL buttons. Developer-provided suffix that is appended to the predefined prefix URL in the template.
* @return the text
*/
public ButtonTextParameter setText(String text) {
this.text = text;
return this;
}
}