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

com.infobip.model.SmsMessage Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version
/*
 * 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.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 SmsMessage {

    private String sender;

    private List destinations = new ArrayList<>();

    private SmsMessageContent content;

    private SmsMessageOptions options;

    private SmsWebhooks webhooks;

    /**
     * Sets sender.
     * 

* Field description: * The sender ID. It 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). * * @param sender * @return This {@link SmsMessage instance}. */ public SmsMessage sender(String sender) { this.sender = sender; return this; } /** * Returns sender. *

* Field description: * The sender ID. It 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 sender */ @JsonProperty("sender") public String getSender() { return sender; } /** * Sets sender. *

* Field description: * The sender ID. It 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). * * @param sender */ @JsonProperty("sender") public void setSender(String sender) { this.sender = sender; } /** * 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 SmsMessage instance}. */ public SmsMessage 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 SmsMessage instance}. */ public SmsMessage addDestinationsItem(SmsDestination 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 content. *

* The field is required. * * @param content * @return This {@link SmsMessage instance}. */ public SmsMessage content(SmsMessageContent content) { this.content = content; return this; } /** * Returns content. *

* The field is required. * * @return content */ @JsonProperty("content") public SmsMessageContent getContent() { return content; } /** * Sets content. *

* The field is required. * * @param content */ @JsonProperty("content") public void setContent(SmsMessageContent content) { this.content = content; } /** * Sets options. * * @param options * @return This {@link SmsMessage instance}. */ public SmsMessage options(SmsMessageOptions options) { this.options = options; return this; } /** * Returns options. * * @return options */ @JsonProperty("options") public SmsMessageOptions getOptions() { return options; } /** * Sets options. * * @param options */ @JsonProperty("options") public void setOptions(SmsMessageOptions options) { this.options = options; } /** * Sets webhooks. * * @param webhooks * @return This {@link SmsMessage instance}. */ public SmsMessage webhooks(SmsWebhooks webhooks) { this.webhooks = webhooks; return this; } /** * Returns webhooks. * * @return webhooks */ @JsonProperty("webhooks") public SmsWebhooks getWebhooks() { return webhooks; } /** * Sets webhooks. * * @param webhooks */ @JsonProperty("webhooks") public void setWebhooks(SmsWebhooks webhooks) { this.webhooks = webhooks; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SmsMessage smsMessage = (SmsMessage) o; return Objects.equals(this.sender, smsMessage.sender) && Objects.equals(this.destinations, smsMessage.destinations) && Objects.equals(this.content, smsMessage.content) && Objects.equals(this.options, smsMessage.options) && Objects.equals(this.webhooks, smsMessage.webhooks); } @Override public int hashCode() { return Objects.hash(sender, destinations, content, options, webhooks); } @Override public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() .append("class SmsMessage {") .append(newLine) .append(" sender: ") .append(toIndentedString(sender)) .append(newLine) .append(" destinations: ") .append(toIndentedString(destinations)) .append(newLine) .append(" content: ") .append(toIndentedString(content)) .append(newLine) .append(" options: ") .append(toIndentedString(options)) .append(newLine) .append(" webhooks: ") .append(toIndentedString(webhooks)) .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); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy