allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s

This commit is contained in:
2026-03-30 14:54:57 +07:00
parent 66aed7c4e8
commit b5e3a778ce
21316 changed files with 2777892 additions and 13 deletions

View File

@@ -0,0 +1,70 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Fax;
use Twilio\TwiML\TwiML;
class Receive extends TwiML {
/**
* Receive constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Receive', null, $attributes);
}
/**
* Add Action attribute.
*
* @param string $action Receive action URL
*/
public function setAction($action): self {
return $this->setAttribute('action', $action);
}
/**
* Add Method attribute.
*
* @param string $method Receive action URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add MediaType attribute.
*
* @param string $mediaType The media type used to store media in the fax media
* store
*/
public function setMediaType($mediaType): self {
return $this->setAttribute('mediaType', $mediaType);
}
/**
* Add PageSize attribute.
*
* @param string $pageSize What size to interpret received pages as
*/
public function setPageSize($pageSize): self {
return $this->setAttribute('pageSize', $pageSize);
}
/**
* Add StoreMedia attribute.
*
* @param bool $storeMedia Whether or not to store received media in the fax
* media store
*/
public function setStoreMedia($storeMedia): self {
return $this->setAttribute('storeMedia', $storeMedia);
}
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML;
class FaxResponse extends TwiML {
/**
* FaxResponse constructor.
*/
public function __construct() {
parent::__construct('Response', null);
}
/**
* Add Receive child.
*
* @param array $attributes Optional attributes
* @return Fax\Receive Child element.
*/
public function receive($attributes = []): Fax\Receive {
return $this->nest(new Fax\Receive($attributes));
}
}

View File

@@ -0,0 +1,21 @@
<?php
namespace Twilio\TwiML;
class GenericNode extends TwiML {
protected $value;
/**
* GenericNode constructor.
*
* @param string $name XML element name
* @param ?string $value XML value
* @param array $attributes XML attributes
*/
public function __construct(string $name, ?string $value, array $attributes) {
parent::__construct($name, $value, $attributes);
$this->name = $name;
$this->value = $value;
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Messaging;
use Twilio\TwiML\TwiML;
class Body extends TwiML {
/**
* Body constructor.
*
* @param string $message Message Body
*/
public function __construct($message) {
parent::__construct('Body', $message);
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Messaging;
use Twilio\TwiML\TwiML;
class Media extends TwiML {
/**
* Media constructor.
*
* @param string $url Media URL
*/
public function __construct($url) {
parent::__construct('Media', $url);
}
}

View File

@@ -0,0 +1,91 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Messaging;
use Twilio\TwiML\TwiML;
class Message extends TwiML {
/**
* Message constructor.
*
* @param string $body Message Body
* @param array $attributes Optional attributes
*/
public function __construct($body, $attributes = []) {
parent::__construct('Message', $body, $attributes);
}
/**
* Add Body child.
*
* @param string $message Message Body
* @return Body Child element.
*/
public function body($message): Body {
return $this->nest(new Body($message));
}
/**
* Add Media child.
*
* @param string $url Media URL
* @return Media Child element.
*/
public function media($url): Media {
return $this->nest(new Media($url));
}
/**
* Add To attribute.
*
* @param string $to Phone Number to send Message to
*/
public function setTo($to): self {
return $this->setAttribute('to', $to);
}
/**
* Add From attribute.
*
* @param string $from Phone Number to send Message from
*/
public function setFrom($from): self {
return $this->setAttribute('from', $from);
}
/**
* Add Action attribute.
*
* @param string $action A URL specifying where Twilio should send status
* callbacks for the created outbound message.
*/
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 StatusCallback attribute.
*
* @param string $statusCallback Status callback URL. Deprecated in favor of
* action.
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Messaging;
use Twilio\TwiML\TwiML;
class Redirect extends TwiML {
/**
* Redirect constructor.
*
* @param string $url Redirect URL
* @param array $attributes Optional attributes
*/
public function __construct($url, $attributes = []) {
parent::__construct('Redirect', $url, $attributes);
}
/**
* Add Method attribute.
*
* @param string $method Redirect URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML;
class MessagingResponse extends TwiML {
/**
* MessagingResponse constructor.
*/
public function __construct() {
parent::__construct('Response', null);
}
/**
* Add Message child.
*
* @param string $body Message Body
* @param array $attributes Optional attributes
* @return Messaging\Message Child element.
*/
public function message($body, $attributes = []): Messaging\Message {
return $this->nest(new Messaging\Message($body, $attributes));
}
/**
* Add Redirect child.
*
* @param string $url Redirect URL
* @param array $attributes Optional attributes
* @return Messaging\Redirect Child element.
*/
public function redirect($url, $attributes = []): Messaging\Redirect {
return $this->nest(new Messaging\Redirect($url, $attributes));
}
}

View File

@@ -0,0 +1,140 @@
<?php
namespace Twilio\TwiML;
use DOMDocument;
use DOMElement;
use DOMException;
/**
* @property $name string XML element name
* @property $attributes array XML attributes
* @property $value string XML body
* @property $children TwiML[] nested TwiML elements
*/
abstract class TwiML {
protected $name;
protected $attributes;
protected $children;
/**
* TwiML constructor.
*
* @param string $name XML element name
* @param ?string $value XML value
* @param array $attributes XML attributes
*/
public function __construct(string $name, ?string $value = null, array $attributes = []) {
$this->name = $name;
$this->attributes = $attributes;
$this->children = [];
if ($value !== null) {
$this->children[] = $value;
}
}
/**
* Add a TwiML element.
*
* @param TwiML|string $twiml TwiML element to add
* @return TwiML $this
*/
public function append($twiml): TwiML {
$this->children[] = $twiml;
return $this;
}
/**
* Add a TwiML element.
*
* @param TwiML $twiml TwiML element to add
* @return TwiML added TwiML element
*/
public function nest(TwiML $twiml): TwiML {
$this->children[] = $twiml;
return $twiml;
}
/**
* Set TwiML attribute.
*
* @param string $key name of attribute
* @param string $value value of attribute
* @return static $this
*/
public function setAttribute(string $key, string $value): TwiML {
$this->attributes[$key] = $value;
return $this;
}
/**
* @param string $name XML element name
* @param ?string $value XML value
* @param array $attributes XML attributes
* @return TwiML
*/
public function addChild(string $name, ?string $value = null, array $attributes = []): TwiML {
return $this->nest(new GenericNode($name, $value, $attributes));
}
/**
* Convert TwiML to XML string.
*
* @return string TwiML XML representation
*/
public function asXML(): string {
return (string)$this;
}
/**
* Convert TwiML to XML string.
*
* @return string TwiML XML representation
* @throws DOMException
*/
public function __toString(): string {
return $this->xml()->saveXML();
}
/**
* Build TwiML element.
*
* @param TwiML $twiml TwiML element to convert to XML
* @param DOMDocument $document XML document for the element
* @return DOMElement $element
* @throws DOMException
*/
private function buildElement(TwiML $twiml, DOMDocument $document): DOMElement {
$element = $document->createElement($twiml->name);
foreach ($twiml->attributes as $name => $value) {
if (\is_bool($value)) {
$value = ($value === true) ? 'true' : 'false';
}
$element->setAttribute($name, $value);
}
foreach ($twiml->children as $child) {
if (\is_string($child)) {
$element->appendChild($document->createTextNode($child));
} else {
$element->appendChild($this->buildElement($child, $document));
}
}
return $element;
}
/**
* Build XML element.
*
* @return DOMDocument Build TwiML element
* @throws DOMException
*/
private function xml(): DOMDocument {
$document = new DOMDocument('1.0', 'UTF-8');
$document->appendChild($this->buildElement($this, $document));
return $document;
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Video;
use Twilio\TwiML\TwiML;
class Room extends TwiML {
/**
* Room constructor.
*
* @param string $name Room name
*/
public function __construct($name) {
parent::__construct('Room', $name);
}
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class AiSession extends TwiML {
/**
* AiSession constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('AiSession', null, $attributes);
}
/**
* Add AiConnector attribute.
*
* @param string $aiConnector The unique name or installed add-on sid that
* identifies the installed addon resource for the
* AI Connector
*/
public function setAiConnector($aiConnector): self {
return $this->setAttribute('aiConnector', $aiConnector);
}
/**
* Add AiSessionConfiguration attribute.
*
* @param string $aiSessionConfiguration The unique name or id of the AiSession
* Configuration resource.
*/
public function setAiSessionConfiguration($aiSessionConfiguration): self {
return $this->setAttribute('aiSessionConfiguration', $aiSessionConfiguration);
}
}

View File

@@ -0,0 +1,108 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Application extends TwiML {
/**
* Application constructor.
*
* @param string $applicationSid Application sid
* @param array $attributes Optional attributes
*/
public function __construct($applicationSid = null, $attributes = []) {
parent::__construct('Application', $applicationSid, $attributes);
}
/**
* Add ApplicationSid child.
*
* @param string $sid Application sid to dial
* @return ApplicationSid Child element.
*/
public function applicationSid($sid): ApplicationSid {
return $this->nest(new ApplicationSid($sid));
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add Url attribute.
*
* @param string $url TwiML URL
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Method attribute.
*
* @param string $method TwiML URL Method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add StatusCallbackEvent attribute.
*
* @param string[] $statusCallbackEvent Events to trigger status callback
*/
public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status Callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status Callback URL Method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
/**
* Add CustomerId attribute.
*
* @param string $customerId Identity of the customer calling application
*/
public function setCustomerId($customerId): self {
return $this->setAttribute('customerId', $customerId);
}
/**
* Add CopyParentTo attribute.
*
* @param bool $copyParentTo Copy parent call To field to called application
* side, otherwise use the application sid as To field
*/
public function setCopyParentTo($copyParentTo): self {
return $this->setAttribute('copyParentTo', $copyParentTo);
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class ApplicationSid extends TwiML {
/**
* ApplicationSid constructor.
*
* @param string $sid Application sid to dial
*/
public function __construct($sid) {
parent::__construct('ApplicationSid', $sid);
}
}

View File

@@ -0,0 +1,256 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Assistant extends TwiML {
/**
* Assistant constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Assistant', null, $attributes);
}
/**
* Add Language child.
*
* @param array $attributes Optional attributes
* @return Language Child element.
*/
public function language($attributes = []): Language {
return $this->nest(new Language($attributes));
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add Id attribute.
*
* @param string $id The assistant ID of the AI Assistant
*/
public function setId($id): self {
return $this->setAttribute('id', $id);
}
/**
* Add Language attribute.
*
* @param string $language Language to be used for both text-to-speech and
* transcription
*/
public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
/**
* Add TtsLanguage attribute.
*
* @param string $ttsLanguage Language to be used for text-to-speech
*/
public function setTtsLanguage($ttsLanguage): self {
return $this->setAttribute('ttsLanguage', $ttsLanguage);
}
/**
* Add TranscriptionLanguage attribute.
*
* @param string $transcriptionLanguage Language to be used for transcription
*/
public function setTranscriptionLanguage($transcriptionLanguage): self {
return $this->setAttribute('transcriptionLanguage', $transcriptionLanguage);
}
/**
* Add TtsProvider attribute.
*
* @param string $ttsProvider Provider to be used for text-to-speech
*/
public function setTtsProvider($ttsProvider): self {
return $this->setAttribute('ttsProvider', $ttsProvider);
}
/**
* Add Voice attribute.
*
* @param string $voice Voice to be used for text-to-speech
*/
public function setVoice($voice): self {
return $this->setAttribute('voice', $voice);
}
/**
* Add TranscriptionProvider attribute.
*
* @param string $transcriptionProvider Provider to be used for transcription
*/
public function setTranscriptionProvider($transcriptionProvider): self {
return $this->setAttribute('transcriptionProvider', $transcriptionProvider);
}
/**
* Add SpeechModel attribute.
*
* @param string $speechModel Speech model to be used for transcription
*/
public function setSpeechModel($speechModel): self {
return $this->setAttribute('speechModel', $speechModel);
}
/**
* Add ProfanityFilter attribute.
*
* @param bool $profanityFilter Whether profanities should be filtered out of
* the speech transcription
*/
public function setProfanityFilter($profanityFilter): self {
return $this->setAttribute('profanityFilter', $profanityFilter);
}
/**
* Add DtmfDetection attribute.
*
* @param bool $dtmfDetection Whether DTMF tones should be detected and
* reported in speech transcription
*/
public function setDtmfDetection($dtmfDetection): self {
return $this->setAttribute('dtmfDetection', $dtmfDetection);
}
/**
* Add WelcomeGreeting attribute.
*
* @param string $welcomeGreeting The sentence to be played automatically when
* the session is connected
*/
public function setWelcomeGreeting($welcomeGreeting): self {
return $this->setAttribute('welcomeGreeting', $welcomeGreeting);
}
/**
* Add PartialPrompts attribute.
*
* @param bool $partialPrompts Whether partial prompts should be reported to
* WebSocket server before the caller finishes
* speaking
*/
public function setPartialPrompts($partialPrompts): self {
return $this->setAttribute('partialPrompts', $partialPrompts);
}
/**
* Add WelcomeGreetingInterruptible attribute.
*
* @param string $welcomeGreetingInterruptible "Whether and how the input from
* a caller, such as speaking or
* DTMF can interrupt the welcome
* greeting
*/
public function setWelcomeGreetingInterruptible($welcomeGreetingInterruptible): self {
return $this->setAttribute('welcomeGreetingInterruptible', $welcomeGreetingInterruptible);
}
/**
* Add Interruptible attribute.
*
* @param string $interruptible Whether and how the input from a caller, such
* as speaking or DTMF can interrupt the play of
* text-to-speech
*/
public function setInterruptible($interruptible): self {
return $this->setAttribute('interruptible', $interruptible);
}
/**
* Add Preemptible attribute.
*
* @param bool $preemptible Whether subsequent text-to-speech or play media can
* interrupt the on-going play of text-to-speech or
* media
*/
public function setPreemptible($preemptible): self {
return $this->setAttribute('preemptible', $preemptible);
}
/**
* Add Hints attribute.
*
* @param string $hints Phrases to help better accuracy in speech recognition
* of these pharases
*/
public function setHints($hints): self {
return $this->setAttribute('hints', $hints);
}
/**
* Add IntelligenceService attribute.
*
* @param string $intelligenceService The Conversational Intelligence Service
* id or unique name to be used for the
* session
*/
public function setIntelligenceService($intelligenceService): self {
return $this->setAttribute('intelligenceService', $intelligenceService);
}
/**
* Add ReportInputDuringAgentSpeech attribute.
*
* @param bool $reportInputDuringAgentSpeech Whether prompts should be reported
* to WebSocket server when
* text-to-speech playing and
* interrupt is disabled
*/
public function setReportInputDuringAgentSpeech($reportInputDuringAgentSpeech): self {
return $this->setAttribute('reportInputDuringAgentSpeech', $reportInputDuringAgentSpeech);
}
/**
* Add ElevenlabsTextNormalization attribute.
*
* @param string $elevenlabsTextNormalization When using ElevenLabs as TTS
* provider, this parameter allows
* you to enable or disable its text
* normalization feature
*/
public function setElevenlabsTextNormalization($elevenlabsTextNormalization): self {
return $this->setAttribute('elevenlabsTextNormalization', $elevenlabsTextNormalization);
}
/**
* Add InterruptSensitivity attribute.
*
* @param string $interruptSensitivity Set the sensitivity of the interrupt
* feature for speech. The value can be
* low, medium, or high
*/
public function setInterruptSensitivity($interruptSensitivity): self {
return $this->setAttribute('interruptSensitivity', $interruptSensitivity);
}
/**
* Add Debug attribute.
*
* @param string $debug Multiple debug options to be used for troubleshooting
*/
public function setDebug($debug): self {
return $this->setAttribute('debug', $debug);
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Autopilot extends TwiML {
/**
* Autopilot constructor.
*
* @param string $name Autopilot assistant sid or unique name
*/
public function __construct($name) {
parent::__construct('Autopilot', $name);
}
}

View File

@@ -0,0 +1,89 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Client extends TwiML {
/**
* Client constructor.
*
* @param string $identity Client identity
* @param array $attributes Optional attributes
*/
public function __construct($identity = null, $attributes = []) {
parent::__construct('Client', $identity, $attributes);
}
/**
* Add Identity child.
*
* @param string $clientIdentity Identity of the client to dial
* @return Identity Child element.
*/
public function identity($clientIdentity): Identity {
return $this->nest(new Identity($clientIdentity));
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add Url attribute.
*
* @param string $url Client URL
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Method attribute.
*
* @param string $method Client URL Method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add StatusCallbackEvent attribute.
*
* @param string[] $statusCallbackEvent Events to trigger status callback
*/
public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status Callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status Callback URL Method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
}

View File

@@ -0,0 +1,206 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Conference extends TwiML {
/**
* Conference constructor.
*
* @param string $name Conference name
* @param array $attributes Optional attributes
*/
public function __construct($name, $attributes = []) {
parent::__construct('Conference', $name, $attributes);
}
/**
* Add Muted attribute.
*
* @param bool $muted Join the conference muted
*/
public function setMuted($muted): self {
return $this->setAttribute('muted', $muted);
}
/**
* Add Beep attribute.
*
* @param string $beep Play beep when joining
*/
public function setBeep($beep): self {
return $this->setAttribute('beep', $beep);
}
/**
* Add StartConferenceOnEnter attribute.
*
* @param bool $startConferenceOnEnter Start the conference on enter
*/
public function setStartConferenceOnEnter($startConferenceOnEnter): self {
return $this->setAttribute('startConferenceOnEnter', $startConferenceOnEnter);
}
/**
* Add EndConferenceOnExit attribute.
*
* @param bool $endConferenceOnExit End the conferenceon exit
*/
public function setEndConferenceOnExit($endConferenceOnExit): self {
return $this->setAttribute('endConferenceOnExit', $endConferenceOnExit);
}
/**
* Add WaitUrl attribute.
*
* @param string $waitUrl Wait URL
*/
public function setWaitUrl($waitUrl): self {
return $this->setAttribute('waitUrl', $waitUrl);
}
/**
* Add WaitMethod attribute.
*
* @param string $waitMethod Wait URL method
*/
public function setWaitMethod($waitMethod): self {
return $this->setAttribute('waitMethod', $waitMethod);
}
/**
* Add MaxParticipants attribute.
*
* @param int $maxParticipants Maximum number of participants
*/
public function setMaxParticipants($maxParticipants): self {
return $this->setAttribute('maxParticipants', $maxParticipants);
}
/**
* Add Record attribute.
*
* @param string $record Record the conference
*/
public function setRecord($record): self {
return $this->setAttribute('record', $record);
}
/**
* Add Region attribute.
*
* @param string $region Conference region
*/
public function setRegion($region): self {
return $this->setAttribute('region', $region);
}
/**
* Add Coach attribute.
*
* @param string $coach Call coach
*/
public function setCoach($coach): self {
return $this->setAttribute('coach', $coach);
}
/**
* Add Trim attribute.
*
* @param string $trim Trim the conference recording
*/
public function setTrim($trim): self {
return $this->setAttribute('trim', $trim);
}
/**
* Add StatusCallbackEvent attribute.
*
* @param string[] $statusCallbackEvent Events to call status callback URL
*/
public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback URL method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
/**
* Add RecordingStatusCallback attribute.
*
* @param string $recordingStatusCallback Recording status callback URL
*/
public function setRecordingStatusCallback($recordingStatusCallback): self {
return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback);
}
/**
* Add RecordingStatusCallbackMethod attribute.
*
* @param string $recordingStatusCallbackMethod Recording status callback URL
* method
*/
public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self {
return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod);
}
/**
* Add RecordingStatusCallbackEvent attribute.
*
* @param string[] $recordingStatusCallbackEvent Recording status callback
* events
*/
public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self {
return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent);
}
/**
* Add EventCallbackUrl attribute.
*
* @param string $eventCallbackUrl Event callback URL
*/
public function setEventCallbackUrl($eventCallbackUrl): self {
return $this->setAttribute('eventCallbackUrl', $eventCallbackUrl);
}
/**
* Add JitterBufferSize attribute.
*
* @param string $jitterBufferSize Size of jitter buffer for participant
*/
public function setJitterBufferSize($jitterBufferSize): self {
return $this->setAttribute('jitterBufferSize', $jitterBufferSize);
}
/**
* Add ParticipantLabel attribute.
*
* @param string $participantLabel A label for participant
*/
public function setParticipantLabel($participantLabel): self {
return $this->setAttribute('participantLabel', $participantLabel);
}
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Config extends TwiML {
/**
* Config constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Config', null, $attributes);
}
/**
* Add Name attribute.
*
* @param string $name The name of the custom config
*/
public function setName($name): self {
return $this->setAttribute('name', $name);
}
/**
* Add Value attribute.
*
* @param string $value The value of the custom config
*/
public function setValue($value): self {
return $this->setAttribute('value', $value);
}
}

View File

@@ -0,0 +1,132 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Connect extends TwiML {
/**
* Connect constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Connect', null, $attributes);
}
/**
* Add Room child.
*
* @param string $name Room name
* @param array $attributes Optional attributes
* @return Room Child element.
*/
public function room($name, $attributes = []): Room {
return $this->nest(new Room($name, $attributes));
}
/**
* Add Autopilot child.
*
* @param string $name Autopilot assistant sid or unique name
* @return Autopilot Child element.
*/
public function autopilot($name): Autopilot {
return $this->nest(new Autopilot($name));
}
/**
* Add Stream child.
*
* @param array $attributes Optional attributes
* @return Stream Child element.
*/
public function stream($attributes = []): Stream {
return $this->nest(new Stream($attributes));
}
/**
* Add VirtualAgent child.
*
* @param array $attributes Optional attributes
* @return VirtualAgent Child element.
*/
public function virtualAgent($attributes = []): VirtualAgent {
return $this->nest(new VirtualAgent($attributes));
}
/**
* Add Conversation child.
*
* @param array $attributes Optional attributes
* @return Conversation Child element.
*/
public function conversation($attributes = []): Conversation {
return $this->nest(new Conversation($attributes));
}
/**
* Add ConversationRelay child.
*
* @param array $attributes Optional attributes
* @return ConversationRelay Child element.
*/
public function conversationRelay($attributes = []): ConversationRelay {
return $this->nest(new ConversationRelay($attributes));
}
/**
* Add Assistant child.
*
* @param array $attributes Optional attributes
* @return Assistant Child element.
*/
public function assistant($attributes = []): Assistant {
return $this->nest(new Assistant($attributes));
}
/**
* Add AiSession child.
*
* @param array $attributes Optional attributes
* @return AiSession Child element.
*/
public function aiSession($attributes = []): AiSession {
return $this->nest(new AiSession($attributes));
}
/**
* Add ConversationRelaySession child.
*
* @param array $attributes Optional attributes
* @return ConversationRelaySession Child element.
*/
public function conversationRelaySession($attributes = []): ConversationRelaySession {
return $this->nest(new ConversationRelaySession($attributes));
}
/**
* 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);
}
}

View File

@@ -0,0 +1,151 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Conversation extends TwiML {
/**
* Conversation constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Conversation', null, $attributes);
}
/**
* Add ServiceInstanceSid attribute.
*
* @param string $serviceInstanceSid Service instance Sid
*/
public function setServiceInstanceSid($serviceInstanceSid): self {
return $this->setAttribute('serviceInstanceSid', $serviceInstanceSid);
}
/**
* Add InboundAutocreation attribute.
*
* @param bool $inboundAutocreation Inbound autocreation
*/
public function setInboundAutocreation($inboundAutocreation): self {
return $this->setAttribute('inboundAutocreation', $inboundAutocreation);
}
/**
* Add RoutingAssignmentTimeout attribute.
*
* @param int $routingAssignmentTimeout Routing assignment timeout
*/
public function setRoutingAssignmentTimeout($routingAssignmentTimeout): self {
return $this->setAttribute('routingAssignmentTimeout', $routingAssignmentTimeout);
}
/**
* Add InboundTimeout attribute.
*
* @param int $inboundTimeout Inbound timeout
*/
public function setInboundTimeout($inboundTimeout): self {
return $this->setAttribute('inboundTimeout', $inboundTimeout);
}
/**
* Add Url attribute.
*
* @param string $url TwiML URL
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Method attribute.
*
* @param string $method TwiML URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add Record attribute.
*
* @param string $record Record
*/
public function setRecord($record): self {
return $this->setAttribute('record', $record);
}
/**
* Add Trim attribute.
*
* @param string $trim Trim
*/
public function setTrim($trim): self {
return $this->setAttribute('trim', $trim);
}
/**
* Add RecordingStatusCallback attribute.
*
* @param string $recordingStatusCallback Recording status callback URL
*/
public function setRecordingStatusCallback($recordingStatusCallback): self {
return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback);
}
/**
* Add RecordingStatusCallbackMethod attribute.
*
* @param string $recordingStatusCallbackMethod Recording status callback URL
* method
*/
public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self {
return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod);
}
/**
* Add RecordingStatusCallbackEvent attribute.
*
* @param string[] $recordingStatusCallbackEvent Recording status callback
* events
*/
public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self {
return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback URL method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
/**
* Add StatusCallbackEvent attribute.
*
* @param string[] $statusCallbackEvent Events to call status callback URL
*/
public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
}

View File

@@ -0,0 +1,257 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class ConversationRelay extends TwiML {
/**
* ConversationRelay constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('ConversationRelay', null, $attributes);
}
/**
* Add Language child.
*
* @param array $attributes Optional attributes
* @return Language Child element.
*/
public function language($attributes = []): Language {
return $this->nest(new Language($attributes));
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add Url attribute.
*
* @param string $url URL of the remote service where the session is connected
* to
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Language attribute.
*
* @param string $language Language to be used for both text-to-speech and
* transcription
*/
public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
/**
* Add TtsLanguage attribute.
*
* @param string $ttsLanguage Language to be used for text-to-speech
*/
public function setTtsLanguage($ttsLanguage): self {
return $this->setAttribute('ttsLanguage', $ttsLanguage);
}
/**
* Add TranscriptionLanguage attribute.
*
* @param string $transcriptionLanguage Language to be used for transcription
*/
public function setTranscriptionLanguage($transcriptionLanguage): self {
return $this->setAttribute('transcriptionLanguage', $transcriptionLanguage);
}
/**
* Add TtsProvider attribute.
*
* @param string $ttsProvider Provider to be used for text-to-speech
*/
public function setTtsProvider($ttsProvider): self {
return $this->setAttribute('ttsProvider', $ttsProvider);
}
/**
* Add Voice attribute.
*
* @param string $voice Voice to be used for text-to-speech
*/
public function setVoice($voice): self {
return $this->setAttribute('voice', $voice);
}
/**
* Add TranscriptionProvider attribute.
*
* @param string $transcriptionProvider Provider to be used for transcription
*/
public function setTranscriptionProvider($transcriptionProvider): self {
return $this->setAttribute('transcriptionProvider', $transcriptionProvider);
}
/**
* Add SpeechModel attribute.
*
* @param string $speechModel Speech model to be used for transcription
*/
public function setSpeechModel($speechModel): self {
return $this->setAttribute('speechModel', $speechModel);
}
/**
* Add ProfanityFilter attribute.
*
* @param bool $profanityFilter Whether profanities should be filtered out of
* the speech transcription
*/
public function setProfanityFilter($profanityFilter): self {
return $this->setAttribute('profanityFilter', $profanityFilter);
}
/**
* Add DtmfDetection attribute.
*
* @param bool $dtmfDetection Whether DTMF tones should be detected and
* reported in speech transcription
*/
public function setDtmfDetection($dtmfDetection): self {
return $this->setAttribute('dtmfDetection', $dtmfDetection);
}
/**
* Add WelcomeGreeting attribute.
*
* @param string $welcomeGreeting The sentence to be played automatically when
* the session is connected
*/
public function setWelcomeGreeting($welcomeGreeting): self {
return $this->setAttribute('welcomeGreeting', $welcomeGreeting);
}
/**
* Add PartialPrompts attribute.
*
* @param bool $partialPrompts Whether partial prompts should be reported to
* WebSocket server before the caller finishes
* speaking
*/
public function setPartialPrompts($partialPrompts): self {
return $this->setAttribute('partialPrompts', $partialPrompts);
}
/**
* Add WelcomeGreetingInterruptible attribute.
*
* @param string $welcomeGreetingInterruptible "Whether and how the input from
* a caller, such as speaking or
* DTMF can interrupt the welcome
* greeting
*/
public function setWelcomeGreetingInterruptible($welcomeGreetingInterruptible): self {
return $this->setAttribute('welcomeGreetingInterruptible', $welcomeGreetingInterruptible);
}
/**
* Add Interruptible attribute.
*
* @param string $interruptible Whether and how the input from a caller, such
* as speaking or DTMF can interrupt the play of
* text-to-speech
*/
public function setInterruptible($interruptible): self {
return $this->setAttribute('interruptible', $interruptible);
}
/**
* Add Preemptible attribute.
*
* @param bool $preemptible Whether subsequent text-to-speech or play media can
* interrupt the on-going play of text-to-speech or
* media
*/
public function setPreemptible($preemptible): self {
return $this->setAttribute('preemptible', $preemptible);
}
/**
* Add Hints attribute.
*
* @param string $hints Phrases to help better accuracy in speech recognition
* of these pharases
*/
public function setHints($hints): self {
return $this->setAttribute('hints', $hints);
}
/**
* Add IntelligenceService attribute.
*
* @param string $intelligenceService The Conversational Intelligence Service
* id or unique name to be used for the
* session
*/
public function setIntelligenceService($intelligenceService): self {
return $this->setAttribute('intelligenceService', $intelligenceService);
}
/**
* Add ReportInputDuringAgentSpeech attribute.
*
* @param bool $reportInputDuringAgentSpeech Whether prompts should be reported
* to WebSocket server when
* text-to-speech playing and
* interrupt is disabled
*/
public function setReportInputDuringAgentSpeech($reportInputDuringAgentSpeech): self {
return $this->setAttribute('reportInputDuringAgentSpeech', $reportInputDuringAgentSpeech);
}
/**
* Add ElevenlabsTextNormalization attribute.
*
* @param string $elevenlabsTextNormalization When using ElevenLabs as TTS
* provider, this parameter allows
* you to enable or disable its text
* normalization feature
*/
public function setElevenlabsTextNormalization($elevenlabsTextNormalization): self {
return $this->setAttribute('elevenlabsTextNormalization', $elevenlabsTextNormalization);
}
/**
* Add InterruptSensitivity attribute.
*
* @param string $interruptSensitivity Set the sensitivity of the interrupt
* feature for speech. The value can be
* low, medium, or high
*/
public function setInterruptSensitivity($interruptSensitivity): self {
return $this->setAttribute('interruptSensitivity', $interruptSensitivity);
}
/**
* Add Debug attribute.
*
* @param string $debug Multiple debug options to be used for troubleshooting
*/
public function setDebug($debug): self {
return $this->setAttribute('debug', $debug);
}
}

View File

@@ -0,0 +1,45 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class ConversationRelaySession extends TwiML {
/**
* ConversationRelaySession constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('ConversationRelaySession', null, $attributes);
}
/**
* Add Connector attribute.
*
* @param string $connector The unique name or installed add-on sid that
* identifies the installed addon resource for the
* ConversationRelaySession Connector
*/
public function setConnector($connector): self {
return $this->setAttribute('connector', $connector);
}
/**
* Add SessionConfiguration attribute.
*
* @param string $sessionConfiguration The unique name or id of the
* ConversationRelaySession Configuration
* resource.
*/
public function setSessionConfiguration($sessionConfiguration): self {
return $this->setAttribute('sessionConfiguration', $sessionConfiguration);
}
}

View File

@@ -0,0 +1,282 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Dial extends TwiML {
/**
* Dial constructor.
*
* @param string $number Phone number to dial
* @param array $attributes Optional attributes
*/
public function __construct($number = null, $attributes = []) {
parent::__construct('Dial', $number, $attributes);
}
/**
* Add Client child.
*
* @param string $identity Client identity
* @param array $attributes Optional attributes
* @return Client Child element.
*/
public function client($identity = null, $attributes = []): Client {
return $this->nest(new Client($identity, $attributes));
}
/**
* Add Conference child.
*
* @param string $name Conference name
* @param array $attributes Optional attributes
* @return Conference Child element.
*/
public function conference($name, $attributes = []): Conference {
return $this->nest(new Conference($name, $attributes));
}
/**
* Add Number child.
*
* @param string $phoneNumber Phone Number to dial
* @param array $attributes Optional attributes
* @return Number Child element.
*/
public function number($phoneNumber, $attributes = []): Number {
return $this->nest(new Number($phoneNumber, $attributes));
}
/**
* Add Queue child.
*
* @param string $name Queue name
* @param array $attributes Optional attributes
* @return Queue Child element.
*/
public function queue($name, $attributes = []): Queue {
return $this->nest(new Queue($name, $attributes));
}
/**
* Add Sim child.
*
* @param string $simSid SIM SID
* @return Sim Child element.
*/
public function sim($simSid): Sim {
return $this->nest(new Sim($simSid));
}
/**
* Add Sip child.
*
* @param string $sipUrl SIP URL
* @param array $attributes Optional attributes
* @return Sip Child element.
*/
public function sip($sipUrl, $attributes = []): Sip {
return $this->nest(new Sip($sipUrl, $attributes));
}
/**
* Add Application child.
*
* @param string $applicationSid Application sid
* @param array $attributes Optional attributes
* @return Application Child element.
*/
public function application($applicationSid = null, $attributes = []): Application {
return $this->nest(new Application($applicationSid, $attributes));
}
/**
* Add WhatsApp child.
*
* @param string $phoneNumber WhatsApp Phone Number to dial
* @param array $attributes Optional attributes
* @return WhatsApp Child element.
*/
public function whatsApp($phoneNumber, $attributes = []): WhatsApp {
return $this->nest(new WhatsApp($phoneNumber, $attributes));
}
/**
* 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 for answer
*/
public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
/**
* Add HangupOnStar attribute.
*
* @param bool $hangupOnStar Hangup call on star press
*/
public function setHangupOnStar($hangupOnStar): self {
return $this->setAttribute('hangupOnStar', $hangupOnStar);
}
/**
* Add TimeLimit attribute.
*
* @param int $timeLimit Max time length
*/
public function setTimeLimit($timeLimit): self {
return $this->setAttribute('timeLimit', $timeLimit);
}
/**
* Add CallerId attribute.
*
* @param string $callerId Caller ID to display
*/
public function setCallerId($callerId): self {
return $this->setAttribute('callerId', $callerId);
}
/**
* Add Record attribute.
*
* @param string $record Record the call
*/
public function setRecord($record): self {
return $this->setAttribute('record', $record);
}
/**
* Add Trim attribute.
*
* @param string $trim Trim the recording
*/
public function setTrim($trim): self {
return $this->setAttribute('trim', $trim);
}
/**
* Add RecordingStatusCallback attribute.
*
* @param string $recordingStatusCallback Recording status callback URL
*/
public function setRecordingStatusCallback($recordingStatusCallback): self {
return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback);
}
/**
* Add RecordingStatusCallbackMethod attribute.
*
* @param string $recordingStatusCallbackMethod Recording status callback URL
* method
*/
public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self {
return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod);
}
/**
* Add RecordingStatusCallbackEvent attribute.
*
* @param string[] $recordingStatusCallbackEvent Recording status callback
* events
*/
public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self {
return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent);
}
/**
* Add AnswerOnBridge attribute.
*
* @param bool $answerOnBridge Preserve the ringing behavior of the inbound
* call until the Dialed call picks up
*/
public function setAnswerOnBridge($answerOnBridge): self {
return $this->setAttribute('answerOnBridge', $answerOnBridge);
}
/**
* Add RingTone attribute.
*
* @param string $ringTone Ringtone allows you to override the ringback tone
* that Twilio will play back to the caller while
* executing the Dial
*/
public function setRingTone($ringTone): self {
return $this->setAttribute('ringTone', $ringTone);
}
/**
* Add RecordingTrack attribute.
*
* @param string $recordingTrack To indicate which audio track should be
* recorded
*/
public function setRecordingTrack($recordingTrack): self {
return $this->setAttribute('recordingTrack', $recordingTrack);
}
/**
* Add Sequential attribute.
*
* @param bool $sequential Used to determine if child TwiML nouns should be
* dialed in order, one after the other (sequential) or
* dial all at once (parallel). Default is false,
* parallel
*/
public function setSequential($sequential): self {
return $this->setAttribute('sequential', $sequential);
}
/**
* Add ReferUrl attribute.
*
* @param string $referUrl Webhook that will receive future SIP REFER requests
*/
public function setReferUrl($referUrl): self {
return $this->setAttribute('referUrl', $referUrl);
}
/**
* Add ReferMethod attribute.
*
* @param string $referMethod The HTTP method to use for the refer Webhook
*/
public function setReferMethod($referMethod): self {
return $this->setAttribute('referMethod', $referMethod);
}
/**
* Add Events attribute.
*
* @param string $events Subscription to events
*/
public function setEvents($events): self {
return $this->setAttribute('events', $events);
}
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Echo_ extends TwiML {
/**
* Echo constructor.
*/
public function __construct() {
parent::__construct('Echo', null);
}
}

View File

@@ -0,0 +1,89 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Enqueue extends TwiML {
/**
* Enqueue constructor.
*
* @param string $name Friendly name
* @param array $attributes Optional attributes
*/
public function __construct($name = null, $attributes = []) {
parent::__construct('Enqueue', $name, $attributes);
}
/**
* Add Task child.
*
* @param string $body TaskRouter task attributes
* @param array $attributes Optional attributes
* @return Task Child element.
*/
public function task($body, $attributes = []): Task {
return $this->nest(new Task($body, $attributes));
}
/**
* Add Action attribute.
*
* @param string $action Action URL
*/
public function setAction($action): self {
return $this->setAttribute('action', $action);
}
/**
* Add MaxQueueSize attribute.
*
* @param int $maxQueueSize Maximum size of queue
*/
public function setMaxQueueSize($maxQueueSize): self {
return $this->setAttribute('maxQueueSize', $maxQueueSize);
}
/**
* Add Method attribute.
*
* @param string $method Action URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add WaitUrl attribute.
*
* @param string $waitUrl Wait URL
*/
public function setWaitUrl($waitUrl): self {
return $this->setAttribute('waitUrl', $waitUrl);
}
/**
* Add WaitUrlMethod attribute.
*
* @param string $waitUrlMethod Wait URL method
*/
public function setWaitUrlMethod($waitUrlMethod): self {
return $this->setAttribute('waitUrlMethod', $waitUrlMethod);
}
/**
* Add WorkflowSid attribute.
*
* @param string $workflowSid TaskRouter Workflow SID
*/
public function setWorkflowSid($workflowSid): self {
return $this->setAttribute('workflowSid', $workflowSid);
}
}

View File

@@ -0,0 +1,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);
}
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Hangup extends TwiML {
/**
* Hangup constructor.
*/
public function __construct() {
parent::__construct('Hangup', null);
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Identity extends TwiML {
/**
* Identity constructor.
*
* @param string $clientIdentity Identity of the client to dial
*/
public function __construct($clientIdentity) {
parent::__construct('Identity', $clientIdentity);
}
}

View File

@@ -0,0 +1,71 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Language extends TwiML {
/**
* Language constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Language', null, $attributes);
}
/**
* Add Code attribute.
*
* @param string $code Language code of this language setting is for
*/
public function setCode($code): self {
return $this->setAttribute('code', $code);
}
/**
* Add TtsProvider attribute.
*
* @param string $ttsProvider Provider to be used for text-to-speech of this
* language
*/
public function setTtsProvider($ttsProvider): self {
return $this->setAttribute('ttsProvider', $ttsProvider);
}
/**
* Add Voice attribute.
*
* @param string $voice Voice to be used for text-to-speech of this language
*/
public function setVoice($voice): self {
return $this->setAttribute('voice', $voice);
}
/**
* Add TranscriptionProvider attribute.
*
* @param string $transcriptionProvider Provider to be used for transcription
* of this language
*/
public function setTranscriptionProvider($transcriptionProvider): self {
return $this->setAttribute('transcriptionProvider', $transcriptionProvider);
}
/**
* Add SpeechModel attribute.
*
* @param string $speechModel Speech model to be used for transcription of this
* language
*/
public function setSpeechModel($speechModel): self {
return $this->setAttribute('speechModel', $speechModel);
}
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Leave extends TwiML {
/**
* Leave constructor.
*/
public function __construct() {
parent::__construct('Leave', null);
}
}

View File

@@ -0,0 +1,158 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Number extends TwiML {
/**
* Number constructor.
*
* @param string $phoneNumber Phone Number to dial
* @param array $attributes Optional attributes
*/
public function __construct($phoneNumber, $attributes = []) {
parent::__construct('Number', $phoneNumber, $attributes);
}
/**
* Add SendDigits attribute.
*
* @param string $sendDigits DTMF tones to play when the call is answered
*/
public function setSendDigits($sendDigits): self {
return $this->setAttribute('sendDigits', $sendDigits);
}
/**
* Add Url attribute.
*
* @param string $url TwiML URL
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Method attribute.
*
* @param string $method TwiML URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add StatusCallbackEvent attribute.
*
* @param string[] $statusCallbackEvent Events to call status callback
*/
public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback URL method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
/**
* Add Byoc attribute.
*
* @param string $byoc BYOC trunk SID (Beta)
*/
public function setByoc($byoc): self {
return $this->setAttribute('byoc', $byoc);
}
/**
* Add MachineDetection attribute.
*
* @param string $machineDetection Enable machine detection or end of greeting
* detection
*/
public function setMachineDetection($machineDetection): self {
return $this->setAttribute('machineDetection', $machineDetection);
}
/**
* Add AmdStatusCallbackMethod attribute.
*
* @param string $amdStatusCallbackMethod HTTP Method to use with
* amd_status_callback
*/
public function setAmdStatusCallbackMethod($amdStatusCallbackMethod): self {
return $this->setAttribute('amdStatusCallbackMethod', $amdStatusCallbackMethod);
}
/**
* Add AmdStatusCallback attribute.
*
* @param string $amdStatusCallback The URL we should call to send amd status
* information to your application
*/
public function setAmdStatusCallback($amdStatusCallback): self {
return $this->setAttribute('amdStatusCallback', $amdStatusCallback);
}
/**
* Add MachineDetectionTimeout attribute.
*
* @param int $machineDetectionTimeout Number of seconds to wait for machine
* detection
*/
public function setMachineDetectionTimeout($machineDetectionTimeout): self {
return $this->setAttribute('machineDetectionTimeout', $machineDetectionTimeout);
}
/**
* Add MachineDetectionSpeechThreshold attribute.
*
* @param int $machineDetectionSpeechThreshold Number of milliseconds for
* measuring stick for the length
* of the speech activity
*/
public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThreshold): self {
return $this->setAttribute('machineDetectionSpeechThreshold', $machineDetectionSpeechThreshold);
}
/**
* Add MachineDetectionSpeechEndThreshold attribute.
*
* @param int $machineDetectionSpeechEndThreshold Number of milliseconds of
* silence after speech activity
*/
public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEndThreshold): self {
return $this->setAttribute('machineDetectionSpeechEndThreshold', $machineDetectionSpeechEndThreshold);
}
/**
* Add MachineDetectionSilenceTimeout attribute.
*
* @param int $machineDetectionSilenceTimeout Number of milliseconds of initial
* silence
*/
public function setMachineDetectionSilenceTimeout($machineDetectionSilenceTimeout): self {
return $this->setAttribute('machineDetectionSilenceTimeout', $machineDetectionSilenceTimeout);
}
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Parameter extends TwiML {
/**
* Parameter constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Parameter', null, $attributes);
}
/**
* Add Name attribute.
*
* @param string $name The name of the custom parameter
*/
public function setName($name): self {
return $this->setAttribute('name', $name);
}
/**
* Add Value attribute.
*
* @param string $value The value of the custom parameter
*/
public function setValue($value): self {
return $this->setAttribute('value', $value);
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Pause extends TwiML {
/**
* Pause constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Pause', null, $attributes);
}
/**
* Add Length attribute.
*
* @param int $length Length in seconds to pause
*/
public function setLength($length): self {
return $this->setAttribute('length', $length);
}
}

View File

@@ -0,0 +1,212 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Pay extends TwiML {
/**
* Pay constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Pay', null, $attributes);
}
/**
* Add Prompt child.
*
* @param array $attributes Optional attributes
* @return Prompt Child element.
*/
public function prompt($attributes = []): Prompt {
return $this->nest(new Prompt($attributes));
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($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 BankAccountType attribute.
*
* @param string $bankAccountType Bank account type for ach transactions. If
* set, payment method attribute must be
* provided and value should be set to
* ach-debit. defaults to consumer-checking
*/
public function setBankAccountType($bankAccountType): self {
return $this->setAttribute('bankAccountType', $bankAccountType);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
/**
* Add Timeout attribute.
*
* @param int $timeout Time to wait to gather input
*/
public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
/**
* Add MaxAttempts attribute.
*
* @param int $maxAttempts Maximum number of allowed retries when gathering
* input
*/
public function setMaxAttempts($maxAttempts): self {
return $this->setAttribute('maxAttempts', $maxAttempts);
}
/**
* Add SecurityCode attribute.
*
* @param bool $securityCode Prompt for security code
*/
public function setSecurityCode($securityCode): self {
return $this->setAttribute('securityCode', $securityCode);
}
/**
* Add PostalCode attribute.
*
* @param string $postalCode Prompt for postal code and it should be true/false
* or default postal code
*/
public function setPostalCode($postalCode): self {
return $this->setAttribute('postalCode', $postalCode);
}
/**
* Add MinPostalCodeLength attribute.
*
* @param int $minPostalCodeLength Prompt for minimum postal code length
*/
public function setMinPostalCodeLength($minPostalCodeLength): self {
return $this->setAttribute('minPostalCodeLength', $minPostalCodeLength);
}
/**
* Add PaymentConnector attribute.
*
* @param string $paymentConnector Unique name for payment connector
*/
public function setPaymentConnector($paymentConnector): self {
return $this->setAttribute('paymentConnector', $paymentConnector);
}
/**
* Add PaymentMethod attribute.
*
* @param string $paymentMethod Payment method to be used. defaults to
* credit-card
*/
public function setPaymentMethod($paymentMethod): self {
return $this->setAttribute('paymentMethod', $paymentMethod);
}
/**
* Add TokenType attribute.
*
* @param string $tokenType Type of token
*/
public function setTokenType($tokenType): self {
return $this->setAttribute('tokenType', $tokenType);
}
/**
* Add ChargeAmount attribute.
*
* @param string $chargeAmount Amount to process. If value is greater than 0
* then make the payment else create a payment token
*/
public function setChargeAmount($chargeAmount): self {
return $this->setAttribute('chargeAmount', $chargeAmount);
}
/**
* Add Currency attribute.
*
* @param string $currency Currency of the amount attribute
*/
public function setCurrency($currency): self {
return $this->setAttribute('currency', $currency);
}
/**
* Add Description attribute.
*
* @param string $description Details regarding the payment
*/
public function setDescription($description): self {
return $this->setAttribute('description', $description);
}
/**
* Add ValidCardTypes attribute.
*
* @param string[] $validCardTypes Comma separated accepted card types
*/
public function setValidCardTypes($validCardTypes): self {
return $this->setAttribute('validCardTypes', $validCardTypes);
}
/**
* Add Language attribute.
*
* @param string $language Language to use
*/
public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Play extends TwiML {
/**
* Play constructor.
*
* @param string $url Media URL
* @param array $attributes Optional attributes
*/
public function __construct($url = null, $attributes = []) {
parent::__construct('Play', $url, $attributes);
}
/**
* Add Loop attribute.
*
* @param int $loop Times to loop media
*/
public function setLoop($loop): self {
return $this->setAttribute('loop', $loop);
}
/**
* Add Digits attribute.
*
* @param string $digits Play DTMF tones for digits
*/
public function setDigits($digits): self {
return $this->setAttribute('digits', $digits);
}
}

View File

@@ -0,0 +1,101 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Prompt extends TwiML {
/**
* Prompt constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Prompt', 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 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 Pause child.
*
* @param array $attributes Optional attributes
* @return Pause Child element.
*/
public function pause($attributes = []): Pause {
return $this->nest(new Pause($attributes));
}
/**
* Add For_ attribute.
*
* @param string $for_ Name of the payment source data element
*/
public function setFor_($for_): self {
return $this->setAttribute('for_', $for_);
}
/**
* Add ErrorType attribute.
*
* @param string[] $errorType Type of error
*/
public function setErrorType($errorType): self {
return $this->setAttribute('errorType', $errorType);
}
/**
* Add CardType attribute.
*
* @param string[] $cardType Type of the credit card
*/
public function setCardType($cardType): self {
return $this->setAttribute('cardType', $cardType);
}
/**
* Add Attempt attribute.
*
* @param int[] $attempt Current attempt count
*/
public function setAttempt($attempt): self {
return $this->setAttribute('attempt', $attempt);
}
/**
* Add RequireMatchingInputs attribute.
*
* @param bool $requireMatchingInputs Require customer to input requested
* information twice and verify matching.
*/
public function setRequireMatchingInputs($requireMatchingInputs): self {
return $this->setAttribute('requireMatchingInputs', $requireMatchingInputs);
}
}

View File

@@ -0,0 +1,60 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Queue extends TwiML {
/**
* Queue constructor.
*
* @param string $name Queue name
* @param array $attributes Optional attributes
*/
public function __construct($name, $attributes = []) {
parent::__construct('Queue', $name, $attributes);
}
/**
* Add Url attribute.
*
* @param string $url Action URL
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Method attribute.
*
* @param string $method Action URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add ReservationSid attribute.
*
* @param string $reservationSid TaskRouter Reservation SID
*/
public function setReservationSid($reservationSid): self {
return $this->setAttribute('reservationSid', $reservationSid);
}
/**
* Add PostWorkActivitySid attribute.
*
* @param string $postWorkActivitySid TaskRouter Activity SID
*/
public function setPostWorkActivitySid($postWorkActivitySid): self {
return $this->setAttribute('postWorkActivitySid', $postWorkActivitySid);
}
}

View File

@@ -0,0 +1,132 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Record extends TwiML {
/**
* Record constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Record', null, $attributes);
}
/**
* 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 Timeout to begin recording
*/
public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
/**
* Add FinishOnKey attribute.
*
* @param string $finishOnKey Finish recording on key
*/
public function setFinishOnKey($finishOnKey): self {
return $this->setAttribute('finishOnKey', $finishOnKey);
}
/**
* Add MaxLength attribute.
*
* @param int $maxLength Max time to record in seconds
*/
public function setMaxLength($maxLength): self {
return $this->setAttribute('maxLength', $maxLength);
}
/**
* Add PlayBeep attribute.
*
* @param bool $playBeep Play beep
*/
public function setPlayBeep($playBeep): self {
return $this->setAttribute('playBeep', $playBeep);
}
/**
* Add Trim attribute.
*
* @param string $trim Trim the recording
*/
public function setTrim($trim): self {
return $this->setAttribute('trim', $trim);
}
/**
* Add RecordingStatusCallback attribute.
*
* @param string $recordingStatusCallback Status callback URL
*/
public function setRecordingStatusCallback($recordingStatusCallback): self {
return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback);
}
/**
* Add RecordingStatusCallbackMethod attribute.
*
* @param string $recordingStatusCallbackMethod Status callback URL method
*/
public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self {
return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod);
}
/**
* Add RecordingStatusCallbackEvent attribute.
*
* @param string[] $recordingStatusCallbackEvent Recording status callback
* events
*/
public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self {
return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent);
}
/**
* Add Transcribe attribute.
*
* @param bool $transcribe Transcribe the recording
*/
public function setTranscribe($transcribe): self {
return $this->setAttribute('transcribe', $transcribe);
}
/**
* Add TranscribeCallback attribute.
*
* @param string $transcribeCallback Transcribe callback URL
*/
public function setTranscribeCallback($transcribeCallback): self {
return $this->setAttribute('transcribeCallback', $transcribeCallback);
}
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Recording extends TwiML {
/**
* Recording constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Recording', null, $attributes);
}
/**
* Add RecordingStatusCallback attribute.
*
* @param string $recordingStatusCallback Recording Status Callback URL
*/
public function setRecordingStatusCallback($recordingStatusCallback): self {
return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback);
}
/**
* Add RecordingStatusCallbackMethod attribute.
*
* @param string $recordingStatusCallbackMethod Recording Status Callback URL
* method
*/
public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self {
return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod);
}
/**
* Add RecordingStatusCallbackEvent attribute.
*
* @param string[] $recordingStatusCallbackEvent Recording Status Callback
* Events
*/
public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self {
return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent);
}
/**
* Add Trim attribute.
*
* @param string $trim Trim the recording
*/
public function setTrim($trim): self {
return $this->setAttribute('trim', $trim);
}
/**
* Add Track attribute.
*
* @param string $track To indicate which audio track should be recorded
*/
public function setTrack($track): self {
return $this->setAttribute('track', $track);
}
/**
* Add Channels attribute.
*
* @param string $channels The recording channels for the final recording
*/
public function setChannels($channels): self {
return $this->setAttribute('channels', $channels);
}
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Redirect extends TwiML {
/**
* Redirect constructor.
*
* @param string $url Redirect URL
* @param array $attributes Optional attributes
*/
public function __construct($url, $attributes = []) {
parent::__construct('Redirect', $url, $attributes);
}
/**
* Add Method attribute.
*
* @param string $method Redirect URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Refer extends TwiML {
/**
* Refer constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Refer', null, $attributes);
}
/**
* Add Sip child.
*
* @param string $sipUrl SIP URL
* @return ReferSip Child element.
*/
public function sip($sipUrl): ReferSip {
return $this->nest(new ReferSip($sipUrl));
}
/**
* 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);
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class ReferSip extends TwiML {
/**
* ReferSip constructor.
*
* @param string $sipUrl SIP URL
*/
public function __construct($sipUrl) {
parent::__construct('Sip', $sipUrl);
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Reject extends TwiML {
/**
* Reject constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Reject', null, $attributes);
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add Reason attribute.
*
* @param string $reason Rejection reason
*/
public function setReason($reason): self {
return $this->setAttribute('reason', $reason);
}
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Room extends TwiML {
/**
* Room constructor.
*
* @param string $name Room name
* @param array $attributes Optional attributes
*/
public function __construct($name, $attributes = []) {
parent::__construct('Room', $name, $attributes);
}
/**
* Add ParticipantIdentity attribute.
*
* @param string $participantIdentity Participant identity when connecting to
* the Room
*/
public function setParticipantIdentity($participantIdentity): self {
return $this->setAttribute('participantIdentity', $participantIdentity);
}
}

View File

@@ -0,0 +1,158 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Say extends TwiML {
/**
* Say constructor.
*
* @param string $message Message to say
* @param array $attributes Optional attributes
*/
public function __construct($message, $attributes = []) {
parent::__construct('Say', $message, $attributes);
}
/**
* Add Break child.
*
* @param array $attributes Optional attributes
* @return SsmlBreak Child element.
*/
public function break_($attributes = []): SsmlBreak {
return $this->nest(new SsmlBreak($attributes));
}
/**
* Add Emphasis child.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
* @return SsmlEmphasis Child element.
*/
public function emphasis($words, $attributes = []): SsmlEmphasis {
return $this->nest(new SsmlEmphasis($words, $attributes));
}
/**
* Add Lang child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlLang Child element.
*/
public function lang($words, $attributes = []): SsmlLang {
return $this->nest(new SsmlLang($words, $attributes));
}
/**
* Add P child.
*
* @param string $words Words to speak
* @return SsmlP Child element.
*/
public function p($words): SsmlP {
return $this->nest(new SsmlP($words));
}
/**
* Add Phoneme child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlPhoneme Child element.
*/
public function phoneme($words, $attributes = []): SsmlPhoneme {
return $this->nest(new SsmlPhoneme($words, $attributes));
}
/**
* Add Prosody child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlProsody Child element.
*/
public function prosody($words, $attributes = []): SsmlProsody {
return $this->nest(new SsmlProsody($words, $attributes));
}
/**
* Add S child.
*
* @param string $words Words to speak
* @return SsmlS Child element.
*/
public function s($words): SsmlS {
return $this->nest(new SsmlS($words));
}
/**
* Add Say-As child.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
* @return SsmlSayAs Child element.
*/
public function say_As($words, $attributes = []): SsmlSayAs {
return $this->nest(new SsmlSayAs($words, $attributes));
}
/**
* Add Sub child.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
* @return SsmlSub Child element.
*/
public function sub($words, $attributes = []): SsmlSub {
return $this->nest(new SsmlSub($words, $attributes));
}
/**
* Add W child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlW Child element.
*/
public function w($words, $attributes = []): SsmlW {
return $this->nest(new SsmlW($words, $attributes));
}
/**
* Add Voice attribute.
*
* @param string $voice Voice to use
*/
public function setVoice($voice): self {
return $this->setAttribute('voice', $voice);
}
/**
* Add Loop attribute.
*
* @param int $loop Times to loop message
*/
public function setLoop($loop): self {
return $this->setAttribute('loop', $loop);
}
/**
* Add Language attribute.
*
* @param string $language Message language
*/
public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Sim extends TwiML {
/**
* Sim constructor.
*
* @param string $simSid SIM SID
*/
public function __construct($simSid) {
parent::__construct('Sim', $simSid);
}
}

View File

@@ -0,0 +1,158 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Sip extends TwiML {
/**
* Sip constructor.
*
* @param string $sipUrl SIP URL
* @param array $attributes Optional attributes
*/
public function __construct($sipUrl, $attributes = []) {
parent::__construct('Sip', $sipUrl, $attributes);
}
/**
* Add Username attribute.
*
* @param string $username SIP Username
*/
public function setUsername($username): self {
return $this->setAttribute('username', $username);
}
/**
* Add Password attribute.
*
* @param string $password SIP Password
*/
public function setPassword($password): self {
return $this->setAttribute('password', $password);
}
/**
* Add Url attribute.
*
* @param string $url Action URL
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Method attribute.
*
* @param string $method Action URL method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add StatusCallbackEvent attribute.
*
* @param string[] $statusCallbackEvent Status callback events
*/
public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback URL method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
/**
* Add MachineDetection attribute.
*
* @param string $machineDetection Enable machine detection or end of greeting
* detection
*/
public function setMachineDetection($machineDetection): self {
return $this->setAttribute('machineDetection', $machineDetection);
}
/**
* Add AmdStatusCallbackMethod attribute.
*
* @param string $amdStatusCallbackMethod HTTP Method to use with
* amd_status_callback
*/
public function setAmdStatusCallbackMethod($amdStatusCallbackMethod): self {
return $this->setAttribute('amdStatusCallbackMethod', $amdStatusCallbackMethod);
}
/**
* Add AmdStatusCallback attribute.
*
* @param string $amdStatusCallback The URL we should call to send amd status
* information to your application
*/
public function setAmdStatusCallback($amdStatusCallback): self {
return $this->setAttribute('amdStatusCallback', $amdStatusCallback);
}
/**
* Add MachineDetectionTimeout attribute.
*
* @param int $machineDetectionTimeout Number of seconds to wait for machine
* detection
*/
public function setMachineDetectionTimeout($machineDetectionTimeout): self {
return $this->setAttribute('machineDetectionTimeout', $machineDetectionTimeout);
}
/**
* Add MachineDetectionSpeechThreshold attribute.
*
* @param int $machineDetectionSpeechThreshold Number of milliseconds for
* measuring stick for the length
* of the speech activity
*/
public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThreshold): self {
return $this->setAttribute('machineDetectionSpeechThreshold', $machineDetectionSpeechThreshold);
}
/**
* Add MachineDetectionSpeechEndThreshold attribute.
*
* @param int $machineDetectionSpeechEndThreshold Number of milliseconds of
* silence after speech activity
*/
public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEndThreshold): self {
return $this->setAttribute('machineDetectionSpeechEndThreshold', $machineDetectionSpeechEndThreshold);
}
/**
* Add MachineDetectionSilenceTimeout attribute.
*
* @param int $machineDetectionSilenceTimeout Number of milliseconds of initial
* silence
*/
public function setMachineDetectionSilenceTimeout($machineDetectionSilenceTimeout): self {
return $this->setAttribute('machineDetectionSilenceTimeout', $machineDetectionSilenceTimeout);
}
}

View File

@@ -0,0 +1,78 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Siprec extends TwiML {
/**
* Siprec constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Siprec', null, $attributes);
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add Name attribute.
*
* @param string $name Friendly name given to SIPREC
*/
public function setName($name): self {
return $this->setAttribute('name', $name);
}
/**
* Add ConnectorName attribute.
*
* @param string $connectorName Unique name for Connector
*/
public function setConnectorName($connectorName): self {
return $this->setAttribute('connectorName', $connectorName);
}
/**
* Add Track attribute.
*
* @param string $track Track to be streamed to remote service
*/
public function setTrack($track): self {
return $this->setAttribute('track', $track);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status Callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status Callback URL method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Sms extends TwiML {
/**
* Sms constructor.
*
* @param string $message Message body
* @param array $attributes Optional attributes
*/
public function __construct($message, $attributes = []) {
parent::__construct('Sms', $message, $attributes);
}
/**
* Add To attribute.
*
* @param string $to Number to send message to
*/
public function setTo($to): self {
return $this->setAttribute('to', $to);
}
/**
* Add From attribute.
*
* @param string $from Number to send message from
*/
public function setFrom($from): self {
return $this->setAttribute('from', $from);
}
/**
* 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 StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlBreak extends TwiML {
/**
* SsmlBreak constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('break', null, $attributes);
}
/**
* Add Strength attribute.
*
* @param string $strength Set a pause based on strength
*/
public function setStrength($strength): self {
return $this->setAttribute('strength', $strength);
}
/**
* Add Time attribute.
*
* @param string $time Set a pause to a specific length of time in seconds or
* milliseconds, available values: [number]s, [number]ms
*/
public function setTime($time): self {
return $this->setAttribute('time', $time);
}
}

View File

@@ -0,0 +1,120 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlEmphasis extends TwiML {
/**
* SsmlEmphasis constructor.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
*/
public function __construct($words, $attributes = []) {
parent::__construct('emphasis', $words, $attributes);
}
/**
* Add Break child.
*
* @param array $attributes Optional attributes
* @return SsmlBreak Child element.
*/
public function break_($attributes = []): SsmlBreak {
return $this->nest(new SsmlBreak($attributes));
}
/**
* Add Emphasis child.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
* @return SsmlEmphasis Child element.
*/
public function emphasis($words, $attributes = []): SsmlEmphasis {
return $this->nest(new SsmlEmphasis($words, $attributes));
}
/**
* Add Lang child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlLang Child element.
*/
public function lang($words, $attributes = []): SsmlLang {
return $this->nest(new SsmlLang($words, $attributes));
}
/**
* Add Phoneme child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlPhoneme Child element.
*/
public function phoneme($words, $attributes = []): SsmlPhoneme {
return $this->nest(new SsmlPhoneme($words, $attributes));
}
/**
* Add Prosody child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlProsody Child element.
*/
public function prosody($words, $attributes = []): SsmlProsody {
return $this->nest(new SsmlProsody($words, $attributes));
}
/**
* Add Say-As child.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
* @return SsmlSayAs Child element.
*/
public function say_As($words, $attributes = []): SsmlSayAs {
return $this->nest(new SsmlSayAs($words, $attributes));
}
/**
* Add Sub child.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
* @return SsmlSub Child element.
*/
public function sub($words, $attributes = []): SsmlSub {
return $this->nest(new SsmlSub($words, $attributes));
}
/**
* Add W child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlW Child element.
*/
public function w($words, $attributes = []): SsmlW {
return $this->nest(new SsmlW($words, $attributes));
}
/**
* Add Level attribute.
*
* @param string $level Specify the degree of emphasis
*/
public function setLevel($level): self {
return $this->setAttribute('level', $level);
}
}

View File

@@ -0,0 +1,140 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlLang extends TwiML {
/**
* SsmlLang constructor.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
*/
public function __construct($words, $attributes = []) {
parent::__construct('lang', $words, $attributes);
}
/**
* Add Break child.
*
* @param array $attributes Optional attributes
* @return SsmlBreak Child element.
*/
public function break_($attributes = []): SsmlBreak {
return $this->nest(new SsmlBreak($attributes));
}
/**
* Add Emphasis child.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
* @return SsmlEmphasis Child element.
*/
public function emphasis($words, $attributes = []): SsmlEmphasis {
return $this->nest(new SsmlEmphasis($words, $attributes));
}
/**
* Add Lang child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlLang Child element.
*/
public function lang($words, $attributes = []): SsmlLang {
return $this->nest(new SsmlLang($words, $attributes));
}
/**
* Add P child.
*
* @param string $words Words to speak
* @return SsmlP Child element.
*/
public function p($words): SsmlP {
return $this->nest(new SsmlP($words));
}
/**
* Add Phoneme child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlPhoneme Child element.
*/
public function phoneme($words, $attributes = []): SsmlPhoneme {
return $this->nest(new SsmlPhoneme($words, $attributes));
}
/**
* Add Prosody child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlProsody Child element.
*/
public function prosody($words, $attributes = []): SsmlProsody {
return $this->nest(new SsmlProsody($words, $attributes));
}
/**
* Add S child.
*
* @param string $words Words to speak
* @return SsmlS Child element.
*/
public function s($words): SsmlS {
return $this->nest(new SsmlS($words));
}
/**
* Add Say-As child.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
* @return SsmlSayAs Child element.
*/
public function say_As($words, $attributes = []): SsmlSayAs {
return $this->nest(new SsmlSayAs($words, $attributes));
}
/**
* Add Sub child.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
* @return SsmlSub Child element.
*/
public function sub($words, $attributes = []): SsmlSub {
return $this->nest(new SsmlSub($words, $attributes));
}
/**
* Add W child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlW Child element.
*/
public function w($words, $attributes = []): SsmlW {
return $this->nest(new SsmlW($words, $attributes));
}
/**
* Add Xml:Lang attribute.
*
* @param string $xmlLang Specify the language
*/
public function setXmlLang($xmlLang): self {
return $this->setAttribute('xml:Lang', $xmlLang);
}
}

View File

@@ -0,0 +1,120 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlP extends TwiML {
/**
* SsmlP constructor.
*
* @param string $words Words to speak
*/
public function __construct($words) {
parent::__construct('p', $words);
}
/**
* Add Break child.
*
* @param array $attributes Optional attributes
* @return SsmlBreak Child element.
*/
public function break_($attributes = []): SsmlBreak {
return $this->nest(new SsmlBreak($attributes));
}
/**
* Add Emphasis child.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
* @return SsmlEmphasis Child element.
*/
public function emphasis($words, $attributes = []): SsmlEmphasis {
return $this->nest(new SsmlEmphasis($words, $attributes));
}
/**
* Add Lang child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlLang Child element.
*/
public function lang($words, $attributes = []): SsmlLang {
return $this->nest(new SsmlLang($words, $attributes));
}
/**
* Add Phoneme child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlPhoneme Child element.
*/
public function phoneme($words, $attributes = []): SsmlPhoneme {
return $this->nest(new SsmlPhoneme($words, $attributes));
}
/**
* Add Prosody child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlProsody Child element.
*/
public function prosody($words, $attributes = []): SsmlProsody {
return $this->nest(new SsmlProsody($words, $attributes));
}
/**
* Add S child.
*
* @param string $words Words to speak
* @return SsmlS Child element.
*/
public function s($words): SsmlS {
return $this->nest(new SsmlS($words));
}
/**
* Add Say-As child.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
* @return SsmlSayAs Child element.
*/
public function say_As($words, $attributes = []): SsmlSayAs {
return $this->nest(new SsmlSayAs($words, $attributes));
}
/**
* Add Sub child.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
* @return SsmlSub Child element.
*/
public function sub($words, $attributes = []): SsmlSub {
return $this->nest(new SsmlSub($words, $attributes));
}
/**
* Add W child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlW Child element.
*/
public function w($words, $attributes = []): SsmlW {
return $this->nest(new SsmlW($words, $attributes));
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlPhoneme extends TwiML {
/**
* SsmlPhoneme constructor.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
*/
public function __construct($words, $attributes = []) {
parent::__construct('phoneme', $words, $attributes);
}
/**
* Add Alphabet attribute.
*
* @param string $alphabet Specify the phonetic alphabet
*/
public function setAlphabet($alphabet): self {
return $this->setAttribute('alphabet', $alphabet);
}
/**
* Add Ph attribute.
*
* @param string $ph Specifiy the phonetic symbols for pronunciation
*/
public function setPh($ph): self {
return $this->setAttribute('ph', $ph);
}
}

View File

@@ -0,0 +1,161 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlProsody extends TwiML {
/**
* SsmlProsody constructor.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
*/
public function __construct($words, $attributes = []) {
parent::__construct('prosody', $words, $attributes);
}
/**
* Add Break child.
*
* @param array $attributes Optional attributes
* @return SsmlBreak Child element.
*/
public function break_($attributes = []): SsmlBreak {
return $this->nest(new SsmlBreak($attributes));
}
/**
* Add Emphasis child.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
* @return SsmlEmphasis Child element.
*/
public function emphasis($words, $attributes = []): SsmlEmphasis {
return $this->nest(new SsmlEmphasis($words, $attributes));
}
/**
* Add Lang child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlLang Child element.
*/
public function lang($words, $attributes = []): SsmlLang {
return $this->nest(new SsmlLang($words, $attributes));
}
/**
* Add P child.
*
* @param string $words Words to speak
* @return SsmlP Child element.
*/
public function p($words): SsmlP {
return $this->nest(new SsmlP($words));
}
/**
* Add Phoneme child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlPhoneme Child element.
*/
public function phoneme($words, $attributes = []): SsmlPhoneme {
return $this->nest(new SsmlPhoneme($words, $attributes));
}
/**
* Add Prosody child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlProsody Child element.
*/
public function prosody($words, $attributes = []): SsmlProsody {
return $this->nest(new SsmlProsody($words, $attributes));
}
/**
* Add S child.
*
* @param string $words Words to speak
* @return SsmlS Child element.
*/
public function s($words): SsmlS {
return $this->nest(new SsmlS($words));
}
/**
* Add Say-As child.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
* @return SsmlSayAs Child element.
*/
public function say_As($words, $attributes = []): SsmlSayAs {
return $this->nest(new SsmlSayAs($words, $attributes));
}
/**
* Add Sub child.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
* @return SsmlSub Child element.
*/
public function sub($words, $attributes = []): SsmlSub {
return $this->nest(new SsmlSub($words, $attributes));
}
/**
* Add W child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlW Child element.
*/
public function w($words, $attributes = []): SsmlW {
return $this->nest(new SsmlW($words, $attributes));
}
/**
* Add Volume attribute.
*
* @param string $volume Specify the volume, available values: default, silent,
* x-soft, soft, medium, loud, x-loud, +ndB, -ndB
*/
public function setVolume($volume): self {
return $this->setAttribute('volume', $volume);
}
/**
* Add Rate attribute.
*
* @param string $rate Specify the rate, available values: x-slow, slow,
* medium, fast, x-fast, n%
*/
public function setRate($rate): self {
return $this->setAttribute('rate', $rate);
}
/**
* Add Pitch attribute.
*
* @param string $pitch Specify the pitch, available values: default, x-low,
* low, medium, high, x-high, +n%, -n%
*/
public function setPitch($pitch): self {
return $this->setAttribute('pitch', $pitch);
}
}

View File

@@ -0,0 +1,110 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlS extends TwiML {
/**
* SsmlS constructor.
*
* @param string $words Words to speak
*/
public function __construct($words) {
parent::__construct('s', $words);
}
/**
* Add Break child.
*
* @param array $attributes Optional attributes
* @return SsmlBreak Child element.
*/
public function break_($attributes = []): SsmlBreak {
return $this->nest(new SsmlBreak($attributes));
}
/**
* Add Emphasis child.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
* @return SsmlEmphasis Child element.
*/
public function emphasis($words, $attributes = []): SsmlEmphasis {
return $this->nest(new SsmlEmphasis($words, $attributes));
}
/**
* Add Lang child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlLang Child element.
*/
public function lang($words, $attributes = []): SsmlLang {
return $this->nest(new SsmlLang($words, $attributes));
}
/**
* Add Phoneme child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlPhoneme Child element.
*/
public function phoneme($words, $attributes = []): SsmlPhoneme {
return $this->nest(new SsmlPhoneme($words, $attributes));
}
/**
* Add Prosody child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlProsody Child element.
*/
public function prosody($words, $attributes = []): SsmlProsody {
return $this->nest(new SsmlProsody($words, $attributes));
}
/**
* Add Say-As child.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
* @return SsmlSayAs Child element.
*/
public function say_As($words, $attributes = []): SsmlSayAs {
return $this->nest(new SsmlSayAs($words, $attributes));
}
/**
* Add Sub child.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
* @return SsmlSub Child element.
*/
public function sub($words, $attributes = []): SsmlSub {
return $this->nest(new SsmlSub($words, $attributes));
}
/**
* Add W child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlW Child element.
*/
public function w($words, $attributes = []): SsmlW {
return $this->nest(new SsmlW($words, $attributes));
}
}

View File

@@ -0,0 +1,43 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlSayAs extends TwiML {
/**
* SsmlSayAs constructor.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
*/
public function __construct($words, $attributes = []) {
parent::__construct('say-as', $words, $attributes);
}
/**
* Add Interpret-As attribute.
*
* @param string $interpretAs Specify the type of words are spoken
*/
public function setInterpretAs($interpretAs): self {
return $this->setAttribute('interpret-as', $interpretAs);
}
/**
* Add Format attribute.
*
* @param string $format Specify the format of the date when interpret-as is
* set to date
*/
public function setFormat($format): self {
return $this->setAttribute('format', $format);
}
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlSub extends TwiML {
/**
* SsmlSub constructor.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
*/
public function __construct($words, $attributes = []) {
parent::__construct('sub', $words, $attributes);
}
/**
* Add Alias attribute.
*
* @param string $alias Substitute a different word (or pronunciation) for
* selected text such as an acronym or abbreviation
*/
public function setAlias($alias): self {
return $this->setAttribute('alias', $alias);
}
}

View File

@@ -0,0 +1,99 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class SsmlW extends TwiML {
/**
* SsmlW constructor.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
*/
public function __construct($words, $attributes = []) {
parent::__construct('w', $words, $attributes);
}
/**
* Add Break child.
*
* @param array $attributes Optional attributes
* @return SsmlBreak Child element.
*/
public function break_($attributes = []): SsmlBreak {
return $this->nest(new SsmlBreak($attributes));
}
/**
* Add Emphasis child.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
* @return SsmlEmphasis Child element.
*/
public function emphasis($words, $attributes = []): SsmlEmphasis {
return $this->nest(new SsmlEmphasis($words, $attributes));
}
/**
* Add Phoneme child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlPhoneme Child element.
*/
public function phoneme($words, $attributes = []): SsmlPhoneme {
return $this->nest(new SsmlPhoneme($words, $attributes));
}
/**
* Add Prosody child.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
* @return SsmlProsody Child element.
*/
public function prosody($words, $attributes = []): SsmlProsody {
return $this->nest(new SsmlProsody($words, $attributes));
}
/**
* Add Say-As child.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
* @return SsmlSayAs Child element.
*/
public function say_As($words, $attributes = []): SsmlSayAs {
return $this->nest(new SsmlSayAs($words, $attributes));
}
/**
* Add Sub child.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
* @return SsmlSub Child element.
*/
public function sub($words, $attributes = []): SsmlSub {
return $this->nest(new SsmlSub($words, $attributes));
}
/**
* Add Role attribute.
*
* @param string $role Customize the pronunciation of words by specifying the
* words part of speech or alternate meaning
*/
public function setRole($role): self {
return $this->setAttribute('role', $role);
}
}

View File

@@ -0,0 +1,81 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Start extends TwiML {
/**
* Start constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Start', null, $attributes);
}
/**
* Add Stream child.
*
* @param array $attributes Optional attributes
* @return Stream Child element.
*/
public function stream($attributes = []): Stream {
return $this->nest(new Stream($attributes));
}
/**
* Add Siprec child.
*
* @param array $attributes Optional attributes
* @return Siprec Child element.
*/
public function siprec($attributes = []): Siprec {
return $this->nest(new Siprec($attributes));
}
/**
* Add Transcription child.
*
* @param array $attributes Optional attributes
* @return Transcription Child element.
*/
public function transcription($attributes = []): Transcription {
return $this->nest(new Transcription($attributes));
}
/**
* Add Recording child.
*
* @param array $attributes Optional attributes
* @return Recording Child element.
*/
public function recording($attributes = []): Recording {
return $this->nest(new Recording($attributes));
}
/**
* 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);
}
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Stop extends TwiML {
/**
* Stop constructor.
*/
public function __construct() {
parent::__construct('Stop', null);
}
/**
* Add Stream child.
*
* @param array $attributes Optional attributes
* @return Stream Child element.
*/
public function stream($attributes = []): Stream {
return $this->nest(new Stream($attributes));
}
/**
* Add Siprec child.
*
* @param array $attributes Optional attributes
* @return Siprec Child element.
*/
public function siprec($attributes = []): Siprec {
return $this->nest(new Siprec($attributes));
}
/**
* Add Transcription child.
*
* @param array $attributes Optional attributes
* @return Transcription Child element.
*/
public function transcription($attributes = []): Transcription {
return $this->nest(new Transcription($attributes));
}
}

View File

@@ -0,0 +1,87 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Stream extends TwiML {
/**
* Stream constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Stream', null, $attributes);
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add Name attribute.
*
* @param string $name Friendly name given to the Stream
*/
public function setName($name): self {
return $this->setAttribute('name', $name);
}
/**
* Add ConnectorName attribute.
*
* @param string $connectorName Unique name for Stream Connector
*/
public function setConnectorName($connectorName): self {
return $this->setAttribute('connectorName', $connectorName);
}
/**
* Add Url attribute.
*
* @param string $url URL of the remote service where the Stream is routed
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Track attribute.
*
* @param string $track Track to be streamed to remote service
*/
public function setTrack($track): self {
return $this->setAttribute('track', $track);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status Callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status Callback URL method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Task extends TwiML {
/**
* Task constructor.
*
* @param string $body TaskRouter task attributes
* @param array $attributes Optional attributes
*/
public function __construct($body, $attributes = []) {
parent::__construct('Task', $body, $attributes);
}
/**
* Add Priority attribute.
*
* @param int $priority Task priority
*/
public function setPriority($priority): self {
return $this->setAttribute('priority', $priority);
}
/**
* Add Timeout attribute.
*
* @param int $timeout Timeout associated with task
*/
public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
}

View File

@@ -0,0 +1,172 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class Transcription extends TwiML {
/**
* Transcription constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('Transcription', null, $attributes);
}
/**
* Add Config child.
*
* @param array $attributes Optional attributes
* @return Config Child element.
*/
public function config($attributes = []): Config {
return $this->nest(new Config($attributes));
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add Name attribute.
*
* @param string $name Friendly name given to the Transcription
*/
public function setName($name): self {
return $this->setAttribute('name', $name);
}
/**
* Add Track attribute.
*
* @param string $track Track to be analyze by the provider
*/
public function setTrack($track): self {
return $this->setAttribute('track', $track);
}
/**
* Add StatusCallbackUrl attribute.
*
* @param string $statusCallbackUrl Status Callback URL
*/
public function setStatusCallbackUrl($statusCallbackUrl): self {
return $this->setAttribute('statusCallbackUrl', $statusCallbackUrl);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status Callback URL method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
/**
* Add InboundTrackLabel attribute.
*
* @param string $inboundTrackLabel Friendly name given to the Inbound Track
*/
public function setInboundTrackLabel($inboundTrackLabel): self {
return $this->setAttribute('inboundTrackLabel', $inboundTrackLabel);
}
/**
* Add OutboundTrackLabel attribute.
*
* @param string $outboundTrackLabel Friendly name given to the Outbound Track
* Label
*/
public function setOutboundTrackLabel($outboundTrackLabel): self {
return $this->setAttribute('outboundTrackLabel', $outboundTrackLabel);
}
/**
* Add PartialResults attribute.
*
* @param bool $partialResults Indicates if partial results are going to be
* send to the customer
*/
public function setPartialResults($partialResults): self {
return $this->setAttribute('partialResults', $partialResults);
}
/**
* Add LanguageCode attribute.
*
* @param string $languageCode Language Code used by the transcription engine
*/
public function setLanguageCode($languageCode): self {
return $this->setAttribute('languageCode', $languageCode);
}
/**
* Add TranscriptionEngine attribute.
*
* @param string $transcriptionEngine Transcription Engine to be used
*/
public function setTranscriptionEngine($transcriptionEngine): self {
return $this->setAttribute('transcriptionEngine', $transcriptionEngine);
}
/**
* Add ProfanityFilter attribute.
*
* @param bool $profanityFilter Enable Profanity Filter
*/
public function setProfanityFilter($profanityFilter): self {
return $this->setAttribute('profanityFilter', $profanityFilter);
}
/**
* Add SpeechModel attribute.
*
* @param string $speechModel Speech Model used by the transcription engine
*/
public function setSpeechModel($speechModel): self {
return $this->setAttribute('speechModel', $speechModel);
}
/**
* Add Hints attribute.
*
* @param string $hints Hints to be provided to the transcription engine
*/
public function setHints($hints): self {
return $this->setAttribute('hints', $hints);
}
/**
* Add EnableAutomaticPunctuation attribute.
*
* @param bool $enableAutomaticPunctuation Enable Automatic Punctuation
*/
public function setEnableAutomaticPunctuation($enableAutomaticPunctuation): self {
return $this->setAttribute('enableAutomaticPunctuation', $enableAutomaticPunctuation);
}
/**
* Add IntelligenceService attribute.
*
* @param string $intelligenceService The SID or the unique name of the
* Intelligence Service to be used
*/
public function setIntelligenceService($intelligenceService): self {
return $this->setAttribute('intelligenceService', $intelligenceService);
}
}

View File

@@ -0,0 +1,92 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class VirtualAgent extends TwiML {
/**
* VirtualAgent constructor.
*
* @param array $attributes Optional attributes
*/
public function __construct($attributes = []) {
parent::__construct('VirtualAgent', null, $attributes);
}
/**
* Add Config child.
*
* @param array $attributes Optional attributes
* @return Config Child element.
*/
public function config($attributes = []): Config {
return $this->nest(new Config($attributes));
}
/**
* Add Parameter child.
*
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
/**
* Add ConnectorName attribute.
*
* @param string $connectorName Defines the conversation profile Dialogflow
* needs to use
*/
public function setConnectorName($connectorName): self {
return $this->setAttribute('connectorName', $connectorName);
}
/**
* Add Language attribute.
*
* @param string $language Language to be used by Dialogflow to transcribe
* speech
*/
public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
/**
* Add SentimentAnalysis attribute.
*
* @param bool $sentimentAnalysis Whether sentiment analysis needs to be
* enabled or not
*/
public function setSentimentAnalysis($sentimentAnalysis): self {
return $this->setAttribute('sentimentAnalysis', $sentimentAnalysis);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback URL to post status callbacks from Twilio
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod HTTP method to use when requesting the
* status callback URL
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML\Voice;
use Twilio\TwiML\TwiML;
class WhatsApp extends TwiML {
/**
* WhatsApp constructor.
*
* @param string $phoneNumber WhatsApp Phone Number to dial
* @param array $attributes Optional attributes
*/
public function __construct($phoneNumber, $attributes = []) {
parent::__construct('WhatsApp', $phoneNumber, $attributes);
}
/**
* Add Url attribute.
*
* @param string $url TwiML URL
*/
public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
/**
* Add Method attribute.
*
* @param string $method TwiML URL Method
*/
public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add StatusCallbackEvent attribute.
*
* @param string[] $statusCallbackEvent Events to trigger status callback
*/
public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
/**
* Add StatusCallback attribute.
*
* @param string $statusCallback Status Callback URL
*/
public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
/**
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status Callback URL Method
*/
public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
}

View File

@@ -0,0 +1,222 @@
<?php
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
namespace Twilio\TwiML;
class VoiceResponse extends TwiML {
/**
* VoiceResponse constructor.
*/
public function __construct() {
parent::__construct('Response', null);
}
/**
* Add Connect child.
*
* @param array $attributes Optional attributes
* @return Voice\Connect Child element.
*/
public function connect($attributes = []): Voice\Connect {
return $this->nest(new Voice\Connect($attributes));
}
/**
* Add Dial child.
*
* @param string $number Phone number to dial
* @param array $attributes Optional attributes
* @return Voice\Dial Child element.
*/
public function dial($number = null, $attributes = []): Voice\Dial {
return $this->nest(new Voice\Dial($number, $attributes));
}
/**
* Add Echo child.
*
* @return Voice\Echo_ Child element.
*/
public function echo_(): Voice\Echo_ {
return $this->nest(new Voice\Echo_());
}
/**
* Add Enqueue child.
*
* @param string $name Friendly name
* @param array $attributes Optional attributes
* @return Voice\Enqueue Child element.
*/
public function enqueue($name = null, $attributes = []): Voice\Enqueue {
return $this->nest(new Voice\Enqueue($name, $attributes));
}
/**
* Add Gather child.
*
* @param array $attributes Optional attributes
* @return Voice\Gather Child element.
*/
public function gather($attributes = []): Voice\Gather {
return $this->nest(new Voice\Gather($attributes));
}
/**
* Add Hangup child.
*
* @return Voice\Hangup Child element.
*/
public function hangup(): Voice\Hangup {
return $this->nest(new Voice\Hangup());
}
/**
* Add Leave child.
*
* @return Voice\Leave Child element.
*/
public function leave(): Voice\Leave {
return $this->nest(new Voice\Leave());
}
/**
* Add Pause child.
*
* @param array $attributes Optional attributes
* @return Voice\Pause Child element.
*/
public function pause($attributes = []): Voice\Pause {
return $this->nest(new Voice\Pause($attributes));
}
/**
* Add Play child.
*
* @param string $url Media URL
* @param array $attributes Optional attributes
* @return Voice\Play Child element.
*/
public function play($url = null, $attributes = []): Voice\Play {
return $this->nest(new Voice\Play($url, $attributes));
}
/**
* Add Queue child.
*
* @param string $name Queue name
* @param array $attributes Optional attributes
* @return Voice\Queue Child element.
*/
public function queue($name, $attributes = []): Voice\Queue {
return $this->nest(new Voice\Queue($name, $attributes));
}
/**
* Add Record child.
*
* @param array $attributes Optional attributes
* @return Voice\Record Child element.
*/
public function record($attributes = []): Voice\Record {
return $this->nest(new Voice\Record($attributes));
}
/**
* Add Redirect child.
*
* @param string $url Redirect URL
* @param array $attributes Optional attributes
* @return Voice\Redirect Child element.
*/
public function redirect($url, $attributes = []): Voice\Redirect {
return $this->nest(new Voice\Redirect($url, $attributes));
}
/**
* Add Reject child.
*
* @param array $attributes Optional attributes
* @return Voice\Reject Child element.
*/
public function reject($attributes = []): Voice\Reject {
return $this->nest(new Voice\Reject($attributes));
}
/**
* Add Say child.
*
* @param string $message Message to say
* @param array $attributes Optional attributes
* @return Voice\Say Child element.
*/
public function say($message, $attributes = []): Voice\Say {
return $this->nest(new Voice\Say($message, $attributes));
}
/**
* Add Sms child.
*
* @param string $message Message body
* @param array $attributes Optional attributes
* @return Voice\Sms Child element.
*/
public function sms($message, $attributes = []): Voice\Sms {
return $this->nest(new Voice\Sms($message, $attributes));
}
/**
* Add Pay child.
*
* @param array $attributes Optional attributes
* @return Voice\Pay Child element.
*/
public function pay($attributes = []): Voice\Pay {
return $this->nest(new Voice\Pay($attributes));
}
/**
* Add Prompt child.
*
* @param array $attributes Optional attributes
* @return Voice\Prompt Child element.
*/
public function prompt($attributes = []): Voice\Prompt {
return $this->nest(new Voice\Prompt($attributes));
}
/**
* Add Start child.
*
* @param array $attributes Optional attributes
* @return Voice\Start Child element.
*/
public function start($attributes = []): Voice\Start {
return $this->nest(new Voice\Start($attributes));
}
/**
* Add Stop child.
*
* @return Voice\Stop Child element.
*/
public function stop(): Voice\Stop {
return $this->nest(new Voice\Stop());
}
/**
* Add Refer child.
*
* @param array $attributes Optional attributes
* @return Voice\Refer Child element.
*/
public function refer($attributes = []): Voice\Refer {
return $this->nest(new Voice\Refer($attributes));
}
}