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

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

/** SmsAdvancedTextualRequest */
public class SmsAdvancedTextualRequest {
  public static final String SERIALIZED_NAME_BULK_ID = "bulkId";

  @SerializedName(SERIALIZED_NAME_BULK_ID)
  private String bulkId;

  public static final String SERIALIZED_NAME_MESSAGES = "messages";

  @SerializedName(SERIALIZED_NAME_MESSAGES)
  private List messages = null;

  public static final String SERIALIZED_NAME_SENDING_SPEED_LIMIT = "sendingSpeedLimit";

  @SerializedName(SERIALIZED_NAME_SENDING_SPEED_LIMIT)
  private SmsSendingSpeedLimit sendingSpeedLimit = null;

  public static final String SERIALIZED_NAME_TRACKING = "tracking";

  @SerializedName(SERIALIZED_NAME_TRACKING)
  private SmsTracking tracking = null;

  public SmsAdvancedTextualRequest bulkId(String bulkId) {

    this.bulkId = bulkId;
    return this;
  }

  /**
   * Unique ID assigned to the request if messaging multiple recipients or sending multiple messages
   * via a single API request. If not provided, it will be auto-generated and returned in the API
   * response. Typically, used to fetch [delivery
   * reports](#channels/sms/get-outbound-sms-message-delivery-reports) and [message
   * logs](#channels/sms/get-outbound-sms-message-logs).
   *
   * @return bulkId
   */
  public String getBulkId() {
    return bulkId;
  }

  public void setBulkId(String bulkId) {
    this.bulkId = bulkId;
  }

  public SmsAdvancedTextualRequest messages(List messages) {

    this.messages = messages;
    return this;
  }

  public SmsAdvancedTextualRequest addMessagesItem(SmsTextualMessage messagesItem) {
    if (this.messages == null) {
      this.messages = new ArrayList<>();
    }
    this.messages.add(messagesItem);
    return this;
  }

  /**
   * An array of message objects of a single message or multiple messages sent under one bulk ID.
   *
   * @return messages
   */
  public List getMessages() {
    return messages;
  }

  public void setMessages(List messages) {
    this.messages = messages;
  }

  public SmsAdvancedTextualRequest sendingSpeedLimit(SmsSendingSpeedLimit sendingSpeedLimit) {

    this.sendingSpeedLimit = sendingSpeedLimit;
    return this;
  }

  /**
   * Limits the send speed when sending messages in bulk to deliver messages over a longer period of
   * time. You may wish to use this to allow your systems or agents to handle large amounts of
   * incoming traffic, e.g., if you are expecting recipients to follow through with a call-to-action
   * option from a message you sent. Not setting a send speed limit can overwhelm your resources
   * with incoming traffic.
   *
   * @return sendingSpeedLimit
   */
  public SmsSendingSpeedLimit getSendingSpeedLimit() {
    return sendingSpeedLimit;
  }

  public void setSendingSpeedLimit(SmsSendingSpeedLimit sendingSpeedLimit) {
    this.sendingSpeedLimit = sendingSpeedLimit;
  }

  public SmsAdvancedTextualRequest tracking(SmsTracking tracking) {

    this.tracking = tracking;
    return this;
  }

  /**
   * Sets up tracking parameters to track conversion metrics and type.
   *
   * @return tracking
   */
  public SmsTracking getTracking() {
    return tracking;
  }

  public void setTracking(SmsTracking tracking) {
    this.tracking = tracking;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SmsAdvancedTextualRequest smsAdvancedTextualRequest = (SmsAdvancedTextualRequest) o;
    return Objects.equals(this.bulkId, smsAdvancedTextualRequest.bulkId)
        && Objects.equals(this.messages, smsAdvancedTextualRequest.messages)
        && Objects.equals(this.sendingSpeedLimit, smsAdvancedTextualRequest.sendingSpeedLimit)
        && Objects.equals(this.tracking, smsAdvancedTextualRequest.tracking);
  }

  @Override
  public int hashCode() {
    return Objects.hash(bulkId, messages, sendingSpeedLimit, tracking);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SmsAdvancedTextualRequest {\n");
    sb.append("    bulkId: ").append(toIndentedString(bulkId)).append("\n");
    sb.append("    messages: ").append(toIndentedString(messages)).append("\n");
    sb.append("    sendingSpeedLimit: ").append(toIndentedString(sendingSpeedLimit)).append("\n");
    sb.append("    tracking: ").append(toIndentedString(tracking)).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