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

com.sinch.sdk.domains.numbers.models.dto.v1.SMSConfigurationDto Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/*
 * Numbers | Sinch
 * An API service for getting, listing and managing Sinch virtual numbers.
 *
 * The version of the OpenAPI document: 1.0.2
 * 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.sinch.sdk.domains.numbers.models.dto.v1;

import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;

/**
 * The current SMS configuration for this number. Once the `servicePlanId` is sent, it
 * enters scheduled provisioning. The status of scheduled provisioning will show under a
 * `scheduledProvisioning` object if it's still running. Once processed successfully,
 * the `servicePlanId` sent will appear directly under the `smsConfiguration`
 * object.
 */
@JsonPropertyOrder({
  SMSConfigurationDto.JSON_PROPERTY_SERVICE_PLAN_ID,
  SMSConfigurationDto.JSON_PROPERTY_CAMPAIGN_ID,
  SMSConfigurationDto.JSON_PROPERTY_SCHEDULED_PROVISIONING
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class SMSConfigurationDto {
  private static final long serialVersionUID = 1L;
  public static final String JSON_PROPERTY_SERVICE_PLAN_ID = "servicePlanId";
  private String servicePlanId;
  private boolean servicePlanIdDefined = false;

  public static final String JSON_PROPERTY_CAMPAIGN_ID = "campaignId";
  private String campaignId;
  private boolean campaignIdDefined = false;

  public static final String JSON_PROPERTY_SCHEDULED_PROVISIONING = "scheduledProvisioning";
  private ScheduledProvisioningDto scheduledProvisioning;
  private boolean scheduledProvisioningDefined = false;

  public SMSConfigurationDto() {}

  public SMSConfigurationDto servicePlanId(String servicePlanId) {
    this.servicePlanId = servicePlanId;
    this.servicePlanIdDefined = true;
    return this;
  }

  /**
   * The `servicePlanId` can be found in the <a
   * href=\"https://dashboard.sinch.com/sms/api/rest\"
   * target=\"_blank\">Sinch Customer Dashboard</a>. The service plan ID is
   * what ties this number to the configured SMS service.
   *
   * @return servicePlanId
   */
  @JsonProperty(JSON_PROPERTY_SERVICE_PLAN_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getServicePlanId() {
    return servicePlanId;
  }

  @JsonIgnore
  public boolean getServicePlanIdDefined() {
    return servicePlanIdDefined;
  }

  @JsonProperty(JSON_PROPERTY_SERVICE_PLAN_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setServicePlanId(String servicePlanId) {
    this.servicePlanId = servicePlanId;
    this.servicePlanIdDefined = true;
  }

  public SMSConfigurationDto campaignId(String campaignId) {
    this.campaignId = campaignId;
    this.campaignIdDefined = true;
    return this;
  }

  /**
   * Only for US virtual numbers. This campaign ID relates to <a
   * href=\"https://community.sinch.com/t5/10DLC/What-is-10DLC/ta-p/7845\"
   * target=\"_blank\">10DLC numbers</a>. So, it is the current campaign ID
   * for this number. The `campaignId` is found on your TCR platform.
   *
   * @return campaignId
   */
  @JsonProperty(JSON_PROPERTY_CAMPAIGN_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getCampaignId() {
    return campaignId;
  }

  @JsonIgnore
  public boolean getCampaignIdDefined() {
    return campaignIdDefined;
  }

  @JsonProperty(JSON_PROPERTY_CAMPAIGN_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCampaignId(String campaignId) {
    this.campaignId = campaignId;
    this.campaignIdDefined = true;
  }

  public SMSConfigurationDto scheduledProvisioning(ScheduledProvisioningDto scheduledProvisioning) {
    this.scheduledProvisioning = scheduledProvisioning;
    this.scheduledProvisioningDefined = true;
    return this;
  }

  /**
   * Get scheduledProvisioning
   *
   * @return scheduledProvisioning
   */
  @JsonProperty(JSON_PROPERTY_SCHEDULED_PROVISIONING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public ScheduledProvisioningDto getScheduledProvisioning() {
    return scheduledProvisioning;
  }

  @JsonIgnore
  public boolean getScheduledProvisioningDefined() {
    return scheduledProvisioningDefined;
  }

  @JsonProperty(JSON_PROPERTY_SCHEDULED_PROVISIONING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setScheduledProvisioning(ScheduledProvisioningDto scheduledProvisioning) {
    this.scheduledProvisioning = scheduledProvisioning;
    this.scheduledProvisioningDefined = true;
  }

  /** Return true if this SMSConfiguration object is equal to o. */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SMSConfigurationDto smSConfiguration = (SMSConfigurationDto) o;
    return Objects.equals(this.servicePlanId, smSConfiguration.servicePlanId)
        && Objects.equals(this.campaignId, smSConfiguration.campaignId)
        && Objects.equals(this.scheduledProvisioning, smSConfiguration.scheduledProvisioning);
  }

  @Override
  public int hashCode() {
    return Objects.hash(servicePlanId, campaignId, scheduledProvisioning);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SMSConfigurationDto {\n");
    sb.append("    servicePlanId: ").append(toIndentedString(servicePlanId)).append("\n");
    sb.append("    campaignId: ").append(toIndentedString(campaignId)).append("\n");
    sb.append("    scheduledProvisioning: ")
        .append(toIndentedString(scheduledProvisioning))
        .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 - 2024 Weber Informatics LLC | Privacy Policy