Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Telnyx API
* SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
*
* The version of the OpenAPI document: 2.0.0
* 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.telnyx.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.telnyx.sdk.model.OutboundVoiceProfileWritableCallRecording;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.telnyx.sdk.JSON;
/**
* OutboundVoiceProfileWritable
*/
@JsonPropertyOrder({
OutboundVoiceProfileWritable.JSON_PROPERTY_NAME,
OutboundVoiceProfileWritable.JSON_PROPERTY_TRAFFIC_TYPE,
OutboundVoiceProfileWritable.JSON_PROPERTY_SERVICE_PLAN,
OutboundVoiceProfileWritable.JSON_PROPERTY_CONCURRENT_CALL_LIMIT,
OutboundVoiceProfileWritable.JSON_PROPERTY_ENABLED,
OutboundVoiceProfileWritable.JSON_PROPERTY_TAGS,
OutboundVoiceProfileWritable.JSON_PROPERTY_USAGE_PAYMENT_METHOD,
OutboundVoiceProfileWritable.JSON_PROPERTY_WHITELISTED_DESTINATIONS,
OutboundVoiceProfileWritable.JSON_PROPERTY_MAX_DESTINATION_RATE,
OutboundVoiceProfileWritable.JSON_PROPERTY_DAILY_SPEND_LIMIT,
OutboundVoiceProfileWritable.JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED,
OutboundVoiceProfileWritable.JSON_PROPERTY_CALL_RECORDING,
OutboundVoiceProfileWritable.JSON_PROPERTY_BILLING_GROUP_ID
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class OutboundVoiceProfileWritable {
public static final String JSON_PROPERTY_NAME = "name";
private String name = "";
/**
* Specifies the type of traffic allowed in this profile.
*/
public enum TrafficTypeEnum {
CONVERSATIONAL("conversational"),
SHORT_DURATION("short_duration");
private String value;
TrafficTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TrafficTypeEnum fromValue(String value) {
for (TrafficTypeEnum b : TrafficTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_TRAFFIC_TYPE = "traffic_type";
private TrafficTypeEnum trafficType = TrafficTypeEnum.CONVERSATIONAL;
/**
* Indicates the coverage of the termination regions. International and Global are the same but International may only be used for high volume/short duration Outbound Voice Profiles.
*/
public enum ServicePlanEnum {
US("us"),
INTERNATIONAL("international"),
GLOBAL("global");
private String value;
ServicePlanEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ServicePlanEnum fromValue(String value) {
for (ServicePlanEnum b : ServicePlanEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_SERVICE_PLAN = "service_plan";
private ServicePlanEnum servicePlan = ServicePlanEnum.GLOBAL;
public static final String JSON_PROPERTY_CONCURRENT_CALL_LIMIT = "concurrent_call_limit";
private Integer concurrentCallLimit;
public static final String JSON_PROPERTY_ENABLED = "enabled";
private Boolean enabled = true;
public static final String JSON_PROPERTY_TAGS = "tags";
private List tags = null;
/**
* Setting for how costs for outbound profile are calculated.
*/
public enum UsagePaymentMethodEnum {
TARIFF("tariff"),
RATE_DECK("rate-deck");
private String value;
UsagePaymentMethodEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static UsagePaymentMethodEnum fromValue(String value) {
for (UsagePaymentMethodEnum b : UsagePaymentMethodEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_USAGE_PAYMENT_METHOD = "usage_payment_method";
private UsagePaymentMethodEnum usagePaymentMethod = UsagePaymentMethodEnum.RATE_DECK;
public static final String JSON_PROPERTY_WHITELISTED_DESTINATIONS = "whitelisted_destinations";
private List whitelistedDestinations = null;
public static final String JSON_PROPERTY_MAX_DESTINATION_RATE = "max_destination_rate";
private BigDecimal maxDestinationRate;
public static final String JSON_PROPERTY_DAILY_SPEND_LIMIT = "daily_spend_limit";
private String dailySpendLimit;
public static final String JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED = "daily_spend_limit_enabled";
private Boolean dailySpendLimitEnabled = false;
public static final String JSON_PROPERTY_CALL_RECORDING = "call_recording";
private OutboundVoiceProfileWritableCallRecording callRecording;
public static final String JSON_PROPERTY_BILLING_GROUP_ID = "billing_group_id";
private UUID billingGroupId;
public OutboundVoiceProfileWritable name(String name) {
this.name = name;
return this;
}
/**
* A user-supplied name to help with organization.
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "office", value = "A user-supplied name to help with organization.")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public OutboundVoiceProfileWritable trafficType(TrafficTypeEnum trafficType) {
this.trafficType = trafficType;
return this;
}
/**
* Specifies the type of traffic allowed in this profile.
* @return trafficType
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "conversational", value = "Specifies the type of traffic allowed in this profile.")
@JsonProperty(JSON_PROPERTY_TRAFFIC_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TrafficTypeEnum getTrafficType() {
return trafficType;
}
public void setTrafficType(TrafficTypeEnum trafficType) {
this.trafficType = trafficType;
}
public OutboundVoiceProfileWritable servicePlan(ServicePlanEnum servicePlan) {
this.servicePlan = servicePlan;
return this;
}
/**
* Indicates the coverage of the termination regions. International and Global are the same but International may only be used for high volume/short duration Outbound Voice Profiles.
* @return servicePlan
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "global", value = "Indicates the coverage of the termination regions. International and Global are the same but International may only be used for high volume/short duration Outbound Voice Profiles.")
@JsonProperty(JSON_PROPERTY_SERVICE_PLAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ServicePlanEnum getServicePlan() {
return servicePlan;
}
public void setServicePlan(ServicePlanEnum servicePlan) {
this.servicePlan = servicePlan;
}
public OutboundVoiceProfileWritable concurrentCallLimit(Integer concurrentCallLimit) {
this.concurrentCallLimit = concurrentCallLimit;
return this;
}
/**
* Must be no more than your global concurrent call limit. Null means no limit.
* @return concurrentCallLimit
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "10", value = "Must be no more than your global concurrent call limit. Null means no limit.")
@JsonProperty(JSON_PROPERTY_CONCURRENT_CALL_LIMIT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getConcurrentCallLimit() {
return concurrentCallLimit;
}
public void setConcurrentCallLimit(Integer concurrentCallLimit) {
this.concurrentCallLimit = concurrentCallLimit;
}
public OutboundVoiceProfileWritable enabled(Boolean enabled) {
this.enabled = enabled;
return this;
}
/**
* Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.
* @return enabled
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "Specifies whether the outbound voice profile can be used. Disabled profiles will result in outbound calls being blocked for the associated Connections.")
@JsonProperty(JSON_PROPERTY_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public OutboundVoiceProfileWritable tags(List tags) {
this.tags = tags;
return this;
}
public OutboundVoiceProfileWritable addTagsItem(String tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}
/**
* Get tags
* @return tags
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[\"office-profile\"]", value = "")
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getTags() {
return tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public OutboundVoiceProfileWritable usagePaymentMethod(UsagePaymentMethodEnum usagePaymentMethod) {
this.usagePaymentMethod = usagePaymentMethod;
return this;
}
/**
* Setting for how costs for outbound profile are calculated.
* @return usagePaymentMethod
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "tariff", value = "Setting for how costs for outbound profile are calculated.")
@JsonProperty(JSON_PROPERTY_USAGE_PAYMENT_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UsagePaymentMethodEnum getUsagePaymentMethod() {
return usagePaymentMethod;
}
public void setUsagePaymentMethod(UsagePaymentMethodEnum usagePaymentMethod) {
this.usagePaymentMethod = usagePaymentMethod;
}
public OutboundVoiceProfileWritable whitelistedDestinations(List whitelistedDestinations) {
this.whitelistedDestinations = whitelistedDestinations;
return this;
}
public OutboundVoiceProfileWritable addWhitelistedDestinationsItem(String whitelistedDestinationsItem) {
if (this.whitelistedDestinations == null) {
this.whitelistedDestinations = new ArrayList<>();
}
this.whitelistedDestinations.add(whitelistedDestinationsItem);
return this;
}
/**
* The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.
* @return whitelistedDestinations
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[\"US\",\"BR\",\"AU\"]", value = "The list of destinations you want to be able to call using this outbound voice profile formatted in alpha2.")
@JsonProperty(JSON_PROPERTY_WHITELISTED_DESTINATIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getWhitelistedDestinations() {
return whitelistedDestinations;
}
public void setWhitelistedDestinations(List whitelistedDestinations) {
this.whitelistedDestinations = whitelistedDestinations;
}
public OutboundVoiceProfileWritable maxDestinationRate(BigDecimal maxDestinationRate) {
this.maxDestinationRate = maxDestinationRate;
return this;
}
/**
* Maximum rate (price per minute) for a Destination to be allowed when making outbound calls.
* @return maxDestinationRate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Maximum rate (price per minute) for a Destination to be allowed when making outbound calls.")
@JsonProperty(JSON_PROPERTY_MAX_DESTINATION_RATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getMaxDestinationRate() {
return maxDestinationRate;
}
public void setMaxDestinationRate(BigDecimal maxDestinationRate) {
this.maxDestinationRate = maxDestinationRate;
}
public OutboundVoiceProfileWritable dailySpendLimit(String dailySpendLimit) {
this.dailySpendLimit = dailySpendLimit;
return this;
}
/**
* The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.
* @return dailySpendLimit
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "100.00", value = "The maximum amount of usage charges, in USD, you want Telnyx to allow on this outbound voice profile in a day before disallowing new calls.")
@JsonProperty(JSON_PROPERTY_DAILY_SPEND_LIMIT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDailySpendLimit() {
return dailySpendLimit;
}
public void setDailySpendLimit(String dailySpendLimit) {
this.dailySpendLimit = dailySpendLimit;
}
public OutboundVoiceProfileWritable dailySpendLimitEnabled(Boolean dailySpendLimitEnabled) {
this.dailySpendLimitEnabled = dailySpendLimitEnabled;
return this;
}
/**
* Specifies whether to enforce the daily_spend_limit on this outbound voice profile.
* @return dailySpendLimitEnabled
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "Specifies whether to enforce the daily_spend_limit on this outbound voice profile.")
@JsonProperty(JSON_PROPERTY_DAILY_SPEND_LIMIT_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getDailySpendLimitEnabled() {
return dailySpendLimitEnabled;
}
public void setDailySpendLimitEnabled(Boolean dailySpendLimitEnabled) {
this.dailySpendLimitEnabled = dailySpendLimitEnabled;
}
public OutboundVoiceProfileWritable callRecording(OutboundVoiceProfileWritableCallRecording callRecording) {
this.callRecording = callRecording;
return this;
}
/**
* Get callRecording
* @return callRecording
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CALL_RECORDING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OutboundVoiceProfileWritableCallRecording getCallRecording() {
return callRecording;
}
public void setCallRecording(OutboundVoiceProfileWritableCallRecording callRecording) {
this.callRecording = callRecording;
}
public OutboundVoiceProfileWritable billingGroupId(UUID billingGroupId) {
this.billingGroupId = billingGroupId;
return this;
}
/**
* The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).
* @return billingGroupId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "6a09cdc3-8948-47f0-aa62-74ac943d6c58", value = "The ID of the billing group associated with the outbound proflile. Defaults to null (for no group assigned).")
@JsonProperty(JSON_PROPERTY_BILLING_GROUP_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UUID getBillingGroupId() {
return billingGroupId;
}
public void setBillingGroupId(UUID billingGroupId) {
this.billingGroupId = billingGroupId;
}
/**
* Return true if this OutboundVoiceProfileWritable object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OutboundVoiceProfileWritable outboundVoiceProfileWritable = (OutboundVoiceProfileWritable) o;
return Objects.equals(this.name, outboundVoiceProfileWritable.name) &&
Objects.equals(this.trafficType, outboundVoiceProfileWritable.trafficType) &&
Objects.equals(this.servicePlan, outboundVoiceProfileWritable.servicePlan) &&
Objects.equals(this.concurrentCallLimit, outboundVoiceProfileWritable.concurrentCallLimit) &&
Objects.equals(this.enabled, outboundVoiceProfileWritable.enabled) &&
Objects.equals(this.tags, outboundVoiceProfileWritable.tags) &&
Objects.equals(this.usagePaymentMethod, outboundVoiceProfileWritable.usagePaymentMethod) &&
Objects.equals(this.whitelistedDestinations, outboundVoiceProfileWritable.whitelistedDestinations) &&
Objects.equals(this.maxDestinationRate, outboundVoiceProfileWritable.maxDestinationRate) &&
Objects.equals(this.dailySpendLimit, outboundVoiceProfileWritable.dailySpendLimit) &&
Objects.equals(this.dailySpendLimitEnabled, outboundVoiceProfileWritable.dailySpendLimitEnabled) &&
Objects.equals(this.callRecording, outboundVoiceProfileWritable.callRecording) &&
Objects.equals(this.billingGroupId, outboundVoiceProfileWritable.billingGroupId);
}
@Override
public int hashCode() {
return Objects.hash(name, trafficType, servicePlan, concurrentCallLimit, enabled, tags, usagePaymentMethod, whitelistedDestinations, maxDestinationRate, dailySpendLimit, dailySpendLimitEnabled, callRecording, billingGroupId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OutboundVoiceProfileWritable {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" trafficType: ").append(toIndentedString(trafficType)).append("\n");
sb.append(" servicePlan: ").append(toIndentedString(servicePlan)).append("\n");
sb.append(" concurrentCallLimit: ").append(toIndentedString(concurrentCallLimit)).append("\n");
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" usagePaymentMethod: ").append(toIndentedString(usagePaymentMethod)).append("\n");
sb.append(" whitelistedDestinations: ").append(toIndentedString(whitelistedDestinations)).append("\n");
sb.append(" maxDestinationRate: ").append(toIndentedString(maxDestinationRate)).append("\n");
sb.append(" dailySpendLimit: ").append(toIndentedString(dailySpendLimit)).append("\n");
sb.append(" dailySpendLimitEnabled: ").append(toIndentedString(dailySpendLimitEnabled)).append("\n");
sb.append(" callRecording: ").append(toIndentedString(callRecording)).append("\n");
sb.append(" billingGroupId: ").append(toIndentedString(billingGroupId)).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 ");
}
}