Class MachineDetectionConfiguration

java.lang.Object
com.bandwidth.sdk.model.MachineDetectionConfiguration

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.6.0") public class MachineDetectionConfiguration extends Object
The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call. Currently, there is an issue where decimal values are not getting processed correctly. Please use whole number values. We are working to resolve this issue. Please contact Bandwidth Support if you need more information.
  • Field Details

  • Constructor Details

    • MachineDetectionConfiguration

      public MachineDetectionConfiguration()
  • Method Details

    • 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 property
      value - 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class 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