Package com.bandwidth.sdk.model
Class MachineDetectionConfiguration
- java.lang.Object
-
- com.bandwidth.sdk.model.MachineDetectionConfiguration
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-08-29T14:24:34.966664-04:00[America/New_York]") public class MachineDetectionConfiguration extends Object
The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MachineDetectionConfiguration.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_CALLBACK_METHOD
static String
SERIALIZED_NAME_CALLBACK_URL
static String
SERIALIZED_NAME_DELAY_RESULT
static String
SERIALIZED_NAME_DETECTION_TIMEOUT
static String
SERIALIZED_NAME_FALLBACK_METHOD
static String
SERIALIZED_NAME_FALLBACK_PASSWORD
static String
SERIALIZED_NAME_FALLBACK_URL
static String
SERIALIZED_NAME_FALLBACK_USERNAME
static String
SERIALIZED_NAME_MACHINE_SPEECH_END_THRESHOLD
static String
SERIALIZED_NAME_MODE
static String
SERIALIZED_NAME_PASSWORD
static String
SERIALIZED_NAME_SILENCE_TIMEOUT
static String
SERIALIZED_NAME_SPEECH_END_THRESHOLD
static String
SERIALIZED_NAME_SPEECH_THRESHOLD
static String
SERIALIZED_NAME_USERNAME
-
Constructor Summary
Constructors Constructor Description MachineDetectionConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MachineDetectionConfiguration
callbackMethod(CallbackMethodEnum callbackMethod)
MachineDetectionConfiguration
callbackUrl(URI callbackUrl)
MachineDetectionConfiguration
delayResult(Boolean delayResult)
MachineDetectionConfiguration
detectionTimeout(Double detectionTimeout)
boolean
equals(Object o)
MachineDetectionConfiguration
fallbackMethod(CallbackMethodEnum fallbackMethod)
MachineDetectionConfiguration
fallbackPassword(String fallbackPassword)
MachineDetectionConfiguration
fallbackUrl(URI fallbackUrl)
MachineDetectionConfiguration
fallbackUsername(String fallbackUsername)
static MachineDetectionConfiguration
fromJson(String jsonString)
Create an instance of MachineDetectionConfiguration given an JSON stringMap<String,Object>
getAdditionalProperties()
Return the additional (undeclared) property.Object
getAdditionalProperty(String key)
Return the additional (undeclared) property with the specified name.CallbackMethodEnum
getCallbackMethod()
Get callbackMethodURI
getCallbackUrl()
The URL to send the 'machineDetectionComplete' webhook when the detection is completed.Boolean
getDelayResult()
If set to 'true' and if an answering machine is detected, the 'answering-machine' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the 'detectionTimeout' is exceeded.Double
getDetectionTimeout()
The timeout used for the whole operation, in seconds.CallbackMethodEnum
getFallbackMethod()
Get fallbackMethodString
getFallbackPassword()
Basic auth password.URI
getFallbackUrl()
A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respondString
getFallbackUsername()
Basic auth username.Double
getMachineSpeechEndThreshold()
When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing.MachineDetectionModeEnum
getMode()
Get modeString
getPassword()
Basic auth password.Double
getSilenceTimeout()
If no speech is detected in this period, a callback with a 'silence' result is sent.Double
getSpeechEndThreshold()
Amount of silence (in seconds) before assuming the callee has finished speaking.Double
getSpeechThreshold()
When speech has ended and a result couldn't be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration.String
getUsername()
Basic auth username.int
hashCode()
MachineDetectionConfiguration
machineSpeechEndThreshold(Double machineSpeechEndThreshold)
MachineDetectionConfiguration
mode(MachineDetectionModeEnum mode)
MachineDetectionConfiguration
password(String password)
MachineDetectionConfiguration
putAdditionalProperty(String key, Object value)
Set the additional (undeclared) property with the specified name and value.void
setCallbackMethod(CallbackMethodEnum callbackMethod)
void
setCallbackUrl(URI callbackUrl)
void
setDelayResult(Boolean delayResult)
void
setDetectionTimeout(Double detectionTimeout)
void
setFallbackMethod(CallbackMethodEnum fallbackMethod)
void
setFallbackPassword(String fallbackPassword)
void
setFallbackUrl(URI fallbackUrl)
void
setFallbackUsername(String fallbackUsername)
void
setMachineSpeechEndThreshold(Double machineSpeechEndThreshold)
void
setMode(MachineDetectionModeEnum mode)
void
setPassword(String password)
void
setSilenceTimeout(Double silenceTimeout)
void
setSpeechEndThreshold(Double speechEndThreshold)
void
setSpeechThreshold(Double speechThreshold)
void
setUsername(String username)
MachineDetectionConfiguration
silenceTimeout(Double silenceTimeout)
MachineDetectionConfiguration
speechEndThreshold(Double speechEndThreshold)
MachineDetectionConfiguration
speechThreshold(Double speechThreshold)
String
toJson()
Convert an instance of MachineDetectionConfiguration to an JSON stringString
toString()
MachineDetectionConfiguration
username(String username)
static void
validateJsonElement(com.google.gson.JsonElement jsonElement)
Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_MODE
public static final String SERIALIZED_NAME_MODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DETECTION_TIMEOUT
public static final String SERIALIZED_NAME_DETECTION_TIMEOUT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SILENCE_TIMEOUT
public static final String SERIALIZED_NAME_SILENCE_TIMEOUT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SPEECH_THRESHOLD
public static final String SERIALIZED_NAME_SPEECH_THRESHOLD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SPEECH_END_THRESHOLD
public static final String SERIALIZED_NAME_SPEECH_END_THRESHOLD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MACHINE_SPEECH_END_THRESHOLD
public static final String SERIALIZED_NAME_MACHINE_SPEECH_END_THRESHOLD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DELAY_RESULT
public static final String SERIALIZED_NAME_DELAY_RESULT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CALLBACK_URL
public static final String SERIALIZED_NAME_CALLBACK_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CALLBACK_METHOD
public static final String SERIALIZED_NAME_CALLBACK_METHOD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_USERNAME
public static final String SERIALIZED_NAME_USERNAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PASSWORD
public static final String SERIALIZED_NAME_PASSWORD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FALLBACK_URL
public static final String SERIALIZED_NAME_FALLBACK_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FALLBACK_METHOD
public static final String SERIALIZED_NAME_FALLBACK_METHOD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FALLBACK_USERNAME
public static final String SERIALIZED_NAME_FALLBACK_USERNAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FALLBACK_PASSWORD
public static final String SERIALIZED_NAME_FALLBACK_PASSWORD
- See Also:
- Constant Field Values
-
-
Method Detail
-
mode
public MachineDetectionConfiguration mode(MachineDetectionModeEnum mode)
-
getMode
@Nullable public MachineDetectionModeEnum getMode()
Get mode- Returns:
- mode
-
setMode
public void setMode(MachineDetectionModeEnum mode)
-
detectionTimeout
public MachineDetectionConfiguration detectionTimeout(Double detectionTimeout)
-
getDetectionTimeout
@Nullable public Double getDetectionTimeout()
The timeout used for the whole operation, in seconds. If no result is determined in this period, a callback with a `timeout` result is sent.- Returns:
- detectionTimeout
-
setDetectionTimeout
public void setDetectionTimeout(Double detectionTimeout)
-
silenceTimeout
public MachineDetectionConfiguration silenceTimeout(Double silenceTimeout)
-
getSilenceTimeout
@Nullable public Double getSilenceTimeout()
If no speech is detected in this period, a callback with a 'silence' result is sent.- Returns:
- silenceTimeout
-
setSilenceTimeout
public void setSilenceTimeout(Double silenceTimeout)
-
speechThreshold
public MachineDetectionConfiguration speechThreshold(Double speechThreshold)
-
getSpeechThreshold
@Nullable public Double getSpeechThreshold()
When speech has ended and a result couldn't be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration. If the length of the speech detected is greater than or equal to this threshold, the result will be 'answering-machine'. If the length of speech detected is below this threshold, the result will be 'human'.- Returns:
- speechThreshold
-
setSpeechThreshold
public void setSpeechThreshold(Double speechThreshold)
-
speechEndThreshold
public MachineDetectionConfiguration speechEndThreshold(Double speechEndThreshold)
-
getSpeechEndThreshold
@Nullable public Double getSpeechEndThreshold()
Amount of silence (in seconds) before assuming the callee has finished speaking.- Returns:
- speechEndThreshold
-
setSpeechEndThreshold
public void setSpeechEndThreshold(Double speechEndThreshold)
-
machineSpeechEndThreshold
public MachineDetectionConfiguration machineSpeechEndThreshold(Double machineSpeechEndThreshold)
-
getMachineSpeechEndThreshold
@Nullable public Double getMachineSpeechEndThreshold()
When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value.- Returns:
- machineSpeechEndThreshold
-
setMachineSpeechEndThreshold
public void setMachineSpeechEndThreshold(Double machineSpeechEndThreshold)
-
delayResult
public MachineDetectionConfiguration delayResult(Boolean delayResult)
-
getDelayResult
@Nullable public Boolean getDelayResult()
If set to 'true' and if an answering machine is detected, the 'answering-machine' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the 'detectionTimeout' is exceeded. If false, the 'answering-machine' result is sent immediately.- Returns:
- delayResult
-
setDelayResult
public void setDelayResult(Boolean delayResult)
-
callbackUrl
public MachineDetectionConfiguration callbackUrl(URI callbackUrl)
-
getCallbackUrl
@Nullable public URI getCallbackUrl()
The URL to send the 'machineDetectionComplete' webhook when the detection is completed. Only for 'async' mode.- Returns:
- callbackUrl
-
setCallbackUrl
public void setCallbackUrl(URI callbackUrl)
-
callbackMethod
public MachineDetectionConfiguration callbackMethod(CallbackMethodEnum callbackMethod)
-
getCallbackMethod
@Nullable public CallbackMethodEnum getCallbackMethod()
Get callbackMethod- Returns:
- callbackMethod
-
setCallbackMethod
public void setCallbackMethod(CallbackMethodEnum callbackMethod)
-
username
public MachineDetectionConfiguration username(String username)
-
getUsername
@Nullable public String getUsername()
Basic auth username.- Returns:
- username
-
setUsername
public void setUsername(String username)
-
password
public MachineDetectionConfiguration password(String password)
-
getPassword
@Nullable public String getPassword()
Basic auth password.- Returns:
- password
-
setPassword
public void setPassword(String password)
-
fallbackUrl
public MachineDetectionConfiguration fallbackUrl(URI fallbackUrl)
-
getFallbackUrl
@Nullable public URI getFallbackUrl()
A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respond- Returns:
- fallbackUrl
-
setFallbackUrl
public void setFallbackUrl(URI fallbackUrl)
-
fallbackMethod
public MachineDetectionConfiguration fallbackMethod(CallbackMethodEnum fallbackMethod)
-
getFallbackMethod
@Nullable public CallbackMethodEnum getFallbackMethod()
Get fallbackMethod- Returns:
- fallbackMethod
-
setFallbackMethod
public void setFallbackMethod(CallbackMethodEnum fallbackMethod)
-
fallbackUsername
public MachineDetectionConfiguration fallbackUsername(String fallbackUsername)
-
getFallbackUsername
@Nullable public String getFallbackUsername()
Basic auth username.- Returns:
- fallbackUsername
-
setFallbackUsername
public void setFallbackUsername(String fallbackUsername)
-
fallbackPassword
public MachineDetectionConfiguration fallbackPassword(String fallbackPassword)
-
getFallbackPassword
@Nullable public String getFallbackPassword()
Basic auth password.- Returns:
- fallbackPassword
-
setFallbackPassword
public void setFallbackPassword(String fallbackPassword)
-
putAdditionalProperty
public MachineDetectionConfiguration putAdditionalProperty(String key, Object value)
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key
- name of the propertyvalue
- value of the property- Returns:
- the MachineDetectionConfiguration instance itself
-
getAdditionalProperties
public Map<String,Object> getAdditionalProperties()
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
public Object getAdditionalProperty(String key)
Return the additional (undeclared) property with the specified name.- Parameters:
key
- name of the property- Returns:
- an object
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to MachineDetectionConfiguration
-
fromJson
public static MachineDetectionConfiguration fromJson(String jsonString) throws IOException
Create an instance of MachineDetectionConfiguration given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of MachineDetectionConfiguration
- Throws:
IOException
- if the JSON string is invalid with respect to MachineDetectionConfiguration
-
toJson
public String toJson()
Convert an instance of MachineDetectionConfiguration to an JSON string- Returns:
- JSON string
-
-