
com.infobip.model.SmsInboundMessage Maven / Gradle / Ivy
/*
* Infobip Client API Libraries OpenAPI Specification
* OpenAPI specification containing public endpoints supported in client API libraries.
*
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.infobip.model;
import com.google.gson.annotations.SerializedName;
import java.time.OffsetDateTime;
import java.util.Objects;
/** SmsInboundMessage */
public class SmsInboundMessage {
public static final String SERIALIZED_NAME_CALLBACK_DATA = "callbackData";
@SerializedName(SERIALIZED_NAME_CALLBACK_DATA)
private String callbackData;
public static final String SERIALIZED_NAME_CLEAN_TEXT = "cleanText";
@SerializedName(SERIALIZED_NAME_CLEAN_TEXT)
private String cleanText;
public static final String SERIALIZED_NAME_FROM = "from";
@SerializedName(SERIALIZED_NAME_FROM)
private String from;
public static final String SERIALIZED_NAME_KEYWORD = "keyword";
@SerializedName(SERIALIZED_NAME_KEYWORD)
private String keyword;
public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId";
@SerializedName(SERIALIZED_NAME_MESSAGE_ID)
private String messageId;
public static final String SERIALIZED_NAME_PRICE = "price";
@SerializedName(SERIALIZED_NAME_PRICE)
private SmsPrice price = null;
public static final String SERIALIZED_NAME_RECEIVED_AT = "receivedAt";
@SerializedName(SERIALIZED_NAME_RECEIVED_AT)
private OffsetDateTime receivedAt;
public static final String SERIALIZED_NAME_SMS_COUNT = "smsCount";
@SerializedName(SERIALIZED_NAME_SMS_COUNT)
private Integer smsCount;
public static final String SERIALIZED_NAME_TEXT = "text";
@SerializedName(SERIALIZED_NAME_TEXT)
private String text;
public static final String SERIALIZED_NAME_TO = "to";
@SerializedName(SERIALIZED_NAME_TO)
private String to;
/**
* Custom callback data sent over the notifyUrl.
*
* @return callbackData
*/
public String getCallbackData() {
return callbackData;
}
/**
* Content of the message without a keyword (if a keyword was sent).
*
* @return cleanText
*/
public String getCleanText() {
return cleanText;
}
/**
* Sender ID that can be alphanumeric or numeric.
*
* @return from
*/
public String getFrom() {
return from;
}
/**
* Keyword extracted from the message content.
*
* @return keyword
*/
public String getKeyword() {
return keyword;
}
/**
* Unique message ID.
*
* @return messageId
*/
public String getMessageId() {
return messageId;
}
/**
* A price object showing currency and a price per each message.
*
* @return price
*/
public SmsPrice getPrice() {
return price;
}
/**
* Indicates when the Infobip platform received the message. Has the following format:
* `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
*
* @return receivedAt
*/
public OffsetDateTime getReceivedAt() {
return receivedAt;
}
/**
* The number of characters within a message
*
* @return smsCount
*/
public Integer getSmsCount() {
return smsCount;
}
/**
* Full content of the message.
*
* @return text
*/
public String getText() {
return text;
}
/**
* The destination address of the message.
*
* @return to
*/
public String getTo() {
return to;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SmsInboundMessage smsInboundMessage = (SmsInboundMessage) o;
return Objects.equals(this.callbackData, smsInboundMessage.callbackData)
&& Objects.equals(this.cleanText, smsInboundMessage.cleanText)
&& Objects.equals(this.from, smsInboundMessage.from)
&& Objects.equals(this.keyword, smsInboundMessage.keyword)
&& Objects.equals(this.messageId, smsInboundMessage.messageId)
&& Objects.equals(this.price, smsInboundMessage.price)
&& Objects.equals(this.receivedAt, smsInboundMessage.receivedAt)
&& Objects.equals(this.smsCount, smsInboundMessage.smsCount)
&& Objects.equals(this.text, smsInboundMessage.text)
&& Objects.equals(this.to, smsInboundMessage.to);
}
@Override
public int hashCode() {
return Objects.hash(
callbackData, cleanText, from, keyword, messageId, price, receivedAt, smsCount, text, to);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SmsInboundMessage {\n");
sb.append(" callbackData: ").append(toIndentedString(callbackData)).append("\n");
sb.append(" cleanText: ").append(toIndentedString(cleanText)).append("\n");
sb.append(" from: ").append(toIndentedString(from)).append("\n");
sb.append(" keyword: ").append(toIndentedString(keyword)).append("\n");
sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n");
sb.append(" price: ").append(toIndentedString(price)).append("\n");
sb.append(" receivedAt: ").append(toIndentedString(receivedAt)).append("\n");
sb.append(" smsCount: ").append(toIndentedString(smsCount)).append("\n");
sb.append(" text: ").append(toIndentedString(text)).append("\n");
sb.append(" to: ").append(toIndentedString(to)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy