Package com.twilio.twiml.voice
Class Gather.Builder
- java.lang.Object
-
- com.twilio.twiml.TwiML.Builder<Gather.Builder>
-
- com.twilio.twiml.voice.Gather.Builder
-
- Enclosing class:
- Gather
public static class Gather.Builder extends TwiML.Builder<Gather.Builder>
Create a new<Gather>element
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Gather.Builderaction(String action)Action URLGather.Builderaction(URI action)Action URLGather.BuilderactionOnEmptyResult(Boolean actionOnEmptyResult)Force webhook to the action URL event if there is no inputGather.BuilderbargeIn(Boolean bargeIn)Stop playing media upon speechGatherbuild()Create and return resulting<Gather>elementGather.Builderdebug(Boolean debug)Allow debug for gatherGather.Builderenhanced(Boolean enhanced)Use enhanced speech modelGather.BuilderfinishOnKey(String finishOnKey)Finish gather on keystatic Gather.BuilderfromXml(String xml)Create and return a<Gather.Builder>from an XML stringGather.Builderhints(String hints)Speech recognition hintsGather.Builderinputs(Gather.Input input)Input type Twilio should acceptGather.Builderinputs(List<Gather.Input> input)Input type Twilio should acceptGather.Builderlanguage(Gather.Language language)Language to useGather.BuildermaxSpeechTime(Integer maxSpeechTime)Max allowed time for speech inputGather.Buildermethod(HttpMethod method)Action URL methodGather.BuildernumDigits(Integer numDigits)Number of digits to collectGather.BuilderpartialResultCallback(String partialResultCallback)Partial result callback URLGather.BuilderpartialResultCallback(URI partialResultCallback)Partial result callback URLGather.BuilderpartialResultCallbackMethod(HttpMethod partialResultCallbackMethod)Partial result callback URL methodGather.Builderpause(Pause pause)Add a child<Pause>elementGather.Builderplay(Play play)Add a child<Play>elementGather.BuilderprofanityFilter(Boolean profanityFilter)Profanity Filter on speechGather.Buildersay(Say say)Add a child<Say>elementGather.BuilderspeechModel(Gather.SpeechModel speechModel)Specify the model that is best suited for your use caseGather.BuilderspeechTimeout(String speechTimeout)Time to wait to gather speech input and it should be either auto or a positive integer.Gather.Buildertimeout(Integer timeout)Time to wait to gather input-
Methods inherited from class com.twilio.twiml.TwiML.Builder
addChild, addText, option
-
-
-
-
Method Detail
-
fromXml
public static Gather.Builder fromXml(String xml) throws TwiMLException
Create and return a<Gather.Builder>from an XML string- Throws:
TwiMLException
-
inputs
public Gather.Builder inputs(List<Gather.Input> input)
Input type Twilio should accept
-
inputs
public Gather.Builder inputs(Gather.Input input)
Input type Twilio should accept
-
action
public Gather.Builder action(URI action)
Action URL
-
action
public Gather.Builder action(String action)
Action URL
-
method
public Gather.Builder method(HttpMethod method)
Action URL method
-
timeout
public Gather.Builder timeout(Integer timeout)
Time to wait to gather input
-
speechTimeout
public Gather.Builder speechTimeout(String speechTimeout)
Time to wait to gather speech input and it should be either auto or a positive integer.
-
maxSpeechTime
public Gather.Builder maxSpeechTime(Integer maxSpeechTime)
Max allowed time for speech input
-
profanityFilter
public Gather.Builder profanityFilter(Boolean profanityFilter)
Profanity Filter on speech
-
finishOnKey
public Gather.Builder finishOnKey(String finishOnKey)
Finish gather on key
-
numDigits
public Gather.Builder numDigits(Integer numDigits)
Number of digits to collect
-
partialResultCallback
public Gather.Builder partialResultCallback(URI partialResultCallback)
Partial result callback URL
-
partialResultCallback
public Gather.Builder partialResultCallback(String partialResultCallback)
Partial result callback URL
-
partialResultCallbackMethod
public Gather.Builder partialResultCallbackMethod(HttpMethod partialResultCallbackMethod)
Partial result callback URL method
-
language
public Gather.Builder language(Gather.Language language)
Language to use
-
hints
public Gather.Builder hints(String hints)
Speech recognition hints
-
bargeIn
public Gather.Builder bargeIn(Boolean bargeIn)
Stop playing media upon speech
-
debug
public Gather.Builder debug(Boolean debug)
Allow debug for gather
-
actionOnEmptyResult
public Gather.Builder actionOnEmptyResult(Boolean actionOnEmptyResult)
Force webhook to the action URL event if there is no input
-
speechModel
public Gather.Builder speechModel(Gather.SpeechModel speechModel)
Specify the model that is best suited for your use case
-
enhanced
public Gather.Builder enhanced(Boolean enhanced)
Use enhanced speech model
-
say
public Gather.Builder say(Say say)
Add a child<Say>element
-
pause
public Gather.Builder pause(Pause pause)
Add a child<Pause>element
-
play
public Gather.Builder play(Play play)
Add a child<Play>element
-
build
public Gather build()
Create and return resulting<Gather>element
-
-