
com.infobip.model.WhatsAppFailover Maven / Gradle / Ivy
/*
* This class is auto generated from the Infobip OpenAPI specification
* through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
* powered by the OpenAPI Generator (https://openapi-generator.tech).
*
* Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
* or contact us @ [email protected].
*/
package com.infobip.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* SMS message to be sent if the WhatsApp template message could not be delivered.
*/
public class WhatsAppFailover {
private String from;
private String text;
/**
* Sets from.
*
* Field description:
* SMS sender number. Must be in international format.
*
* The field is required.
*
* @param from
* @return This {@link WhatsAppFailover instance}.
*/
public WhatsAppFailover from(String from) {
this.from = from;
return this;
}
/**
* Returns from.
*
* Field description:
* SMS sender number. Must be in international format.
*
* The field is required.
*
* @return from
*/
@JsonProperty("from")
public String getFrom() {
return from;
}
/**
* Sets from.
*
* Field description:
* SMS sender number. Must be in international format.
*
* The field is required.
*
* @param from
*/
@JsonProperty("from")
public void setFrom(String from) {
this.from = from;
}
/**
* Sets text.
*
* Field description:
* Content of the SMS that will be sent.
*
* The field is required.
*
* @param text
* @return This {@link WhatsAppFailover instance}.
*/
public WhatsAppFailover text(String text) {
this.text = text;
return this;
}
/**
* Returns text.
*
* Field description:
* Content of the SMS that will be sent.
*
* The field is required.
*
* @return text
*/
@JsonProperty("text")
public String getText() {
return text;
}
/**
* Sets text.
*
* Field description:
* Content of the SMS that will be sent.
*
* The field is required.
*
* @param text
*/
@JsonProperty("text")
public void setText(String text) {
this.text = text;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WhatsAppFailover whatsAppFailover = (WhatsAppFailover) o;
return Objects.equals(this.from, whatsAppFailover.from) && Objects.equals(this.text, whatsAppFailover.text);
}
@Override
public int hashCode() {
return Objects.hash(from, text);
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class WhatsAppFailover {")
.append(newLine)
.append(" from: ")
.append(toIndentedString(from))
.append(newLine)
.append(" text: ")
.append(toIndentedString(text))
.append(newLine)
.append("}")
.toString();
}
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
String lineSeparator = System.lineSeparator();
String lineSeparatorFollowedByIndentation = lineSeparator + " ";
return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
}
}