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

com.infobip.model.MessagesApiFailover 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.util.Objects;

/**
 * Provides options for configuring a message failover. When message fails it will be sent over channels in order specified in an array. Make sure to provide correct sender and destinations specified as `Channels Destination` for each channel.
 */
public class MessagesApiFailover {

    private OutboundMessageChannel channel;

    private String sender;

    private ValidityPeriod validityPeriod;

    /**
     * Sets channel.
     * 

* The field is required. * * @param channel * @return This {@link MessagesApiFailover instance}. */ public MessagesApiFailover channel(OutboundMessageChannel channel) { this.channel = channel; return this; } /** * Returns channel. *

* The field is required. * * @return channel */ @JsonProperty("channel") public OutboundMessageChannel getChannel() { return channel; } /** * Sets channel. *

* The field is required. * * @param channel */ @JsonProperty("channel") public void setChannel(OutboundMessageChannel channel) { this.channel = channel; } /** * Sets sender. *

* Field description: * Sender for channel specified above. *

* The field is required. * * @param sender * @return This {@link MessagesApiFailover instance}. */ public MessagesApiFailover sender(String sender) { this.sender = sender; return this; } /** * Returns sender. *

* Field description: * Sender for channel specified above. *

* The field is required. * * @return sender */ @JsonProperty("sender") public String getSender() { return sender; } /** * Sets sender. *

* Field description: * Sender for channel specified above. *

* The field is required. * * @param sender */ @JsonProperty("sender") public void setSender(String sender) { this.sender = sender; } /** * Sets validityPeriod. * * @param validityPeriod * @return This {@link MessagesApiFailover instance}. */ public MessagesApiFailover validityPeriod(ValidityPeriod validityPeriod) { this.validityPeriod = validityPeriod; return this; } /** * Returns validityPeriod. * * @return validityPeriod */ @JsonProperty("validityPeriod") public ValidityPeriod getValidityPeriod() { return validityPeriod; } /** * Sets validityPeriod. * * @param validityPeriod */ @JsonProperty("validityPeriod") public void setValidityPeriod(ValidityPeriod validityPeriod) { this.validityPeriod = validityPeriod; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MessagesApiFailover messagesApiFailover = (MessagesApiFailover) o; return Objects.equals(this.channel, messagesApiFailover.channel) && Objects.equals(this.sender, messagesApiFailover.sender) && Objects.equals(this.validityPeriod, messagesApiFailover.validityPeriod); } @Override public int hashCode() { return Objects.hash(channel, sender, validityPeriod); } @Override public String toString() { String newLine = System.lineSeparator(); return new StringBuilder() .append("class MessagesApiFailover {") .append(newLine) .append(" channel: ") .append(toIndentedString(channel)) .append(newLine) .append(" sender: ") .append(toIndentedString(sender)) .append(newLine) .append(" validityPeriod: ") .append(toIndentedString(validityPeriod)) .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