All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infobip.model.SmsTextualMessage 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.ArrayList;
import java.util.List;
import java.util.Objects;

/** SmsTextualMessage */
public class SmsTextualMessage {
  public static final String SERIALIZED_NAME_CALLBACK_DATA = "callbackData";

  @SerializedName(SERIALIZED_NAME_CALLBACK_DATA)
  private String callbackData;

  public static final String SERIALIZED_NAME_DELIVERY_TIME_WINDOW = "deliveryTimeWindow";

  @SerializedName(SERIALIZED_NAME_DELIVERY_TIME_WINDOW)
  private SmsDeliveryTimeWindow deliveryTimeWindow = null;

  public static final String SERIALIZED_NAME_DESTINATIONS = "destinations";

  @SerializedName(SERIALIZED_NAME_DESTINATIONS)
  private List destinations = null;

  public static final String SERIALIZED_NAME_FLASH = "flash";

  @SerializedName(SERIALIZED_NAME_FLASH)
  private Boolean flash;

  public static final String SERIALIZED_NAME_FROM = "from";

  @SerializedName(SERIALIZED_NAME_FROM)
  private String from;

  public static final String SERIALIZED_NAME_INTERMEDIATE_REPORT = "intermediateReport";

  @SerializedName(SERIALIZED_NAME_INTERMEDIATE_REPORT)
  private Boolean intermediateReport;

  public static final String SERIALIZED_NAME_LANGUAGE = "language";

  @SerializedName(SERIALIZED_NAME_LANGUAGE)
  private SmsLanguage language = null;

  public static final String SERIALIZED_NAME_NOTIFY_CONTENT_TYPE = "notifyContentType";

  @SerializedName(SERIALIZED_NAME_NOTIFY_CONTENT_TYPE)
  private String notifyContentType;

  public static final String SERIALIZED_NAME_NOTIFY_URL = "notifyUrl";

  @SerializedName(SERIALIZED_NAME_NOTIFY_URL)
  private String notifyUrl;

  public static final String SERIALIZED_NAME_REGIONAL = "regional";

  @SerializedName(SERIALIZED_NAME_REGIONAL)
  private SmsRegionalOptions regional = null;

  public static final String SERIALIZED_NAME_SEND_AT = "sendAt";

  @SerializedName(SERIALIZED_NAME_SEND_AT)
  private OffsetDateTime sendAt;

  public static final String SERIALIZED_NAME_TEXT = "text";

  @SerializedName(SERIALIZED_NAME_TEXT)
  private String text;

  public static final String SERIALIZED_NAME_TRANSLITERATION = "transliteration";

  @SerializedName(SERIALIZED_NAME_TRANSLITERATION)
  private String transliteration;

  public static final String SERIALIZED_NAME_VALIDITY_PERIOD = "validityPeriod";

  @SerializedName(SERIALIZED_NAME_VALIDITY_PERIOD)
  private Long validityPeriod;

  public SmsTextualMessage callbackData(String callbackData) {

    this.callbackData = callbackData;
    return this;
  }

  /**
   * Additional client data to be sent over the `notifyUrl`. The maximum value is 4000
   * characters.
   *
   * @return callbackData
   */
  public String getCallbackData() {
    return callbackData;
  }

  public void setCallbackData(String callbackData) {
    this.callbackData = callbackData;
  }

  public SmsTextualMessage deliveryTimeWindow(SmsDeliveryTimeWindow deliveryTimeWindow) {

    this.deliveryTimeWindow = deliveryTimeWindow;
    return this;
  }

  /**
   * Sets specific scheduling options to send a message within daily or hourly intervals.
   *
   * @return deliveryTimeWindow
   */
  public SmsDeliveryTimeWindow getDeliveryTimeWindow() {
    return deliveryTimeWindow;
  }

  public void setDeliveryTimeWindow(SmsDeliveryTimeWindow deliveryTimeWindow) {
    this.deliveryTimeWindow = deliveryTimeWindow;
  }

  public SmsTextualMessage destinations(List destinations) {

    this.destinations = destinations;
    return this;
  }

