
com.infobip.model.MmsAdvancedMessage 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.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* An array of message objects of a single message or multiple messages sent under one bulk ID.
*/
public class MmsAdvancedMessage {
private String callbackData;
private MmsDeliveryTimeWindow deliveryTimeWindow;
private List destinations = new ArrayList<>();
private String from;
private Boolean intermediateReport;
private String notifyUrl;
private MmsRegional regional;
private OffsetDateTime sendAt;
private List messageSegments = new ArrayList<>();
private Long validityPeriod;
private String title;
private String entityId;
private String applicationId;
/**
* Sets callbackData.
*
* Field description:
* Additional client data to be sent over the notifyUrl. The maximum value is 4000 characters.
*
* @param callbackData
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage callbackData(String callbackData) {
this.callbackData = callbackData;
return this;
}
/**
* Returns callbackData.
*
* Field description:
* Additional client data to be sent over the notifyUrl. The maximum value is 4000 characters.
*
* @return callbackData
*/
@JsonProperty("callbackData")
public String getCallbackData() {
return callbackData;
}
/**
* Sets callbackData.
*
* Field description:
* Additional client data to be sent over the notifyUrl. The maximum value is 4000 characters.
*
* @param callbackData
*/
@JsonProperty("callbackData")
public void setCallbackData(String callbackData) {
this.callbackData = callbackData;
}
/**
* Sets deliveryTimeWindow.
*
* @param deliveryTimeWindow
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage deliveryTimeWindow(MmsDeliveryTimeWindow deliveryTimeWindow) {
this.deliveryTimeWindow = deliveryTimeWindow;
return this;
}
/**
* Returns deliveryTimeWindow.
*
* @return deliveryTimeWindow
*/
@JsonProperty("deliveryTimeWindow")
public MmsDeliveryTimeWindow getDeliveryTimeWindow() {
return deliveryTimeWindow;
}
/**
* Sets deliveryTimeWindow.
*
* @param deliveryTimeWindow
*/
@JsonProperty("deliveryTimeWindow")
public void setDeliveryTimeWindow(MmsDeliveryTimeWindow deliveryTimeWindow) {
this.deliveryTimeWindow = deliveryTimeWindow;
}
/**
* Sets destinations.
*
* Field description:
* An array of destination objects for where messages are being sent. A valid destination is required.
*
* The field is required.
*
* @param destinations
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage destinations(List destinations) {
this.destinations = destinations;
return this;
}
/**
* Adds and item into destinations.
*
* Field description:
* An array of destination objects for where messages are being sent. A valid destination is required.
*
* The field is required.
*
* @param destinationsItem The item to be added to the list.
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage addDestinationsItem(MmsDestination destinationsItem) {
if (this.destinations == null) {
this.destinations = new ArrayList<>();
}
this.destinations.add(destinationsItem);
return this;
}
/**
* Returns destinations.
*
* Field description:
* An array of destination objects for where messages are being sent. A valid destination is required.
*
* The field is required.
*
* @return destinations
*/
@JsonProperty("destinations")
public List getDestinations() {
return destinations;
}
/**
* Sets destinations.
*
* Field description:
* An array of destination objects for where messages are being sent. A valid destination is required.
*
* The field is required.
*
* @param destinations
*/
@JsonProperty("destinations")
public void setDestinations(List destinations) {
this.destinations = destinations;
}
/**
* Sets from.
*
* Field description:
* The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`).
*
* @param from
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage from(String from) {
this.from = from;
return this;
}
/**
* Returns from.
*
* Field description:
* The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`).
*
* @return from
*/
@JsonProperty("from")
public String getFrom() {
return from;
}
/**
* Sets from.
*
* Field description:
* The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`).
*
* @param from
*/
@JsonProperty("from")
public void setFrom(String from) {
this.from = from;
}
/**
* Sets intermediateReport.
*
* Field description:
* The [real-time intermediate delivery report](https://www.infobip.com/docs/api/channels/mms/get-outbound-mms-message-delivery-reports) containing GSM error codes, messages status, pricing, network and country codes, etc., which will be sent on your callback server. Defaults to `false`.
*
* @param intermediateReport
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage intermediateReport(Boolean intermediateReport) {
this.intermediateReport = intermediateReport;
return this;
}
/**
* Returns intermediateReport.
*
* Field description:
* The [real-time intermediate delivery report](https://www.infobip.com/docs/api/channels/mms/get-outbound-mms-message-delivery-reports) containing GSM error codes, messages status, pricing, network and country codes, etc., which will be sent on your callback server. Defaults to `false`.
*
* @return intermediateReport
*/
@JsonProperty("intermediateReport")
public Boolean getIntermediateReport() {
return intermediateReport;
}
/**
* Sets intermediateReport.
*
* Field description:
* The [real-time intermediate delivery report](https://www.infobip.com/docs/api/channels/mms/get-outbound-mms-message-delivery-reports) containing GSM error codes, messages status, pricing, network and country codes, etc., which will be sent on your callback server. Defaults to `false`.
*
* @param intermediateReport
*/
@JsonProperty("intermediateReport")
public void setIntermediateReport(Boolean intermediateReport) {
this.intermediateReport = intermediateReport;
}
/**
* Sets notifyUrl.
*
* Field description:
* The URL on your call back server on to which a delivery report will be sent.
*
* @param notifyUrl
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage notifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
return this;
}
/**
* Returns notifyUrl.
*
* Field description:
* The URL on your call back server on to which a delivery report will be sent.
*
* @return notifyUrl
*/
@JsonProperty("notifyUrl")
public String getNotifyUrl() {
return notifyUrl;
}
/**
* Sets notifyUrl.
*
* Field description:
* The URL on your call back server on to which a delivery report will be sent.
*
* @param notifyUrl
*/
@JsonProperty("notifyUrl")
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
/**
* Sets regional.
*
* @param regional
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage regional(MmsRegional regional) {
this.regional = regional;
return this;
}
/**
* Returns regional.
*
* @return regional
*/
@JsonProperty("regional")
public MmsRegional getRegional() {
return regional;
}
/**
* Sets regional.
*
* @param regional
*/
@JsonProperty("regional")
public void setRegional(MmsRegional regional) {
this.regional = regional;
}
/**
* Sets sendAt.
*
* Field description:
* Date and time when the message is to be sent. Used for scheduled MMS. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
*
* @param sendAt
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage sendAt(OffsetDateTime sendAt) {
this.sendAt = sendAt;
return this;
}
/**
* Returns sendAt.
*
* Field description:
* Date and time when the message is to be sent. Used for scheduled MMS. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
*
* @return sendAt
*/
@JsonProperty("sendAt")
public OffsetDateTime getSendAt() {
return sendAt;
}
/**
* Sets sendAt.
*
* Field description:
* Date and time when the message is to be sent. Used for scheduled MMS. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
*
* @param sendAt
*/
@JsonProperty("sendAt")
public void setSendAt(OffsetDateTime sendAt) {
this.sendAt = sendAt;
}
/**
* Sets messageSegments.
*
* Field description:
* Content of the message being sent.
*
* The field is required.
*
* @param messageSegments
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage messageSegments(List messageSegments) {
this.messageSegments = messageSegments;
return this;
}
/**
* Adds and item into messageSegments.
*
* Field description:
* Content of the message being sent.
*
* The field is required.
*
* @param messageSegmentsItem The item to be added to the list.
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage addMessageSegmentsItem(MmsAdvancedMessageSegment messageSegmentsItem) {
if (this.messageSegments == null) {
this.messageSegments = new ArrayList<>();
}
this.messageSegments.add(messageSegmentsItem);
return this;
}
/**
* Returns messageSegments.
*
* Field description:
* Content of the message being sent.
*
* The field is required.
*
* @return messageSegments
*/
@JsonProperty("messageSegments")
public List getMessageSegments() {
return messageSegments;
}
/**
* Sets messageSegments.
*
* Field description:
* Content of the message being sent.
*
* The field is required.
*
* @param messageSegments
*/
@JsonProperty("messageSegments")
public void setMessageSegments(List messageSegments) {
this.messageSegments = messageSegments;
}
/**
* Sets validityPeriod.
*
* Field description:
* The message validity period in minutes. When the period expires, it will not be allowed for the message to be sent. Validity period longer than 48h is not supported. Any bigger value will automatically default back to `2880`.
*
* @param validityPeriod
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage validityPeriod(Long validityPeriod) {
this.validityPeriod = validityPeriod;
return this;
}
/**
* Returns validityPeriod.
*
* Field description:
* The message validity period in minutes. When the period expires, it will not be allowed for the message to be sent. Validity period longer than 48h is not supported. Any bigger value will automatically default back to `2880`.
*
* @return validityPeriod
*/
@JsonProperty("validityPeriod")
public Long getValidityPeriod() {
return validityPeriod;
}
/**
* Sets validityPeriod.
*
* Field description:
* The message validity period in minutes. When the period expires, it will not be allowed for the message to be sent. Validity period longer than 48h is not supported. Any bigger value will automatically default back to `2880`.
*
* @param validityPeriod
*/
@JsonProperty("validityPeriod")
public void setValidityPeriod(Long validityPeriod) {
this.validityPeriod = validityPeriod;
}
/**
* Sets title.
*
* @param title
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage title(String title) {
this.title = title;
return this;
}
/**
* Returns title.
*
* @return title
*/
@JsonProperty("title")
public String getTitle() {
return title;
}
/**
* Sets title.
*
* @param title
*/
@JsonProperty("title")
public void setTitle(String title) {
this.title = title;
}
/**
* Sets entityId.
*
* Field description:
* Required for entity use in a send request for outbound traffic. Returned in notification events.
*
* @param entityId
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage entityId(String entityId) {
this.entityId = entityId;
return this;
}
/**
* Returns entityId.
*
* Field description:
* Required for entity use in a send request for outbound traffic. Returned in notification events.
*
* @return entityId
*/
@JsonProperty("entityId")
public String getEntityId() {
return entityId;
}
/**
* Sets entityId.
*
* Field description:
* Required for entity use in a send request for outbound traffic. Returned in notification events.
*
* @param entityId
*/
@JsonProperty("entityId")
public void setEntityId(String entityId) {
this.entityId = entityId;
}
/**
* Sets applicationId.
*
* Field description:
* Required for application use in a send request for outbound traffic. Returned in notification events.
*
* @param applicationId
* @return This {@link MmsAdvancedMessage instance}.
*/
public MmsAdvancedMessage applicationId(String applicationId) {
this.applicationId = applicationId;
return this;
}
/**
* Returns applicationId.
*
* Field description:
* Required for application use in a send request for outbound traffic. Returned in notification events.
*
* @return applicationId
*/
@JsonProperty("applicationId")
public String getApplicationId() {
return applicationId;
}
/**
* Sets applicationId.
*
* Field description:
* Required for application use in a send request for outbound traffic. Returned in notification events.
*
* @param applicationId
*/
@JsonProperty("applicationId")
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MmsAdvancedMessage mmsAdvancedMessage = (MmsAdvancedMessage) o;
return Objects.equals(this.callbackData, mmsAdvancedMessage.callbackData)
&& Objects.equals(this.deliveryTimeWindow, mmsAdvancedMessage.deliveryTimeWindow)
&& Objects.equals(this.destinations, mmsAdvancedMessage.destinations)
&& Objects.equals(this.from, mmsAdvancedMessage.from)
&& Objects.equals(this.intermediateReport, mmsAdvancedMessage.intermediateReport)
&& Objects.equals(this.notifyUrl, mmsAdvancedMessage.notifyUrl)
&& Objects.equals(this.regional, mmsAdvancedMessage.regional)
&& Objects.equals(this.sendAt, mmsAdvancedMessage.sendAt)
&& Objects.equals(this.messageSegments, mmsAdvancedMessage.messageSegments)
&& Objects.equals(this.validityPeriod, mmsAdvancedMessage.validityPeriod)
&& Objects.equals(this.title, mmsAdvancedMessage.title)
&& Objects.equals(this.entityId, mmsAdvancedMessage.entityId)
&& Objects.equals(this.applicationId, mmsAdvancedMessage.applicationId);
}
@Override
public int hashCode() {
return Objects.hash(
callbackData,
deliveryTimeWindow,
destinations,
from,
intermediateReport,
notifyUrl,
regional,
sendAt,
messageSegments,
validityPeriod,
title,
entityId,
applicationId);
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class MmsAdvancedMessage {")
.append(newLine)
.append(" callbackData: ")
.append(toIndentedString(callbackData))
.append(newLine)
.append(" deliveryTimeWindow: ")
.append(toIndentedString(deliveryTimeWindow))
.append(newLine)
.append(" destinations: ")
.append(toIndentedString(destinations))
.append(newLine)
.append(" from: ")
.append(toIndentedString(from))
.append(newLine)
.append(" intermediateReport: ")
.append(toIndentedString(intermediateReport))
.append(newLine)
.append(" notifyUrl: ")
.append(toIndentedString(notifyUrl))
.append(newLine)
.append(" regional: ")
.append(toIndentedString(regional))
.append(newLine)
.append(" sendAt: ")
.append(toIndentedString(sendAt))
.append(newLine)
.append(" messageSegments: ")
.append(toIndentedString(messageSegments))
.append(newLine)
.append(" validityPeriod: ")
.append(toIndentedString(validityPeriod))
.append(newLine)
.append(" title: ")
.append(toIndentedString(title))
.append(newLine)
.append(" entityId: ")
.append(toIndentedString(entityId))
.append(newLine)
.append(" applicationId: ")
.append(toIndentedString(applicationId))
.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);
}
}