Package com.vonage.client.voice.ncco
Class InputAction.Builder
java.lang.Object
com.vonage.client.voice.ncco.InputAction.Builder
- Enclosing class:
InputAction
Builder for specifying the properties of an InputAction.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the InputAction.dtmf()Enables DTMF with the default settings.dtmf(DtmfSettings dtmf) Enable DTMF input with the provided settings.eventMethod(EventMethod eventMethod) The HTTP method used to send event information to event_url The default value is POST.Vonage sends the digits pressed by the callee to this URL after timeOut pause inactivity or when#is pressed.Deprecated.This will be removed in a future release.eventUrl(Collection<String> eventUrl) Deprecated.This will be removed in a future release.How the input should be processed.speech(SpeechSettings speech) Automatic Speech Recognition (ASR) settings to enable speech input.type(Collection<String> type) Deprecated.Usedtmf(DtmfSettings)andspeech(SpeechSettings)instead.
-
Method Details
-
dtmf
Enables DTMF with the default settings.- Returns:
- This builder to keep building the input action.
- Since:
- 8.12.0
-
dtmf
Enable DTMF input with the provided settings. Note that if you override any of the defaults, you cannot set mode(InputMode) to InputMode.ASYNCHRONOUS.- Parameters:
dtmf- The DTMF settings object.- Returns:
- This builder to keep building the input action.
- Since:
- 6.0.0
-
speech
Automatic Speech Recognition (ASR) settings to enable speech input. Required if dtmf(DtmfSettings) is not provided.- Parameters:
speech- The speech settings object.- Returns:
- This builder to keep building the input action.
- Since:
- 6.0.0
-
eventUrl
Deprecated.This will be removed in a future release. UseeventUrl(String)instead.Vonage sends the digits pressed by the callee to this URL after timeOut pause inactivity or when#is pressed.- Parameters:
eventUrl- The URL wrapped in a singleton collection to send the event metadata to.- Returns:
- This builder to keep building the input action.
-
eventUrl
Deprecated.This will be removed in a future release. UseeventUrl(String)instead.Vonage sends the digits pressed by the callee to this URL after timeOut pause inactivity or when#is pressed.- Parameters:
eventUrl- The URL to send the event metadata to.- Returns:
- This builder to keep building the input action.
-
eventUrl
Vonage sends the digits pressed by the callee to this URL after timeOut pause inactivity or when#is pressed.- Parameters:
eventUrl- The URL to send the event metadata to.- Returns:
- This builder to keep building the input action.
- Since:
- 8.12.0
-
eventMethod
The HTTP method used to send event information to event_url The default value is POST.- Parameters:
eventMethod- The HTTP method to use for the event as an enum.- Returns:
- This builder to keep building the input action.
-
mode
How the input should be processed. If not set, the default is InputMode.SYNCHRONOUS. If set to InputMode.ASYNCHRONOUS, usedtmf()instead ofdtmf(DtmfSettings).- Parameters:
mode- The DTMF processing mode as an enum.- Returns:
- This builder to keep building the input action.
- Since:
- 8.12.0
-
type
Deprecated.Usedtmf(DtmfSettings)andspeech(SpeechSettings)instead. The type will be set automatically based on the provided settings.Sets the acceptable input types. From v8.12.0 onwards, you should not call this method manually; instead, usedtmf()and / orspeech(SpeechSettings). This method will be removed in a future release.- Parameters:
type- Acceptable input types as a collection. Valid values are ["dtmf"] for DTMF input only, ["speech"] for ASR only, or ["dtmf", "speech"] for both.- Returns:
- This builder to keep building the input action.
-
build
Builds the InputAction.- Returns:
- A new InputAction object from the stored builder options.
-