
com.infobip.model.ViberWebhookReport 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.time.OffsetDateTime;
import java.util.Objects;
/**
* Collection of reports, one per every message.
*/
public class ViberWebhookReport {
private String bulkId;
private MessagePrice price;
private ViberMessageStatus status;
private ViberMessageError error;
private String messageId;
private String to;
private String sender;
private OffsetDateTime sentAt;
private OffsetDateTime doneAt;
private Integer messageCount;
private String mccMnc;
private String callbackData;
private ViberPlatform platform;
/**
* Sets bulkId.
*
* Field description:
* Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request.
*
* @param bulkId
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport bulkId(String bulkId) {
this.bulkId = bulkId;
return this;
}
/**
* Returns bulkId.
*
* Field description:
* Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request.
*
* @return bulkId
*/
@JsonProperty("bulkId")
public String getBulkId() {
return bulkId;
}
/**
* Sets bulkId.
*
* Field description:
* Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request.
*
* @param bulkId
*/
@JsonProperty("bulkId")
public void setBulkId(String bulkId) {
this.bulkId = bulkId;
}
/**
* Sets price.
*
* @param price
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport price(MessagePrice price) {
this.price = price;
return this;
}
/**
* Returns price.
*
* @return price
*/
@JsonProperty("price")
public MessagePrice getPrice() {
return price;
}
/**
* Sets price.
*
* @param price
*/
@JsonProperty("price")
public void setPrice(MessagePrice price) {
this.price = price;
}
/**
* Sets status.
*
* @param status
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport status(ViberMessageStatus status) {
this.status = status;
return this;
}
/**
* Returns status.
*
* @return status
*/
@JsonProperty("status")
public ViberMessageStatus getStatus() {
return status;
}
/**
* Sets status.
*
* @param status
*/
@JsonProperty("status")
public void setStatus(ViberMessageStatus status) {
this.status = status;
}
/**
* Sets error.
*
* @param error
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport error(ViberMessageError error) {
this.error = error;
return this;
}
/**
* Returns error.
*
* @return error
*/
@JsonProperty("error")
public ViberMessageError getError() {
return error;
}
/**
* Sets error.
*
* @param error
*/
@JsonProperty("error")
public void setError(ViberMessageError error) {
this.error = error;
}
/**
* Sets messageId.
*
* Field description:
* Unique message ID.
*
* @param messageId
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport messageId(String messageId) {
this.messageId = messageId;
return this;
}
/**
* Returns messageId.
*
* Field description:
* Unique message ID.
*
* @return messageId
*/
@JsonProperty("messageId")
public String getMessageId() {
return messageId;
}
/**
* Sets messageId.
*
* Field description:
* Unique message ID.
*
* @param messageId
*/
@JsonProperty("messageId")
public void setMessageId(String messageId) {
this.messageId = messageId;
}
/**
* Sets to.
*
* Field description:
* Message destination address.
*
* @param to
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport to(String to) {
this.to = to;
return this;
}
/**
* Returns to.
*
* Field description:
* Message destination address.
*
* @return to
*/
@JsonProperty("to")
public String getTo() {
return to;
}
/**
* Sets to.
*
* Field description:
* Message destination address.
*
* @param to
*/
@JsonProperty("to")
public void setTo(String to) {
this.to = to;
}
/**
* Sets sender.
*
* Field description:
* The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`).
*
* @param sender
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport sender(String sender) {
this.sender = sender;
return this;
}
/**
* Returns sender.
*
* Field description:
* The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`).
*
* @return sender
*/
@JsonProperty("sender")
public String getSender() {
return sender;
}
/**
* Sets sender.
*
* Field description:
* The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`).
*
* @param sender
*/
@JsonProperty("sender")
public void setSender(String sender) {
this.sender = sender;
}
/**
* Sets sentAt.
*
* Field description:
* Date and time when the message was sent. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
*
* @param sentAt
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport sentAt(OffsetDateTime sentAt) {
this.sentAt = sentAt;
return this;
}
/**
* Returns sentAt.
*
* Field description:
* Date and time when the message was sent. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
*
* @return sentAt
*/
@JsonProperty("sentAt")
public OffsetDateTime getSentAt() {
return sentAt;
}
/**
* Sets sentAt.
*
* Field description:
* Date and time when the message was sent. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
*
* @param sentAt
*/
@JsonProperty("sentAt")
public void setSentAt(OffsetDateTime sentAt) {
this.sentAt = sentAt;
}
/**
* Sets doneAt.
*
* Field description:
* Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
*
* @param doneAt
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport doneAt(OffsetDateTime doneAt) {
this.doneAt = doneAt;
return this;
}
/**
* Returns doneAt.
*
* Field description:
* Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
*
* @return doneAt
*/
@JsonProperty("doneAt")
public OffsetDateTime getDoneAt() {
return doneAt;
}
/**
* Sets doneAt.
*
* Field description:
* Date and time when the Infobip services finished processing the message (i.e., delivered to the destination, network, etc.). Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
*
* @param doneAt
*/
@JsonProperty("doneAt")
public void setDoneAt(OffsetDateTime doneAt) {
this.doneAt = doneAt;
}
/**
* Sets messageCount.
*
* Field description:
* The number of sent messages.
*
* @param messageCount
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport messageCount(Integer messageCount) {
this.messageCount = messageCount;
return this;
}
/**
* Returns messageCount.
*
* Field description:
* The number of sent messages.
*
* @return messageCount
*/
@JsonProperty("messageCount")
public Integer getMessageCount() {
return messageCount;
}
/**
* Sets messageCount.
*
* Field description:
* The number of sent messages.
*
* @param messageCount
*/
@JsonProperty("messageCount")
public void setMessageCount(Integer messageCount) {
this.messageCount = messageCount;
}
/**
* Sets mccMnc.
*
* Field description:
* Mobile country and network codes.
*
* @param mccMnc
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport mccMnc(String mccMnc) {
this.mccMnc = mccMnc;
return this;
}
/**
* Returns mccMnc.
*
* Field description:
* Mobile country and network codes.
*
* @return mccMnc
*/
@JsonProperty("mccMnc")
public String getMccMnc() {
return mccMnc;
}
/**
* Sets mccMnc.
*
* Field description:
* Mobile country and network codes.
*
* @param mccMnc
*/
@JsonProperty("mccMnc")
public void setMccMnc(String mccMnc) {
this.mccMnc = mccMnc;
}
/**
* Sets callbackData.
*
* Field description:
* Callback data sent through ‛callbackData‛ field when sending message.
*
* @param callbackData
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport callbackData(String callbackData) {
this.callbackData = callbackData;
return this;
}
/**
* Returns callbackData.
*
* Field description:
* Callback data sent through ‛callbackData‛ field when sending message.
*
* @return callbackData
*/
@JsonProperty("callbackData")
public String getCallbackData() {
return callbackData;
}
/**
* Sets callbackData.
*
* Field description:
* Callback data sent through ‛callbackData‛ field when sending message.
*
* @param callbackData
*/
@JsonProperty("callbackData")
public void setCallbackData(String callbackData) {
this.callbackData = callbackData;
}
/**
* Sets platform.
*
* @param platform
* @return This {@link ViberWebhookReport instance}.
*/
public ViberWebhookReport platform(ViberPlatform platform) {
this.platform = platform;
return this;
}
/**
* Returns platform.
*
* @return platform
*/
@JsonProperty("platform")
public ViberPlatform getPlatform() {
return platform;
}
/**
* Sets platform.
*
* @param platform
*/
@JsonProperty("platform")
public void setPlatform(ViberPlatform platform) {
this.platform = platform;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ViberWebhookReport viberWebhookReport = (ViberWebhookReport) o;
return Objects.equals(this.bulkId, viberWebhookReport.bulkId)
&& Objects.equals(this.price, viberWebhookReport.price)
&& Objects.equals(this.status, viberWebhookReport.status)
&& Objects.equals(this.error, viberWebhookReport.error)
&& Objects.equals(this.messageId, viberWebhookReport.messageId)
&& Objects.equals(this.to, viberWebhookReport.to)
&& Objects.equals(this.sender, viberWebhookReport.sender)
&& Objects.equals(this.sentAt, viberWebhookReport.sentAt)
&& Objects.equals(this.doneAt, viberWebhookReport.doneAt)
&& Objects.equals(this.messageCount, viberWebhookReport.messageCount)
&& Objects.equals(this.mccMnc, viberWebhookReport.mccMnc)
&& Objects.equals(this.callbackData, viberWebhookReport.callbackData)
&& Objects.equals(this.platform, viberWebhookReport.platform);
}
@Override
public int hashCode() {
return Objects.hash(
bulkId,
price,
status,
error,
messageId,
to,
sender,
sentAt,
doneAt,
messageCount,
mccMnc,
callbackData,
platform);
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class ViberWebhookReport {")
.append(newLine)
.append(" bulkId: ")
.append(toIndentedString(bulkId))
.append(newLine)
.append(" price: ")
.append(toIndentedString(price))
.append(newLine)
.append(" status: ")
.append(toIndentedString(status))
.append(newLine)
.append(" error: ")
.append(toIndentedString(error))
.append(newLine)
.append(" messageId: ")
.append(toIndentedString(messageId))
.append(newLine)
.append(" to: ")
.append(toIndentedString(to))
.append(newLine)
.append(" sender: ")
.append(toIndentedString(sender))
.append(newLine)
.append(" sentAt: ")
.append(toIndentedString(sentAt))
.append(newLine)
.append(" doneAt: ")
.append(toIndentedString(doneAt))
.append(newLine)
.append(" messageCount: ")
.append(toIndentedString(messageCount))
.append(newLine)
.append(" mccMnc: ")
.append(toIndentedString(mccMnc))
.append(newLine)
.append(" callbackData: ")
.append(toIndentedString(callbackData))
.append(newLine)
.append(" platform: ")
.append(toIndentedString(platform))
.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);
}
}