com.sinch.sdk.domains.voice.models.dto.v1.AceRequestAllOfAmdDto 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.
/*
* 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.Objects;
/**
* If [Answering Machine Detection](/docs/voice/api-reference/amd_v2) (AMD) is enabled, this object
* contains information about whether the call was answered by a machine.
*/
@JsonPropertyOrder({
AceRequestAllOfAmdDto.JSON_PROPERTY_STATUS,
AceRequestAllOfAmdDto.JSON_PROPERTY_REASON,
AceRequestAllOfAmdDto.JSON_PROPERTY_DURATION
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class AceRequestAllOfAmdDto {
private static final long serialVersionUID = 1L;
/** The determination by the system of who answered the call. */
public enum StatusEnum {
MACHINE("machine"),
HUMAN("human"),
NOTSURE("notsure"),
HANGUP("hangup"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
StatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return UNKNOWN_DEFAULT_OPEN_API;
}
}
public static final String JSON_PROPERTY_STATUS = "status";
private String status;
private boolean statusDefined = false;
/** The reason that the system used to determine who answered the call. */
public enum ReasonEnum {
LONGGREETING("longgreeting"),
INITIALSILENCE("initialsilence"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
ReasonEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ReasonEnum fromValue(String value) {
for (ReasonEnum b : ReasonEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return UNKNOWN_DEFAULT_OPEN_API;
}
}
public static final String JSON_PROPERTY_REASON = "reason";
private String reason;
private boolean reasonDefined = false;
public static final String JSON_PROPERTY_DURATION = "duration";
private Integer duration;
private boolean durationDefined = false;
public AceRequestAllOfAmdDto() {}
public AceRequestAllOfAmdDto status(String status) {
this.status = status;
this.statusDefined = true;
return this;
}
/**
* The determination by the system of who answered the call.
*
* @return status
*/
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStatus() {
return status;
}
@JsonIgnore
public boolean getStatusDefined() {
return statusDefined;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(String status) {
this.status = status;
this.statusDefined = true;
}
public AceRequestAllOfAmdDto reason(String reason) {
this.reason = reason;
this.reasonDefined = true;
return this;
}
/**
* The reason that the system used to determine who answered the call.
*
* @return reason
*/
@JsonProperty(JSON_PROPERTY_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getReason() {
return reason;
}
@JsonIgnore
public boolean getReasonDefined() {
return reasonDefined;
}
@JsonProperty(JSON_PROPERTY_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReason(String reason) {
this.reason = reason;
this.reasonDefined = true;
}
public AceRequestAllOfAmdDto duration(Integer duration) {
this.duration = duration;
this.durationDefined = true;
return this;
}
/**
* The length of the call.
*
* @return duration
*/
@JsonProperty(JSON_PROPERTY_DURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getDuration() {
return duration;
}
@JsonIgnore
public boolean getDurationDefined() {
return durationDefined;
}
@JsonProperty(JSON_PROPERTY_DURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDuration(Integer duration) {
this.duration = duration;
this.durationDefined = true;
}
/** Return true if this aceRequest_allOf_amd object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AceRequestAllOfAmdDto aceRequestAllOfAmd = (AceRequestAllOfAmdDto) o;
return Objects.equals(this.status, aceRequestAllOfAmd.status)
&& Objects.equals(this.reason, aceRequestAllOfAmd.reason)
&& Objects.equals(this.duration, aceRequestAllOfAmd.duration);
}
@Override
public int hashCode() {
return Objects.hash(status, reason, duration);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AceRequestAllOfAmdDto {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append(" duration: ").append(toIndentedString(duration)).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