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

com.sinch.sdk.domains.voice.models.dto.v1.UpdateNumbersDto Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/*
 * Voice API | Sinch
 * The Voice API exposes calling- and conference-related functionality in the Sinch Voice Platform.
 *
 * The version of the OpenAPI document: 1.0.1
 * 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.voice.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 com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** UpdateNumbersDto */
@JsonPropertyOrder({
  UpdateNumbersDto.JSON_PROPERTY_NUMBERS,
  UpdateNumbersDto.JSON_PROPERTY_APPLICATIONKEY,
  UpdateNumbersDto.JSON_PROPERTY_CAPABILITY
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class UpdateNumbersDto {
  private static final long serialVersionUID = 1L;
  public static final String JSON_PROPERTY_NUMBERS = "numbers";
  private List numbers;
  private boolean numbersDefined = false;

  public static final String JSON_PROPERTY_APPLICATIONKEY = "applicationkey";
  private String applicationkey;
  private boolean applicationkeyDefined = false;

  /**
   * indicates the DID capability that needs to be assigned to the chosen application. Valid values
   * are 'voice' and 'sms'. Please note that the DID needs to support the selected
   * capability.
   */
  public enum CapabilityEnum {
    VOICE("voice"),

    SMS("sms"),

    UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

    private String value;

    CapabilityEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static CapabilityEnum fromValue(String value) {
      for (CapabilityEnum b : CapabilityEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      return UNKNOWN_DEFAULT_OPEN_API;
    }
  }

  public static final String JSON_PROPERTY_CAPABILITY = "capability";
  private String capability;
  private boolean capabilityDefined = false;

  public UpdateNumbersDto() {}

  public UpdateNumbersDto numbers(List numbers) {
    this.numbers = numbers;
    this.numbersDefined = true;
    return this;
  }

  public UpdateNumbersDto addNumbersItem(String numbersItem) {
    if (this.numbers == null) {
      this.numbers = new ArrayList<>();
    }
    this.numbersDefined = true;
    this.numbers.add(numbersItem);
    return this;
  }

  /**
   * The phone number or list of numbers in E.164 format.
   *
   * @return numbers
   */
  @JsonProperty(JSON_PROPERTY_NUMBERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getNumbers() {
    return numbers;
  }

  @JsonIgnore
  public boolean getNumbersDefined() {
    return numbersDefined;
  }

  @JsonProperty(JSON_PROPERTY_NUMBERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNumbers(List numbers) {
    this.numbers = numbers;
    this.numbersDefined = true;
  }

  public UpdateNumbersDto applicationkey(String applicationkey) {
    this.applicationkey = applicationkey;
    this.applicationkeyDefined = true;
    return this;
  }

  /**
   * indicates the application where the number(s) will be assigned. If empty, the application key
   * that is used to sign the request will be used.
   *
   * @return applicationkey
   */
  @JsonProperty(JSON_PROPERTY_APPLICATIONKEY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getApplicationkey() {
    return applicationkey;
  }

  @JsonIgnore
  public boolean getApplicationkeyDefined() {
    return applicationkeyDefined;
  }

  @JsonProperty(JSON_PROPERTY_APPLICATIONKEY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setApplicationkey(String applicationkey) {
    this.applicationkey = applicationkey;
    this.applicationkeyDefined = true;
  }

  public UpdateNumbersDto capability(String capability) {
    this.capability = capability;
    this.capabilityDefined = true;
    return this;
  }

  /**
   * indicates the DID capability that needs to be assigned to the chosen application. Valid values
   * are 'voice' and 'sms'. Please note that the DID needs to support the selected
   * capability.
   *
   * @return capability
   */
  @JsonProperty(JSON_PROPERTY_CAPABILITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getCapability() {
    return capability;
  }

  @JsonIgnore
  public boolean getCapabilityDefined() {
    return capabilityDefined;
  }

  @JsonProperty(JSON_PROPERTY_CAPABILITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCapability(String capability) {
    this.capability = capability;
    this.capabilityDefined = true;
  }

  /** Return true if this updateNumbers object is equal to o. */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpdateNumbersDto updateNumbers = (UpdateNumbersDto) o;
    return Objects.equals(this.numbers, updateNumbers.numbers)
        && Objects.equals(this.applicationkey, updateNumbers.applicationkey)
        && Objects.equals(this.capability, updateNumbers.capability);
  }

  @Override
  public int hashCode() {
    return Objects.hash(numbers, applicationkey, capability);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpdateNumbersDto {\n");
    sb.append("    numbers: ").append(toIndentedString(numbers)).append("\n");
    sb.append("    applicationkey: ").append(toIndentedString(applicationkey)).append("\n");
    sb.append("    capability: ").append(toIndentedString(capability)).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