cloud.genesys.webmessaging.sdk.model.ContentPostback Maven / Gradle / Ivy
package cloud.genesys.webmessaging.sdk.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import java.util.Objects;
import java.io.IOException;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* Structured message postback (Deprecated). Postback response object representing the click of a rich media button (Deprecated).
*/
@ApiModel(description = "Structured message postback (Deprecated). Postback response object representing the click of a rich media button (Deprecated).")
public class ContentPostback implements Serializable {
private String id = null;
private String payload = null;
private String text = null;
/**
* An ID assigned to the button response.
**/
public ContentPostback id(String id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "An ID assigned to the button response.")
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
/**
* The response payload associated with the clicked button.
**/
public ContentPostback payload(String payload) {
this.payload = payload;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "The response payload associated with the clicked button.")
@JsonProperty("payload")
public String getPayload() {
return payload;
}
public void setPayload(String payload) {
this.payload = payload;
}
/**
* The response text from the button click.
**/
public ContentPostback text(String text) {
this.text = text;
return this;
}
@ApiModelProperty(example = "null", value = "The response text from the button click.")
@JsonProperty("text")
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ContentPostback contentPostback = (ContentPostback) o;
return Objects.equals(this.id, contentPostback.id) &&
Objects.equals(this.payload, contentPostback.payload) &&
Objects.equals(this.text, contentPostback.text);
}
@Override
public int hashCode() {
return Objects.hash(id, payload, text);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ContentPostback {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" payload: ").append(toIndentedString(payload)).append("\n");
sb.append(" text: ").append(toIndentedString(text)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}