-
Notifications
You must be signed in to change notification settings - Fork 561
/
Copy pathGather.php
220 lines (195 loc) · 5.76 KB
/
Gather.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Gather extends TwiML {
/**
* Gather constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Gather', null, $attributes);
}
/**
* Add Say child.
*
* @param string $message Message to say
* @param array $attributes Optional attributes
* @return Say Child element.
*/
public function say($message, $attributes = []): Say {
return $this->nest(new Say($message, $attributes));
}
/**
* Add Pause child.
*
* @param array $attributes Optional attributes
* @return Pause Child element.
*/
public function pause($attributes = []): Pause {
return $this->nest(new Pause($attributes));
}
/**
* Add Play child.
*
* @param string $url Media URL
* @param array $attributes Optional attributes
* @return Play Child element.
*/
public function play($url = null, $attributes = []): Play {
return $this->nest(new Play($url, $attributes));
}
/**
* Add Input attribute.
*
* @param string[] $input Input type Twilio should accept
*/
public function setInput($input): self {
return $this->setAttribute('input', $input);
}
/**
* Add Action attribute.
*
* @param string $action Action URL
*/
public function setAction($action): self {
return $this->setAttribute('action', $action);
}
/**
* Add Method attribute.
*
* @param string $method Action URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add Timeout attribute.
*
* @param int $timeout Time to wait to gather input
*/
public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
/**
* Add SpeechTimeout attribute.
*
* @param string $speechTimeout Time to wait to gather speech input and it
* should be either auto or a positive integer.
*/
public function setSpeechTimeout($speechTimeout): self {
return $this->setAttribute('speechTimeout', $speechTimeout);
}
/**
* Add MaxSpeechTime attribute.
*
* @param int $maxSpeechTime Max allowed time for speech input
*/
public function setMaxSpeechTime($maxSpeechTime): self {
return $this->setAttribute('maxSpeechTime', $maxSpeechTime);
}
/**
* Add ProfanityFilter attribute.
*
* @param bool $profanityFilter Profanity Filter on speech
*/
public function setProfanityFilter($profanityFilter): self {
return $this->setAttribute('profanityFilter', $profanityFilter);
}
/**
* Add FinishOnKey attribute.
*
* @param string $finishOnKey Finish gather on key
*/
public function setFinishOnKey($finishOnKey): self {
return $this->setAttribute('finishOnKey', $finishOnKey);
}
/**
* Add NumDigits attribute.
*
* @param int $numDigits Number of digits to collect
*/
public function setNumDigits($numDigits): self {
return $this->setAttribute('numDigits', $numDigits);
}
/**
* Add PartialResultCallback attribute.
*
* @param string $partialResultCallback Partial result callback URL
*/
public function setPartialResultCallback($partialResultCallback): self {
return $this->setAttribute('partialResultCallback', $partialResultCallback);
}
/**
* Add PartialResultCallbackMethod attribute.
*
* @param string $partialResultCallbackMethod Partial result callback URL method
*/
public function setPartialResultCallbackMethod($partialResultCallbackMethod): self {
return $this->setAttribute('partialResultCallbackMethod', $partialResultCallbackMethod);
}
/**
* Add Language attribute.
*
* @param string $language Language to use
*/
public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
/**
* Add Hints attribute.
*
* @param string $hints Speech recognition hints
*/
public function setHints($hints): self {
return $this->setAttribute('hints', $hints);
}
/**
* Add BargeIn attribute.
*
* @param bool $bargeIn Stop playing media upon speech
*/
public function setBargeIn($bargeIn): self {
return $this->setAttribute('bargeIn', $bargeIn);
}
/**
* Add Debug attribute.
*
* @param bool $debug Allow debug for gather
*/
public function setDebug($debug): self {
return $this->setAttribute('debug', $debug);
}
/**
* Add ActionOnEmptyResult attribute.
*
* @param bool $actionOnEmptyResult Force webhook to the action URL event if
* there is no input
*/
public function setActionOnEmptyResult($actionOnEmptyResult): self {
return $this->setAttribute('actionOnEmptyResult', $actionOnEmptyResult);
}
/**
* Add SpeechModel attribute.
*
* @param string $speechModel Specify the model that is best suited for your
* use case
*/
public function setSpeechModel($speechModel): self {
return $this->setAttribute('speechModel', $speechModel);
}
/**
* Add Enhanced attribute.
*
* @param bool $enhanced Use enhanced speech model
*/
public function setEnhanced($enhanced): self {
return $this->setAttribute('enhanced', $enhanced);
}
}