  public SmsTextualMessage addDestinationsItem(SmsDestination destinationsItem) {
    if (this.destinations == null) {
      this.destinations = new ArrayList<>();
    }
    this.destinations.add(destinationsItem);
    return this;
  }

  /**
   * An array of destination objects for where messages are being sent. A valid destination is
   * required.
   *
   * @return destinations
   */
  public List getDestinations() {
    return destinations;
  }

  public void setDestinations(List destinations) {
    this.destinations = destinations;
  }

  public SmsTextualMessage flash(Boolean flash) {

    this.flash = flash;
    return this;
  }

  /**
   * Allows for sending a [flash SMS](https://www.infobip.com/docs/sms/message-types#flash-sms) to
   * automatically appear on recipient devices without interaction. Set to `true` to
   * enable flash SMS, or leave the default value, `false` to send a standard SMS.
   *
   * @return flash
   */
  public Boolean getFlash() {
    return flash;
  }

  public void setFlash(Boolean flash) {
    this.flash = flash;
  }

  public SmsTextualMessage from(String from) {

    this.from = from;
    return this;
  }

  /**
   * The sender ID which can be alphanumeric or numeric (e.g., `CompanyName`). Make sure
   * you don't exceed [character
   * limit](https://www.infobip.com/docs/sms/get-started#sender-names).
   *
   * @return from
   */
  public String getFrom() {
    return from;
  }

  public void setFrom(String from) {
    this.from = from;
  }

  public SmsTextualMessage intermediateReport(Boolean intermediateReport) {

    this.intermediateReport = intermediateReport;
    return this;
  }

  /**
   * The [real-time intermediate delivery report](#channels/sms/receive-outbound-sms-message-report)
   * 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
   */
  public Boolean getIntermediateReport() {
    return intermediateReport;
  }

  public void setIntermediateReport(Boolean intermediateReport) {
    this.intermediateReport = intermediateReport;
  }

  public SmsTextualMessage language(SmsLanguage language) {

    this.language = language;
    return this;
  }

  /**
   * Sets the language parameters for the message being sent.
   *
   * @return language
   */
  public SmsLanguage getLanguage() {
    return language;
  }

  public void setLanguage(SmsLanguage language) {
    this.language = language;
  }

  public SmsTextualMessage notifyContentType(String notifyContentType) {

    this.notifyContentType = notifyContentType;
    return this;
  }

  /**
   * Preferred delivery report content type, `application/json` or
   * `application/xml`.
   *
   * @return notifyContentType
   */
  public String getNotifyContentType() {
    return notifyContentType;
  }

  public void setNotifyContentType(String notifyContentType) {
    this.notifyContentType = notifyContentType;
  }

  public SmsTextualMessage notifyUrl(String notifyUrl) {

    this.notifyUrl = notifyUrl;
    return this;
  }

  /**
   * The URL on your call back server on to which a delivery report will be sent. The [retry
   * cycle](https://www.infobip.com/docs/sms/api#notify-url) for when your URL becomes unavailable
   * uses the following formula: `1min + (1min * <retrynumber> *
   * <retrynumber>)</retrynumber></retrynumber>`.
   *
   * @return notifyUrl
   */
  public String getNotifyUrl() {
    return notifyUrl;
  }

  public void setNotifyUrl(String notifyUrl) {
    this.notifyUrl = notifyUrl;
  }

  public SmsTextualMessage regional(SmsRegionalOptions regional) {

    this.regional = regional;
    return this;
  }

  /**
   * Region-specific parameters, often imposed by local laws. Use this, if country or region that
   * you are sending an SMS to requires additional information.
   *
   * @return regional
   */
  public SmsRegionalOptions getRegional() {
    return regional;
  }

  public void setRegional(SmsRegionalOptions regional) {
    this.regional = regional;
  }

  public SmsTextualMessage sendAt(OffsetDateTime sendAt) {

    this.sendAt = sendAt;
    return this;
  }

  /**
   * Date and time when the message is to be sent. Used for [scheduled
   * SMS](#channels/sms/get-scheduled-sms-messages). Has the following format:
   * `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. Must be sooner than 180 days from now.
   *
   * @return sendAt
   */
  public OffsetDateTime getSendAt() {
    return sendAt;
  }

