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

com.sinch.sdk.domains.numbers.models.dto.v1.VoiceConfigurationDto 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.JsonCreator;
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.time.OffsetDateTime;
import java.util.Objects;

/**
 * The current voice configuration for this number. During scheduled provisioning, the app ID value
 * may be empty in a response if it is still processing or if it has failed. The status of scheduled
 * provisioning will show under a `scheduledVoiceProvisioning` object if it's still
 * running. Once processed successfully, the `appId` sent will appear directly under the
 * `voiceConfiguration` object.
 */
@JsonPropertyOrder({
  VoiceConfigurationDto.JSON_PROPERTY_APP_ID,
  VoiceConfigurationDto.JSON_PROPERTY_LAST_UPDATED_TIME,
  VoiceConfigurationDto.JSON_PROPERTY_SCHEDULED_VOICE_PROVISIONING
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class VoiceConfigurationDto {
  private static final long serialVersionUID = 1L;
  public static final String JSON_PROPERTY_APP_ID = "appId";
  private String appId;
  private boolean appIdDefined = false;

  public static final String JSON_PROPERTY_LAST_UPDATED_TIME = "lastUpdatedTime";
  private OffsetDateTime lastUpdatedTime;
  private boolean lastUpdatedTimeDefined = false;

  public static final String JSON_PROPERTY_SCHEDULED_VOICE_PROVISIONING =
      "scheduledVoiceProvisioning";
  private ScheduledVoiceProvisioningDto scheduledVoiceProvisioning;
  private boolean scheduledVoiceProvisioningDefined = false;

  public VoiceConfigurationDto() {}

  @JsonCreator
  public VoiceConfigurationDto(
      @JsonProperty(JSON_PROPERTY_LAST_UPDATED_TIME) OffsetDateTime lastUpdatedTime) {
    this();
    this.lastUpdatedTime = lastUpdatedTime;
    this.lastUpdatedTimeDefined = true;
  }

  public VoiceConfigurationDto appId(String appId) {
    this.appId = appId;
    this.appIdDefined = true;
    return this;
  }

  /**
   * Your app ID for the Voice API. The `appId` can be found in your <a
   * href=\"https://dashboard.sinch.com/voice/apps\"
   * target=\"_blank\">Sinch Customer Dashboard</a> under Voice, then apps.
   *
   * @return appId
   */
  @JsonProperty(JSON_PROPERTY_APP_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getAppId() {
    return appId;
  }

  @JsonIgnore
  public boolean getAppIdDefined() {
    return appIdDefined;
  }

  @JsonProperty(JSON_PROPERTY_APP_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAppId(String appId) {
    this.appId = appId;
    this.appIdDefined = true;
  }

  /**
   * Timestamp when the status was last updated.
   *
   * @return lastUpdatedTime
   */
  @JsonProperty(JSON_PROPERTY_LAST_UPDATED_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public OffsetDateTime getLastUpdatedTime() {
    return lastUpdatedTime;
  }

  @JsonIgnore
  public boolean getLastUpdatedTimeDefined() {
    return lastUpdatedTimeDefined;
  }

  public VoiceConfigurationDto scheduledVoiceProvisioning(
      ScheduledVoiceProvisioningDto scheduledVoiceProvisioning) {
    this.scheduledVoiceProvisioning = scheduledVoiceProvisioning;
    this.scheduledVoiceProvisioningDefined = true;
    return this;
  }

  /**
   * Get scheduledVoiceProvisioning
   *
   * @return scheduledVoiceProvisioning
   */
  @JsonProperty(JSON_PROPERTY_SCHEDULED_VOICE_PROVISIONING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public ScheduledVoiceProvisioningDto getScheduledVoiceProvisioning() {
    return scheduledVoiceProvisioning;
  }

  @JsonIgnore
  public boolean getScheduledVoiceProvisioningDefined() {
    return scheduledVoiceProvisioningDefined;
  }

  @JsonProperty(JSON_PROPERTY_SCHEDULED_VOICE_PROVISIONING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setScheduledVoiceProvisioning(
      ScheduledVoiceProvisioningDto scheduledVoiceProvisioning) {
    this.scheduledVoiceProvisioning = scheduledVoiceProvisioning;
    this.scheduledVoiceProvisioningDefined = true;
  }

  /** Return true if this VoiceConfiguration object is equal to o. */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VoiceConfigurationDto voiceConfiguration = (VoiceConfigurationDto) o;
    return Objects.equals(this.appId, voiceConfiguration.appId)
        && Objects.equals(this.lastUpdatedTime, voiceConfiguration.lastUpdatedTime)
        && Objects.equals(
            this.scheduledVoiceProvisioning, voiceConfiguration.scheduledVoiceProvisioning);
  }

  @Override
  public int hashCode() {
    return Objects.hash(appId, lastUpdatedTime, scheduledVoiceProvisioning);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class VoiceConfigurationDto {\n");
    sb.append("    appId: ").append(toIndentedString(appId)).append("\n");
    sb.append("    lastUpdatedTime: ").append(toIndentedString(lastUpdatedTime)).append("\n");
    sb.append("    scheduledVoiceProvisioning: ")
        .append(toIndentedString(scheduledVoiceProvisioning))
        .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