com.sinch.sdk.domains.numbers.models.dto.v1.ActiveNumberDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
/*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** The phone number that has been rented by a customer and assigned to a project. */
@JsonPropertyOrder({
ActiveNumberDto.JSON_PROPERTY_PHONE_NUMBER,
ActiveNumberDto.JSON_PROPERTY_PROJECT_ID,
ActiveNumberDto.JSON_PROPERTY_DISPLAY_NAME,
ActiveNumberDto.JSON_PROPERTY_REGION_CODE,
ActiveNumberDto.JSON_PROPERTY_TYPE,
ActiveNumberDto.JSON_PROPERTY_CAPABILITY,
ActiveNumberDto.JSON_PROPERTY_MONEY,
ActiveNumberDto.JSON_PROPERTY_PAYMENT_INTERVAL_MONTHS,
ActiveNumberDto.JSON_PROPERTY_NEXT_CHARGE_DATE,
ActiveNumberDto.JSON_PROPERTY_EXPIRE_AT,
ActiveNumberDto.JSON_PROPERTY_SMS_CONFIGURATION,
ActiveNumberDto.JSON_PROPERTY_VOICE_CONFIGURATION,
ActiveNumberDto.JSON_PROPERTY_CALLBACK_URL
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class ActiveNumberDto {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_PHONE_NUMBER = "phoneNumber";
private String phoneNumber;
private boolean phoneNumberDefined = false;
public static final String JSON_PROPERTY_PROJECT_ID = "projectId";
private String projectId;
private boolean projectIdDefined = false;
public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName";
private String displayName;
private boolean displayNameDefined = false;
public static final String JSON_PROPERTY_REGION_CODE = "regionCode";
private String regionCode;
private boolean regionCodeDefined = false;
public static final String JSON_PROPERTY_TYPE = "type";
private String type;
private boolean typeDefined = false;
public static final String JSON_PROPERTY_CAPABILITY = "capability";
private List capability;
private boolean capabilityDefined = false;
public static final String JSON_PROPERTY_MONEY = "money";
private MoneyDto money;
private boolean moneyDefined = false;
public static final String JSON_PROPERTY_PAYMENT_INTERVAL_MONTHS = "paymentIntervalMonths";
private Integer paymentIntervalMonths;
private boolean paymentIntervalMonthsDefined = false;
public static final String JSON_PROPERTY_NEXT_CHARGE_DATE = "nextChargeDate";
private OffsetDateTime nextChargeDate;
private boolean nextChargeDateDefined = false;
public static final String JSON_PROPERTY_EXPIRE_AT = "expireAt";
private OffsetDateTime expireAt;
private boolean expireAtDefined = false;
public static final String JSON_PROPERTY_SMS_CONFIGURATION = "smsConfiguration";
private SMSConfigurationDto smsConfiguration;
private boolean smsConfigurationDefined = false;
public static final String JSON_PROPERTY_VOICE_CONFIGURATION = "voiceConfiguration";
private VoiceConfigurationDto voiceConfiguration;
private boolean voiceConfigurationDefined = false;
public static final String JSON_PROPERTY_CALLBACK_URL = "callbackUrl";
private String callbackUrl;
private boolean callbackUrlDefined = false;
public ActiveNumberDto() {}
@JsonCreator
public ActiveNumberDto(
@JsonProperty(JSON_PROPERTY_REGION_CODE) String regionCode,
@JsonProperty(JSON_PROPERTY_PAYMENT_INTERVAL_MONTHS) Integer paymentIntervalMonths,
@JsonProperty(JSON_PROPERTY_NEXT_CHARGE_DATE) OffsetDateTime nextChargeDate,
@JsonProperty(JSON_PROPERTY_EXPIRE_AT) OffsetDateTime expireAt) {
this();
this.regionCode = regionCode;
this.regionCodeDefined = true;
this.paymentIntervalMonths = paymentIntervalMonths;
this.paymentIntervalMonthsDefined = true;
this.nextChargeDate = nextChargeDate;
this.nextChargeDateDefined = true;
this.expireAt = expireAt;
this.expireAtDefined = true;
}
public ActiveNumberDto phoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
this.phoneNumberDefined = true;
return this;
}
/**
* The phone number in <a
* href=\"https://community.sinch.com/t5/Glossary/E-164/ta-p/7537\"
* target=\"_blank\">E.164</a> format with leading `+`. Example:
* `+12025550134`.
*
* @return phoneNumber
*/
@JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPhoneNumber() {
return phoneNumber;
}
@JsonIgnore
public boolean getPhoneNumberDefined() {
return phoneNumberDefined;
}
@JsonProperty(JSON_PROPERTY_PHONE_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
this.phoneNumberDefined = true;
}
public ActiveNumberDto projectId(String projectId) {
this.projectId = projectId;
this.projectIdDefined = true;
return this;
}
/**
* Project ID. Your project ID can be found on your <a
* href=\"https://dashboard.sinch.com/settings/project-management\"
* target=\"_blank\">Sinch Customer Dashboard</a>.
*
* @return projectId
*/
@JsonProperty(JSON_PROPERTY_PROJECT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getProjectId() {
return projectId;
}
@JsonIgnore
public boolean getProjectIdDefined() {
return projectIdDefined;
}
@JsonProperty(JSON_PROPERTY_PROJECT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProjectId(String projectId) {
this.projectId = projectId;
this.projectIdDefined = true;
}
public ActiveNumberDto displayName(String displayName) {
this.displayName = displayName;
this.displayNameDefined = true;
return this;
}
/**
* User supplied name for the phone number.
*
* @return displayName
*/
@JsonProperty(JSON_PROPERTY_DISPLAY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDisplayName() {
return displayName;
}
@JsonIgnore
public boolean getDisplayNameDefined() {
return displayNameDefined;
}
@JsonProperty(JSON_PROPERTY_DISPLAY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDisplayName(String displayName) {
this.displayName = displayName;
this.displayNameDefined = true;
}
/**
* ISO 3166-1 alpha-2 country code of the phone number. Example `US`, `GB` or
* `SE`.
*
* @return regionCode
*/
@JsonProperty(JSON_PROPERTY_REGION_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRegionCode() {
return regionCode;
}
@JsonIgnore
public boolean getRegionCodeDefined() {
return regionCodeDefined;
}
public ActiveNumberDto type(String type) {
this.type = type;
this.typeDefined = true;
return this;
}
/**
* The number type.
*
* @return type
*/
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getType() {
return type;
}
@JsonIgnore
public boolean getTypeDefined() {
return typeDefined;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(String type) {
this.type = type;
this.typeDefined = true;
}
public ActiveNumberDto capability(List capability) {
this.capability = capability;
this.capabilityDefined = true;
return this;
}
public ActiveNumberDto addCapabilityItem(String capabilityItem) {
if (this.capability == null) {
this.capability = new ArrayList<>();
}
this.capabilityDefined = true;
this.capability.add(capabilityItem);
return this;
}
/**
* The capability of the number.
*
* @return capability
*/
@JsonProperty(JSON_PROPERTY_CAPABILITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getCapability() {
return capability;
}
@JsonIgnore
public boolean getCapabilityDefined() {
return capabilityDefined;
}
@JsonProperty(JSON_PROPERTY_CAPABILITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCapability(List capability) {
this.capability = capability;
this.capabilityDefined = true;
}
public ActiveNumberDto money(MoneyDto money) {
this.money = money;
this.moneyDefined = true;
return this;
}
/**
* Get money
*
* @return money
*/
@JsonProperty(JSON_PROPERTY_MONEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public MoneyDto getMoney() {
return money;
}
@JsonIgnore
public boolean getMoneyDefined() {
return moneyDefined;
}
@JsonProperty(JSON_PROPERTY_MONEY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMoney(MoneyDto money) {
this.money = money;
this.moneyDefined = true;
}
/**
* How often the recurring price is charged in months.
*
* @return paymentIntervalMonths
*/
@JsonProperty(JSON_PROPERTY_PAYMENT_INTERVAL_MONTHS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getPaymentIntervalMonths() {
return paymentIntervalMonths;
}
@JsonIgnore
public boolean getPaymentIntervalMonthsDefined() {
return paymentIntervalMonthsDefined;
}
/**
* The date of the next charge.
*
* @return nextChargeDate
*/
@JsonProperty(JSON_PROPERTY_NEXT_CHARGE_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getNextChargeDate() {
return nextChargeDate;
}
@JsonIgnore
public boolean getNextChargeDateDefined() {
return nextChargeDateDefined;
}
/**
* The timestamp when the subscription will expire if an expiration date has been set.
*
* @return expireAt
*/
@JsonProperty(JSON_PROPERTY_EXPIRE_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getExpireAt() {
return expireAt;
}
@JsonIgnore
public boolean getExpireAtDefined() {
return expireAtDefined;
}
public ActiveNumberDto smsConfiguration(SMSConfigurationDto smsConfiguration) {
this.smsConfiguration = smsConfiguration;
this.smsConfigurationDefined = true;
return this;
}
/**
* Get smsConfiguration
*
* @return smsConfiguration
*/
@JsonProperty(JSON_PROPERTY_SMS_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SMSConfigurationDto getSmsConfiguration() {
return smsConfiguration;
}
@JsonIgnore
public boolean getSmsConfigurationDefined() {
return smsConfigurationDefined;
}
@JsonProperty(JSON_PROPERTY_SMS_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSmsConfiguration(SMSConfigurationDto smsConfiguration) {
this.smsConfiguration = smsConfiguration;
this.smsConfigurationDefined = true;
}
public ActiveNumberDto voiceConfiguration(VoiceConfigurationDto voiceConfiguration) {
this.voiceConfiguration = voiceConfiguration;
this.voiceConfigurationDefined = true;
return this;
}
/**
* Get voiceConfiguration
*
* @return voiceConfiguration
*/
@JsonProperty(JSON_PROPERTY_VOICE_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public VoiceConfigurationDto getVoiceConfiguration() {
return voiceConfiguration;
}
@JsonIgnore
public boolean getVoiceConfigurationDefined() {
return voiceConfigurationDefined;
}
@JsonProperty(JSON_PROPERTY_VOICE_CONFIGURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setVoiceConfiguration(VoiceConfigurationDto voiceConfiguration) {
this.voiceConfiguration = voiceConfiguration;
this.voiceConfigurationDefined = true;
}
public ActiveNumberDto callbackUrl(String callbackUrl) {
this.callbackUrl = callbackUrl;
this.callbackUrlDefined = true;
return this;
}
/**
* The active number's callback URL to be called for provisioning / deprovisioning updates
*
* @return callbackUrl
*/
@JsonProperty(JSON_PROPERTY_CALLBACK_URL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCallbackUrl() {
return callbackUrl;
}
@JsonIgnore
public boolean getCallbackUrlDefined() {
return callbackUrlDefined;
}
@JsonProperty(JSON_PROPERTY_CALLBACK_URL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCallbackUrl(String callbackUrl) {
this.callbackUrl = callbackUrl;
this.callbackUrlDefined = true;
}
/** Return true if this ActiveNumber object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActiveNumberDto activeNumber = (ActiveNumberDto) o;
return Objects.equals(this.phoneNumber, activeNumber.phoneNumber)
&& Objects.equals(this.projectId, activeNumber.projectId)
&& Objects.equals(this.displayName, activeNumber.displayName)
&& Objects.equals(this.regionCode, activeNumber.regionCode)
&& Objects.equals(this.type, activeNumber.type)
&& Objects.equals(this.capability, activeNumber.capability)
&& Objects.equals(this.money, activeNumber.money)
&& Objects.equals(this.paymentIntervalMonths, activeNumber.paymentIntervalMonths)
&& Objects.equals(this.nextChargeDate, activeNumber.nextChargeDate)
&& Objects.equals(this.expireAt, activeNumber.expireAt)
&& Objects.equals(this.smsConfiguration, activeNumber.smsConfiguration)
&& Objects.equals(this.voiceConfiguration, activeNumber.voiceConfiguration)
&& Objects.equals(this.callbackUrl, activeNumber.callbackUrl);
}
@Override
public int hashCode() {
return Objects.hash(
phoneNumber,
projectId,
displayName,
regionCode,
type,
capability,
money,
paymentIntervalMonths,
nextChargeDate,
expireAt,
smsConfiguration,
voiceConfiguration,
callbackUrl);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ActiveNumberDto {\n");
sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
sb.append(" regionCode: ").append(toIndentedString(regionCode)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" capability: ").append(toIndentedString(capability)).append("\n");
sb.append(" money: ").append(toIndentedString(money)).append("\n");
sb.append(" paymentIntervalMonths: ")
.append(toIndentedString(paymentIntervalMonths))
.append("\n");
sb.append(" nextChargeDate: ").append(toIndentedString(nextChargeDate)).append("\n");
sb.append(" expireAt: ").append(toIndentedString(expireAt)).append("\n");
sb.append(" smsConfiguration: ").append(toIndentedString(smsConfiguration)).append("\n");
sb.append(" voiceConfiguration: ").append(toIndentedString(voiceConfiguration)).append("\n");
sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).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