  public void setSendAt(OffsetDateTime sendAt) {
    this.sendAt = sendAt;
  }

  public SmsTextualMessage text(String text) {

    this.text = text;
    return this;
  }

  /**
   * Content of the message being sent.
   *
   * @return text
   */
  public String getText() {
    return text;
  }

  public void setText(String text) {
    this.text = text;
  }

  public SmsTextualMessage transliteration(String transliteration) {

    this.transliteration = transliteration;
    return this;
  }

  /**
   * The transliteration of your sent message from one script to another. Transliteration is used to
   * replace characters which are not recognized as part of your defaulted alphabet. Possible
   * values: `TURKISH`, `GREEK`, `CYRILLIC`,
   * `SERBIAN_CYRILLIC`, `CENTRAL_EUROPEAN`, `BALTIC` and
   * `NON_UNICODE`.
   *
   * @return transliteration
   */
  public String getTransliteration() {
    return transliteration;
  }

  public void setTransliteration(String transliteration) {
    this.transliteration = transliteration;
  }

  public SmsTextualMessage validityPeriod(Long validityPeriod) {

    this.validityPeriod = validityPeriod;
    return this;
  }

  /**
   * 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
   */
  public Long getValidityPeriod() {
    return validityPeriod;
  }

  public void setValidityPeriod(Long validityPeriod) {
    this.validityPeriod = validityPeriod;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SmsTextualMessage smsTextualMessage = (SmsTextualMessage) o;
    return Objects.equals(this.callbackData, smsTextualMessage.callbackData)
        && Objects.equals(this.deliveryTimeWindow, smsTextualMessage.deliveryTimeWindow)
        && Objects.equals(this.destinations, smsTextualMessage.destinations)
        && Objects.equals(this.flash, smsTextualMessage.flash)
        && Objects.equals(this.from, smsTextualMessage.from)
        && Objects.equals(this.intermediateReport, smsTextualMessage.intermediateReport)
        && Objects.equals(this.language, smsTextualMessage.language)
        && Objects.equals(this.notifyContentType, smsTextualMessage.notifyContentType)
        && Objects.equals(this.notifyUrl, smsTextualMessage.notifyUrl)
        && Objects.equals(this.regional, smsTextualMessage.regional)
        && Objects.equals(this.sendAt, smsTextualMessage.sendAt)
        && Objects.equals(this.text, smsTextualMessage.text)
        && Objects.equals(this.transliteration, smsTextualMessage.transliteration)
        && Objects.equals(this.validityPeriod, smsTextualMessage.validityPeriod);
  }

  @Override
  public int hashCode() {
    return Objects.hash(
        callbackData,
        deliveryTimeWindow,
        destinations,
        flash,
        from,
        intermediateReport,
        language,
        notifyContentType,
        notifyUrl,
        regional,
        sendAt,
        text,
        transliteration,
        validityPeriod);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SmsTextualMessage {\n");
    sb.append("    callbackData: ").append(toIndentedString(callbackData)).append("\n");
    sb.append("    deliveryTimeWindow: ").append(toIndentedString(deliveryTimeWindow)).append("\n");
    sb.append("    destinations: ").append(toIndentedString(destinations)).append("\n");
    sb.append("    flash: ").append(toIndentedString(flash)).append("\n");
    sb.append("    from: ").append(toIndentedString(from)).append("\n");
    sb.append("    intermediateReport: ").append(toIndentedString(intermediateReport)).append("\n");
    sb.append("    language: ").append(toIndentedString(language)).append("\n");
    sb.append("    notifyContentType: ").append(toIndentedString(notifyContentType)).append("\n");
    sb.append("    notifyUrl: ").append(toIndentedString(notifyUrl)).append("\n");
    sb.append("    regional: ").append(toIndentedString(regional)).append("\n");
    sb.append("    sendAt: ").append(toIndentedString(sendAt)).append("\n");
    sb.append("    text: ").append(toIndentedString(text)).append("\n");
    sb.append("    transliteration: ").append(toIndentedString(transliteration)).append("\n");
    sb.append("    validityPeriod: ").append(toIndentedString(validityPeriod)).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