Jelajahi Sumber

#1326 Update all plugins: Twilio from 5.16.6 to 5.19.6

Alex Trofimov 8 tahun lalu
induk
melakukan
2168733835
77 mengubah file dengan 4886 tambahan dan 947 penghapusan
  1. 111 0
      plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingContext.php
  2. 164 0
      plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingInstance.php
  3. 153 0
      plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingList.php
  4. 86 0
      plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.php
  5. 39 0
      plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingPage.php
  6. 118 0
      plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookContext.php
  7. 147 0
      plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookInstance.php
  8. 181 0
      plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookList.php
  9. 241 0
      plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.php
  10. 39 0
      plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookPage.php
  11. 118 0
      plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookContext.php
  12. 148 0
      plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookInstance.php
  13. 181 0
      plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookList.php
  14. 241 0
      plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.php
  15. 39 0
      plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookPage.php
  16. 9 7
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueContext.php
  17. 16 10
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueInstance.php
  18. 25 14
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueList.php
  19. 110 0
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.php
  20. 2 2
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValuePage.php
  21. 16 13
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypeContext.php
  22. 15 12
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypeInstance.php
  23. 13 10
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypeList.php
  24. 31 13
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.php
  25. 2 2
      plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypePage.php
  26. 9 7
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldContext.php
  27. 13 12
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldInstance.php
  28. 18 12
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldList.php
  29. 2 2
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldPage.php
  30. 12 8
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleContext.php
  31. 16 13
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleInstance.php
  32. 24 14
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleList.php
  33. 196 0
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleOptions.php
  34. 2 2
      plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SamplePage.php
  35. 21 18
      plugins/Twilio/Rest/Preview/Understand/Assistant/IntentContext.php
  36. 16 13
      plugins/Twilio/Rest/Preview/Understand/Assistant/IntentInstance.php
  37. 13 10
      plugins/Twilio/Rest/Preview/Understand/Assistant/IntentList.php
  38. 31 13
      plugins/Twilio/Rest/Preview/Understand/Assistant/IntentOptions.php
  39. 2 2
      plugins/Twilio/Rest/Preview/Understand/Assistant/IntentPage.php
  40. 11 8
      plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildContext.php
  41. 18 11
      plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildInstance.php
  42. 10 9
      plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildList.php
  43. 21 9
      plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.php
  44. 2 2
      plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildPage.php
  45. 11 8
      plugins/Twilio/Rest/Preview/Understand/Assistant/QueryContext.php
  46. 16 11
      plugins/Twilio/Rest/Preview/Understand/Assistant/QueryInstance.php
  47. 15 13
      plugins/Twilio/Rest/Preview/Understand/Assistant/QueryList.php
  48. 247 0
      plugins/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.php
  49. 2 2
      plugins/Twilio/Rest/Preview/Understand/Assistant/QueryPage.php
  50. 34 28
      plugins/Twilio/Rest/Preview/Understand/AssistantContext.php
  51. 25 16
      plugins/Twilio/Rest/Preview/Understand/AssistantInstance.php
  52. 24 20
      plugins/Twilio/Rest/Preview/Understand/AssistantList.php
  53. 326 0
      plugins/Twilio/Rest/Preview/Understand/AssistantOptions.php
  54. 3 3
      plugins/Twilio/Rest/Preview/Understand/AssistantPage.php
  55. 0 61
      plugins/Twilio/Rest/Preview/Understand/Service/FieldType/FieldValueOptions.php
  56. 0 118
      plugins/Twilio/Rest/Preview/Understand/Service/Intent/SampleOptions.php
  57. 0 231
      plugins/Twilio/Rest/Preview/Understand/Service/QueryOptions.php
  58. 0 188
      plugins/Twilio/Rest/Preview/Understand/ServiceOptions.php
  59. 72 0
      plugins/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextContext.php
  60. 111 0
      plugins/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextInstance.php
  61. 55 0
      plugins/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextList.php
  62. 42 0
      plugins/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextPage.php
  63. 78 0
      plugins/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextContext.php
  64. 119 0
      plugins/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextInstance.php
  65. 61 0
      plugins/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.php
  66. 43 0
      plugins/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextPage.php
  67. 98 0
      plugins/Twilio/Rest/Video/V1/CompositionSettingsContext.php
  68. 126 0
      plugins/Twilio/Rest/Video/V1/CompositionSettingsInstance.php
  69. 49 0
      plugins/Twilio/Rest/Video/V1/CompositionSettingsList.php
  70. 141 0
      plugins/Twilio/Rest/Video/V1/CompositionSettingsOptions.php
  71. 37 0
      plugins/Twilio/Rest/Video/V1/CompositionSettingsPage.php
  72. 98 0
      plugins/Twilio/Rest/Video/V1/RecordingSettingsContext.php
  73. 126 0
      plugins/Twilio/Rest/Video/V1/RecordingSettingsInstance.php
  74. 49 0
      plugins/Twilio/Rest/Video/V1/RecordingSettingsList.php
  75. 141 0
      plugins/Twilio/Rest/Video/V1/RecordingSettingsOptions.php
  76. 37 0
      plugins/Twilio/Rest/Video/V1/RecordingSettingsPage.php
  77. 18 0
      plugins/Twilio/TwiML/GenericNode.php

+ 111 - 0
plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingContext.php

@@ -0,0 +1,111 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Api\V2010\Account\Conference;
+
+use Twilio\InstanceContext;
+use Twilio\Values;
+use Twilio\Version;
+
+class RecordingContext extends InstanceContext {
+    /**
+     * Initialize the RecordingContext
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param string $accountSid The account_sid
+     * @param string $conferenceSid Fetch by unique conference Sid for the recording
+     * @param string $sid Fetch by unique recording Sid
+     * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingContext 
+     */
+    public function __construct(Version $version, $accountSid, $conferenceSid, $sid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array(
+            'accountSid' => $accountSid,
+            'conferenceSid' => $conferenceSid,
+            'sid' => $sid,
+        );
+
+        $this->uri = '/Accounts/' . rawurlencode($accountSid) . '/Conferences/' . rawurlencode($conferenceSid) . '/Recordings/' . rawurlencode($sid) . '.json';
+    }
+
+    /**
+     * Update the RecordingInstance
+     * 
+     * @param string $status The status to change the recording to.
+     * @return RecordingInstance Updated RecordingInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function update($status) {
+        $data = Values::of(array('Status' => $status, ));
+
+        $payload = $this->version->update(
+            'POST',
+            $this->uri,
+            array(),
+            $data
+        );
+
+        return new RecordingInstance(
+            $this->version,
+            $payload,
+            $this->solution['accountSid'],
+            $this->solution['conferenceSid'],
+            $this->solution['sid']
+        );
+    }
+
+    /**
+     * Fetch a RecordingInstance
+     * 
+     * @return RecordingInstance Fetched RecordingInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        $params = Values::of(array());
+
+        $payload = $this->version->fetch(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new RecordingInstance(
+            $this->version,
+            $payload,
+            $this->solution['accountSid'],
+            $this->solution['conferenceSid'],
+            $this->solution['sid']
+        );
+    }
+
+    /**
+     * Deletes the RecordingInstance
+     * 
+     * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function delete() {
+        return $this->version->delete('delete', $this->uri);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Api.V2010.RecordingContext ' . implode(' ', $context) . ']';
+    }
+}

+ 164 - 0
plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingInstance.php

@@ -0,0 +1,164 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Api\V2010\Account\Conference;
+
+use Twilio\Deserialize;
+use Twilio\Exceptions\TwilioException;
+use Twilio\InstanceResource;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * @property string accountSid
+ * @property string apiVersion
+ * @property string callSid
+ * @property string conferenceSid
+ * @property \DateTime dateCreated
+ * @property \DateTime dateUpdated
+ * @property \DateTime startTime
+ * @property string duration
+ * @property string sid
+ * @property string price
+ * @property string priceUnit
+ * @property string status
+ * @property integer channels
+ * @property string source
+ * @property integer errorCode
+ * @property array encryptionDetails
+ * @property string uri
+ */
+class RecordingInstance extends InstanceResource {
+    /**
+     * Initialize the RecordingInstance
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param mixed[] $payload The response payload
+     * @param string $accountSid The unique sid that identifies this account
+     * @param string $conferenceSid The unique id for the conference associated
+     *                              with the recording.
+     * @param string $sid Fetch by unique recording Sid
+     * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingInstance 
+     */
+    public function __construct(Version $version, array $payload, $accountSid, $conferenceSid, $sid = null) {
+        parent::__construct($version);
+
+        // Marshaled Properties
+        $this->properties = array(
+            'accountSid' => Values::array_get($payload, 'account_sid'),
+            'apiVersion' => Values::array_get($payload, 'api_version'),
+            'callSid' => Values::array_get($payload, 'call_sid'),
+            'conferenceSid' => Values::array_get($payload, 'conference_sid'),
+            'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
+            'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+            'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')),
+            'duration' => Values::array_get($payload, 'duration'),
+            'sid' => Values::array_get($payload, 'sid'),
+            'price' => Values::array_get($payload, 'price'),
+            'priceUnit' => Values::array_get($payload, 'price_unit'),
+            'status' => Values::array_get($payload, 'status'),
+            'channels' => Values::array_get($payload, 'channels'),
+            'source' => Values::array_get($payload, 'source'),
+            'errorCode' => Values::array_get($payload, 'error_code'),
+            'encryptionDetails' => Values::array_get($payload, 'encryption_details'),
+            'uri' => Values::array_get($payload, 'uri'),
+        );
+
+        $this->solution = array(
+            'accountSid' => $accountSid,
+            'conferenceSid' => $conferenceSid,
+            'sid' => $sid ?: $this->properties['sid'],
+        );
+    }
+
+    /**
+     * Generate an instance context for the instance, the context is capable of
+     * performing various actions.  All instance actions are proxied to the context
+     * 
+     * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingContext Context
+     *                                                                    for this
+     *                                                                    RecordingInstance
+     */
+    protected function proxy() {
+        if (!$this->context) {
+            $this->context = new RecordingContext(
+                $this->version,
+                $this->solution['accountSid'],
+                $this->solution['conferenceSid'],
+                $this->solution['sid']
+            );
+        }
+
+        return $this->context;
+    }
+
+    /**
+     * Update the RecordingInstance
+     * 
+     * @param string $status The status to change the recording to.
+     * @return RecordingInstance Updated RecordingInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function update($status) {
+        return $this->proxy()->update($status);
+    }
+
+    /**
+     * Fetch a RecordingInstance
+     * 
+     * @return RecordingInstance Fetched RecordingInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        return $this->proxy()->fetch();
+    }
+
+    /**
+     * Deletes the RecordingInstance
+     * 
+     * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function delete() {
+        return $this->proxy()->delete();
+    }
+
+    /**
+     * Magic getter to access properties
+     * 
+     * @param string $name Property to access
+     * @return mixed The requested property
+     * @throws TwilioException For unknown properties
+     */
+    public function __get($name) {
+        if (array_key_exists($name, $this->properties)) {
+            return $this->properties[$name];
+        }
+
+        if (property_exists($this, '_' . $name)) {
+            $method = 'get' . ucfirst($name);
+            return $this->$method();
+        }
+
+        throw new TwilioException('Unknown property: ' . $name);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Api.V2010.RecordingInstance ' . implode(' ', $context) . ']';
+    }
+}

+ 153 - 0
plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingList.php

@@ -0,0 +1,153 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Api\V2010\Account\Conference;
+
+use Twilio\ListResource;
+use Twilio\Options;
+use Twilio\Serialize;
+use Twilio\Values;
+use Twilio\Version;
+
+class RecordingList extends ListResource {
+    /**
+     * Construct the RecordingList
+     * 
+     * @param Version $version Version that contains the resource
+     * @param string $accountSid The unique sid that identifies this account
+     * @param string $conferenceSid The unique id for the conference associated
+     *                              with the recording.
+     * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingList 
+     */
+    public function __construct(Version $version, $accountSid, $conferenceSid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array('accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, );
+
+        $this->uri = '/Accounts/' . rawurlencode($accountSid) . '/Conferences/' . rawurlencode($conferenceSid) . '/Recordings.json';
+    }
+
+    /**
+     * Streams RecordingInstance records from the API as a generator stream.
+     * This operation lazily loads records as efficiently as possible until the
+     * limit
+     * is reached.
+     * The results are returned as a generator, so this operation is memory
+     * efficient.
+     * 
+     * @param array|Options $options Optional Arguments
+     * @param int $limit Upper limit for the number of records to return. stream()
+     *                   guarantees to never return more than limit.  Default is no
+     *                   limit
+     * @param mixed $pageSize Number of records to fetch per request, when not set
+     *                        will use the default value of 50 records.  If no
+     *                        page_size is defined but a limit is defined, stream()
+     *                        will attempt to read the limit with the most
+     *                        efficient page size, i.e. min(limit, 1000)
+     * @return \Twilio\Stream stream of results
+     */
+    public function stream($options = array(), $limit = null, $pageSize = null) {
+        $limits = $this->version->readLimits($limit, $pageSize);
+
+        $page = $this->page($options, $limits['pageSize']);
+
+        return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+    }
+
+    /**
+     * Reads RecordingInstance records from the API as a list.
+     * Unlike stream(), this operation is eager and will load `limit` records into
+     * memory before returning.
+     * 
+     * @param array|Options $options Optional Arguments
+     * @param int $limit Upper limit for the number of records to return. read()
+     *                   guarantees to never return more than limit.  Default is no
+     *                   limit
+     * @param mixed $pageSize Number of records to fetch per request, when not set
+     *                        will use the default value of 50 records.  If no
+     *                        page_size is defined but a limit is defined, read()
+     *                        will attempt to read the limit with the most
+     *                        efficient page size, i.e. min(limit, 1000)
+     * @return RecordingInstance[] Array of results
+     */
+    public function read($options = array(), $limit = null, $pageSize = null) {
+        return iterator_to_array($this->stream($options, $limit, $pageSize), false);
+    }
+
+    /**
+     * Retrieve a single page of RecordingInstance records from the API.
+     * Request is executed immediately
+     * 
+     * @param array|Options $options Optional Arguments
+     * @param mixed $pageSize Number of records to return, defaults to 50
+     * @param string $pageToken PageToken provided by the API
+     * @param mixed $pageNumber Page Number, this value is simply for client state
+     * @return \Twilio\Page Page of RecordingInstance
+     */
+    public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) {
+        $options = new Values($options);
+        $params = Values::of(array(
+            'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']),
+            'DateCreated' => Serialize::iso8601Date($options['dateCreated']),
+            'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']),
+            'PageToken' => $pageToken,
+            'Page' => $pageNumber,
+            'PageSize' => $pageSize,
+        ));
+
+        $response = $this->version->page(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new RecordingPage($this->version, $response, $this->solution);
+    }
+
+    /**
+     * Retrieve a specific page of RecordingInstance records from the API.
+     * Request is executed immediately
+     * 
+     * @param string $targetUrl API-generated URL for the requested results page
+     * @return \Twilio\Page Page of RecordingInstance
+     */
+    public function getPage($targetUrl) {
+        $response = $this->version->getDomain()->getClient()->request(
+            'GET',
+            $targetUrl
+        );
+
+        return new RecordingPage($this->version, $response, $this->solution);
+    }
+
+    /**
+     * Constructs a RecordingContext
+     * 
+     * @param string $sid Fetch by unique recording Sid
+     * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingContext 
+     */
+    public function getContext($sid) {
+        return new RecordingContext(
+            $this->version,
+            $this->solution['accountSid'],
+            $this->solution['conferenceSid'],
+            $sid
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Api.V2010.RecordingList]';
+    }
+}

+ 86 - 0
plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.php

@@ -0,0 +1,86 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Api\V2010\Account\Conference;
+
+use Twilio\Options;
+use Twilio\Values;
+
+abstract class RecordingOptions {
+    /**
+     * @param string $dateCreatedBefore Filter by date created
+     * @param string $dateCreated Filter by date created
+     * @param string $dateCreatedAfter Filter by date created
+     * @return ReadRecordingOptions Options builder
+     */
+    public static function read($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE) {
+        return new ReadRecordingOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter);
+    }
+}
+
+class ReadRecordingOptions extends Options {
+    /**
+     * @param string $dateCreatedBefore Filter by date created
+     * @param string $dateCreated Filter by date created
+     * @param string $dateCreatedAfter Filter by date created
+     */
+    public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE) {
+        $this->options['dateCreatedBefore'] = $dateCreatedBefore;
+        $this->options['dateCreated'] = $dateCreated;
+        $this->options['dateCreatedAfter'] = $dateCreatedAfter;
+    }
+
+    /**
+     * Only show recordings created on the given date. Should be formatted as `YYYY-MM-DD`. You can also specify inequality, such as `DateCreated<=YYYY-MM-DD` for recordings generated at or before midnight on a date, and `DateCreated>=YYYY-MM-DD` for recordings generated at or after midnight on a date.
+     * 
+     * @param string $dateCreatedBefore Filter by date created
+     * @return $this Fluent Builder
+     */
+    public function setDateCreatedBefore($dateCreatedBefore) {
+        $this->options['dateCreatedBefore'] = $dateCreatedBefore;
+        return $this;
+    }
+
+    /**
+     * Only show recordings created on the given date. Should be formatted as `YYYY-MM-DD`. You can also specify inequality, such as `DateCreated<=YYYY-MM-DD` for recordings generated at or before midnight on a date, and `DateCreated>=YYYY-MM-DD` for recordings generated at or after midnight on a date.
+     * 
+     * @param string $dateCreated Filter by date created
+     * @return $this Fluent Builder
+     */
+    public function setDateCreated($dateCreated) {
+        $this->options['dateCreated'] = $dateCreated;
+        return $this;
+    }
+
+    /**
+     * Only show recordings created on the given date. Should be formatted as `YYYY-MM-DD`. You can also specify inequality, such as `DateCreated<=YYYY-MM-DD` for recordings generated at or before midnight on a date, and `DateCreated>=YYYY-MM-DD` for recordings generated at or after midnight on a date.
+     * 
+     * @param string $dateCreatedAfter Filter by date created
+     * @return $this Fluent Builder
+     */
+    public function setDateCreatedAfter($dateCreatedAfter) {
+        $this->options['dateCreatedAfter'] = $dateCreatedAfter;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Api.V2010.ReadRecordingOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 39 - 0
plugins/Twilio/Rest/Api/V2010/Account/Conference/RecordingPage.php

@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Api\V2010\Account\Conference;
+
+use Twilio\Page;
+
+class RecordingPage extends Page {
+    public function __construct($version, $response, $solution) {
+        parent::__construct($version, $response);
+
+        // Path Solution
+        $this->solution = $solution;
+    }
+
+    public function buildInstance(array $payload) {
+        return new RecordingInstance(
+            $this->version,
+            $payload,
+            $this->solution['accountSid'],
+            $this->solution['conferenceSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Api.V2010.RecordingPage]';
+    }
+}

+ 118 - 0
plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookContext.php

@@ -0,0 +1,118 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Chat\V2\Service\Channel;
+
+use Twilio\InstanceContext;
+use Twilio\Options;
+use Twilio\Serialize;
+use Twilio\Values;
+use Twilio\Version;
+
+class WebhookContext extends InstanceContext {
+    /**
+     * Initialize the WebhookContext
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param string $serviceSid The service_sid
+     * @param string $channelSid The channel_sid
+     * @param string $sid The sid
+     * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookContext 
+     */
+    public function __construct(Version $version, $serviceSid, $channelSid, $sid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, );
+
+        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Channels/' . rawurlencode($channelSid) . '/Webhooks/' . rawurlencode($sid) . '';
+    }
+
+    /**
+     * Fetch a WebhookInstance
+     * 
+     * @return WebhookInstance Fetched WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        $params = Values::of(array());
+
+        $payload = $this->version->fetch(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new WebhookInstance(
+            $this->version,
+            $payload,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid'],
+            $this->solution['sid']
+        );
+    }
+
+    /**
+     * Update the WebhookInstance
+     * 
+     * @param array|Options $options Optional Arguments
+     * @return WebhookInstance Updated WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function update($options = array()) {
+        $options = new Values($options);
+
+        $data = Values::of(array(
+            'Configuration.Url' => $options['configurationUrl'],
+            'Configuration.Method' => $options['configurationMethod'],
+            'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }),
+            'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }),
+            'Configuration.FlowSid' => $options['configurationFlowSid'],
+            'Configuration.RetryCount' => $options['configurationRetryCount'],
+        ));
+
+        $payload = $this->version->update(
+            'POST',
+            $this->uri,
+            array(),
+            $data
+        );
+
+        return new WebhookInstance(
+            $this->version,
+            $payload,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid'],
+            $this->solution['sid']
+        );
+    }
+
+    /**
+     * Deletes the WebhookInstance
+     * 
+     * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function delete() {
+        return $this->version->delete('delete', $this->uri);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Chat.V2.WebhookContext ' . implode(' ', $context) . ']';
+    }
+}

+ 147 - 0
plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookInstance.php

@@ -0,0 +1,147 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Chat\V2\Service\Channel;
+
+use Twilio\Deserialize;
+use Twilio\Exceptions\TwilioException;
+use Twilio\InstanceResource;
+use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * @property string sid
+ * @property string accountSid
+ * @property string serviceSid
+ * @property string channelSid
+ * @property string type
+ * @property string url
+ * @property array configuration
+ * @property \DateTime dateCreated
+ * @property \DateTime dateUpdated
+ */
+class WebhookInstance extends InstanceResource {
+    /**
+     * Initialize the WebhookInstance
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param mixed[] $payload The response payload
+     * @param string $serviceSid The service_sid
+     * @param string $channelSid The channel_sid
+     * @param string $sid The sid
+     * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookInstance 
+     */
+    public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null) {
+        parent::__construct($version);
+
+        // Marshaled Properties
+        $this->properties = array(
+            'sid' => Values::array_get($payload, 'sid'),
+            'accountSid' => Values::array_get($payload, 'account_sid'),
+            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'channelSid' => Values::array_get($payload, 'channel_sid'),
+            'type' => Values::array_get($payload, 'type'),
+            'url' => Values::array_get($payload, 'url'),
+            'configuration' => Values::array_get($payload, 'configuration'),
+            'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
+            'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+        );
+
+        $this->solution = array(
+            'serviceSid' => $serviceSid,
+            'channelSid' => $channelSid,
+            'sid' => $sid ?: $this->properties['sid'],
+        );
+    }
+
+    /**
+     * Generate an instance context for the instance, the context is capable of
+     * performing various actions.  All instance actions are proxied to the context
+     * 
+     * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookContext Context for this
+     *                                                             WebhookInstance
+     */
+    protected function proxy() {
+        if (!$this->context) {
+            $this->context = new WebhookContext(
+                $this->version,
+                $this->solution['serviceSid'],
+                $this->solution['channelSid'],
+                $this->solution['sid']
+            );
+        }
+
+        return $this->context;
+    }
+
+    /**
+     * Fetch a WebhookInstance
+     * 
+     * @return WebhookInstance Fetched WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        return $this->proxy()->fetch();
+    }
+
+    /**
+     * Update the WebhookInstance
+     * 
+     * @param array|Options $options Optional Arguments
+     * @return WebhookInstance Updated WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function update($options = array()) {
+        return $this->proxy()->update($options);
+    }
+
+    /**
+     * Deletes the WebhookInstance
+     * 
+     * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function delete() {
+        return $this->proxy()->delete();
+    }
+
+    /**
+     * Magic getter to access properties
+     * 
+     * @param string $name Property to access
+     * @return mixed The requested property
+     * @throws TwilioException For unknown properties
+     */
+    public function __get($name) {
+        if (array_key_exists($name, $this->properties)) {
+            return $this->properties[$name];
+        }
+
+        if (property_exists($this, '_' . $name)) {
+            $method = 'get' . ucfirst($name);
+            return $this->$method();
+        }
+
+        throw new TwilioException('Unknown property: ' . $name);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Chat.V2.WebhookInstance ' . implode(' ', $context) . ']';
+    }
+}

+ 181 - 0
plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookList.php

@@ -0,0 +1,181 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Chat\V2\Service\Channel;
+
+use Twilio\ListResource;
+use Twilio\Options;
+use Twilio\Serialize;
+use Twilio\Values;
+use Twilio\Version;
+
+class WebhookList extends ListResource {
+    /**
+     * Construct the WebhookList
+     * 
+     * @param Version $version Version that contains the resource
+     * @param string $serviceSid The service_sid
+     * @param string $channelSid The channel_sid
+     * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookList 
+     */
+    public function __construct(Version $version, $serviceSid, $channelSid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, );
+
+        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Channels/' . rawurlencode($channelSid) . '/Webhooks';
+    }
+
+    /**
+     * Streams WebhookInstance records from the API as a generator stream.
+     * This operation lazily loads records as efficiently as possible until the
+     * limit
+     * is reached.
+     * The results are returned as a generator, so this operation is memory
+     * efficient.
+     * 
+     * @param int $limit Upper limit for the number of records to return. stream()
+     *                   guarantees to never return more than limit.  Default is no
+     *                   limit
+     * @param mixed $pageSize Number of records to fetch per request, when not set
+     *                        will use the default value of 50 records.  If no
+     *                        page_size is defined but a limit is defined, stream()
+     *                        will attempt to read the limit with the most
+     *                        efficient page size, i.e. min(limit, 1000)
+     * @return \Twilio\Stream stream of results
+     */
+    public function stream($limit = null, $pageSize = null) {
+        $limits = $this->version->readLimits($limit, $pageSize);
+
+        $page = $this->page($limits['pageSize']);
+
+        return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+    }
+
+    /**
+     * Reads WebhookInstance records from the API as a list.
+     * Unlike stream(), this operation is eager and will load `limit` records into
+     * memory before returning.
+     * 
+     * @param int $limit Upper limit for the number of records to return. read()
+     *                   guarantees to never return more than limit.  Default is no
+     *                   limit
+     * @param mixed $pageSize Number of records to fetch per request, when not set
+     *                        will use the default value of 50 records.  If no
+     *                        page_size is defined but a limit is defined, read()
+     *                        will attempt to read the limit with the most
+     *                        efficient page size, i.e. min(limit, 1000)
+     * @return WebhookInstance[] Array of results
+     */
+    public function read($limit = null, $pageSize = null) {
+        return iterator_to_array($this->stream($limit, $pageSize), false);
+    }
+
+    /**
+     * Retrieve a single page of WebhookInstance records from the API.
+     * Request is executed immediately
+     * 
+     * @param mixed $pageSize Number of records to return, defaults to 50
+     * @param string $pageToken PageToken provided by the API
+     * @param mixed $pageNumber Page Number, this value is simply for client state
+     * @return \Twilio\Page Page of WebhookInstance
+     */
+    public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) {
+        $params = Values::of(array(
+            'PageToken' => $pageToken,
+            'Page' => $pageNumber,
+            'PageSize' => $pageSize,
+        ));
+
+        $response = $this->version->page(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new WebhookPage($this->version, $response, $this->solution);
+    }
+
+    /**
+     * Retrieve a specific page of WebhookInstance records from the API.
+     * Request is executed immediately
+     * 
+     * @param string $targetUrl API-generated URL for the requested results page
+     * @return \Twilio\Page Page of WebhookInstance
+     */
+    public function getPage($targetUrl) {
+        $response = $this->version->getDomain()->getClient()->request(
+            'GET',
+            $targetUrl
+        );
+
+        return new WebhookPage($this->version, $response, $this->solution);
+    }
+
+    /**
+     * Create a new WebhookInstance
+     * 
+     * @param string $type The type
+     * @param array|Options $options Optional Arguments
+     * @return WebhookInstance Newly created WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function create($type, $options = array()) {
+        $options = new Values($options);
+
+        $data = Values::of(array(
+            'Type' => $type,
+            'Configuration.Url' => $options['configurationUrl'],
+            'Configuration.Method' => $options['configurationMethod'],
+            'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }),
+            'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }),
+            'Configuration.FlowSid' => $options['configurationFlowSid'],
+            'Configuration.RetryCount' => $options['configurationRetryCount'],
+        ));
+
+        $payload = $this->version->create(
+            'POST',
+            $this->uri,
+            array(),
+            $data
+        );
+
+        return new WebhookInstance(
+            $this->version,
+            $payload,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid']
+        );
+    }
+
+    /**
+     * Constructs a WebhookContext
+     * 
+     * @param string $sid The sid
+     * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookContext 
+     */
+    public function getContext($sid) {
+        return new WebhookContext(
+            $this->version,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid'],
+            $sid
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Chat.V2.WebhookList]';
+    }
+}

+ 241 - 0
plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.php

@@ -0,0 +1,241 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Chat\V2\Service\Channel;
+
+use Twilio\Options;
+use Twilio\Values;
+
+abstract class WebhookOptions {
+    /**
+     * @param string $configurationUrl The configuration.url
+     * @param string $configurationMethod The configuration.method
+     * @param string $configurationFilters The configuration.filters
+     * @param string $configurationTriggers The configuration.triggers
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @param integer $configurationRetryCount The configuration.retry_count
+     * @return CreateWebhookOptions Options builder
+     */
+    public static function create($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE) {
+        return new CreateWebhookOptions($configurationUrl, $configurationMethod, $configurationFilters, $configurationTriggers, $configurationFlowSid, $configurationRetryCount);
+    }
+
+    /**
+     * @param string $configurationUrl The configuration.url
+     * @param string $configurationMethod The configuration.method
+     * @param string $configurationFilters The configuration.filters
+     * @param string $configurationTriggers The configuration.triggers
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @param integer $configurationRetryCount The configuration.retry_count
+     * @return UpdateWebhookOptions Options builder
+     */
+    public static function update($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE) {
+        return new UpdateWebhookOptions($configurationUrl, $configurationMethod, $configurationFilters, $configurationTriggers, $configurationFlowSid, $configurationRetryCount);
+    }
+}
+
+class CreateWebhookOptions extends Options {
+    /**
+     * @param string $configurationUrl The configuration.url
+     * @param string $configurationMethod The configuration.method
+     * @param string $configurationFilters The configuration.filters
+     * @param string $configurationTriggers The configuration.triggers
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @param integer $configurationRetryCount The configuration.retry_count
+     */
+    public function __construct($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE) {
+        $this->options['configurationUrl'] = $configurationUrl;
+        $this->options['configurationMethod'] = $configurationMethod;
+        $this->options['configurationFilters'] = $configurationFilters;
+        $this->options['configurationTriggers'] = $configurationTriggers;
+        $this->options['configurationFlowSid'] = $configurationFlowSid;
+        $this->options['configurationRetryCount'] = $configurationRetryCount;
+    }
+
+    /**
+     * The configuration.url
+     * 
+     * @param string $configurationUrl The configuration.url
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationUrl($configurationUrl) {
+        $this->options['configurationUrl'] = $configurationUrl;
+        return $this;
+    }
+
+    /**
+     * The configuration.method
+     * 
+     * @param string $configurationMethod The configuration.method
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationMethod($configurationMethod) {
+        $this->options['configurationMethod'] = $configurationMethod;
+        return $this;
+    }
+
+    /**
+     * The configuration.filters
+     * 
+     * @param string $configurationFilters The configuration.filters
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationFilters($configurationFilters) {
+        $this->options['configurationFilters'] = $configurationFilters;
+        return $this;
+    }
+
+    /**
+     * The configuration.triggers
+     * 
+     * @param string $configurationTriggers The configuration.triggers
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationTriggers($configurationTriggers) {
+        $this->options['configurationTriggers'] = $configurationTriggers;
+        return $this;
+    }
+
+    /**
+     * The configuration.flow_sid
+     * 
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationFlowSid($configurationFlowSid) {
+        $this->options['configurationFlowSid'] = $configurationFlowSid;
+        return $this;
+    }
+
+    /**
+     * The configuration.retry_count
+     * 
+     * @param integer $configurationRetryCount The configuration.retry_count
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationRetryCount($configurationRetryCount) {
+        $this->options['configurationRetryCount'] = $configurationRetryCount;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Chat.V2.CreateWebhookOptions ' . implode(' ', $options) . ']';
+    }
+}
+
+class UpdateWebhookOptions extends Options {
+    /**
+     * @param string $configurationUrl The configuration.url
+     * @param string $configurationMethod The configuration.method
+     * @param string $configurationFilters The configuration.filters
+     * @param string $configurationTriggers The configuration.triggers
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @param integer $configurationRetryCount The configuration.retry_count
+     */
+    public function __construct($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE) {
+        $this->options['configurationUrl'] = $configurationUrl;
+        $this->options['configurationMethod'] = $configurationMethod;
+        $this->options['configurationFilters'] = $configurationFilters;
+        $this->options['configurationTriggers'] = $configurationTriggers;
+        $this->options['configurationFlowSid'] = $configurationFlowSid;
+        $this->options['configurationRetryCount'] = $configurationRetryCount;
+    }
+
+    /**
+     * The configuration.url
+     * 
+     * @param string $configurationUrl The configuration.url
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationUrl($configurationUrl) {
+        $this->options['configurationUrl'] = $configurationUrl;
+        return $this;
+    }
+
+    /**
+     * The configuration.method
+     * 
+     * @param string $configurationMethod The configuration.method
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationMethod($configurationMethod) {
+        $this->options['configurationMethod'] = $configurationMethod;
+        return $this;
+    }
+
+    /**
+     * The configuration.filters
+     * 
+     * @param string $configurationFilters The configuration.filters
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationFilters($configurationFilters) {
+        $this->options['configurationFilters'] = $configurationFilters;
+        return $this;
+    }
+
+    /**
+     * The configuration.triggers
+     * 
+     * @param string $configurationTriggers The configuration.triggers
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationTriggers($configurationTriggers) {
+        $this->options['configurationTriggers'] = $configurationTriggers;
+        return $this;
+    }
+
+    /**
+     * The configuration.flow_sid
+     * 
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationFlowSid($configurationFlowSid) {
+        $this->options['configurationFlowSid'] = $configurationFlowSid;
+        return $this;
+    }
+
+    /**
+     * The configuration.retry_count
+     * 
+     * @param integer $configurationRetryCount The configuration.retry_count
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationRetryCount($configurationRetryCount) {
+        $this->options['configurationRetryCount'] = $configurationRetryCount;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Chat.V2.UpdateWebhookOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 39 - 0
plugins/Twilio/Rest/Chat/V2/Service/Channel/WebhookPage.php

@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Chat\V2\Service\Channel;
+
+use Twilio\Page;
+
+class WebhookPage extends Page {
+    public function __construct($version, $response, $solution) {
+        parent::__construct($version, $response);
+
+        // Path Solution
+        $this->solution = $solution;
+    }
+
+    public function buildInstance(array $payload) {
+        return new WebhookInstance(
+            $this->version,
+            $payload,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Chat.V2.WebhookPage]';
+    }
+}

+ 118 - 0
plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookContext.php

@@ -0,0 +1,118 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
+
+use Twilio\InstanceContext;
+use Twilio\Options;
+use Twilio\Serialize;
+use Twilio\Values;
+use Twilio\Version;
+
+class WebhookContext extends InstanceContext {
+    /**
+     * Initialize the WebhookContext
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param string $serviceSid The service_sid
+     * @param string $channelSid The channel_sid
+     * @param string $sid The sid
+     * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookContext 
+     */
+    public function __construct(Version $version, $serviceSid, $channelSid, $sid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, );
+
+        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Channels/' . rawurlencode($channelSid) . '/Webhooks/' . rawurlencode($sid) . '';
+    }
+
+    /**
+     * Fetch a WebhookInstance
+     * 
+     * @return WebhookInstance Fetched WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        $params = Values::of(array());
+
+        $payload = $this->version->fetch(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new WebhookInstance(
+            $this->version,
+            $payload,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid'],
+            $this->solution['sid']
+        );
+    }
+
+    /**
+     * Update the WebhookInstance
+     * 
+     * @param array|Options $options Optional Arguments
+     * @return WebhookInstance Updated WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function update($options = array()) {
+        $options = new Values($options);
+
+        $data = Values::of(array(
+            'Configuration.Url' => $options['configurationUrl'],
+            'Configuration.Method' => $options['configurationMethod'],
+            'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }),
+            'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }),
+            'Configuration.FlowSid' => $options['configurationFlowSid'],
+            'Configuration.RetryCount' => $options['configurationRetryCount'],
+        ));
+
+        $payload = $this->version->update(
+            'POST',
+            $this->uri,
+            array(),
+            $data
+        );
+
+        return new WebhookInstance(
+            $this->version,
+            $payload,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid'],
+            $this->solution['sid']
+        );
+    }
+
+    /**
+     * Deletes the WebhookInstance
+     * 
+     * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function delete() {
+        return $this->version->delete('delete', $this->uri);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.IpMessaging.V2.WebhookContext ' . implode(' ', $context) . ']';
+    }
+}

+ 148 - 0
plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookInstance.php

@@ -0,0 +1,148 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
+
+use Twilio\Deserialize;
+use Twilio\Exceptions\TwilioException;
+use Twilio\InstanceResource;
+use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * @property string sid
+ * @property string accountSid
+ * @property string serviceSid
+ * @property string channelSid
+ * @property string type
+ * @property string url
+ * @property array configuration
+ * @property \DateTime dateCreated
+ * @property \DateTime dateUpdated
+ */
+class WebhookInstance extends InstanceResource {
+    /**
+     * Initialize the WebhookInstance
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param mixed[] $payload The response payload
+     * @param string $serviceSid The service_sid
+     * @param string $channelSid The channel_sid
+     * @param string $sid The sid
+     * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookInstance 
+     */
+    public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null) {
+        parent::__construct($version);
+
+        // Marshaled Properties
+        $this->properties = array(
+            'sid' => Values::array_get($payload, 'sid'),
+            'accountSid' => Values::array_get($payload, 'account_sid'),
+            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'channelSid' => Values::array_get($payload, 'channel_sid'),
+            'type' => Values::array_get($payload, 'type'),
+            'url' => Values::array_get($payload, 'url'),
+            'configuration' => Values::array_get($payload, 'configuration'),
+            'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
+            'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+        );
+
+        $this->solution = array(
+            'serviceSid' => $serviceSid,
+            'channelSid' => $channelSid,
+            'sid' => $sid ?: $this->properties['sid'],
+        );
+    }
+
+    /**
+     * Generate an instance context for the instance, the context is capable of
+     * performing various actions.  All instance actions are proxied to the context
+     * 
+     * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookContext Context
+     *                                                                    for this
+     *                                                                    WebhookInstance
+     */
+    protected function proxy() {
+        if (!$this->context) {
+            $this->context = new WebhookContext(
+                $this->version,
+                $this->solution['serviceSid'],
+                $this->solution['channelSid'],
+                $this->solution['sid']
+            );
+        }
+
+        return $this->context;
+    }
+
+    /**
+     * Fetch a WebhookInstance
+     * 
+     * @return WebhookInstance Fetched WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        return $this->proxy()->fetch();
+    }
+
+    /**
+     * Update the WebhookInstance
+     * 
+     * @param array|Options $options Optional Arguments
+     * @return WebhookInstance Updated WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function update($options = array()) {
+        return $this->proxy()->update($options);
+    }
+
+    /**
+     * Deletes the WebhookInstance
+     * 
+     * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function delete() {
+        return $this->proxy()->delete();
+    }
+
+    /**
+     * Magic getter to access properties
+     * 
+     * @param string $name Property to access
+     * @return mixed The requested property
+     * @throws TwilioException For unknown properties
+     */
+    public function __get($name) {
+        if (array_key_exists($name, $this->properties)) {
+            return $this->properties[$name];
+        }
+
+        if (property_exists($this, '_' . $name)) {
+            $method = 'get' . ucfirst($name);
+            return $this->$method();
+        }
+
+        throw new TwilioException('Unknown property: ' . $name);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.IpMessaging.V2.WebhookInstance ' . implode(' ', $context) . ']';
+    }
+}

+ 181 - 0
plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookList.php

@@ -0,0 +1,181 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
+
+use Twilio\ListResource;
+use Twilio\Options;
+use Twilio\Serialize;
+use Twilio\Values;
+use Twilio\Version;
+
+class WebhookList extends ListResource {
+    /**
+     * Construct the WebhookList
+     * 
+     * @param Version $version Version that contains the resource
+     * @param string $serviceSid The service_sid
+     * @param string $channelSid The channel_sid
+     * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookList 
+     */
+    public function __construct(Version $version, $serviceSid, $channelSid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, );
+
+        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Channels/' . rawurlencode($channelSid) . '/Webhooks';
+    }
+
+    /**
+     * Streams WebhookInstance records from the API as a generator stream.
+     * This operation lazily loads records as efficiently as possible until the
+     * limit
+     * is reached.
+     * The results are returned as a generator, so this operation is memory
+     * efficient.
+     * 
+     * @param int $limit Upper limit for the number of records to return. stream()
+     *                   guarantees to never return more than limit.  Default is no
+     *                   limit
+     * @param mixed $pageSize Number of records to fetch per request, when not set
+     *                        will use the default value of 50 records.  If no
+     *                        page_size is defined but a limit is defined, stream()
+     *                        will attempt to read the limit with the most
+     *                        efficient page size, i.e. min(limit, 1000)
+     * @return \Twilio\Stream stream of results
+     */
+    public function stream($limit = null, $pageSize = null) {
+        $limits = $this->version->readLimits($limit, $pageSize);
+
+        $page = $this->page($limits['pageSize']);
+
+        return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+    }
+
+    /**
+     * Reads WebhookInstance records from the API as a list.
+     * Unlike stream(), this operation is eager and will load `limit` records into
+     * memory before returning.
+     * 
+     * @param int $limit Upper limit for the number of records to return. read()
+     *                   guarantees to never return more than limit.  Default is no
+     *                   limit
+     * @param mixed $pageSize Number of records to fetch per request, when not set
+     *                        will use the default value of 50 records.  If no
+     *                        page_size is defined but a limit is defined, read()
+     *                        will attempt to read the limit with the most
+     *                        efficient page size, i.e. min(limit, 1000)
+     * @return WebhookInstance[] Array of results
+     */
+    public function read($limit = null, $pageSize = null) {
+        return iterator_to_array($this->stream($limit, $pageSize), false);
+    }
+
+    /**
+     * Retrieve a single page of WebhookInstance records from the API.
+     * Request is executed immediately
+     * 
+     * @param mixed $pageSize Number of records to return, defaults to 50
+     * @param string $pageToken PageToken provided by the API
+     * @param mixed $pageNumber Page Number, this value is simply for client state
+     * @return \Twilio\Page Page of WebhookInstance
+     */
+    public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) {
+        $params = Values::of(array(
+            'PageToken' => $pageToken,
+            'Page' => $pageNumber,
+            'PageSize' => $pageSize,
+        ));
+
+        $response = $this->version->page(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new WebhookPage($this->version, $response, $this->solution);
+    }
+
+    /**
+     * Retrieve a specific page of WebhookInstance records from the API.
+     * Request is executed immediately
+     * 
+     * @param string $targetUrl API-generated URL for the requested results page
+     * @return \Twilio\Page Page of WebhookInstance
+     */
+    public function getPage($targetUrl) {
+        $response = $this->version->getDomain()->getClient()->request(
+            'GET',
+            $targetUrl
+        );
+
+        return new WebhookPage($this->version, $response, $this->solution);
+    }
+
+    /**
+     * Create a new WebhookInstance
+     * 
+     * @param string $type The type
+     * @param array|Options $options Optional Arguments
+     * @return WebhookInstance Newly created WebhookInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function create($type, $options = array()) {
+        $options = new Values($options);
+
+        $data = Values::of(array(
+            'Type' => $type,
+            'Configuration.Url' => $options['configurationUrl'],
+            'Configuration.Method' => $options['configurationMethod'],
+            'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }),
+            'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }),
+            'Configuration.FlowSid' => $options['configurationFlowSid'],
+            'Configuration.RetryCount' => $options['configurationRetryCount'],
+        ));
+
+        $payload = $this->version->create(
+            'POST',
+            $this->uri,
+            array(),
+            $data
+        );
+
+        return new WebhookInstance(
+            $this->version,
+            $payload,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid']
+        );
+    }
+
+    /**
+     * Constructs a WebhookContext
+     * 
+     * @param string $sid The sid
+     * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookContext 
+     */
+    public function getContext($sid) {
+        return new WebhookContext(
+            $this->version,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid'],
+            $sid
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.IpMessaging.V2.WebhookList]';
+    }
+}

+ 241 - 0
plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.php

@@ -0,0 +1,241 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
+
+use Twilio\Options;
+use Twilio\Values;
+
+abstract class WebhookOptions {
+    /**
+     * @param string $configurationUrl The configuration.url
+     * @param string $configurationMethod The configuration.method
+     * @param string $configurationFilters The configuration.filters
+     * @param string $configurationTriggers The configuration.triggers
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @param integer $configurationRetryCount The configuration.retry_count
+     * @return CreateWebhookOptions Options builder
+     */
+    public static function create($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE) {
+        return new CreateWebhookOptions($configurationUrl, $configurationMethod, $configurationFilters, $configurationTriggers, $configurationFlowSid, $configurationRetryCount);
+    }
+
+    /**
+     * @param string $configurationUrl The configuration.url
+     * @param string $configurationMethod The configuration.method
+     * @param string $configurationFilters The configuration.filters
+     * @param string $configurationTriggers The configuration.triggers
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @param integer $configurationRetryCount The configuration.retry_count
+     * @return UpdateWebhookOptions Options builder
+     */
+    public static function update($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE) {
+        return new UpdateWebhookOptions($configurationUrl, $configurationMethod, $configurationFilters, $configurationTriggers, $configurationFlowSid, $configurationRetryCount);
+    }
+}
+
+class CreateWebhookOptions extends Options {
+    /**
+     * @param string $configurationUrl The configuration.url
+     * @param string $configurationMethod The configuration.method
+     * @param string $configurationFilters The configuration.filters
+     * @param string $configurationTriggers The configuration.triggers
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @param integer $configurationRetryCount The configuration.retry_count
+     */
+    public function __construct($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE) {
+        $this->options['configurationUrl'] = $configurationUrl;
+        $this->options['configurationMethod'] = $configurationMethod;
+        $this->options['configurationFilters'] = $configurationFilters;
+        $this->options['configurationTriggers'] = $configurationTriggers;
+        $this->options['configurationFlowSid'] = $configurationFlowSid;
+        $this->options['configurationRetryCount'] = $configurationRetryCount;
+    }
+
+    /**
+     * The configuration.url
+     * 
+     * @param string $configurationUrl The configuration.url
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationUrl($configurationUrl) {
+        $this->options['configurationUrl'] = $configurationUrl;
+        return $this;
+    }
+
+    /**
+     * The configuration.method
+     * 
+     * @param string $configurationMethod The configuration.method
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationMethod($configurationMethod) {
+        $this->options['configurationMethod'] = $configurationMethod;
+        return $this;
+    }
+
+    /**
+     * The configuration.filters
+     * 
+     * @param string $configurationFilters The configuration.filters
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationFilters($configurationFilters) {
+        $this->options['configurationFilters'] = $configurationFilters;
+        return $this;
+    }
+
+    /**
+     * The configuration.triggers
+     * 
+     * @param string $configurationTriggers The configuration.triggers
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationTriggers($configurationTriggers) {
+        $this->options['configurationTriggers'] = $configurationTriggers;
+        return $this;
+    }
+
+    /**
+     * The configuration.flow_sid
+     * 
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationFlowSid($configurationFlowSid) {
+        $this->options['configurationFlowSid'] = $configurationFlowSid;
+        return $this;
+    }
+
+    /**
+     * The configuration.retry_count
+     * 
+     * @param integer $configurationRetryCount The configuration.retry_count
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationRetryCount($configurationRetryCount) {
+        $this->options['configurationRetryCount'] = $configurationRetryCount;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.IpMessaging.V2.CreateWebhookOptions ' . implode(' ', $options) . ']';
+    }
+}
+
+class UpdateWebhookOptions extends Options {
+    /**
+     * @param string $configurationUrl The configuration.url
+     * @param string $configurationMethod The configuration.method
+     * @param string $configurationFilters The configuration.filters
+     * @param string $configurationTriggers The configuration.triggers
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @param integer $configurationRetryCount The configuration.retry_count
+     */
+    public function __construct($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE) {
+        $this->options['configurationUrl'] = $configurationUrl;
+        $this->options['configurationMethod'] = $configurationMethod;
+        $this->options['configurationFilters'] = $configurationFilters;
+        $this->options['configurationTriggers'] = $configurationTriggers;
+        $this->options['configurationFlowSid'] = $configurationFlowSid;
+        $this->options['configurationRetryCount'] = $configurationRetryCount;
+    }
+
+    /**
+     * The configuration.url
+     * 
+     * @param string $configurationUrl The configuration.url
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationUrl($configurationUrl) {
+        $this->options['configurationUrl'] = $configurationUrl;
+        return $this;
+    }
+
+    /**
+     * The configuration.method
+     * 
+     * @param string $configurationMethod The configuration.method
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationMethod($configurationMethod) {
+        $this->options['configurationMethod'] = $configurationMethod;
+        return $this;
+    }
+
+    /**
+     * The configuration.filters
+     * 
+     * @param string $configurationFilters The configuration.filters
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationFilters($configurationFilters) {
+        $this->options['configurationFilters'] = $configurationFilters;
+        return $this;
+    }
+
+    /**
+     * The configuration.triggers
+     * 
+     * @param string $configurationTriggers The configuration.triggers
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationTriggers($configurationTriggers) {
+        $this->options['configurationTriggers'] = $configurationTriggers;
+        return $this;
+    }
+
+    /**
+     * The configuration.flow_sid
+     * 
+     * @param string $configurationFlowSid The configuration.flow_sid
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationFlowSid($configurationFlowSid) {
+        $this->options['configurationFlowSid'] = $configurationFlowSid;
+        return $this;
+    }
+
+    /**
+     * The configuration.retry_count
+     * 
+     * @param integer $configurationRetryCount The configuration.retry_count
+     * @return $this Fluent Builder
+     */
+    public function setConfigurationRetryCount($configurationRetryCount) {
+        $this->options['configurationRetryCount'] = $configurationRetryCount;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.IpMessaging.V2.UpdateWebhookOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 39 - 0
plugins/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookPage.php

@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
+
+use Twilio\Page;
+
+class WebhookPage extends Page {
+    public function __construct($version, $response, $solution) {
+        parent::__construct($version, $response);
+
+        // Path Solution
+        $this->solution = $solution;
+    }
+
+    public function buildInstance(array $payload) {
+        return new WebhookInstance(
+            $this->version,
+            $payload,
+            $this->solution['serviceSid'],
+            $this->solution['channelSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.IpMessaging.V2.WebhookPage]';
+    }
+}

+ 9 - 7
plugins/Twilio/Rest/Preview/Understand/Service/FieldType/FieldValueContext.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueContext.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\FieldType;
+namespace Twilio\Rest\Preview\Understand\Assistant\FieldType;
 
 use Twilio\InstanceContext;
 use Twilio\Values;
@@ -21,28 +21,29 @@ class FieldValueContext extends InstanceContext {
      * Initialize the FieldValueContext
      * 
      * @param \Twilio\Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The assistant_sid
      * @param string $fieldTypeSid The field_type_sid
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueContext 
      */
-    public function __construct(Version $version, $serviceSid, $fieldTypeSid, $sid) {
+    public function __construct(Version $version, $assistantSid, $fieldTypeSid, $sid) {
         parent::__construct($version);
 
         // Path Solution
         $this->solution = array(
-            'serviceSid' => $serviceSid,
+            'assistantSid' => $assistantSid,
             'fieldTypeSid' => $fieldTypeSid,
             'sid' => $sid,
         );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/FieldTypes/' . rawurlencode($fieldTypeSid) . '/FieldValues/' . rawurlencode($sid) . '';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/FieldTypes/' . rawurlencode($fieldTypeSid) . '/FieldValues/' . rawurlencode($sid) . '';
     }
 
     /**
      * Fetch a FieldValueInstance
      * 
      * @return FieldValueInstance Fetched FieldValueInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         $params = Values::of(array());
@@ -56,7 +57,7 @@ class FieldValueContext extends InstanceContext {
         return new FieldValueInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['fieldTypeSid'],
             $this->solution['sid']
         );
@@ -66,6 +67,7 @@ class FieldValueContext extends InstanceContext {
      * Deletes the FieldValueInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->version->delete('delete', $this->uri);

+ 16 - 10
plugins/Twilio/Rest/Preview/Understand/Service/FieldType/FieldValueInstance.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueInstance.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\FieldType;
+namespace Twilio\Rest\Preview\Understand\Assistant\FieldType;
 
 use Twilio\Deserialize;
 use Twilio\Exceptions\TwilioException;
@@ -23,10 +23,11 @@ use Twilio\Version;
  * @property \DateTime dateUpdated
  * @property string fieldTypeSid
  * @property string language
- * @property string serviceSid
+ * @property string assistantSid
  * @property string sid
  * @property string value
  * @property string url
+ * @property string synonymOf
  */
 class FieldValueInstance extends InstanceResource {
     /**
@@ -34,12 +35,13 @@ class FieldValueInstance extends InstanceResource {
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param mixed[] $payload The response payload
-     * @param string $serviceSid The service_sid
-     * @param string $fieldTypeSid The field_type_sid
+     * @param string $assistantSid The unique ID of the Assistant.
+     * @param string $fieldTypeSid The unique ID of the Field Type associated with
+     *                             this Field Value.
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueInstance 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueInstance 
      */
-    public function __construct(Version $version, array $payload, $serviceSid, $fieldTypeSid, $sid = null) {
+    public function __construct(Version $version, array $payload, $assistantSid, $fieldTypeSid, $sid = null) {
         parent::__construct($version);
 
         // Marshaled Properties
@@ -49,14 +51,15 @@ class FieldValueInstance extends InstanceResource {
             'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
             'fieldTypeSid' => Values::array_get($payload, 'field_type_sid'),
             'language' => Values::array_get($payload, 'language'),
-            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'assistantSid' => Values::array_get($payload, 'assistant_sid'),
             'sid' => Values::array_get($payload, 'sid'),
             'value' => Values::array_get($payload, 'value'),
             'url' => Values::array_get($payload, 'url'),
+            'synonymOf' => Values::array_get($payload, 'synonym_of'),
         );
 
         $this->solution = array(
-            'serviceSid' => $serviceSid,
+            'assistantSid' => $assistantSid,
             'fieldTypeSid' => $fieldTypeSid,
             'sid' => $sid ?: $this->properties['sid'],
         );
@@ -66,13 +69,14 @@ class FieldValueInstance extends InstanceResource {
      * Generate an instance context for the instance, the context is capable of
      * performing various actions.  All instance actions are proxied to the context
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueContext Context for this FieldValueInstance
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueContext Context for this
+     *                                                                               FieldValueInstance
      */
     protected function proxy() {
         if (!$this->context) {
             $this->context = new FieldValueContext(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['fieldTypeSid'],
                 $this->solution['sid']
             );
@@ -85,6 +89,7 @@ class FieldValueInstance extends InstanceResource {
      * Fetch a FieldValueInstance
      * 
      * @return FieldValueInstance Fetched FieldValueInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         return $this->proxy()->fetch();
@@ -94,6 +99,7 @@ class FieldValueInstance extends InstanceResource {
      * Deletes the FieldValueInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->proxy()->delete();

+ 25 - 14
plugins/Twilio/Rest/Preview/Understand/Service/FieldType/FieldValueList.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueList.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\FieldType;
+namespace Twilio\Rest\Preview\Understand\Assistant\FieldType;
 
 use Twilio\ListResource;
 use Twilio\Options;
@@ -22,17 +22,18 @@ class FieldValueList extends ListResource {
      * Construct the FieldValueList
      * 
      * @param Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
-     * @param string $fieldTypeSid The field_type_sid
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueList 
+     * @param string $assistantSid The unique ID of the Assistant.
+     * @param string $fieldTypeSid The unique ID of the Field Type associated with
+     *                             this Field Value.
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueList 
      */
-    public function __construct(Version $version, $serviceSid, $fieldTypeSid) {
+    public function __construct(Version $version, $assistantSid, $fieldTypeSid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'fieldTypeSid' => $fieldTypeSid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/FieldTypes/' . rawurlencode($fieldTypeSid) . '/FieldValues';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/FieldTypes/' . rawurlencode($fieldTypeSid) . '/FieldValues';
     }
 
     /**
@@ -129,12 +130,22 @@ class FieldValueList extends ListResource {
     /**
      * Create a new FieldValueInstance
      * 
-     * @param string $language The language
-     * @param string $value The value
+     * @param string $language An ISO language-country string of the value.
+     * @param string $value A user-provided string that uniquely identifies this
+     *                      resource as an alternative to the sid. Unique up to 64
+     *                      characters long.
+     * @param array|Options $options Optional Arguments
      * @return FieldValueInstance Newly created FieldValueInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
-    public function create($language, $value) {
-        $data = Values::of(array('Language' => $language, 'Value' => $value, ));
+    public function create($language, $value, $options = array()) {
+        $options = new Values($options);
+
+        $data = Values::of(array(
+            'Language' => $language,
+            'Value' => $value,
+            'SynonymOf' => $options['synonymOf'],
+        ));
 
         $payload = $this->version->create(
             'POST',
@@ -146,7 +157,7 @@ class FieldValueList extends ListResource {
         return new FieldValueInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['fieldTypeSid']
         );
     }
@@ -155,12 +166,12 @@ class FieldValueList extends ListResource {
      * Constructs a FieldValueContext
      * 
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueContext 
      */
     public function getContext($sid) {
         return new FieldValueContext(
             $this->version,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['fieldTypeSid'],
             $sid
         );

+ 110 - 0
plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.php

@@ -0,0 +1,110 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Preview\Understand\Assistant\FieldType;
+
+use Twilio\Options;
+use Twilio\Values;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+abstract class FieldValueOptions {
+    /**
+     * @param string $language An ISO language-country string of the value. For
+     *                         example: en-US
+     * @return ReadFieldValueOptions Options builder
+     */
+    public static function read($language = Values::NONE) {
+        return new ReadFieldValueOptions($language);
+    }
+
+    /**
+     * @param string $synonymOf A value that indicates this field value is a
+     *                          synonym of. Empty if the value is not a synonym.
+     * @return CreateFieldValueOptions Options builder
+     */
+    public static function create($synonymOf = Values::NONE) {
+        return new CreateFieldValueOptions($synonymOf);
+    }
+}
+
+class ReadFieldValueOptions extends Options {
+    /**
+     * @param string $language An ISO language-country string of the value. For
+     *                         example: en-US
+     */
+    public function __construct($language = Values::NONE) {
+        $this->options['language'] = $language;
+    }
+
+    /**
+     * An ISO language-country string of the value. For example: *en-US*
+     * 
+     * @param string $language An ISO language-country string of the value. For
+     *                         example: en-US
+     * @return $this Fluent Builder
+     */
+    public function setLanguage($language) {
+        $this->options['language'] = $language;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.ReadFieldValueOptions ' . implode(' ', $options) . ']';
+    }
+}
+
+class CreateFieldValueOptions extends Options {
+    /**
+     * @param string $synonymOf A value that indicates this field value is a
+     *                          synonym of. Empty if the value is not a synonym.
+     */
+    public function __construct($synonymOf = Values::NONE) {
+        $this->options['synonymOf'] = $synonymOf;
+    }
+
+    /**
+     * A value that indicates this field value is a synonym of. Empty if the value is not a synonym.
+     * 
+     * @param string $synonymOf A value that indicates this field value is a
+     *                          synonym of. Empty if the value is not a synonym.
+     * @return $this Fluent Builder
+     */
+    public function setSynonymOf($synonymOf) {
+        $this->options['synonymOf'] = $synonymOf;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.CreateFieldValueOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 2 - 2
plugins/Twilio/Rest/Preview/Understand/Service/FieldType/FieldValuePage.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValuePage.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\FieldType;
+namespace Twilio\Rest\Preview\Understand\Assistant\FieldType;
 
 use Twilio\Page;
 
@@ -26,7 +26,7 @@ class FieldValuePage extends Page {
         return new FieldValueInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['fieldTypeSid']
         );
     }

+ 16 - 13
plugins/Twilio/Rest/Preview/Understand/Service/FieldTypeContext.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypeContext.php

@@ -7,20 +7,20 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Exceptions\TwilioException;
 use Twilio\InstanceContext;
 use Twilio\Options;
-use Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueList;
+use Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueList;
 use Twilio\Values;
 use Twilio\Version;
 
 /**
  * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
  * 
- * @property \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueList fieldValues
- * @method \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueContext fieldValues(string $sid)
+ * @property \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueList fieldValues
+ * @method \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueContext fieldValues(string $sid)
  */
 class FieldTypeContext extends InstanceContext {
     protected $_fieldValues = null;
@@ -29,23 +29,24 @@ class FieldTypeContext extends InstanceContext {
      * Initialize the FieldTypeContext
      * 
      * @param \Twilio\Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The assistant_sid
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldTypeContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeContext 
      */
-    public function __construct(Version $version, $serviceSid, $sid) {
+    public function __construct(Version $version, $assistantSid, $sid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/FieldTypes/' . rawurlencode($sid) . '';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/FieldTypes/' . rawurlencode($sid) . '';
     }
 
     /**
      * Fetch a FieldTypeInstance
      * 
      * @return FieldTypeInstance Fetched FieldTypeInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         $params = Values::of(array());
@@ -59,7 +60,7 @@ class FieldTypeContext extends InstanceContext {
         return new FieldTypeInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['sid']
         );
     }
@@ -69,6 +70,7 @@ class FieldTypeContext extends InstanceContext {
      * 
      * @param array|Options $options Optional Arguments
      * @return FieldTypeInstance Updated FieldTypeInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         $options = new Values($options);
@@ -88,7 +90,7 @@ class FieldTypeContext extends InstanceContext {
         return new FieldTypeInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['sid']
         );
     }
@@ -97,6 +99,7 @@ class FieldTypeContext extends InstanceContext {
      * Deletes the FieldTypeInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->version->delete('delete', $this->uri);
@@ -105,13 +108,13 @@ class FieldTypeContext extends InstanceContext {
     /**
      * Access the fieldValues
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueList 
      */
     protected function getFieldValues() {
         if (!$this->_fieldValues) {
             $this->_fieldValues = new FieldValueList(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['sid']
             );
         }

+ 15 - 12
plugins/Twilio/Rest/Preview/Understand/Service/FieldTypeInstance.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypeInstance.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Deserialize;
 use Twilio\Exceptions\TwilioException;
@@ -24,7 +24,7 @@ use Twilio\Version;
  * @property \DateTime dateUpdated
  * @property string friendlyName
  * @property array links
- * @property string serviceSid
+ * @property string assistantSid
  * @property string sid
  * @property string uniqueName
  * @property string url
@@ -37,11 +37,11 @@ class FieldTypeInstance extends InstanceResource {
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param mixed[] $payload The response payload
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The unique ID of the Assistant.
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldTypeInstance 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeInstance 
      */
-    public function __construct(Version $version, array $payload, $serviceSid, $sid = null) {
+    public function __construct(Version $version, array $payload, $assistantSid, $sid = null) {
         parent::__construct($version);
 
         // Marshaled Properties
@@ -51,28 +51,28 @@ class FieldTypeInstance extends InstanceResource {
             'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
             'friendlyName' => Values::array_get($payload, 'friendly_name'),
             'links' => Values::array_get($payload, 'links'),
-            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'assistantSid' => Values::array_get($payload, 'assistant_sid'),
             'sid' => Values::array_get($payload, 'sid'),
             'uniqueName' => Values::array_get($payload, 'unique_name'),
             'url' => Values::array_get($payload, 'url'),
         );
 
-        $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], );
+        $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], );
     }
 
     /**
      * Generate an instance context for the instance, the context is capable of
      * performing various actions.  All instance actions are proxied to the context
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldTypeContext Context for
-     *                                                                  this
-     *                                                                  FieldTypeInstance
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeContext Context
+     *                                                                    for this
+     *                                                                    FieldTypeInstance
      */
     protected function proxy() {
         if (!$this->context) {
             $this->context = new FieldTypeContext(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['sid']
             );
         }
@@ -84,6 +84,7 @@ class FieldTypeInstance extends InstanceResource {
      * Fetch a FieldTypeInstance
      * 
      * @return FieldTypeInstance Fetched FieldTypeInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         return $this->proxy()->fetch();
@@ -94,6 +95,7 @@ class FieldTypeInstance extends InstanceResource {
      * 
      * @param array|Options $options Optional Arguments
      * @return FieldTypeInstance Updated FieldTypeInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         return $this->proxy()->update($options);
@@ -103,6 +105,7 @@ class FieldTypeInstance extends InstanceResource {
      * Deletes the FieldTypeInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->proxy()->delete();
@@ -111,7 +114,7 @@ class FieldTypeInstance extends InstanceResource {
     /**
      * Access the fieldValues
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldType\FieldValueList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueList 
      */
     protected function getFieldValues() {
         return $this->proxy()->fieldValues;

+ 13 - 10
plugins/Twilio/Rest/Preview/Understand/Service/FieldTypeList.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypeList.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\ListResource;
 use Twilio\Options;
@@ -22,16 +22,16 @@ class FieldTypeList extends ListResource {
      * Construct the FieldTypeList
      * 
      * @param Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldTypeList 
+     * @param string $assistantSid The unique ID of the Assistant.
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeList 
      */
-    public function __construct(Version $version, $serviceSid) {
+    public function __construct(Version $version, $assistantSid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, );
+        $this->solution = array('assistantSid' => $assistantSid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/FieldTypes';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/FieldTypes';
     }
 
     /**
@@ -123,9 +123,12 @@ class FieldTypeList extends ListResource {
     /**
      * Create a new FieldTypeInstance
      * 
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      * @param array|Options $options Optional Arguments
      * @return FieldTypeInstance Newly created FieldTypeInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function create($uniqueName, $options = array()) {
         $options = new Values($options);
@@ -139,17 +142,17 @@ class FieldTypeList extends ListResource {
             $data
         );
 
-        return new FieldTypeInstance($this->version, $payload, $this->solution['serviceSid']);
+        return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']);
     }
 
     /**
      * Constructs a FieldTypeContext
      * 
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldTypeContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeContext 
      */
     public function getContext($sid) {
-        return new FieldTypeContext($this->version, $this->solution['serviceSid'], $sid);
+        return new FieldTypeContext($this->version, $this->solution['assistantSid'], $sid);
     }
 
     /**

+ 31 - 13
plugins/Twilio/Rest/Preview/Understand/Service/FieldTypeOptions.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Options;
 use Twilio\Values;
@@ -17,7 +17,9 @@ use Twilio\Values;
  */
 abstract class FieldTypeOptions {
     /**
-     * @param string $friendlyName The friendly_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
      * @return CreateFieldTypeOptions Options builder
      */
     public static function create($friendlyName = Values::NONE) {
@@ -25,8 +27,12 @@ abstract class FieldTypeOptions {
     }
 
     /**
-     * @param string $friendlyName The friendly_name
-     * @param string $uniqueName The unique_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      * @return UpdateFieldTypeOptions Options builder
      */
     public static function update($friendlyName = Values::NONE, $uniqueName = Values::NONE) {
@@ -36,16 +42,20 @@ abstract class FieldTypeOptions {
 
 class CreateFieldTypeOptions extends Options {
     /**
-     * @param string $friendlyName The friendly_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
      */
     public function __construct($friendlyName = Values::NONE) {
         $this->options['friendlyName'] = $friendlyName;
     }
 
     /**
-     * The friendly_name
+     * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
      * 
-     * @param string $friendlyName The friendly_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
      * @return $this Fluent Builder
      */
     public function setFriendlyName($friendlyName) {
@@ -71,8 +81,12 @@ class CreateFieldTypeOptions extends Options {
 
 class UpdateFieldTypeOptions extends Options {
     /**
-     * @param string $friendlyName The friendly_name
-     * @param string $uniqueName The unique_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      */
     public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE) {
         $this->options['friendlyName'] = $friendlyName;
@@ -80,9 +94,11 @@ class UpdateFieldTypeOptions extends Options {
     }
 
     /**
-     * The friendly_name
+     * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
      * 
-     * @param string $friendlyName The friendly_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
      * @return $this Fluent Builder
      */
     public function setFriendlyName($friendlyName) {
@@ -91,9 +107,11 @@ class UpdateFieldTypeOptions extends Options {
     }
 
     /**
-     * The unique_name
+     * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
      * 
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      * @return $this Fluent Builder
      */
     public function setUniqueName($uniqueName) {

+ 2 - 2
plugins/Twilio/Rest/Preview/Understand/Service/FieldTypePage.php → plugins/Twilio/Rest/Preview/Understand/Assistant/FieldTypePage.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Page;
 
@@ -23,7 +23,7 @@ class FieldTypePage extends Page {
     }
 
     public function buildInstance(array $payload) {
-        return new FieldTypeInstance($this->version, $payload, $this->solution['serviceSid']);
+        return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']);
     }
 
     /**

+ 9 - 7
plugins/Twilio/Rest/Preview/Understand/Service/Intent/FieldContext.php → plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldContext.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
 
 use Twilio\InstanceContext;
 use Twilio\Values;
@@ -21,24 +21,25 @@ class FieldContext extends InstanceContext {
      * Initialize the FieldContext
      * 
      * @param \Twilio\Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The assistant_sid
      * @param string $intentSid The intent_sid
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\FieldContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldContext 
      */
-    public function __construct(Version $version, $serviceSid, $intentSid, $sid) {
+    public function __construct(Version $version, $assistantSid, $intentSid, $sid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'intentSid' => $intentSid, 'sid' => $sid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'intentSid' => $intentSid, 'sid' => $sid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Intents/' . rawurlencode($intentSid) . '/Fields/' . rawurlencode($sid) . '';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/Intents/' . rawurlencode($intentSid) . '/Fields/' . rawurlencode($sid) . '';
     }
 
     /**
      * Fetch a FieldInstance
      * 
      * @return FieldInstance Fetched FieldInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         $params = Values::of(array());
@@ -52,7 +53,7 @@ class FieldContext extends InstanceContext {
         return new FieldInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid'],
             $this->solution['sid']
         );
@@ -62,6 +63,7 @@ class FieldContext extends InstanceContext {
      * Deletes the FieldInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->version->delete('delete', $this->uri);

+ 13 - 12
plugins/Twilio/Rest/Preview/Understand/Service/Intent/FieldInstance.php → plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldInstance.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
 
 use Twilio\Deserialize;
 use Twilio\Exceptions\TwilioException;
@@ -23,7 +23,7 @@ use Twilio\Version;
  * @property \DateTime dateUpdated
  * @property string fieldType
  * @property string intentSid
- * @property string serviceSid
+ * @property string assistantSid
  * @property string sid
  * @property string uniqueName
  * @property string url
@@ -34,12 +34,13 @@ class FieldInstance extends InstanceResource {
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param mixed[] $payload The response payload
-     * @param string $serviceSid The service_sid
-     * @param string $intentSid The intent_sid
+     * @param string $assistantSid The unique ID of the parent Assistant.
+     * @param string $intentSid The unique ID of the Intent associated with this
+     *                          Field.
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\FieldInstance 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldInstance 
      */
-    public function __construct(Version $version, array $payload, $serviceSid, $intentSid, $sid = null) {
+    public function __construct(Version $version, array $payload, $assistantSid, $intentSid, $sid = null) {
         parent::__construct($version);
 
         // Marshaled Properties
@@ -49,14 +50,14 @@ class FieldInstance extends InstanceResource {
             'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
             'fieldType' => Values::array_get($payload, 'field_type'),
             'intentSid' => Values::array_get($payload, 'intent_sid'),
-            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'assistantSid' => Values::array_get($payload, 'assistant_sid'),
             'sid' => Values::array_get($payload, 'sid'),
             'uniqueName' => Values::array_get($payload, 'unique_name'),
             'url' => Values::array_get($payload, 'url'),
         );
 
         $this->solution = array(
-            'serviceSid' => $serviceSid,
+            'assistantSid' => $assistantSid,
             'intentSid' => $intentSid,
             'sid' => $sid ?: $this->properties['sid'],
         );
@@ -66,15 +67,13 @@ class FieldInstance extends InstanceResource {
      * Generate an instance context for the instance, the context is capable of
      * performing various actions.  All instance actions are proxied to the context
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\FieldContext Context
-     *                                                                     for this
-     *                                                                     FieldInstance
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldContext Context for this FieldInstance
      */
     protected function proxy() {
         if (!$this->context) {
             $this->context = new FieldContext(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['intentSid'],
                 $this->solution['sid']
             );
@@ -87,6 +86,7 @@ class FieldInstance extends InstanceResource {
      * Fetch a FieldInstance
      * 
      * @return FieldInstance Fetched FieldInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         return $this->proxy()->fetch();
@@ -96,6 +96,7 @@ class FieldInstance extends InstanceResource {
      * Deletes the FieldInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->proxy()->delete();

+ 18 - 12
plugins/Twilio/Rest/Preview/Understand/Service/Intent/FieldList.php → plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldList.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
 
 use Twilio\ListResource;
 use Twilio\Values;
@@ -21,17 +21,18 @@ class FieldList extends ListResource {
      * Construct the FieldList
      * 
      * @param Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
-     * @param string $intentSid The intent_sid
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\FieldList 
+     * @param string $assistantSid The unique ID of the parent Assistant.
+     * @param string $intentSid The unique ID of the Intent associated with this
+     *                          Field.
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldList 
      */
-    public function __construct(Version $version, $serviceSid, $intentSid) {
+    public function __construct(Version $version, $assistantSid, $intentSid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'intentSid' => $intentSid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'intentSid' => $intentSid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Intents/' . rawurlencode($intentSid) . '/Fields';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/Intents/' . rawurlencode($intentSid) . '/Fields';
     }
 
     /**
@@ -123,9 +124,14 @@ class FieldList extends ListResource {
     /**
      * Create a new FieldInstance
      * 
-     * @param string $fieldType The field_type
-     * @param string $uniqueName The unique_name
+     * @param string $fieldType The unique name or sid of the FieldType. It can be
+     *                          any Built-in Field Type or the unique_name or sid
+     *                          of a custom Field Type.
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      * @return FieldInstance Newly created FieldInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function create($fieldType, $uniqueName) {
         $data = Values::of(array('FieldType' => $fieldType, 'UniqueName' => $uniqueName, ));
@@ -140,7 +146,7 @@ class FieldList extends ListResource {
         return new FieldInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid']
         );
     }
@@ -149,12 +155,12 @@ class FieldList extends ListResource {
      * Constructs a FieldContext
      * 
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\FieldContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldContext 
      */
     public function getContext($sid) {
         return new FieldContext(
             $this->version,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid'],
             $sid
         );

+ 2 - 2
plugins/Twilio/Rest/Preview/Understand/Service/Intent/FieldPage.php → plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/FieldPage.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
 
 use Twilio\Page;
 
@@ -26,7 +26,7 @@ class FieldPage extends Page {
         return new FieldInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid']
         );
     }

+ 12 - 8
plugins/Twilio/Rest/Preview/Understand/Service/Intent/SampleContext.php → plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleContext.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
 
 use Twilio\InstanceContext;
 use Twilio\Options;
@@ -22,24 +22,25 @@ class SampleContext extends InstanceContext {
      * Initialize the SampleContext
      * 
      * @param \Twilio\Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The assistant_sid
      * @param string $intentSid The intent_sid
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\SampleContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleContext 
      */
-    public function __construct(Version $version, $serviceSid, $intentSid, $sid) {
+    public function __construct(Version $version, $assistantSid, $intentSid, $sid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'intentSid' => $intentSid, 'sid' => $sid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'intentSid' => $intentSid, 'sid' => $sid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Intents/' . rawurlencode($intentSid) . '/Samples/' . rawurlencode($sid) . '';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/Intents/' . rawurlencode($intentSid) . '/Samples/' . rawurlencode($sid) . '';
     }
 
     /**
      * Fetch a SampleInstance
      * 
      * @return SampleInstance Fetched SampleInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         $params = Values::of(array());
@@ -53,7 +54,7 @@ class SampleContext extends InstanceContext {
         return new SampleInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid'],
             $this->solution['sid']
         );
@@ -64,6 +65,7 @@ class SampleContext extends InstanceContext {
      * 
      * @param array|Options $options Optional Arguments
      * @return SampleInstance Updated SampleInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         $options = new Values($options);
@@ -71,6 +73,7 @@ class SampleContext extends InstanceContext {
         $data = Values::of(array(
             'Language' => $options['language'],
             'TaggedText' => $options['taggedText'],
+            'SourceChannel' => $options['sourceChannel'],
         ));
 
         $payload = $this->version->update(
@@ -83,7 +86,7 @@ class SampleContext extends InstanceContext {
         return new SampleInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid'],
             $this->solution['sid']
         );
@@ -93,6 +96,7 @@ class SampleContext extends InstanceContext {
      * Deletes the SampleInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->version->delete('delete', $this->uri);

+ 16 - 13
plugins/Twilio/Rest/Preview/Understand/Service/Intent/SampleInstance.php → plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleInstance.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
 
 use Twilio\Deserialize;
 use Twilio\Exceptions\TwilioException;
@@ -24,10 +24,11 @@ use Twilio\Version;
  * @property \DateTime dateUpdated
  * @property string intentSid
  * @property string language
- * @property string serviceSid
+ * @property string assistantSid
  * @property string sid
  * @property string taggedText
  * @property string url
+ * @property string sourceChannel
  */
 class SampleInstance extends InstanceResource {
     /**
@@ -35,12 +36,13 @@ class SampleInstance extends InstanceResource {
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param mixed[] $payload The response payload
-     * @param string $serviceSid The service_sid
-     * @param string $intentSid The intent_sid
+     * @param string $assistantSid The unique ID of the Assistant.
+     * @param string $intentSid The unique ID of the Intent associated with this
+     *                          Sample.
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\SampleInstance 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleInstance 
      */
-    public function __construct(Version $version, array $payload, $serviceSid, $intentSid, $sid = null) {
+    public function __construct(Version $version, array $payload, $assistantSid, $intentSid, $sid = null) {
         parent::__construct($version);
 
         // Marshaled Properties
@@ -50,14 +52,15 @@ class SampleInstance extends InstanceResource {
             'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
             'intentSid' => Values::array_get($payload, 'intent_sid'),
             'language' => Values::array_get($payload, 'language'),
-            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'assistantSid' => Values::array_get($payload, 'assistant_sid'),
             'sid' => Values::array_get($payload, 'sid'),
             'taggedText' => Values::array_get($payload, 'tagged_text'),
             'url' => Values::array_get($payload, 'url'),
+            'sourceChannel' => Values::array_get($payload, 'source_channel'),
         );
 
         $this->solution = array(
-            'serviceSid' => $serviceSid,
+            'assistantSid' => $assistantSid,
             'intentSid' => $intentSid,
             'sid' => $sid ?: $this->properties['sid'],
         );
@@ -67,16 +70,13 @@ class SampleInstance extends InstanceResource {
      * Generate an instance context for the instance, the context is capable of
      * performing various actions.  All instance actions are proxied to the context
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\SampleContext Context
-     *                                                                      for
-     *                                                                      this
-     *                                                                      SampleInstance
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleContext Context for this SampleInstance
      */
     protected function proxy() {
         if (!$this->context) {
             $this->context = new SampleContext(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['intentSid'],
                 $this->solution['sid']
             );
@@ -89,6 +89,7 @@ class SampleInstance extends InstanceResource {
      * Fetch a SampleInstance
      * 
      * @return SampleInstance Fetched SampleInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         return $this->proxy()->fetch();
@@ -99,6 +100,7 @@ class SampleInstance extends InstanceResource {
      * 
      * @param array|Options $options Optional Arguments
      * @return SampleInstance Updated SampleInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         return $this->proxy()->update($options);
@@ -108,6 +110,7 @@ class SampleInstance extends InstanceResource {
      * Deletes the SampleInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->proxy()->delete();

+ 24 - 14
plugins/Twilio/Rest/Preview/Understand/Service/Intent/SampleList.php → plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleList.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
 
 use Twilio\ListResource;
 use Twilio\Options;
@@ -22,17 +22,18 @@ class SampleList extends ListResource {
      * Construct the SampleList
      * 
      * @param Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
-     * @param string $intentSid The intent_sid
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\SampleList 
+     * @param string $assistantSid The unique ID of the Assistant.
+     * @param string $intentSid The unique ID of the Intent associated with this
+     *                          Sample.
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleList 
      */
-    public function __construct(Version $version, $serviceSid, $intentSid) {
+    public function __construct(Version $version, $assistantSid, $intentSid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'intentSid' => $intentSid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'intentSid' => $intentSid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Intents/' . rawurlencode($intentSid) . '/Samples';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/Intents/' . rawurlencode($intentSid) . '/Samples';
     }
 
     /**
@@ -129,12 +130,21 @@ class SampleList extends ListResource {
     /**
      * Create a new SampleInstance
      * 
-     * @param string $language The language
-     * @param string $taggedText The tagged_text
+     * @param string $language An ISO language-country string of the sample.
+     * @param string $taggedText The text example of how end-users may express this
+     *                           intent. The sample may contain Field tag blocks.
+     * @param array|Options $options Optional Arguments
      * @return SampleInstance Newly created SampleInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
-    public function create($language, $taggedText) {
-        $data = Values::of(array('Language' => $language, 'TaggedText' => $taggedText, ));
+    public function create($language, $taggedText, $options = array()) {
+        $options = new Values($options);
+
+        $data = Values::of(array(
+            'Language' => $language,
+            'TaggedText' => $taggedText,
+            'SourceChannel' => $options['sourceChannel'],
+        ));
 
         $payload = $this->version->create(
             'POST',
@@ -146,7 +156,7 @@ class SampleList extends ListResource {
         return new SampleInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid']
         );
     }
@@ -155,12 +165,12 @@ class SampleList extends ListResource {
      * Constructs a SampleContext
      * 
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\SampleContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleContext 
      */
     public function getContext($sid) {
         return new SampleContext(
             $this->version,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid'],
             $sid
         );

+ 196 - 0
plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SampleOptions.php

@@ -0,0 +1,196 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
+
+use Twilio\Options;
+use Twilio\Values;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+abstract class SampleOptions {
+    /**
+     * @param string $language An ISO language-country string of the sample.
+     * @return ReadSampleOptions Options builder
+     */
+    public static function read($language = Values::NONE) {
+        return new ReadSampleOptions($language);
+    }
+
+    /**
+     * @param string $sourceChannel The communication channel the sample was
+     *                              captured. It can be: voice, sms, chat, alexa,
+     *                              google-assistant, or slack. If not included the
+     *                              value will be null
+     * @return CreateSampleOptions Options builder
+     */
+    public static function create($sourceChannel = Values::NONE) {
+        return new CreateSampleOptions($sourceChannel);
+    }
+
+    /**
+     * @param string $language An ISO language-country string of the sample.
+     * @param string $taggedText The text example of how end-users may express this
+     *                           intent. The sample may contain Field tag blocks.
+     * @param string $sourceChannel The communication channel the sample was
+     *                              captured. It can be: voice, sms, chat, alexa,
+     *                              google-assistant, or slack. If not included the
+     *                              value will be null
+     * @return UpdateSampleOptions Options builder
+     */
+    public static function update($language = Values::NONE, $taggedText = Values::NONE, $sourceChannel = Values::NONE) {
+        return new UpdateSampleOptions($language, $taggedText, $sourceChannel);
+    }
+}
+
+class ReadSampleOptions extends Options {
+    /**
+     * @param string $language An ISO language-country string of the sample.
+     */
+    public function __construct($language = Values::NONE) {
+        $this->options['language'] = $language;
+    }
+
+    /**
+     * An ISO language-country string of the sample.
+     * 
+     * @param string $language An ISO language-country string of the sample.
+     * @return $this Fluent Builder
+     */
+    public function setLanguage($language) {
+        $this->options['language'] = $language;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.ReadSampleOptions ' . implode(' ', $options) . ']';
+    }
+}
+
+class CreateSampleOptions extends Options {
+    /**
+     * @param string $sourceChannel The communication channel the sample was
+     *                              captured. It can be: voice, sms, chat, alexa,
+     *                              google-assistant, or slack. If not included the
+     *                              value will be null
+     */
+    public function __construct($sourceChannel = Values::NONE) {
+        $this->options['sourceChannel'] = $sourceChannel;
+    }
+
+    /**
+     * The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null
+     * 
+     * @param string $sourceChannel The communication channel the sample was
+     *                              captured. It can be: voice, sms, chat, alexa,
+     *                              google-assistant, or slack. If not included the
+     *                              value will be null
+     * @return $this Fluent Builder
+     */
+    public function setSourceChannel($sourceChannel) {
+        $this->options['sourceChannel'] = $sourceChannel;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.CreateSampleOptions ' . implode(' ', $options) . ']';
+    }
+}
+
+class UpdateSampleOptions extends Options {
+    /**
+     * @param string $language An ISO language-country string of the sample.
+     * @param string $taggedText The text example of how end-users may express this
+     *                           intent. The sample may contain Field tag blocks.
+     * @param string $sourceChannel The communication channel the sample was
+     *                              captured. It can be: voice, sms, chat, alexa,
+     *                              google-assistant, or slack. If not included the
+     *                              value will be null
+     */
+    public function __construct($language = Values::NONE, $taggedText = Values::NONE, $sourceChannel = Values::NONE) {
+        $this->options['language'] = $language;
+        $this->options['taggedText'] = $taggedText;
+        $this->options['sourceChannel'] = $sourceChannel;
+    }
+
+    /**
+     * An ISO language-country string of the sample.
+     * 
+     * @param string $language An ISO language-country string of the sample.
+     * @return $this Fluent Builder
+     */
+    public function setLanguage($language) {
+        $this->options['language'] = $language;
+        return $this;
+    }
+
+    /**
+     * The text example of how end-users may express this intent. The sample may contain Field tag blocks.
+     * 
+     * @param string $taggedText The text example of how end-users may express this
+     *                           intent. The sample may contain Field tag blocks.
+     * @return $this Fluent Builder
+     */
+    public function setTaggedText($taggedText) {
+        $this->options['taggedText'] = $taggedText;
+        return $this;
+    }
+
+    /**
+     * The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null
+     * 
+     * @param string $sourceChannel The communication channel the sample was
+     *                              captured. It can be: voice, sms, chat, alexa,
+     *                              google-assistant, or slack. If not included the
+     *                              value will be null
+     * @return $this Fluent Builder
+     */
+    public function setSourceChannel($sourceChannel) {
+        $this->options['sourceChannel'] = $sourceChannel;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.UpdateSampleOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 2 - 2
plugins/Twilio/Rest/Preview/Understand/Service/Intent/SamplePage.php → plugins/Twilio/Rest/Preview/Understand/Assistant/Intent/SamplePage.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
+namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
 
 use Twilio\Page;
 
@@ -26,7 +26,7 @@ class SamplePage extends Page {
         return new SampleInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['intentSid']
         );
     }

+ 21 - 18
plugins/Twilio/Rest/Preview/Understand/Service/IntentContext.php → plugins/Twilio/Rest/Preview/Understand/Assistant/IntentContext.php

@@ -7,23 +7,23 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Exceptions\TwilioException;
 use Twilio\InstanceContext;
 use Twilio\Options;
-use Twilio\Rest\Preview\Understand\Service\Intent\FieldList;
-use Twilio\Rest\Preview\Understand\Service\Intent\SampleList;
+use Twilio\Rest\Preview\Understand\Assistant\Intent\FieldList;
+use Twilio\Rest\Preview\Understand\Assistant\Intent\SampleList;
 use Twilio\Values;
 use Twilio\Version;
 
 /**
  * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
  * 
- * @property \Twilio\Rest\Preview\Understand\Service\Intent\FieldList fields
- * @property \Twilio\Rest\Preview\Understand\Service\Intent\SampleList samples
- * @method \Twilio\Rest\Preview\Understand\Service\Intent\FieldContext fields(string $sid)
- * @method \Twilio\Rest\Preview\Understand\Service\Intent\SampleContext samples(string $sid)
+ * @property \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldList fields
+ * @property \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleList samples
+ * @method \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldContext fields(string $sid)
+ * @method \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleContext samples(string $sid)
  */
 class IntentContext extends InstanceContext {
     protected $_fields = null;
@@ -33,23 +33,24 @@ class IntentContext extends InstanceContext {
      * Initialize the IntentContext
      * 
      * @param \Twilio\Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The assistant_sid
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\IntentContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\IntentContext 
      */
-    public function __construct(Version $version, $serviceSid, $sid) {
+    public function __construct(Version $version, $assistantSid, $sid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Intents/' . rawurlencode($sid) . '';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/Intents/' . rawurlencode($sid) . '';
     }
 
     /**
      * Fetch a IntentInstance
      * 
      * @return IntentInstance Fetched IntentInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         $params = Values::of(array());
@@ -63,7 +64,7 @@ class IntentContext extends InstanceContext {
         return new IntentInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['sid']
         );
     }
@@ -73,6 +74,7 @@ class IntentContext extends InstanceContext {
      * 
      * @param array|Options $options Optional Arguments
      * @return IntentInstance Updated IntentInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         $options = new Values($options);
@@ -92,7 +94,7 @@ class IntentContext extends InstanceContext {
         return new IntentInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['sid']
         );
     }
@@ -101,6 +103,7 @@ class IntentContext extends InstanceContext {
      * Deletes the IntentInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->version->delete('delete', $this->uri);
@@ -109,13 +112,13 @@ class IntentContext extends InstanceContext {
     /**
      * Access the fields
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\FieldList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldList 
      */
     protected function getFields() {
         if (!$this->_fields) {
             $this->_fields = new FieldList(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['sid']
             );
         }
@@ -126,13 +129,13 @@ class IntentContext extends InstanceContext {
     /**
      * Access the samples
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\SampleList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleList 
      */
     protected function getSamples() {
         if (!$this->_samples) {
             $this->_samples = new SampleList(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['sid']
             );
         }

+ 16 - 13
plugins/Twilio/Rest/Preview/Understand/Service/IntentInstance.php → plugins/Twilio/Rest/Preview/Understand/Assistant/IntentInstance.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Deserialize;
 use Twilio\Exceptions\TwilioException;
@@ -24,7 +24,7 @@ use Twilio\Version;
  * @property \DateTime dateUpdated
  * @property string friendlyName
  * @property array links
- * @property string serviceSid
+ * @property string assistantSid
  * @property string sid
  * @property string uniqueName
  * @property string url
@@ -38,11 +38,11 @@ class IntentInstance extends InstanceResource {
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param mixed[] $payload The response payload
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The unique ID of the Assistant.
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\IntentInstance 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\IntentInstance 
      */
-    public function __construct(Version $version, array $payload, $serviceSid, $sid = null) {
+    public function __construct(Version $version, array $payload, $assistantSid, $sid = null) {
         parent::__construct($version);
 
         // Marshaled Properties
@@ -52,28 +52,28 @@ class IntentInstance extends InstanceResource {
             'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
             'friendlyName' => Values::array_get($payload, 'friendly_name'),
             'links' => Values::array_get($payload, 'links'),
-            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'assistantSid' => Values::array_get($payload, 'assistant_sid'),
             'sid' => Values::array_get($payload, 'sid'),
             'uniqueName' => Values::array_get($payload, 'unique_name'),
             'url' => Values::array_get($payload, 'url'),
         );
 
-        $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], );
+        $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], );
     }
 
     /**
      * Generate an instance context for the instance, the context is capable of
      * performing various actions.  All instance actions are proxied to the context
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\IntentContext Context for
-     *                                                               this
-     *                                                               IntentInstance
+     * @return \Twilio\Rest\Preview\Understand\Assistant\IntentContext Context for
+     *                                                                 this
+     *                                                                 IntentInstance
      */
     protected function proxy() {
         if (!$this->context) {
             $this->context = new IntentContext(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['sid']
             );
         }
@@ -85,6 +85,7 @@ class IntentInstance extends InstanceResource {
      * Fetch a IntentInstance
      * 
      * @return IntentInstance Fetched IntentInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         return $this->proxy()->fetch();
@@ -95,6 +96,7 @@ class IntentInstance extends InstanceResource {
      * 
      * @param array|Options $options Optional Arguments
      * @return IntentInstance Updated IntentInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         return $this->proxy()->update($options);
@@ -104,6 +106,7 @@ class IntentInstance extends InstanceResource {
      * Deletes the IntentInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->proxy()->delete();
@@ -112,7 +115,7 @@ class IntentInstance extends InstanceResource {
     /**
      * Access the fields
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\FieldList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\FieldList 
      */
     protected function getFields() {
         return $this->proxy()->fields;
@@ -121,7 +124,7 @@ class IntentInstance extends InstanceResource {
     /**
      * Access the samples
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\Intent\SampleList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\Intent\SampleList 
      */
     protected function getSamples() {
         return $this->proxy()->samples;

+ 13 - 10
plugins/Twilio/Rest/Preview/Understand/Service/IntentList.php → plugins/Twilio/Rest/Preview/Understand/Assistant/IntentList.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\ListResource;
 use Twilio\Options;
@@ -22,16 +22,16 @@ class IntentList extends ListResource {
      * Construct the IntentList
      * 
      * @param Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
-     * @return \Twilio\Rest\Preview\Understand\Service\IntentList 
+     * @param string $assistantSid The unique ID of the Assistant.
+     * @return \Twilio\Rest\Preview\Understand\Assistant\IntentList 
      */
-    public function __construct(Version $version, $serviceSid) {
+    public function __construct(Version $version, $assistantSid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, );
+        $this->solution = array('assistantSid' => $assistantSid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Intents';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/Intents';
     }
 
     /**
@@ -123,9 +123,12 @@ class IntentList extends ListResource {
     /**
      * Create a new IntentInstance
      * 
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      * @param array|Options $options Optional Arguments
      * @return IntentInstance Newly created IntentInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function create($uniqueName, $options = array()) {
         $options = new Values($options);
@@ -139,17 +142,17 @@ class IntentList extends ListResource {
             $data
         );
 
-        return new IntentInstance($this->version, $payload, $this->solution['serviceSid']);
+        return new IntentInstance($this->version, $payload, $this->solution['assistantSid']);
     }
 
     /**
      * Constructs a IntentContext
      * 
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\IntentContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\IntentContext 
      */
     public function getContext($sid) {
-        return new IntentContext($this->version, $this->solution['serviceSid'], $sid);
+        return new IntentContext($this->version, $this->solution['assistantSid'], $sid);
     }
 
     /**

+ 31 - 13
plugins/Twilio/Rest/Preview/Understand/Service/IntentOptions.php → plugins/Twilio/Rest/Preview/Understand/Assistant/IntentOptions.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Options;
 use Twilio\Values;
@@ -17,7 +17,9 @@ use Twilio\Values;
  */
 abstract class IntentOptions {
     /**
-     * @param string $friendlyName The friendly_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
      * @return CreateIntentOptions Options builder
      */
     public static function create($friendlyName = Values::NONE) {
@@ -25,8 +27,12 @@ abstract class IntentOptions {
     }
 
     /**
-     * @param string $friendlyName The friendly_name
-     * @param string $uniqueName The unique_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      * @return UpdateIntentOptions Options builder
      */
     public static function update($friendlyName = Values::NONE, $uniqueName = Values::NONE) {
@@ -36,16 +42,20 @@ abstract class IntentOptions {
 
 class CreateIntentOptions extends Options {
     /**
-     * @param string $friendlyName The friendly_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
      */
     public function __construct($friendlyName = Values::NONE) {
         $this->options['friendlyName'] = $friendlyName;
     }
 
     /**
-     * The friendly_name
+     * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
      * 
-     * @param string $friendlyName The friendly_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
      * @return $this Fluent Builder
      */
     public function setFriendlyName($friendlyName) {
@@ -71,8 +81,12 @@ class CreateIntentOptions extends Options {
 
 class UpdateIntentOptions extends Options {
     /**
-     * @param string $friendlyName The friendly_name
-     * @param string $uniqueName The unique_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      */
     public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE) {
         $this->options['friendlyName'] = $friendlyName;
@@ -80,9 +94,11 @@ class UpdateIntentOptions extends Options {
     }
 
     /**
-     * The friendly_name
+     * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
      * 
-     * @param string $friendlyName The friendly_name
+     * @param string $friendlyName A user-provided string that identifies this
+     *                             resource. It is non-unique and can up to 255
+     *                             characters long.
      * @return $this Fluent Builder
      */
     public function setFriendlyName($friendlyName) {
@@ -91,9 +107,11 @@ class UpdateIntentOptions extends Options {
     }
 
     /**
-     * The unique_name
+     * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
      * 
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
      * @return $this Fluent Builder
      */
     public function setUniqueName($uniqueName) {

+ 2 - 2
plugins/Twilio/Rest/Preview/Understand/Service/IntentPage.php → plugins/Twilio/Rest/Preview/Understand/Assistant/IntentPage.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Page;
 
@@ -23,7 +23,7 @@ class IntentPage extends Page {
     }
 
     public function buildInstance(array $payload) {
-        return new IntentInstance($this->version, $payload, $this->solution['serviceSid']);
+        return new IntentInstance($this->version, $payload, $this->solution['assistantSid']);
     }
 
     /**

+ 11 - 8
plugins/Twilio/Rest/Preview/Understand/Service/ModelBuildContext.php → plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildContext.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\InstanceContext;
 use Twilio\Options;
@@ -22,23 +22,24 @@ class ModelBuildContext extends InstanceContext {
      * Initialize the ModelBuildContext
      * 
      * @param \Twilio\Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The assistant_sid
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\ModelBuildContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildContext 
      */
-    public function __construct(Version $version, $serviceSid, $sid) {
+    public function __construct(Version $version, $assistantSid, $sid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/ModelBuilds/' . rawurlencode($sid) . '';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/ModelBuilds/' . rawurlencode($sid) . '';
     }
 
     /**
      * Fetch a ModelBuildInstance
      * 
      * @return ModelBuildInstance Fetched ModelBuildInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         $params = Values::of(array());
@@ -52,7 +53,7 @@ class ModelBuildContext extends InstanceContext {
         return new ModelBuildInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['sid']
         );
     }
@@ -62,6 +63,7 @@ class ModelBuildContext extends InstanceContext {
      * 
      * @param array|Options $options Optional Arguments
      * @return ModelBuildInstance Updated ModelBuildInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         $options = new Values($options);
@@ -78,7 +80,7 @@ class ModelBuildContext extends InstanceContext {
         return new ModelBuildInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['sid']
         );
     }
@@ -87,6 +89,7 @@ class ModelBuildContext extends InstanceContext {
      * Deletes the ModelBuildInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->version->delete('delete', $this->uri);

+ 18 - 11
plugins/Twilio/Rest/Preview/Understand/Service/ModelBuildInstance.php → plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildInstance.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Deserialize;
 use Twilio\Exceptions\TwilioException;
@@ -22,11 +22,13 @@ use Twilio\Version;
  * @property string accountSid
  * @property \DateTime dateCreated
  * @property \DateTime dateUpdated
- * @property string serviceSid
+ * @property string assistantSid
  * @property string sid
  * @property string status
  * @property string uniqueName
  * @property string url
+ * @property integer buildDuration
+ * @property integer errorCode
  */
 class ModelBuildInstance extends InstanceResource {
     /**
@@ -34,11 +36,11 @@ class ModelBuildInstance extends InstanceResource {
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param mixed[] $payload The response payload
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The unique ID of the parent Assistant.
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\ModelBuildInstance 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildInstance 
      */
-    public function __construct(Version $version, array $payload, $serviceSid, $sid = null) {
+    public function __construct(Version $version, array $payload, $assistantSid, $sid = null) {
         parent::__construct($version);
 
         // Marshaled Properties
@@ -46,29 +48,31 @@ class ModelBuildInstance extends InstanceResource {
             'accountSid' => Values::array_get($payload, 'account_sid'),
             'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
             'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
-            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'assistantSid' => Values::array_get($payload, 'assistant_sid'),
             'sid' => Values::array_get($payload, 'sid'),
             'status' => Values::array_get($payload, 'status'),
             'uniqueName' => Values::array_get($payload, 'unique_name'),
             'url' => Values::array_get($payload, 'url'),
+            'buildDuration' => Values::array_get($payload, 'build_duration'),
+            'errorCode' => Values::array_get($payload, 'error_code'),
         );
 
-        $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], );
+        $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], );
     }
 
     /**
      * Generate an instance context for the instance, the context is capable of
      * performing various actions.  All instance actions are proxied to the context
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\ModelBuildContext Context
-     *                                                                   for this
-     *                                                                   ModelBuildInstance
+     * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildContext Context
+     *                                                                     for this
+     *                                                                     ModelBuildInstance
      */
     protected function proxy() {
         if (!$this->context) {
             $this->context = new ModelBuildContext(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['sid']
             );
         }
@@ -80,6 +84,7 @@ class ModelBuildInstance extends InstanceResource {
      * Fetch a ModelBuildInstance
      * 
      * @return ModelBuildInstance Fetched ModelBuildInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         return $this->proxy()->fetch();
@@ -90,6 +95,7 @@ class ModelBuildInstance extends InstanceResource {
      * 
      * @param array|Options $options Optional Arguments
      * @return ModelBuildInstance Updated ModelBuildInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         return $this->proxy()->update($options);
@@ -99,6 +105,7 @@ class ModelBuildInstance extends InstanceResource {
      * Deletes the ModelBuildInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->proxy()->delete();

+ 10 - 9
plugins/Twilio/Rest/Preview/Understand/Service/ModelBuildList.php → plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildList.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\ListResource;
 use Twilio\Options;
@@ -22,16 +22,16 @@ class ModelBuildList extends ListResource {
      * Construct the ModelBuildList
      * 
      * @param Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
-     * @return \Twilio\Rest\Preview\Understand\Service\ModelBuildList 
+     * @param string $assistantSid The unique ID of the parent Assistant.
+     * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildList 
      */
-    public function __construct(Version $version, $serviceSid) {
+    public function __construct(Version $version, $assistantSid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, );
+        $this->solution = array('assistantSid' => $assistantSid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/ModelBuilds';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/ModelBuilds';
     }
 
     /**
@@ -125,6 +125,7 @@ class ModelBuildList extends ListResource {
      * 
      * @param array|Options $options Optional Arguments
      * @return ModelBuildInstance Newly created ModelBuildInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function create($options = array()) {
         $options = new Values($options);
@@ -141,17 +142,17 @@ class ModelBuildList extends ListResource {
             $data
         );
 
-        return new ModelBuildInstance($this->version, $payload, $this->solution['serviceSid']);
+        return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']);
     }
 
     /**
      * Constructs a ModelBuildContext
      * 
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\ModelBuildContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildContext 
      */
     public function getContext($sid) {
-        return new ModelBuildContext($this->version, $this->solution['serviceSid'], $sid);
+        return new ModelBuildContext($this->version, $this->solution['assistantSid'], $sid);
     }
 
     /**

+ 21 - 9
plugins/Twilio/Rest/Preview/Understand/Service/ModelBuildOptions.php → plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Options;
 use Twilio\Values;
@@ -18,7 +18,9 @@ use Twilio\Values;
 abstract class ModelBuildOptions {
     /**
      * @param string $statusCallback The status_callback
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long. For example: v0.1
      * @return CreateModelBuildOptions Options builder
      */
     public static function create($statusCallback = Values::NONE, $uniqueName = Values::NONE) {
@@ -26,7 +28,9 @@ abstract class ModelBuildOptions {
     }
 
     /**
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long. For example: v0.1
      * @return UpdateModelBuildOptions Options builder
      */
     public static function update($uniqueName = Values::NONE) {
@@ -37,7 +41,9 @@ abstract class ModelBuildOptions {
 class CreateModelBuildOptions extends Options {
     /**
      * @param string $statusCallback The status_callback
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long. For example: v0.1
      */
     public function __construct($statusCallback = Values::NONE, $uniqueName = Values::NONE) {
         $this->options['statusCallback'] = $statusCallback;
@@ -56,9 +62,11 @@ class CreateModelBuildOptions extends Options {
     }
 
     /**
-     * The unique_name
+     * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1
      * 
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long. For example: v0.1
      * @return $this Fluent Builder
      */
     public function setUniqueName($uniqueName) {
@@ -84,16 +92,20 @@ class CreateModelBuildOptions extends Options {
 
 class UpdateModelBuildOptions extends Options {
     /**
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long. For example: v0.1
      */
     public function __construct($uniqueName = Values::NONE) {
         $this->options['uniqueName'] = $uniqueName;
     }
 
     /**
-     * The unique_name
+     * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1
      * 
-     * @param string $uniqueName The unique_name
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long. For example: v0.1
      * @return $this Fluent Builder
      */
     public function setUniqueName($uniqueName) {

+ 2 - 2
plugins/Twilio/Rest/Preview/Understand/Service/ModelBuildPage.php → plugins/Twilio/Rest/Preview/Understand/Assistant/ModelBuildPage.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Page;
 
@@ -23,7 +23,7 @@ class ModelBuildPage extends Page {
     }
 
     public function buildInstance(array $payload) {
-        return new ModelBuildInstance($this->version, $payload, $this->solution['serviceSid']);
+        return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']);
     }
 
     /**

+ 11 - 8
plugins/Twilio/Rest/Preview/Understand/Service/QueryContext.php → plugins/Twilio/Rest/Preview/Understand/Assistant/QueryContext.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\InstanceContext;
 use Twilio\Options;
@@ -22,23 +22,24 @@ class QueryContext extends InstanceContext {
      * Initialize the QueryContext
      * 
      * @param \Twilio\Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The assistant_sid
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\QueryContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\QueryContext 
      */
-    public function __construct(Version $version, $serviceSid, $sid) {
+    public function __construct(Version $version, $assistantSid, $sid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid, );
+        $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Queries/' . rawurlencode($sid) . '';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/Queries/' . rawurlencode($sid) . '';
     }
 
     /**
      * Fetch a QueryInstance
      * 
      * @return QueryInstance Fetched QueryInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         $params = Values::of(array());
@@ -52,7 +53,7 @@ class QueryContext extends InstanceContext {
         return new QueryInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['sid']
         );
     }
@@ -62,6 +63,7 @@ class QueryContext extends InstanceContext {
      * 
      * @param array|Options $options Optional Arguments
      * @return QueryInstance Updated QueryInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         $options = new Values($options);
@@ -78,7 +80,7 @@ class QueryContext extends InstanceContext {
         return new QueryInstance(
             $this->version,
             $payload,
-            $this->solution['serviceSid'],
+            $this->solution['assistantSid'],
             $this->solution['sid']
         );
     }
@@ -87,6 +89,7 @@ class QueryContext extends InstanceContext {
      * Deletes the QueryInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->version->delete('delete', $this->uri);

+ 16 - 11
plugins/Twilio/Rest/Preview/Understand/Service/QueryInstance.php → plugins/Twilio/Rest/Preview/Understand/Assistant/QueryInstance.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Deserialize;
 use Twilio\Exceptions\TwilioException;
@@ -27,10 +27,11 @@ use Twilio\Version;
  * @property string modelBuildSid
  * @property string query
  * @property string sampleSid
- * @property string serviceSid
+ * @property string assistantSid
  * @property string sid
  * @property string status
  * @property string url
+ * @property string sourceChannel
  */
 class QueryInstance extends InstanceResource {
     /**
@@ -38,11 +39,11 @@ class QueryInstance extends InstanceResource {
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param mixed[] $payload The response payload
-     * @param string $serviceSid The service_sid
+     * @param string $assistantSid The unique ID of the parent Assistant.
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\QueryInstance 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\QueryInstance 
      */
-    public function __construct(Version $version, array $payload, $serviceSid, $sid = null) {
+    public function __construct(Version $version, array $payload, $assistantSid, $sid = null) {
         parent::__construct($version);
 
         // Marshaled Properties
@@ -55,28 +56,29 @@ class QueryInstance extends InstanceResource {
             'modelBuildSid' => Values::array_get($payload, 'model_build_sid'),
             'query' => Values::array_get($payload, 'query'),
             'sampleSid' => Values::array_get($payload, 'sample_sid'),
-            'serviceSid' => Values::array_get($payload, 'service_sid'),
+            'assistantSid' => Values::array_get($payload, 'assistant_sid'),
             'sid' => Values::array_get($payload, 'sid'),
             'status' => Values::array_get($payload, 'status'),
             'url' => Values::array_get($payload, 'url'),
+            'sourceChannel' => Values::array_get($payload, 'source_channel'),
         );
 
-        $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], );
+        $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], );
     }
 
     /**
      * Generate an instance context for the instance, the context is capable of
      * performing various actions.  All instance actions are proxied to the context
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\QueryContext Context for
-     *                                                              this
-     *                                                              QueryInstance
+     * @return \Twilio\Rest\Preview\Understand\Assistant\QueryContext Context for
+     *                                                                this
+     *                                                                QueryInstance
      */
     protected function proxy() {
         if (!$this->context) {
             $this->context = new QueryContext(
                 $this->version,
-                $this->solution['serviceSid'],
+                $this->solution['assistantSid'],
                 $this->solution['sid']
             );
         }
@@ -88,6 +90,7 @@ class QueryInstance extends InstanceResource {
      * Fetch a QueryInstance
      * 
      * @return QueryInstance Fetched QueryInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         return $this->proxy()->fetch();
@@ -98,6 +101,7 @@ class QueryInstance extends InstanceResource {
      * 
      * @param array|Options $options Optional Arguments
      * @return QueryInstance Updated QueryInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         return $this->proxy()->update($options);
@@ -107,6 +111,7 @@ class QueryInstance extends InstanceResource {
      * Deletes the QueryInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->proxy()->delete();

+ 15 - 13
plugins/Twilio/Rest/Preview/Understand/Service/QueryList.php → plugins/Twilio/Rest/Preview/Understand/Assistant/QueryList.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\ListResource;
 use Twilio\Options;
@@ -22,16 +22,16 @@ class QueryList extends ListResource {
      * Construct the QueryList
      * 
      * @param Version $version Version that contains the resource
-     * @param string $serviceSid The service_sid
-     * @return \Twilio\Rest\Preview\Understand\Service\QueryList 
+     * @param string $assistantSid The unique ID of the parent Assistant.
+     * @return \Twilio\Rest\Preview\Understand\Assistant\QueryList 
      */
-    public function __construct(Version $version, $serviceSid) {
+    public function __construct(Version $version, $assistantSid) {
         parent::__construct($version);
 
         // Path Solution
-        $this->solution = array('serviceSid' => $serviceSid, );
+        $this->solution = array('assistantSid' => $assistantSid, );
 
-        $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Queries';
+        $this->uri = '/Assistants/' . rawurlencode($assistantSid) . '/Queries';
     }
 
     /**
@@ -130,10 +130,13 @@ class QueryList extends ListResource {
     /**
      * Create a new QueryInstance
      * 
-     * @param string $language The language
-     * @param string $query The query
+     * @param string $language An ISO language-country string of the sample.
+     * @param string $query A user-provided string that uniquely identifies this
+     *                      resource as an alternative to the sid. It can be up to
+     *                      2048 characters long.
      * @param array|Options $options Optional Arguments
      * @return QueryInstance Newly created QueryInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function create($language, $query, $options = array()) {
         $options = new Values($options);
@@ -141,10 +144,9 @@ class QueryList extends ListResource {
         $data = Values::of(array(
             'Language' => $language,
             'Query' => $query,
-            'Intent' => $options['intent'],
+            'Intents' => $options['intents'],
             'ModelBuild' => $options['modelBuild'],
             'Field' => $options['field'],
-            'NamedEntity' => $options['namedEntity'],
         ));
 
         $payload = $this->version->create(
@@ -154,17 +156,17 @@ class QueryList extends ListResource {
             $data
         );
 
-        return new QueryInstance($this->version, $payload, $this->solution['serviceSid']);
+        return new QueryInstance($this->version, $payload, $this->solution['assistantSid']);
     }
 
     /**
      * Constructs a QueryContext
      * 
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\Service\QueryContext 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\QueryContext 
      */
     public function getContext($sid) {
-        return new QueryContext($this->version, $this->solution['serviceSid'], $sid);
+        return new QueryContext($this->version, $this->solution['assistantSid'], $sid);
     }
 
     /**

+ 247 - 0
plugins/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.php

@@ -0,0 +1,247 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Preview\Understand\Assistant;
+
+use Twilio\Options;
+use Twilio\Values;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+abstract class QueryOptions {
+    /**
+     * @param string $language An ISO language-country string of the sample.
+     * @param string $modelBuild The Model Build Sid or unique name of the Model
+     *                           Build to be queried.
+     * @param string $status A string that described the query status. The values
+     *                       can be: pending_review, reviewed, discarded
+     * @return ReadQueryOptions Options builder
+     */
+    public static function read($language = Values::NONE, $modelBuild = Values::NONE, $status = Values::NONE) {
+        return new ReadQueryOptions($language, $modelBuild, $status);
+    }
+
+    /**
+     * @param string $intents Constraints the query to a set of intents. Useful
+     *                        when you need to constrain the paths the user can
+     *                        take. Intents should be comma separated
+     *                        intent-unique-name-1, intent-unique-name-2
+     * @param string $modelBuild The Model Build Sid or unique name of the Model
+     *                           Build to be queried.
+     * @param string $field Constraints the query to a given Field with an intent.
+     *                      Useful when you know the Field you are expecting. It
+     *                      accepts one field in the format
+     *                      intent-unique-name-1:field-unique-name
+     * @return CreateQueryOptions Options builder
+     */
+    public static function create($intents = Values::NONE, $modelBuild = Values::NONE, $field = Values::NONE) {
+        return new CreateQueryOptions($intents, $modelBuild, $field);
+    }
+
+    /**
+     * @param string $sampleSid The sample_sid
+     * @param string $status A string that described the query status. The values
+     *                       can be: pending_review, reviewed, discarded
+     * @return UpdateQueryOptions Options builder
+     */
+    public static function update($sampleSid = Values::NONE, $status = Values::NONE) {
+        return new UpdateQueryOptions($sampleSid, $status);
+    }
+}
+
+class ReadQueryOptions extends Options {
+    /**
+     * @param string $language An ISO language-country string of the sample.
+     * @param string $modelBuild The Model Build Sid or unique name of the Model
+     *                           Build to be queried.
+     * @param string $status A string that described the query status. The values
+     *                       can be: pending_review, reviewed, discarded
+     */
+    public function __construct($language = Values::NONE, $modelBuild = Values::NONE, $status = Values::NONE) {
+        $this->options['language'] = $language;
+        $this->options['modelBuild'] = $modelBuild;
+        $this->options['status'] = $status;
+    }
+
+    /**
+     * An ISO language-country string of the sample.
+     * 
+     * @param string $language An ISO language-country string of the sample.
+     * @return $this Fluent Builder
+     */
+    public function setLanguage($language) {
+        $this->options['language'] = $language;
+        return $this;
+    }
+
+    /**
+     * The Model Build Sid or unique name of the Model Build to be queried.
+     * 
+     * @param string $modelBuild The Model Build Sid or unique name of the Model
+     *                           Build to be queried.
+     * @return $this Fluent Builder
+     */
+    public function setModelBuild($modelBuild) {
+        $this->options['modelBuild'] = $modelBuild;
+        return $this;
+    }
+
+    /**
+     * A string that described the query status. The values can be: pending_review, reviewed, discarded
+     * 
+     * @param string $status A string that described the query status. The values
+     *                       can be: pending_review, reviewed, discarded
+     * @return $this Fluent Builder
+     */
+    public function setStatus($status) {
+        $this->options['status'] = $status;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.ReadQueryOptions ' . implode(' ', $options) . ']';
+    }
+}
+
+class CreateQueryOptions extends Options {
+    /**
+     * @param string $intents Constraints the query to a set of intents. Useful
+     *                        when you need to constrain the paths the user can
+     *                        take. Intents should be comma separated
+     *                        intent-unique-name-1, intent-unique-name-2
+     * @param string $modelBuild The Model Build Sid or unique name of the Model
+     *                           Build to be queried.
+     * @param string $field Constraints the query to a given Field with an intent.
+     *                      Useful when you know the Field you are expecting. It
+     *                      accepts one field in the format
+     *                      intent-unique-name-1:field-unique-name
+     */
+    public function __construct($intents = Values::NONE, $modelBuild = Values::NONE, $field = Values::NONE) {
+        $this->options['intents'] = $intents;
+        $this->options['modelBuild'] = $modelBuild;
+        $this->options['field'] = $field;
+    }
+
+    /**
+     * Constraints the query to a set of intents. Useful when you need to constrain the paths the user can take. Intents should be comma separated *intent-unique-name-1*, *intent-unique-name-2*
+     * 
+     * @param string $intents Constraints the query to a set of intents. Useful
+     *                        when you need to constrain the paths the user can
+     *                        take. Intents should be comma separated
+     *                        intent-unique-name-1, intent-unique-name-2
+     * @return $this Fluent Builder
+     */
+    public function setIntents($intents) {
+        $this->options['intents'] = $intents;
+        return $this;
+    }
+
+    /**
+     * The Model Build Sid or unique name of the Model Build to be queried.
+     * 
+     * @param string $modelBuild The Model Build Sid or unique name of the Model
+     *                           Build to be queried.
+     * @return $this Fluent Builder
+     */
+    public function setModelBuild($modelBuild) {
+        $this->options['modelBuild'] = $modelBuild;
+        return $this;
+    }
+
+    /**
+     * Constraints the query to a given Field with an intent. Useful when you know the Field you are expecting. It accepts one field in the format *intent-unique-name-1*:*field-unique-name*
+     * 
+     * @param string $field Constraints the query to a given Field with an intent.
+     *                      Useful when you know the Field you are expecting. It
+     *                      accepts one field in the format
+     *                      intent-unique-name-1:field-unique-name
+     * @return $this Fluent Builder
+     */
+    public function setField($field) {
+        $this->options['field'] = $field;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.CreateQueryOptions ' . implode(' ', $options) . ']';
+    }
+}
+
+class UpdateQueryOptions extends Options {
+    /**
+     * @param string $sampleSid The sample_sid
+     * @param string $status A string that described the query status. The values
+     *                       can be: pending_review, reviewed, discarded
+     */
+    public function __construct($sampleSid = Values::NONE, $status = Values::NONE) {
+        $this->options['sampleSid'] = $sampleSid;
+        $this->options['status'] = $status;
+    }
+
+    /**
+     * The sample_sid
+     * 
+     * @param string $sampleSid The sample_sid
+     * @return $this Fluent Builder
+     */
+    public function setSampleSid($sampleSid) {
+        $this->options['sampleSid'] = $sampleSid;
+        return $this;
+    }
+
+    /**
+     * A string that described the query status. The values can be: pending_review, reviewed, discarded
+     * 
+     * @param string $status A string that described the query status. The values
+     *                       can be: pending_review, reviewed, discarded
+     * @return $this Fluent Builder
+     */
+    public function setStatus($status) {
+        $this->options['status'] = $status;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.UpdateQueryOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 2 - 2
plugins/Twilio/Rest/Preview/Understand/Service/QueryPage.php → plugins/Twilio/Rest/Preview/Understand/Assistant/QueryPage.php

@@ -7,7 +7,7 @@
  * /       /
  */
 
-namespace Twilio\Rest\Preview\Understand\Service;
+namespace Twilio\Rest\Preview\Understand\Assistant;
 
 use Twilio\Page;
 
@@ -23,7 +23,7 @@ class QueryPage extends Page {
     }
 
     public function buildInstance(array $payload) {
-        return new QueryInstance($this->version, $payload, $this->solution['serviceSid']);
+        return new QueryInstance($this->version, $payload, $this->solution['assistantSid']);
     }
 
     /**

+ 34 - 28
plugins/Twilio/Rest/Preview/Understand/ServiceContext.php → plugins/Twilio/Rest/Preview/Understand/AssistantContext.php

@@ -12,10 +12,10 @@ namespace Twilio\Rest\Preview\Understand;
 use Twilio\Exceptions\TwilioException;
 use Twilio\InstanceContext;
 use Twilio\Options;
-use Twilio\Rest\Preview\Understand\Service\FieldTypeList;
-use Twilio\Rest\Preview\Understand\Service\IntentList;
-use Twilio\Rest\Preview\Understand\Service\ModelBuildList;
-use Twilio\Rest\Preview\Understand\Service\QueryList;
+use Twilio\Rest\Preview\Understand\Assistant\FieldTypeList;
+use Twilio\Rest\Preview\Understand\Assistant\IntentList;
+use Twilio\Rest\Preview\Understand\Assistant\ModelBuildList;
+use Twilio\Rest\Preview\Understand\Assistant\QueryList;
 use Twilio\Serialize;
 use Twilio\Values;
 use Twilio\Version;
@@ -23,27 +23,27 @@ use Twilio\Version;
 /**
  * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
  * 
- * @property \Twilio\Rest\Preview\Understand\Service\FieldTypeList fieldTypes
- * @property \Twilio\Rest\Preview\Understand\Service\IntentList intents
- * @property \Twilio\Rest\Preview\Understand\Service\ModelBuildList modelBuilds
- * @property \Twilio\Rest\Preview\Understand\Service\QueryList queries
- * @method \Twilio\Rest\Preview\Understand\Service\FieldTypeContext fieldTypes(string $sid)
- * @method \Twilio\Rest\Preview\Understand\Service\IntentContext intents(string $sid)
- * @method \Twilio\Rest\Preview\Understand\Service\ModelBuildContext modelBuilds(string $sid)
- * @method \Twilio\Rest\Preview\Understand\Service\QueryContext queries(string $sid)
+ * @property \Twilio\Rest\Preview\Understand\Assistant\FieldTypeList fieldTypes
+ * @property \Twilio\Rest\Preview\Understand\Assistant\IntentList intents
+ * @property \Twilio\Rest\Preview\Understand\Assistant\ModelBuildList modelBuilds
+ * @property \Twilio\Rest\Preview\Understand\Assistant\QueryList queries
+ * @method \Twilio\Rest\Preview\Understand\Assistant\FieldTypeContext fieldTypes(string $sid)
+ * @method \Twilio\Rest\Preview\Understand\Assistant\IntentContext intents(string $sid)
+ * @method \Twilio\Rest\Preview\Understand\Assistant\ModelBuildContext modelBuilds(string $sid)
+ * @method \Twilio\Rest\Preview\Understand\Assistant\QueryContext queries(string $sid)
  */
-class ServiceContext extends InstanceContext {
+class AssistantContext extends InstanceContext {
     protected $_fieldTypes = null;
     protected $_intents = null;
     protected $_modelBuilds = null;
     protected $_queries = null;
 
     /**
-     * Initialize the ServiceContext
+     * Initialize the AssistantContext
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\ServiceContext 
+     * @return \Twilio\Rest\Preview\Understand\AssistantContext 
      */
     public function __construct(Version $version, $sid) {
         parent::__construct($version);
@@ -51,13 +51,14 @@ class ServiceContext extends InstanceContext {
         // Path Solution
         $this->solution = array('sid' => $sid, );
 
-        $this->uri = '/Services/' . rawurlencode($sid) . '';
+        $this->uri = '/Assistants/' . rawurlencode($sid) . '';
     }
 
     /**
-     * Fetch a ServiceInstance
+     * Fetch a AssistantInstance
      * 
-     * @return ServiceInstance Fetched ServiceInstance
+     * @return AssistantInstance Fetched AssistantInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         $params = Values::of(array());
@@ -68,14 +69,15 @@ class ServiceContext extends InstanceContext {
             $params
         );
 
-        return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+        return new AssistantInstance($this->version, $payload, $this->solution['sid']);
     }
 
     /**
-     * Update the ServiceInstance
+     * Update the AssistantInstance
      * 
      * @param array|Options $options Optional Arguments
-     * @return ServiceInstance Updated ServiceInstance
+     * @return AssistantInstance Updated AssistantInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         $options = new Values($options);
@@ -85,6 +87,9 @@ class ServiceContext extends InstanceContext {
             'LogQueries' => Serialize::booleanToString($options['logQueries']),
             'Ttl' => $options['ttl'],
             'UniqueName' => $options['uniqueName'],
+            'ResponseUrl' => $options['responseUrl'],
+            'CallbackUrl' => $options['callbackUrl'],
+            'CallbackEvents' => $options['callbackEvents'],
         ));
 
         $payload = $this->version->update(
@@ -94,13 +99,14 @@ class ServiceContext extends InstanceContext {
             $data
         );
 
-        return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+        return new AssistantInstance($this->version, $payload, $this->solution['sid']);
     }
 
     /**
-     * Deletes the ServiceInstance
+     * Deletes the AssistantInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->version->delete('delete', $this->uri);
@@ -109,7 +115,7 @@ class ServiceContext extends InstanceContext {
     /**
      * Access the fieldTypes
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldTypeList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeList 
      */
     protected function getFieldTypes() {
         if (!$this->_fieldTypes) {
@@ -122,7 +128,7 @@ class ServiceContext extends InstanceContext {
     /**
      * Access the intents
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\IntentList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\IntentList 
      */
     protected function getIntents() {
         if (!$this->_intents) {
@@ -135,7 +141,7 @@ class ServiceContext extends InstanceContext {
     /**
      * Access the modelBuilds
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\ModelBuildList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildList 
      */
     protected function getModelBuilds() {
         if (!$this->_modelBuilds) {
@@ -148,7 +154,7 @@ class ServiceContext extends InstanceContext {
     /**
      * Access the queries
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\QueryList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\QueryList 
      */
     protected function getQueries() {
         if (!$this->_queries) {
@@ -201,6 +207,6 @@ class ServiceContext extends InstanceContext {
         foreach ($this->solution as $key => $value) {
             $context[] = "$key=$value";
         }
-        return '[Twilio.Preview.Understand.ServiceContext ' . implode(' ', $context) . ']';
+        return '[Twilio.Preview.Understand.AssistantContext ' . implode(' ', $context) . ']';
     }
 }

+ 25 - 16
plugins/Twilio/Rest/Preview/Understand/ServiceInstance.php → plugins/Twilio/Rest/Preview/Understand/AssistantInstance.php

@@ -30,20 +30,23 @@ use Twilio\Version;
  * @property integer ttl
  * @property string uniqueName
  * @property string url
+ * @property string responseUrl
+ * @property string callbackUrl
+ * @property string callbackEvents
  */
-class ServiceInstance extends InstanceResource {
+class AssistantInstance extends InstanceResource {
     protected $_fieldTypes = null;
     protected $_intents = null;
     protected $_modelBuilds = null;
     protected $_queries = null;
 
     /**
-     * Initialize the ServiceInstance
+     * Initialize the AssistantInstance
      * 
      * @param \Twilio\Version $version Version that contains the resource
      * @param mixed[] $payload The response payload
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\ServiceInstance 
+     * @return \Twilio\Rest\Preview\Understand\AssistantInstance 
      */
     public function __construct(Version $version, array $payload, $sid = null) {
         parent::__construct($version);
@@ -61,6 +64,9 @@ class ServiceInstance extends InstanceResource {
             'ttl' => Values::array_get($payload, 'ttl'),
             'uniqueName' => Values::array_get($payload, 'unique_name'),
             'url' => Values::array_get($payload, 'url'),
+            'responseUrl' => Values::array_get($payload, 'response_url'),
+            'callbackUrl' => Values::array_get($payload, 'callback_url'),
+            'callbackEvents' => Values::array_get($payload, 'callback_events'),
         );
 
         $this->solution = array('sid' => $sid ?: $this->properties['sid'], );
@@ -70,40 +76,43 @@ class ServiceInstance extends InstanceResource {
      * Generate an instance context for the instance, the context is capable of
      * performing various actions.  All instance actions are proxied to the context
      * 
-     * @return \Twilio\Rest\Preview\Understand\ServiceContext Context for this
-     *                                                        ServiceInstance
+     * @return \Twilio\Rest\Preview\Understand\AssistantContext Context for this
+     *                                                          AssistantInstance
      */
     protected function proxy() {
         if (!$this->context) {
-            $this->context = new ServiceContext($this->version, $this->solution['sid']);
+            $this->context = new AssistantContext($this->version, $this->solution['sid']);
         }
 
         return $this->context;
     }
 
     /**
-     * Fetch a ServiceInstance
+     * Fetch a AssistantInstance
      * 
-     * @return ServiceInstance Fetched ServiceInstance
+     * @return AssistantInstance Fetched AssistantInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function fetch() {
         return $this->proxy()->fetch();
     }
 
     /**
-     * Update the ServiceInstance
+     * Update the AssistantInstance
      * 
      * @param array|Options $options Optional Arguments
-     * @return ServiceInstance Updated ServiceInstance
+     * @return AssistantInstance Updated AssistantInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function update($options = array()) {
         return $this->proxy()->update($options);
     }
 
     /**
-     * Deletes the ServiceInstance
+     * Deletes the AssistantInstance
      * 
      * @return boolean True if delete succeeds, false otherwise
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function delete() {
         return $this->proxy()->delete();
@@ -112,7 +121,7 @@ class ServiceInstance extends InstanceResource {
     /**
      * Access the fieldTypes
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\FieldTypeList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeList 
      */
     protected function getFieldTypes() {
         return $this->proxy()->fieldTypes;
@@ -121,7 +130,7 @@ class ServiceInstance extends InstanceResource {
     /**
      * Access the intents
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\IntentList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\IntentList 
      */
     protected function getIntents() {
         return $this->proxy()->intents;
@@ -130,7 +139,7 @@ class ServiceInstance extends InstanceResource {
     /**
      * Access the modelBuilds
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\ModelBuildList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildList 
      */
     protected function getModelBuilds() {
         return $this->proxy()->modelBuilds;
@@ -139,7 +148,7 @@ class ServiceInstance extends InstanceResource {
     /**
      * Access the queries
      * 
-     * @return \Twilio\Rest\Preview\Understand\Service\QueryList 
+     * @return \Twilio\Rest\Preview\Understand\Assistant\QueryList 
      */
     protected function getQueries() {
         return $this->proxy()->queries;
@@ -175,6 +184,6 @@ class ServiceInstance extends InstanceResource {
         foreach ($this->solution as $key => $value) {
             $context[] = "$key=$value";
         }
-        return '[Twilio.Preview.Understand.ServiceInstance ' . implode(' ', $context) . ']';
+        return '[Twilio.Preview.Understand.AssistantInstance ' . implode(' ', $context) . ']';
     }
 }

+ 24 - 20
plugins/Twilio/Rest/Preview/Understand/ServiceList.php → plugins/Twilio/Rest/Preview/Understand/AssistantList.php

@@ -18,12 +18,12 @@ use Twilio\Version;
 /**
  * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
  */
-class ServiceList extends ListResource {
+class AssistantList extends ListResource {
     /**
-     * Construct the ServiceList
+     * Construct the AssistantList
      * 
      * @param Version $version Version that contains the resource
-     * @return \Twilio\Rest\Preview\Understand\ServiceList 
+     * @return \Twilio\Rest\Preview\Understand\AssistantList 
      */
     public function __construct(Version $version) {
         parent::__construct($version);
@@ -31,11 +31,11 @@ class ServiceList extends ListResource {
         // Path Solution
         $this->solution = array();
 
-        $this->uri = '/Services';
+        $this->uri = '/Assistants';
     }
 
     /**
-     * Streams ServiceInstance records from the API as a generator stream.
+     * Streams AssistantInstance records from the API as a generator stream.
      * This operation lazily loads records as efficiently as possible until the
      * limit
      * is reached.
@@ -61,7 +61,7 @@ class ServiceList extends ListResource {
     }
 
     /**
-     * Reads ServiceInstance records from the API as a list.
+     * Reads AssistantInstance records from the API as a list.
      * Unlike stream(), this operation is eager and will load `limit` records into
      * memory before returning.
      * 
@@ -73,20 +73,20 @@ class ServiceList extends ListResource {
      *                        page_size is defined but a limit is defined, read()
      *                        will attempt to read the limit with the most
      *                        efficient page size, i.e. min(limit, 1000)
-     * @return ServiceInstance[] Array of results
+     * @return AssistantInstance[] Array of results
      */
     public function read($limit = null, $pageSize = null) {
         return iterator_to_array($this->stream($limit, $pageSize), false);
     }
 
     /**
-     * Retrieve a single page of ServiceInstance records from the API.
+     * Retrieve a single page of AssistantInstance records from the API.
      * Request is executed immediately
      * 
      * @param mixed $pageSize Number of records to return, defaults to 50
      * @param string $pageToken PageToken provided by the API
      * @param mixed $pageNumber Page Number, this value is simply for client state
-     * @return \Twilio\Page Page of ServiceInstance
+     * @return \Twilio\Page Page of AssistantInstance
      */
     public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) {
         $params = Values::of(array(
@@ -101,15 +101,15 @@ class ServiceList extends ListResource {
             $params
         );
 
-        return new ServicePage($this->version, $response, $this->solution);
+        return new AssistantPage($this->version, $response, $this->solution);
     }
 
     /**
-     * Retrieve a specific page of ServiceInstance records from the API.
+     * Retrieve a specific page of AssistantInstance records from the API.
      * Request is executed immediately
      * 
      * @param string $targetUrl API-generated URL for the requested results page
-     * @return \Twilio\Page Page of ServiceInstance
+     * @return \Twilio\Page Page of AssistantInstance
      */
     public function getPage($targetUrl) {
         $response = $this->version->getDomain()->getClient()->request(
@@ -117,14 +117,15 @@ class ServiceList extends ListResource {
             $targetUrl
         );
 
-        return new ServicePage($this->version, $response, $this->solution);
+        return new AssistantPage($this->version, $response, $this->solution);
     }
 
     /**
-     * Create a new ServiceInstance
+     * Create a new AssistantInstance
      * 
      * @param array|Options $options Optional Arguments
-     * @return ServiceInstance Newly created ServiceInstance
+     * @return AssistantInstance Newly created AssistantInstance
+     * @throws TwilioException When an HTTP error occurs.
      */
     public function create($options = array()) {
         $options = new Values($options);
@@ -134,6 +135,9 @@ class ServiceList extends ListResource {
             'LogQueries' => Serialize::booleanToString($options['logQueries']),
             'Ttl' => $options['ttl'],
             'UniqueName' => $options['uniqueName'],
+            'ResponseUrl' => $options['responseUrl'],
+            'CallbackUrl' => $options['callbackUrl'],
+            'CallbackEvents' => $options['callbackEvents'],
         ));
 
         $payload = $this->version->create(
@@ -143,17 +147,17 @@ class ServiceList extends ListResource {
             $data
         );
 
-        return new ServiceInstance($this->version, $payload);
+        return new AssistantInstance($this->version, $payload);
     }
 
     /**
-     * Constructs a ServiceContext
+     * Constructs a AssistantContext
      * 
      * @param string $sid The sid
-     * @return \Twilio\Rest\Preview\Understand\ServiceContext 
+     * @return \Twilio\Rest\Preview\Understand\AssistantContext 
      */
     public function getContext($sid) {
-        return new ServiceContext($this->version, $sid);
+        return new AssistantContext($this->version, $sid);
     }
 
     /**
@@ -162,6 +166,6 @@ class ServiceList extends ListResource {
      * @return string Machine friendly representation
      */
     public function __toString() {
-        return '[Twilio.Preview.Understand.ServiceList]';
+        return '[Twilio.Preview.Understand.AssistantList]';
     }
 }

+ 326 - 0
plugins/Twilio/Rest/Preview/Understand/AssistantOptions.php

@@ -0,0 +1,326 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Preview\Understand;
+
+use Twilio\Options;
+use Twilio\Values;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+abstract class AssistantOptions {
+    /**
+     * @param string $friendlyName A text description for the Assistant. It is
+     *                             non-unique and can up to 255 characters long.
+     * @param boolean $logQueries A boolean that specifies whether queries should
+     *                            be logged for 30 days further training. If false,
+     *                            no queries will be stored, if true, queries will
+     *                            be stored for 30 days and deleted thereafter.
+     *                            Defaults to true if no value is provided.
+     * @param integer $ttl The ttl
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
+     * @param string $responseUrl The webhook URL called to fetch the response to
+     *                            an incoming communication expressed in Assistant
+     *                            TwiML.
+     * @param string $callbackUrl The callback_url
+     * @param string $callbackEvents The callback_events
+     * @return CreateAssistantOptions Options builder
+     */
+    public static function create($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE, $responseUrl = Values::NONE, $callbackUrl = Values::NONE, $callbackEvents = Values::NONE) {
+        return new CreateAssistantOptions($friendlyName, $logQueries, $ttl, $uniqueName, $responseUrl, $callbackUrl, $callbackEvents);
+    }
+
+    /**
+     * @param string $friendlyName A text description for the Assistant. It is
+     *                             non-unique and can up to 255 characters long.
+     * @param boolean $logQueries A boolean that specifies whether queries should
+     *                            be logged for 30 days further training. If false,
+     *                            no queries will be stored, if true, queries will
+     *                            be stored for 30 days and deleted thereafter.
+     *                            Defaults to true if no value is provided.
+     * @param integer $ttl The ttl
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
+     * @param string $responseUrl The webhook URL called to fetch the response to
+     *                            an incoming communication expressed in Assistant
+     *                            TwiML.
+     * @param string $callbackUrl The callback_url
+     * @param string $callbackEvents The callback_events
+     * @return UpdateAssistantOptions Options builder
+     */
+    public static function update($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE, $responseUrl = Values::NONE, $callbackUrl = Values::NONE, $callbackEvents = Values::NONE) {
+        return new UpdateAssistantOptions($friendlyName, $logQueries, $ttl, $uniqueName, $responseUrl, $callbackUrl, $callbackEvents);
+    }
+}
+
+class CreateAssistantOptions extends Options {
+    /**
+     * @param string $friendlyName A text description for the Assistant. It is
+     *                             non-unique and can up to 255 characters long.
+     * @param boolean $logQueries A boolean that specifies whether queries should
+     *                            be logged for 30 days further training. If false,
+     *                            no queries will be stored, if true, queries will
+     *                            be stored for 30 days and deleted thereafter.
+     *                            Defaults to true if no value is provided.
+     * @param integer $ttl The ttl
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
+     * @param string $responseUrl The webhook URL called to fetch the response to
+     *                            an incoming communication expressed in Assistant
+     *                            TwiML.
+     * @param string $callbackUrl The callback_url
+     * @param string $callbackEvents The callback_events
+     */
+    public function __construct($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE, $responseUrl = Values::NONE, $callbackUrl = Values::NONE, $callbackEvents = Values::NONE) {
+        $this->options['friendlyName'] = $friendlyName;
+        $this->options['logQueries'] = $logQueries;
+        $this->options['ttl'] = $ttl;
+        $this->options['uniqueName'] = $uniqueName;
+        $this->options['responseUrl'] = $responseUrl;
+        $this->options['callbackUrl'] = $callbackUrl;
+        $this->options['callbackEvents'] = $callbackEvents;
+    }
+
+    /**
+     * A text description for the Assistant. It is non-unique and can up to 255 characters long.
+     * 
+     * @param string $friendlyName A text description for the Assistant. It is
+     *                             non-unique and can up to 255 characters long.
+     * @return $this Fluent Builder
+     */
+    public function setFriendlyName($friendlyName) {
+        $this->options['friendlyName'] = $friendlyName;
+        return $this;
+    }
+
+    /**
+     * A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.
+     * 
+     * @param boolean $logQueries A boolean that specifies whether queries should
+     *                            be logged for 30 days further training. If false,
+     *                            no queries will be stored, if true, queries will
+     *                            be stored for 30 days and deleted thereafter.
+     *                            Defaults to true if no value is provided.
+     * @return $this Fluent Builder
+     */
+    public function setLogQueries($logQueries) {
+        $this->options['logQueries'] = $logQueries;
+        return $this;
+    }
+
+    /**
+     * The ttl
+     * 
+     * @param integer $ttl The ttl
+     * @return $this Fluent Builder
+     */
+    public function setTtl($ttl) {
+        $this->options['ttl'] = $ttl;
+        return $this;
+    }
+
+    /**
+     * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
+     * 
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
+     * @return $this Fluent Builder
+     */
+    public function setUniqueName($uniqueName) {
+        $this->options['uniqueName'] = $uniqueName;
+        return $this;
+    }
+
+    /**
+     * The webhook URL called to fetch the response to an incoming communication expressed in Assistant TwiML.
+     * 
+     * @param string $responseUrl The webhook URL called to fetch the response to
+     *                            an incoming communication expressed in Assistant
+     *                            TwiML.
+     * @return $this Fluent Builder
+     */
+    public function setResponseUrl($responseUrl) {
+        $this->options['responseUrl'] = $responseUrl;
+        return $this;
+    }
+
+    /**
+     * The callback_url
+     * 
+     * @param string $callbackUrl The callback_url
+     * @return $this Fluent Builder
+     */
+    public function setCallbackUrl($callbackUrl) {
+        $this->options['callbackUrl'] = $callbackUrl;
+        return $this;
+    }
+
+    /**
+     * The callback_events
+     * 
+     * @param string $callbackEvents The callback_events
+     * @return $this Fluent Builder
+     */
+    public function setCallbackEvents($callbackEvents) {
+        $this->options['callbackEvents'] = $callbackEvents;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.CreateAssistantOptions ' . implode(' ', $options) . ']';
+    }
+}
+
+class UpdateAssistantOptions extends Options {
+    /**
+     * @param string $friendlyName A text description for the Assistant. It is
+     *                             non-unique and can up to 255 characters long.
+     * @param boolean $logQueries A boolean that specifies whether queries should
+     *                            be logged for 30 days further training. If false,
+     *                            no queries will be stored, if true, queries will
+     *                            be stored for 30 days and deleted thereafter.
+     *                            Defaults to true if no value is provided.
+     * @param integer $ttl The ttl
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
+     * @param string $responseUrl The webhook URL called to fetch the response to
+     *                            an incoming communication expressed in Assistant
+     *                            TwiML.
+     * @param string $callbackUrl The callback_url
+     * @param string $callbackEvents The callback_events
+     */
+    public function __construct($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE, $responseUrl = Values::NONE, $callbackUrl = Values::NONE, $callbackEvents = Values::NONE) {
+        $this->options['friendlyName'] = $friendlyName;
+        $this->options['logQueries'] = $logQueries;
+        $this->options['ttl'] = $ttl;
+        $this->options['uniqueName'] = $uniqueName;
+        $this->options['responseUrl'] = $responseUrl;
+        $this->options['callbackUrl'] = $callbackUrl;
+        $this->options['callbackEvents'] = $callbackEvents;
+    }
+
+    /**
+     * A text description for the Assistant. It is non-unique and can up to 255 characters long.
+     * 
+     * @param string $friendlyName A text description for the Assistant. It is
+     *                             non-unique and can up to 255 characters long.
+     * @return $this Fluent Builder
+     */
+    public function setFriendlyName($friendlyName) {
+        $this->options['friendlyName'] = $friendlyName;
+        return $this;
+    }
+
+    /**
+     * A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.
+     * 
+     * @param boolean $logQueries A boolean that specifies whether queries should
+     *                            be logged for 30 days further training. If false,
+     *                            no queries will be stored, if true, queries will
+     *                            be stored for 30 days and deleted thereafter.
+     *                            Defaults to true if no value is provided.
+     * @return $this Fluent Builder
+     */
+    public function setLogQueries($logQueries) {
+        $this->options['logQueries'] = $logQueries;
+        return $this;
+    }
+
+    /**
+     * The ttl
+     * 
+     * @param integer $ttl The ttl
+     * @return $this Fluent Builder
+     */
+    public function setTtl($ttl) {
+        $this->options['ttl'] = $ttl;
+        return $this;
+    }
+
+    /**
+     * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
+     * 
+     * @param string $uniqueName A user-provided string that uniquely identifies
+     *                           this resource as an alternative to the sid. Unique
+     *                           up to 64 characters long.
+     * @return $this Fluent Builder
+     */
+    public function setUniqueName($uniqueName) {
+        $this->options['uniqueName'] = $uniqueName;
+        return $this;
+    }
+
+    /**
+     * The webhook URL called to fetch the response to an incoming communication expressed in Assistant TwiML.
+     * 
+     * @param string $responseUrl The webhook URL called to fetch the response to
+     *                            an incoming communication expressed in Assistant
+     *                            TwiML.
+     * @return $this Fluent Builder
+     */
+    public function setResponseUrl($responseUrl) {
+        $this->options['responseUrl'] = $responseUrl;
+        return $this;
+    }
+
+    /**
+     * The callback_url
+     * 
+     * @param string $callbackUrl The callback_url
+     * @return $this Fluent Builder
+     */
+    public function setCallbackUrl($callbackUrl) {
+        $this->options['callbackUrl'] = $callbackUrl;
+        return $this;
+    }
+
+    /**
+     * The callback_events
+     * 
+     * @param string $callbackEvents The callback_events
+     * @return $this Fluent Builder
+     */
+    public function setCallbackEvents($callbackEvents) {
+        $this->options['callbackEvents'] = $callbackEvents;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Preview.Understand.UpdateAssistantOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 3 - 3
plugins/Twilio/Rest/Preview/Understand/ServicePage.php → plugins/Twilio/Rest/Preview/Understand/AssistantPage.php

@@ -14,7 +14,7 @@ use Twilio\Page;
 /**
  * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
  */
-class ServicePage extends Page {
+class AssistantPage extends Page {
     public function __construct($version, $response, $solution) {
         parent::__construct($version, $response);
 
@@ -23,7 +23,7 @@ class ServicePage extends Page {
     }
 
     public function buildInstance(array $payload) {
-        return new ServiceInstance($this->version, $payload);
+        return new AssistantInstance($this->version, $payload);
     }
 
     /**
@@ -32,6 +32,6 @@ class ServicePage extends Page {
      * @return string Machine friendly representation
      */
     public function __toString() {
-        return '[Twilio.Preview.Understand.ServicePage]';
+        return '[Twilio.Preview.Understand.AssistantPage]';
     }
 }

+ 0 - 61
plugins/Twilio/Rest/Preview/Understand/Service/FieldType/FieldValueOptions.php

@@ -1,61 +0,0 @@
-<?php
-
-/**
- * This code was generated by
- * \ / _    _  _|   _  _
- * | (_)\/(_)(_|\/| |(/_  v1.0.0
- * /       /
- */
-
-namespace Twilio\Rest\Preview\Understand\Service\FieldType;
-
-use Twilio\Options;
-use Twilio\Values;
-
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
-abstract class FieldValueOptions {
-    /**
-     * @param string $language The language
-     * @return ReadFieldValueOptions Options builder
-     */
-    public static function read($language = Values::NONE) {
-        return new ReadFieldValueOptions($language);
-    }
-}
-
-class ReadFieldValueOptions extends Options {
-    /**
-     * @param string $language The language
-     */
-    public function __construct($language = Values::NONE) {
-        $this->options['language'] = $language;
-    }
-
-    /**
-     * The language
-     * 
-     * @param string $language The language
-     * @return $this Fluent Builder
-     */
-    public function setLanguage($language) {
-        $this->options['language'] = $language;
-        return $this;
-    }
-
-    /**
-     * Provide a friendly representation
-     * 
-     * @return string Machine friendly representation
-     */
-    public function __toString() {
-        $options = array();
-        foreach ($this->options as $key => $value) {
-            if ($value != Values::NONE) {
-                $options[] = "$key=$value";
-            }
-        }
-        return '[Twilio.Preview.Understand.ReadFieldValueOptions ' . implode(' ', $options) . ']';
-    }
-}

+ 0 - 118
plugins/Twilio/Rest/Preview/Understand/Service/Intent/SampleOptions.php

@@ -1,118 +0,0 @@
-<?php
-
-/**
- * This code was generated by
- * \ / _    _  _|   _  _
- * | (_)\/(_)(_|\/| |(/_  v1.0.0
- * /       /
- */
-
-namespace Twilio\Rest\Preview\Understand\Service\Intent;
-
-use Twilio\Options;
-use Twilio\Values;
-
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
-abstract class SampleOptions {
-    /**
-     * @param string $language The language
-     * @return ReadSampleOptions Options builder
-     */
-    public static function read($language = Values::NONE) {
-        return new ReadSampleOptions($language);
-    }
-
-    /**
-     * @param string $language The language
-     * @param string $taggedText The tagged_text
-     * @return UpdateSampleOptions Options builder
-     */
-    public static function update($language = Values::NONE, $taggedText = Values::NONE) {
-        return new UpdateSampleOptions($language, $taggedText);
-    }
-}
-
-class ReadSampleOptions extends Options {
-    /**
-     * @param string $language The language
-     */
-    public function __construct($language = Values::NONE) {
-        $this->options['language'] = $language;
-    }
-
-    /**
-     * The language
-     * 
-     * @param string $language The language
-     * @return $this Fluent Builder
-     */
-    public function setLanguage($language) {
-        $this->options['language'] = $language;
-        return $this;
-    }
-
-    /**
-     * Provide a friendly representation
-     * 
-     * @return string Machine friendly representation
-     */
-    public function __toString() {
-        $options = array();
-        foreach ($this->options as $key => $value) {
-            if ($value != Values::NONE) {
-                $options[] = "$key=$value";
-            }
-        }
-        return '[Twilio.Preview.Understand.ReadSampleOptions ' . implode(' ', $options) . ']';
-    }
-}
-
-class UpdateSampleOptions extends Options {
-    /**
-     * @param string $language The language
-     * @param string $taggedText The tagged_text
-     */
-    public function __construct($language = Values::NONE, $taggedText = Values::NONE) {
-        $this->options['language'] = $language;
-        $this->options['taggedText'] = $taggedText;
-    }
-
-    /**
-     * The language
-     * 
-     * @param string $language The language
-     * @return $this Fluent Builder
-     */
-    public function setLanguage($language) {
-        $this->options['language'] = $language;
-        return $this;
-    }
-
-    /**
-     * The tagged_text
-     * 
-     * @param string $taggedText The tagged_text
-     * @return $this Fluent Builder
-     */
-    public function setTaggedText($taggedText) {
-        $this->options['taggedText'] = $taggedText;
-        return $this;
-    }
-
-    /**
-     * Provide a friendly representation
-     * 
-     * @return string Machine friendly representation
-     */
-    public function __toString() {
-        $options = array();
-        foreach ($this->options as $key => $value) {
-            if ($value != Values::NONE) {
-                $options[] = "$key=$value";
-            }
-        }
-        return '[Twilio.Preview.Understand.UpdateSampleOptions ' . implode(' ', $options) . ']';
-    }
-}

+ 0 - 231
plugins/Twilio/Rest/Preview/Understand/Service/QueryOptions.php

@@ -1,231 +0,0 @@
-<?php
-
-/**
- * This code was generated by
- * \ / _    _  _|   _  _
- * | (_)\/(_)(_|\/| |(/_  v1.0.0
- * /       /
- */
-
-namespace Twilio\Rest\Preview\Understand\Service;
-
-use Twilio\Options;
-use Twilio\Values;
-
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
-abstract class QueryOptions {
-    /**
-     * @param string $language The language
-     * @param string $modelBuild The model_build
-     * @param string $status The status
-     * @return ReadQueryOptions Options builder
-     */
-    public static function read($language = Values::NONE, $modelBuild = Values::NONE, $status = Values::NONE) {
-        return new ReadQueryOptions($language, $modelBuild, $status);
-    }
-
-    /**
-     * @param string $intent The intent
-     * @param string $modelBuild The model_build
-     * @param string $field The field
-     * @param string $namedEntity The named_entity
-     * @return CreateQueryOptions Options builder
-     */
-    public static function create($intent = Values::NONE, $modelBuild = Values::NONE, $field = Values::NONE, $namedEntity = Values::NONE) {
-        return new CreateQueryOptions($intent, $modelBuild, $field, $namedEntity);
-    }
-
-    /**
-     * @param string $sampleSid The sample_sid
-     * @param string $status The status
-     * @return UpdateQueryOptions Options builder
-     */
-    public static function update($sampleSid = Values::NONE, $status = Values::NONE) {
-        return new UpdateQueryOptions($sampleSid, $status);
-    }
-}
-
-class ReadQueryOptions extends Options {
-    /**
-     * @param string $language The language
-     * @param string $modelBuild The model_build
-     * @param string $status The status
-     */
-    public function __construct($language = Values::NONE, $modelBuild = Values::NONE, $status = Values::NONE) {
-        $this->options['language'] = $language;
-        $this->options['modelBuild'] = $modelBuild;
-        $this->options['status'] = $status;
-    }
-
-    /**
-     * The language
-     * 
-     * @param string $language The language
-     * @return $this Fluent Builder
-     */
-    public function setLanguage($language) {
-        $this->options['language'] = $language;
-        return $this;
-    }
-
-    /**
-     * The model_build
-     * 
-     * @param string $modelBuild The model_build
-     * @return $this Fluent Builder
-     */
-    public function setModelBuild($modelBuild) {
-        $this->options['modelBuild'] = $modelBuild;
-        return $this;
-    }
-
-    /**
-     * The status
-     * 
-     * @param string $status The status
-     * @return $this Fluent Builder
-     */
-    public function setStatus($status) {
-        $this->options['status'] = $status;
-        return $this;
-    }
-
-    /**
-     * Provide a friendly representation
-     * 
-     * @return string Machine friendly representation
-     */
-    public function __toString() {
-        $options = array();
-        foreach ($this->options as $key => $value) {
-            if ($value != Values::NONE) {
-                $options[] = "$key=$value";
-            }
-        }
-        return '[Twilio.Preview.Understand.ReadQueryOptions ' . implode(' ', $options) . ']';
-    }
-}
-
-class CreateQueryOptions extends Options {
-    /**
-     * @param string $intent The intent
-     * @param string $modelBuild The model_build
-     * @param string $field The field
-     * @param string $namedEntity The named_entity
-     */
-    public function __construct($intent = Values::NONE, $modelBuild = Values::NONE, $field = Values::NONE, $namedEntity = Values::NONE) {
-        $this->options['intent'] = $intent;
-        $this->options['modelBuild'] = $modelBuild;
-        $this->options['field'] = $field;
-        $this->options['namedEntity'] = $namedEntity;
-    }
-
-    /**
-     * The intent
-     * 
-     * @param string $intent The intent
-     * @return $this Fluent Builder
-     */
-    public function setIntent($intent) {
-        $this->options['intent'] = $intent;
-        return $this;
-    }
-
-    /**
-     * The model_build
-     * 
-     * @param string $modelBuild The model_build
-     * @return $this Fluent Builder
-     */
-    public function setModelBuild($modelBuild) {
-        $this->options['modelBuild'] = $modelBuild;
-        return $this;
-    }
-
-    /**
-     * The field
-     * 
-     * @param string $field The field
-     * @return $this Fluent Builder
-     */
-    public function setField($field) {
-        $this->options['field'] = $field;
-        return $this;
-    }
-
-    /**
-     * The named_entity
-     * 
-     * @param string $namedEntity The named_entity
-     * @return $this Fluent Builder
-     */
-    public function setNamedEntity($namedEntity) {
-        $this->options['namedEntity'] = $namedEntity;
-        return $this;
-    }
-
-    /**
-     * Provide a friendly representation
-     * 
-     * @return string Machine friendly representation
-     */
-    public function __toString() {
-        $options = array();
-        foreach ($this->options as $key => $value) {
-            if ($value != Values::NONE) {
-                $options[] = "$key=$value";
-            }
-        }
-        return '[Twilio.Preview.Understand.CreateQueryOptions ' . implode(' ', $options) . ']';
-    }
-}
-
-class UpdateQueryOptions extends Options {
-    /**
-     * @param string $sampleSid The sample_sid
-     * @param string $status The status
-     */
-    public function __construct($sampleSid = Values::NONE, $status = Values::NONE) {
-        $this->options['sampleSid'] = $sampleSid;
-        $this->options['status'] = $status;
-    }
-
-    /**
-     * The sample_sid
-     * 
-     * @param string $sampleSid The sample_sid
-     * @return $this Fluent Builder
-     */
-    public function setSampleSid($sampleSid) {
-        $this->options['sampleSid'] = $sampleSid;
-        return $this;
-    }
-
-    /**
-     * The status
-     * 
-     * @param string $status The status
-     * @return $this Fluent Builder
-     */
-    public function setStatus($status) {
-        $this->options['status'] = $status;
-        return $this;
-    }
-
-    /**
-     * Provide a friendly representation
-     * 
-     * @return string Machine friendly representation
-     */
-    public function __toString() {
-        $options = array();
-        foreach ($this->options as $key => $value) {
-            if ($value != Values::NONE) {
-                $options[] = "$key=$value";
-            }
-        }
-        return '[Twilio.Preview.Understand.UpdateQueryOptions ' . implode(' ', $options) . ']';
-    }
-}

+ 0 - 188
plugins/Twilio/Rest/Preview/Understand/ServiceOptions.php

@@ -1,188 +0,0 @@
-<?php
-
-/**
- * This code was generated by
- * \ / _    _  _|   _  _
- * | (_)\/(_)(_|\/| |(/_  v1.0.0
- * /       /
- */
-
-namespace Twilio\Rest\Preview\Understand;
-
-use Twilio\Options;
-use Twilio\Values;
-
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
-abstract class ServiceOptions {
-    /**
-     * @param string $friendlyName The friendly_name
-     * @param boolean $logQueries The log_queries
-     * @param integer $ttl The ttl
-     * @param string $uniqueName The unique_name
-     * @return CreateServiceOptions Options builder
-     */
-    public static function create($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE) {
-        return new CreateServiceOptions($friendlyName, $logQueries, $ttl, $uniqueName);
-    }
-
-    /**
-     * @param string $friendlyName The friendly_name
-     * @param boolean $logQueries The log_queries
-     * @param integer $ttl The ttl
-     * @param string $uniqueName The unique_name
-     * @return UpdateServiceOptions Options builder
-     */
-    public static function update($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE) {
-        return new UpdateServiceOptions($friendlyName, $logQueries, $ttl, $uniqueName);
-    }
-}
-
-class CreateServiceOptions extends Options {
-    /**
-     * @param string $friendlyName The friendly_name
-     * @param boolean $logQueries The log_queries
-     * @param integer $ttl The ttl
-     * @param string $uniqueName The unique_name
-     */
-    public function __construct($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE) {
-        $this->options['friendlyName'] = $friendlyName;
-        $this->options['logQueries'] = $logQueries;
-        $this->options['ttl'] = $ttl;
-        $this->options['uniqueName'] = $uniqueName;
-    }
-
-    /**
-     * The friendly_name
-     * 
-     * @param string $friendlyName The friendly_name
-     * @return $this Fluent Builder
-     */
-    public function setFriendlyName($friendlyName) {
-        $this->options['friendlyName'] = $friendlyName;
-        return $this;
-    }
-
-    /**
-     * The log_queries
-     * 
-     * @param boolean $logQueries The log_queries
-     * @return $this Fluent Builder
-     */
-    public function setLogQueries($logQueries) {
-        $this->options['logQueries'] = $logQueries;
-        return $this;
-    }
-
-    /**
-     * The ttl
-     * 
-     * @param integer $ttl The ttl
-     * @return $this Fluent Builder
-     */
-    public function setTtl($ttl) {
-        $this->options['ttl'] = $ttl;
-        return $this;
-    }
-
-    /**
-     * The unique_name
-     * 
-     * @param string $uniqueName The unique_name
-     * @return $this Fluent Builder
-     */
-    public function setUniqueName($uniqueName) {
-        $this->options['uniqueName'] = $uniqueName;
-        return $this;
-    }
-
-    /**
-     * Provide a friendly representation
-     * 
-     * @return string Machine friendly representation
-     */
-    public function __toString() {
-        $options = array();
-        foreach ($this->options as $key => $value) {
-            if ($value != Values::NONE) {
-                $options[] = "$key=$value";
-            }
-        }
-        return '[Twilio.Preview.Understand.CreateServiceOptions ' . implode(' ', $options) . ']';
-    }
-}
-
-class UpdateServiceOptions extends Options {
-    /**
-     * @param string $friendlyName The friendly_name
-     * @param boolean $logQueries The log_queries
-     * @param integer $ttl The ttl
-     * @param string $uniqueName The unique_name
-     */
-    public function __construct($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE) {
-        $this->options['friendlyName'] = $friendlyName;
-        $this->options['logQueries'] = $logQueries;
-        $this->options['ttl'] = $ttl;
-        $this->options['uniqueName'] = $uniqueName;
-    }
-
-    /**
-     * The friendly_name
-     * 
-     * @param string $friendlyName The friendly_name
-     * @return $this Fluent Builder
-     */
-    public function setFriendlyName($friendlyName) {
-        $this->options['friendlyName'] = $friendlyName;
-        return $this;
-    }
-
-    /**
-     * The log_queries
-     * 
-     * @param boolean $logQueries The log_queries
-     * @return $this Fluent Builder
-     */
-    public function setLogQueries($logQueries) {
-        $this->options['logQueries'] = $logQueries;
-        return $this;
-    }
-
-    /**
-     * The ttl
-     * 
-     * @param integer $ttl The ttl
-     * @return $this Fluent Builder
-     */
-    public function setTtl($ttl) {
-        $this->options['ttl'] = $ttl;
-        return $this;
-    }
-
-    /**
-     * The unique_name
-     * 
-     * @param string $uniqueName The unique_name
-     * @return $this Fluent Builder
-     */
-    public function setUniqueName($uniqueName) {
-        $this->options['uniqueName'] = $uniqueName;
-        return $this;
-    }
-
-    /**
-     * Provide a friendly representation
-     * 
-     * @return string Machine friendly representation
-     */
-    public function __toString() {
-        $options = array();
-        foreach ($this->options as $key => $value) {
-            if ($value != Values::NONE) {
-                $options[] = "$key=$value";
-            }
-        }
-        return '[Twilio.Preview.Understand.UpdateServiceOptions ' . implode(' ', $options) . ']';
-    }
-}

+ 72 - 0
plugins/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextContext.php

@@ -0,0 +1,72 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Studio\V1\Flow\Engagement;
+
+use Twilio\InstanceContext;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ */
+class EngagementContextContext extends InstanceContext {
+    /**
+     * Initialize the EngagementContextContext
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param string $flowSid The flow_sid
+     * @param string $engagementSid The engagement_sid
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextContext 
+     */
+    public function __construct(Version $version, $flowSid, $engagementSid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array('flowSid' => $flowSid, 'engagementSid' => $engagementSid, );
+
+        $this->uri = '/Flows/' . rawurlencode($flowSid) . '/Engagements/' . rawurlencode($engagementSid) . '/Context';
+    }
+
+    /**
+     * Fetch a EngagementContextInstance
+     * 
+     * @return EngagementContextInstance Fetched EngagementContextInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        $params = Values::of(array());
+
+        $payload = $this->version->fetch(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new EngagementContextInstance(
+            $this->version,
+            $payload,
+            $this->solution['flowSid'],
+            $this->solution['engagementSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Studio.V1.EngagementContextContext ' . implode(' ', $context) . ']';
+    }
+}

+ 111 - 0
plugins/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextInstance.php

@@ -0,0 +1,111 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Studio\V1\Flow\Engagement;
+
+use Twilio\Exceptions\TwilioException;
+use Twilio\InstanceResource;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ * 
+ * @property string accountSid
+ * @property array context
+ * @property string engagementSid
+ * @property string flowSid
+ * @property string url
+ */
+class EngagementContextInstance extends InstanceResource {
+    /**
+     * Initialize the EngagementContextInstance
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param mixed[] $payload The response payload
+     * @param string $flowSid The flow_sid
+     * @param string $engagementSid The engagement_sid
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextInstance 
+     */
+    public function __construct(Version $version, array $payload, $flowSid, $engagementSid) {
+        parent::__construct($version);
+
+        // Marshaled Properties
+        $this->properties = array(
+            'accountSid' => Values::array_get($payload, 'account_sid'),
+            'context' => Values::array_get($payload, 'context'),
+            'engagementSid' => Values::array_get($payload, 'engagement_sid'),
+            'flowSid' => Values::array_get($payload, 'flow_sid'),
+            'url' => Values::array_get($payload, 'url'),
+        );
+
+        $this->solution = array('flowSid' => $flowSid, 'engagementSid' => $engagementSid, );
+    }
+
+    /**
+     * Generate an instance context for the instance, the context is capable of
+     * performing various actions.  All instance actions are proxied to the context
+     * 
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextContext Context for this EngagementContextInstance
+     */
+    protected function proxy() {
+        if (!$this->context) {
+            $this->context = new EngagementContextContext(
+                $this->version,
+                $this->solution['flowSid'],
+                $this->solution['engagementSid']
+            );
+        }
+
+        return $this->context;
+    }
+
+    /**
+     * Fetch a EngagementContextInstance
+     * 
+     * @return EngagementContextInstance Fetched EngagementContextInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        return $this->proxy()->fetch();
+    }
+
+    /**
+     * Magic getter to access properties
+     * 
+     * @param string $name Property to access
+     * @return mixed The requested property
+     * @throws TwilioException For unknown properties
+     */
+    public function __get($name) {
+        if (array_key_exists($name, $this->properties)) {
+            return $this->properties[$name];
+        }
+
+        if (property_exists($this, '_' . $name)) {
+            $method = 'get' . ucfirst($name);
+            return $this->$method();
+        }
+
+        throw new TwilioException('Unknown property: ' . $name);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Studio.V1.EngagementContextInstance ' . implode(' ', $context) . ']';
+    }
+}

+ 55 - 0
plugins/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextList.php

@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Studio\V1\Flow\Engagement;
+
+use Twilio\ListResource;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ */
+class EngagementContextList extends ListResource {
+    /**
+     * Construct the EngagementContextList
+     * 
+     * @param Version $version Version that contains the resource
+     * @param string $flowSid The flow_sid
+     * @param string $engagementSid The engagement_sid
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextList 
+     */
+    public function __construct(Version $version, $flowSid, $engagementSid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array('flowSid' => $flowSid, 'engagementSid' => $engagementSid, );
+    }
+
+    /**
+     * Constructs a EngagementContextContext
+     * 
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextContext 
+     */
+    public function getContext() {
+        return new EngagementContextContext(
+            $this->version,
+            $this->solution['flowSid'],
+            $this->solution['engagementSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Studio.V1.EngagementContextList]';
+    }
+}

+ 42 - 0
plugins/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextPage.php

@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Studio\V1\Flow\Engagement;
+
+use Twilio\Page;
+
+/**
+ * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ */
+class EngagementContextPage extends Page {
+    public function __construct($version, $response, $solution) {
+        parent::__construct($version, $response);
+
+        // Path Solution
+        $this->solution = $solution;
+    }
+
+    public function buildInstance(array $payload) {
+        return new EngagementContextInstance(
+            $this->version,
+            $payload,
+            $this->solution['flowSid'],
+            $this->solution['engagementSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Studio.V1.EngagementContextPage]';
+    }
+}

+ 78 - 0
plugins/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextContext.php

@@ -0,0 +1,78 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Studio\V1\Flow\Engagement\Step;
+
+use Twilio\InstanceContext;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ */
+class StepContextContext extends InstanceContext {
+    /**
+     * Initialize the StepContextContext
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param string $flowSid The flow_sid
+     * @param string $engagementSid The engagement_sid
+     * @param string $stepSid The step_sid
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextContext 
+     */
+    public function __construct(Version $version, $flowSid, $engagementSid, $stepSid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array(
+            'flowSid' => $flowSid,
+            'engagementSid' => $engagementSid,
+            'stepSid' => $stepSid,
+        );
+
+        $this->uri = '/Flows/' . rawurlencode($flowSid) . '/Engagements/' . rawurlencode($engagementSid) . '/Steps/' . rawurlencode($stepSid) . '/Context';
+    }
+
+    /**
+     * Fetch a StepContextInstance
+     * 
+     * @return StepContextInstance Fetched StepContextInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        $params = Values::of(array());
+
+        $payload = $this->version->fetch(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new StepContextInstance(
+            $this->version,
+            $payload,
+            $this->solution['flowSid'],
+            $this->solution['engagementSid'],
+            $this->solution['stepSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Studio.V1.StepContextContext ' . implode(' ', $context) . ']';
+    }
+}

+ 119 - 0
plugins/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextInstance.php

@@ -0,0 +1,119 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Studio\V1\Flow\Engagement\Step;
+
+use Twilio\Exceptions\TwilioException;
+use Twilio\InstanceResource;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ * 
+ * @property string accountSid
+ * @property array context
+ * @property string engagementSid
+ * @property string flowSid
+ * @property string stepSid
+ * @property string url
+ */
+class StepContextInstance extends InstanceResource {
+    /**
+     * Initialize the StepContextInstance
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param mixed[] $payload The response payload
+     * @param string $flowSid The flow_sid
+     * @param string $engagementSid The engagement_sid
+     * @param string $stepSid The step_sid
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextInstance 
+     */
+    public function __construct(Version $version, array $payload, $flowSid, $engagementSid, $stepSid) {
+        parent::__construct($version);
+
+        // Marshaled Properties
+        $this->properties = array(
+            'accountSid' => Values::array_get($payload, 'account_sid'),
+            'context' => Values::array_get($payload, 'context'),
+            'engagementSid' => Values::array_get($payload, 'engagement_sid'),
+            'flowSid' => Values::array_get($payload, 'flow_sid'),
+            'stepSid' => Values::array_get($payload, 'step_sid'),
+            'url' => Values::array_get($payload, 'url'),
+        );
+
+        $this->solution = array(
+            'flowSid' => $flowSid,
+            'engagementSid' => $engagementSid,
+            'stepSid' => $stepSid,
+        );
+    }
+
+    /**
+     * Generate an instance context for the instance, the context is capable of
+     * performing various actions.  All instance actions are proxied to the context
+     * 
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextContext Context for this StepContextInstance
+     */
+    protected function proxy() {
+        if (!$this->context) {
+            $this->context = new StepContextContext(
+                $this->version,
+                $this->solution['flowSid'],
+                $this->solution['engagementSid'],
+                $this->solution['stepSid']
+            );
+        }
+
+        return $this->context;
+    }
+
+    /**
+     * Fetch a StepContextInstance
+     * 
+     * @return StepContextInstance Fetched StepContextInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        return $this->proxy()->fetch();
+    }
+
+    /**
+     * Magic getter to access properties
+     * 
+     * @param string $name Property to access
+     * @return mixed The requested property
+     * @throws TwilioException For unknown properties
+     */
+    public function __get($name) {
+        if (array_key_exists($name, $this->properties)) {
+            return $this->properties[$name];
+        }
+
+        if (property_exists($this, '_' . $name)) {
+            $method = 'get' . ucfirst($name);
+            return $this->$method();
+        }
+
+        throw new TwilioException('Unknown property: ' . $name);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Studio.V1.StepContextInstance ' . implode(' ', $context) . ']';
+    }
+}

+ 61 - 0
plugins/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.php

@@ -0,0 +1,61 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Studio\V1\Flow\Engagement\Step;
+
+use Twilio\ListResource;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ */
+class StepContextList extends ListResource {
+    /**
+     * Construct the StepContextList
+     * 
+     * @param Version $version Version that contains the resource
+     * @param string $flowSid The flow_sid
+     * @param string $engagementSid The engagement_sid
+     * @param string $stepSid The step_sid
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextList 
+     */
+    public function __construct(Version $version, $flowSid, $engagementSid, $stepSid) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array(
+            'flowSid' => $flowSid,
+            'engagementSid' => $engagementSid,
+            'stepSid' => $stepSid,
+        );
+    }
+
+    /**
+     * Constructs a StepContextContext
+     * 
+     * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextContext 
+     */
+    public function getContext() {
+        return new StepContextContext(
+            $this->version,
+            $this->solution['flowSid'],
+            $this->solution['engagementSid'],
+            $this->solution['stepSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Studio.V1.StepContextList]';
+    }
+}

+ 43 - 0
plugins/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextPage.php

@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Studio\V1\Flow\Engagement\Step;
+
+use Twilio\Page;
+
+/**
+ * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ */
+class StepContextPage extends Page {
+    public function __construct($version, $response, $solution) {
+        parent::__construct($version, $response);
+
+        // Path Solution
+        $this->solution = $solution;
+    }
+
+    public function buildInstance(array $payload) {
+        return new StepContextInstance(
+            $this->version,
+            $payload,
+            $this->solution['flowSid'],
+            $this->solution['engagementSid'],
+            $this->solution['stepSid']
+        );
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Studio.V1.StepContextPage]';
+    }
+}

+ 98 - 0
plugins/Twilio/Rest/Video/V1/CompositionSettingsContext.php

@@ -0,0 +1,98 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\InstanceContext;
+use Twilio\Options;
+use Twilio\Serialize;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+class CompositionSettingsContext extends InstanceContext {
+    /**
+     * Initialize the CompositionSettingsContext
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @return \Twilio\Rest\Video\V1\CompositionSettingsContext 
+     */
+    public function __construct(Version $version) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array();
+
+        $this->uri = '/CompositionSettings/Default';
+    }
+
+    /**
+     * Fetch a CompositionSettingsInstance
+     * 
+     * @return CompositionSettingsInstance Fetched CompositionSettingsInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        $params = Values::of(array());
+
+        $payload = $this->version->fetch(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new CompositionSettingsInstance($this->version, $payload);
+    }
+
+    /**
+     * Create a new CompositionSettingsInstance
+     * 
+     * @param string $friendlyName Friendly name of the configuration to be shown
+     *                             in the console
+     * @param array|Options $options Optional Arguments
+     * @return CompositionSettingsInstance Newly created CompositionSettingsInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function create($friendlyName, $options = array()) {
+        $options = new Values($options);
+
+        $data = Values::of(array(
+            'FriendlyName' => $friendlyName,
+            'AwsCredentialsSid' => $options['awsCredentialsSid'],
+            'EncryptionKeySid' => $options['encryptionKeySid'],
+            'AwsS3Url' => $options['awsS3Url'],
+            'AwsStorageEnabled' => Serialize::booleanToString($options['awsStorageEnabled']),
+            'EncryptionEnabled' => Serialize::booleanToString($options['encryptionEnabled']),
+        ));
+
+        $payload = $this->version->create(
+            'POST',
+            $this->uri,
+            array(),
+            $data
+        );
+
+        return new CompositionSettingsInstance($this->version, $payload);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Video.V1.CompositionSettingsContext ' . implode(' ', $context) . ']';
+    }
+}

+ 126 - 0
plugins/Twilio/Rest/Video/V1/CompositionSettingsInstance.php

@@ -0,0 +1,126 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\Exceptions\TwilioException;
+use Twilio\InstanceResource;
+use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ * 
+ * @property string accountSid
+ * @property string friendlyName
+ * @property string awsCredentialsSid
+ * @property string awsS3Url
+ * @property boolean awsStorageEnabled
+ * @property string encryptionKeySid
+ * @property boolean encryptionEnabled
+ * @property string url
+ */
+class CompositionSettingsInstance extends InstanceResource {
+    /**
+     * Initialize the CompositionSettingsInstance
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param mixed[] $payload The response payload
+     * @return \Twilio\Rest\Video\V1\CompositionSettingsInstance 
+     */
+    public function __construct(Version $version, array $payload) {
+        parent::__construct($version);
+
+        // Marshaled Properties
+        $this->properties = array(
+            'accountSid' => Values::array_get($payload, 'account_sid'),
+            'friendlyName' => Values::array_get($payload, 'friendly_name'),
+            'awsCredentialsSid' => Values::array_get($payload, 'aws_credentials_sid'),
+            'awsS3Url' => Values::array_get($payload, 'aws_s3_url'),
+            'awsStorageEnabled' => Values::array_get($payload, 'aws_storage_enabled'),
+            'encryptionKeySid' => Values::array_get($payload, 'encryption_key_sid'),
+            'encryptionEnabled' => Values::array_get($payload, 'encryption_enabled'),
+            'url' => Values::array_get($payload, 'url'),
+        );
+
+        $this->solution = array();
+    }
+
+    /**
+     * Generate an instance context for the instance, the context is capable of
+     * performing various actions.  All instance actions are proxied to the context
+     * 
+     * @return \Twilio\Rest\Video\V1\CompositionSettingsContext Context for this
+     *                                                          CompositionSettingsInstance
+     */
+    protected function proxy() {
+        if (!$this->context) {
+            $this->context = new CompositionSettingsContext($this->version);
+        }
+
+        return $this->context;
+    }
+
+    /**
+     * Fetch a CompositionSettingsInstance
+     * 
+     * @return CompositionSettingsInstance Fetched CompositionSettingsInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        return $this->proxy()->fetch();
+    }
+
+    /**
+     * Create a new CompositionSettingsInstance
+     * 
+     * @param string $friendlyName Friendly name of the configuration to be shown
+     *                             in the console
+     * @param array|Options $options Optional Arguments
+     * @return CompositionSettingsInstance Newly created CompositionSettingsInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function create($friendlyName, $options = array()) {
+        return $this->proxy()->create($friendlyName, $options);
+    }
+
+    /**
+     * Magic getter to access properties
+     * 
+     * @param string $name Property to access
+     * @return mixed The requested property
+     * @throws TwilioException For unknown properties
+     */
+    public function __get($name) {
+        if (array_key_exists($name, $this->properties)) {
+            return $this->properties[$name];
+        }
+
+        if (property_exists($this, '_' . $name)) {
+            $method = 'get' . ucfirst($name);
+            return $this->$method();
+        }
+
+        throw new TwilioException('Unknown property: ' . $name);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Video.V1.CompositionSettingsInstance ' . implode(' ', $context) . ']';
+    }
+}

+ 49 - 0
plugins/Twilio/Rest/Video/V1/CompositionSettingsList.php

@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\ListResource;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+class CompositionSettingsList extends ListResource {
+    /**
+     * Construct the CompositionSettingsList
+     * 
+     * @param Version $version Version that contains the resource
+     * @return \Twilio\Rest\Video\V1\CompositionSettingsList 
+     */
+    public function __construct(Version $version) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array();
+    }
+
+    /**
+     * Constructs a CompositionSettingsContext
+     * 
+     * @return \Twilio\Rest\Video\V1\CompositionSettingsContext 
+     */
+    public function getContext() {
+        return new CompositionSettingsContext($this->version);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Video.V1.CompositionSettingsList]';
+    }
+}

+ 141 - 0
plugins/Twilio/Rest/Video/V1/CompositionSettingsOptions.php

@@ -0,0 +1,141 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\Options;
+use Twilio\Values;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+abstract class CompositionSettingsOptions {
+    /**
+     * @param string $awsCredentialsSid SID of the Stored Credential resource CRxx
+     * @param string $encryptionKeySid SID of the Public Key resource CRxx
+     * @param string $awsS3Url Identity of the external location where the
+     *                         compositions should be stored. We only support
+     *                         DNS-compliant URLs like
+     *                         http://<my-bucket>.s3-<aws-region>.amazonaws.com/compositions, where compositions is the path where you want compositions to be stored.
+     * @param boolean $awsStorageEnabled true|false When set to true, all
+     *                                   Compositions will be written to the
+     *                                   AwsS3Url specified above. When set to
+     *                                   false, all Compositions will be stored in
+     *                                   Twilio's cloud.
+     * @param boolean $encryptionEnabled true|false When set to true, all
+     *                                   Compositions will be stored encrypted.
+     * @return CreateCompositionSettingsOptions Options builder
+     */
+    public static function create($awsCredentialsSid = Values::NONE, $encryptionKeySid = Values::NONE, $awsS3Url = Values::NONE, $awsStorageEnabled = Values::NONE, $encryptionEnabled = Values::NONE) {
+        return new CreateCompositionSettingsOptions($awsCredentialsSid, $encryptionKeySid, $awsS3Url, $awsStorageEnabled, $encryptionEnabled);
+    }
+}
+
+class CreateCompositionSettingsOptions extends Options {
+    /**
+     * @param string $awsCredentialsSid SID of the Stored Credential resource CRxx
+     * @param string $encryptionKeySid SID of the Public Key resource CRxx
+     * @param string $awsS3Url Identity of the external location where the
+     *                         compositions should be stored. We only support
+     *                         DNS-compliant URLs like
+     *                         http://<my-bucket>.s3-<aws-region>.amazonaws.com/compositions, where compositions is the path where you want compositions to be stored.
+     * @param boolean $awsStorageEnabled true|false When set to true, all
+     *                                   Compositions will be written to the
+     *                                   AwsS3Url specified above. When set to
+     *                                   false, all Compositions will be stored in
+     *                                   Twilio's cloud.
+     * @param boolean $encryptionEnabled true|false When set to true, all
+     *                                   Compositions will be stored encrypted.
+     */
+    public function __construct($awsCredentialsSid = Values::NONE, $encryptionKeySid = Values::NONE, $awsS3Url = Values::NONE, $awsStorageEnabled = Values::NONE, $encryptionEnabled = Values::NONE) {
+        $this->options['awsCredentialsSid'] = $awsCredentialsSid;
+        $this->options['encryptionKeySid'] = $encryptionKeySid;
+        $this->options['awsS3Url'] = $awsS3Url;
+        $this->options['awsStorageEnabled'] = $awsStorageEnabled;
+        $this->options['encryptionEnabled'] = $encryptionEnabled;
+    }
+
+    /**
+     * SID of the Stored Credential resource `CRxx`
+     * 
+     * @param string $awsCredentialsSid SID of the Stored Credential resource CRxx
+     * @return $this Fluent Builder
+     */
+    public function setAwsCredentialsSid($awsCredentialsSid) {
+        $this->options['awsCredentialsSid'] = $awsCredentialsSid;
+        return $this;
+    }
+
+    /**
+     * SID of the Public Key resource `CRxx`
+     * 
+     * @param string $encryptionKeySid SID of the Public Key resource CRxx
+     * @return $this Fluent Builder
+     */
+    public function setEncryptionKeySid($encryptionKeySid) {
+        $this->options['encryptionKeySid'] = $encryptionKeySid;
+        return $this;
+    }
+
+    /**
+     * Identity of the external location where the compositions should be stored. We only support DNS-compliant URLs like `http://<my-bucket>.s3-<aws-region>.amazonaws.com/compositions`,  where `compositions` is the path where you want compositions to be stored.
+     * 
+     * @param string $awsS3Url Identity of the external location where the
+     *                         compositions should be stored. We only support
+     *                         DNS-compliant URLs like
+     *                         http://<my-bucket>.s3-<aws-region>.amazonaws.com/compositions, where compositions is the path where you want compositions to be stored.
+     * @return $this Fluent Builder
+     */
+    public function setAwsS3Url($awsS3Url) {
+        $this->options['awsS3Url'] = $awsS3Url;
+        return $this;
+    }
+
+    /**
+     * `true|false` When set to `true`, all Compositions will be written to the `AwsS3Url` specified above. When set to `false`, all Compositions will be stored in Twilio's cloud.
+     * 
+     * @param boolean $awsStorageEnabled true|false When set to true, all
+     *                                   Compositions will be written to the
+     *                                   AwsS3Url specified above. When set to
+     *                                   false, all Compositions will be stored in
+     *                                   Twilio's cloud.
+     * @return $this Fluent Builder
+     */
+    public function setAwsStorageEnabled($awsStorageEnabled) {
+        $this->options['awsStorageEnabled'] = $awsStorageEnabled;
+        return $this;
+    }
+
+    /**
+     * `true|false` When set to `true`, all Compositions will be stored encrypted. Dafault value is `false`
+     * 
+     * @param boolean $encryptionEnabled true|false When set to true, all
+     *                                   Compositions will be stored encrypted.
+     * @return $this Fluent Builder
+     */
+    public function setEncryptionEnabled($encryptionEnabled) {
+        $this->options['encryptionEnabled'] = $encryptionEnabled;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Video.V1.CreateCompositionSettingsOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 37 - 0
plugins/Twilio/Rest/Video/V1/CompositionSettingsPage.php

@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\Page;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+class CompositionSettingsPage extends Page {
+    public function __construct($version, $response, $solution) {
+        parent::__construct($version, $response);
+
+        // Path Solution
+        $this->solution = $solution;
+    }
+
+    public function buildInstance(array $payload) {
+        return new CompositionSettingsInstance($this->version, $payload);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Video.V1.CompositionSettingsPage]';
+    }
+}

+ 98 - 0
plugins/Twilio/Rest/Video/V1/RecordingSettingsContext.php

@@ -0,0 +1,98 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\InstanceContext;
+use Twilio\Options;
+use Twilio\Serialize;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+class RecordingSettingsContext extends InstanceContext {
+    /**
+     * Initialize the RecordingSettingsContext
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @return \Twilio\Rest\Video\V1\RecordingSettingsContext 
+     */
+    public function __construct(Version $version) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array();
+
+        $this->uri = '/RecordingSettings/Default';
+    }
+
+    /**
+     * Fetch a RecordingSettingsInstance
+     * 
+     * @return RecordingSettingsInstance Fetched RecordingSettingsInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        $params = Values::of(array());
+
+        $payload = $this->version->fetch(
+            'GET',
+            $this->uri,
+            $params
+        );
+
+        return new RecordingSettingsInstance($this->version, $payload);
+    }
+
+    /**
+     * Create a new RecordingSettingsInstance
+     * 
+     * @param string $friendlyName Friendly name of the configuration to be shown
+     *                             in the console
+     * @param array|Options $options Optional Arguments
+     * @return RecordingSettingsInstance Newly created RecordingSettingsInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function create($friendlyName, $options = array()) {
+        $options = new Values($options);
+
+        $data = Values::of(array(
+            'FriendlyName' => $friendlyName,
+            'AwsCredentialsSid' => $options['awsCredentialsSid'],
+            'EncryptionKeySid' => $options['encryptionKeySid'],
+            'AwsS3Url' => $options['awsS3Url'],
+            'AwsStorageEnabled' => Serialize::booleanToString($options['awsStorageEnabled']),
+            'EncryptionEnabled' => Serialize::booleanToString($options['encryptionEnabled']),
+        ));
+
+        $payload = $this->version->create(
+            'POST',
+            $this->uri,
+            array(),
+            $data
+        );
+
+        return new RecordingSettingsInstance($this->version, $payload);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Video.V1.RecordingSettingsContext ' . implode(' ', $context) . ']';
+    }
+}

+ 126 - 0
plugins/Twilio/Rest/Video/V1/RecordingSettingsInstance.php

@@ -0,0 +1,126 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\Exceptions\TwilioException;
+use Twilio\InstanceResource;
+use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ * 
+ * @property string accountSid
+ * @property string friendlyName
+ * @property string awsCredentialsSid
+ * @property string awsS3Url
+ * @property boolean awsStorageEnabled
+ * @property string encryptionKeySid
+ * @property boolean encryptionEnabled
+ * @property string url
+ */
+class RecordingSettingsInstance extends InstanceResource {
+    /**
+     * Initialize the RecordingSettingsInstance
+     * 
+     * @param \Twilio\Version $version Version that contains the resource
+     * @param mixed[] $payload The response payload
+     * @return \Twilio\Rest\Video\V1\RecordingSettingsInstance 
+     */
+    public function __construct(Version $version, array $payload) {
+        parent::__construct($version);
+
+        // Marshaled Properties
+        $this->properties = array(
+            'accountSid' => Values::array_get($payload, 'account_sid'),
+            'friendlyName' => Values::array_get($payload, 'friendly_name'),
+            'awsCredentialsSid' => Values::array_get($payload, 'aws_credentials_sid'),
+            'awsS3Url' => Values::array_get($payload, 'aws_s3_url'),
+            'awsStorageEnabled' => Values::array_get($payload, 'aws_storage_enabled'),
+            'encryptionKeySid' => Values::array_get($payload, 'encryption_key_sid'),
+            'encryptionEnabled' => Values::array_get($payload, 'encryption_enabled'),
+            'url' => Values::array_get($payload, 'url'),
+        );
+
+        $this->solution = array();
+    }
+
+    /**
+     * Generate an instance context for the instance, the context is capable of
+     * performing various actions.  All instance actions are proxied to the context
+     * 
+     * @return \Twilio\Rest\Video\V1\RecordingSettingsContext Context for this
+     *                                                        RecordingSettingsInstance
+     */
+    protected function proxy() {
+        if (!$this->context) {
+            $this->context = new RecordingSettingsContext($this->version);
+        }
+
+        return $this->context;
+    }
+
+    /**
+     * Fetch a RecordingSettingsInstance
+     * 
+     * @return RecordingSettingsInstance Fetched RecordingSettingsInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function fetch() {
+        return $this->proxy()->fetch();
+    }
+
+    /**
+     * Create a new RecordingSettingsInstance
+     * 
+     * @param string $friendlyName Friendly name of the configuration to be shown
+     *                             in the console
+     * @param array|Options $options Optional Arguments
+     * @return RecordingSettingsInstance Newly created RecordingSettingsInstance
+     * @throws TwilioException When an HTTP error occurs.
+     */
+    public function create($friendlyName, $options = array()) {
+        return $this->proxy()->create($friendlyName, $options);
+    }
+
+    /**
+     * Magic getter to access properties
+     * 
+     * @param string $name Property to access
+     * @return mixed The requested property
+     * @throws TwilioException For unknown properties
+     */
+    public function __get($name) {
+        if (array_key_exists($name, $this->properties)) {
+            return $this->properties[$name];
+        }
+
+        if (property_exists($this, '_' . $name)) {
+            $method = 'get' . ucfirst($name);
+            return $this->$method();
+        }
+
+        throw new TwilioException('Unknown property: ' . $name);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $context = array();
+        foreach ($this->solution as $key => $value) {
+            $context[] = "$key=$value";
+        }
+        return '[Twilio.Video.V1.RecordingSettingsInstance ' . implode(' ', $context) . ']';
+    }
+}

+ 49 - 0
plugins/Twilio/Rest/Video/V1/RecordingSettingsList.php

@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\ListResource;
+use Twilio\Version;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+class RecordingSettingsList extends ListResource {
+    /**
+     * Construct the RecordingSettingsList
+     * 
+     * @param Version $version Version that contains the resource
+     * @return \Twilio\Rest\Video\V1\RecordingSettingsList 
+     */
+    public function __construct(Version $version) {
+        parent::__construct($version);
+
+        // Path Solution
+        $this->solution = array();
+    }
+
+    /**
+     * Constructs a RecordingSettingsContext
+     * 
+     * @return \Twilio\Rest\Video\V1\RecordingSettingsContext 
+     */
+    public function getContext() {
+        return new RecordingSettingsContext($this->version);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Video.V1.RecordingSettingsList]';
+    }
+}

+ 141 - 0
plugins/Twilio/Rest/Video/V1/RecordingSettingsOptions.php

@@ -0,0 +1,141 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\Options;
+use Twilio\Values;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+abstract class RecordingSettingsOptions {
+    /**
+     * @param string $awsCredentialsSid SID of the Stored Credential resource CRxx
+     * @param string $encryptionKeySid SID of the Public Key resource CRxx
+     * @param string $awsS3Url Identity of the external location where the
+     *                         recordings should be stored. We only support
+     *                         DNS-compliant URLs like
+     *                         http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings, where recordings is the path where you want recordings to be stored.
+     * @param boolean $awsStorageEnabled true|false When set to true, all
+     *                                   Recordings will be written to the AwsS3Url
+     *                                   specified above. When set to false, all
+     *                                   Recordings will be stored in Twilio's
+     *                                   cloud.
+     * @param boolean $encryptionEnabled true|false When set to true, all
+     *                                   Recordings will be stored encrypted.
+     * @return CreateRecordingSettingsOptions Options builder
+     */
+    public static function create($awsCredentialsSid = Values::NONE, $encryptionKeySid = Values::NONE, $awsS3Url = Values::NONE, $awsStorageEnabled = Values::NONE, $encryptionEnabled = Values::NONE) {
+        return new CreateRecordingSettingsOptions($awsCredentialsSid, $encryptionKeySid, $awsS3Url, $awsStorageEnabled, $encryptionEnabled);
+    }
+}
+
+class CreateRecordingSettingsOptions extends Options {
+    /**
+     * @param string $awsCredentialsSid SID of the Stored Credential resource CRxx
+     * @param string $encryptionKeySid SID of the Public Key resource CRxx
+     * @param string $awsS3Url Identity of the external location where the
+     *                         recordings should be stored. We only support
+     *                         DNS-compliant URLs like
+     *                         http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings, where recordings is the path where you want recordings to be stored.
+     * @param boolean $awsStorageEnabled true|false When set to true, all
+     *                                   Recordings will be written to the AwsS3Url
+     *                                   specified above. When set to false, all
+     *                                   Recordings will be stored in Twilio's
+     *                                   cloud.
+     * @param boolean $encryptionEnabled true|false When set to true, all
+     *                                   Recordings will be stored encrypted.
+     */
+    public function __construct($awsCredentialsSid = Values::NONE, $encryptionKeySid = Values::NONE, $awsS3Url = Values::NONE, $awsStorageEnabled = Values::NONE, $encryptionEnabled = Values::NONE) {
+        $this->options['awsCredentialsSid'] = $awsCredentialsSid;
+        $this->options['encryptionKeySid'] = $encryptionKeySid;
+        $this->options['awsS3Url'] = $awsS3Url;
+        $this->options['awsStorageEnabled'] = $awsStorageEnabled;
+        $this->options['encryptionEnabled'] = $encryptionEnabled;
+    }
+
+    /**
+     * SID of the Stored Credential resource `CRxx`
+     * 
+     * @param string $awsCredentialsSid SID of the Stored Credential resource CRxx
+     * @return $this Fluent Builder
+     */
+    public function setAwsCredentialsSid($awsCredentialsSid) {
+        $this->options['awsCredentialsSid'] = $awsCredentialsSid;
+        return $this;
+    }
+
+    /**
+     * SID of the Public Key resource `CRxx`
+     * 
+     * @param string $encryptionKeySid SID of the Public Key resource CRxx
+     * @return $this Fluent Builder
+     */
+    public function setEncryptionKeySid($encryptionKeySid) {
+        $this->options['encryptionKeySid'] = $encryptionKeySid;
+        return $this;
+    }
+
+    /**
+     * Identity of the external location where the recordings should be stored. We only support DNS-compliant URLs like `http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings`, where `recordings` is the path where you want recordings to be stored.
+     * 
+     * @param string $awsS3Url Identity of the external location where the
+     *                         recordings should be stored. We only support
+     *                         DNS-compliant URLs like
+     *                         http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings, where recordings is the path where you want recordings to be stored.
+     * @return $this Fluent Builder
+     */
+    public function setAwsS3Url($awsS3Url) {
+        $this->options['awsS3Url'] = $awsS3Url;
+        return $this;
+    }
+
+    /**
+     * `true|false` When set to `true`, all Recordings will be written to the `AwsS3Url` specified above. When set to `false`, all Recordings will be stored in Twilio's cloud.
+     * 
+     * @param boolean $awsStorageEnabled true|false When set to true, all
+     *                                   Recordings will be written to the AwsS3Url
+     *                                   specified above. When set to false, all
+     *                                   Recordings will be stored in Twilio's
+     *                                   cloud.
+     * @return $this Fluent Builder
+     */
+    public function setAwsStorageEnabled($awsStorageEnabled) {
+        $this->options['awsStorageEnabled'] = $awsStorageEnabled;
+        return $this;
+    }
+
+    /**
+     * `true|false` When set to `true`, all Recordings will be stored encrypted. Dafault value is `false`
+     * 
+     * @param boolean $encryptionEnabled true|false When set to true, all
+     *                                   Recordings will be stored encrypted.
+     * @return $this Fluent Builder
+     */
+    public function setEncryptionEnabled($encryptionEnabled) {
+        $this->options['encryptionEnabled'] = $encryptionEnabled;
+        return $this;
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        $options = array();
+        foreach ($this->options as $key => $value) {
+            if ($value != Values::NONE) {
+                $options[] = "$key=$value";
+            }
+        }
+        return '[Twilio.Video.V1.CreateRecordingSettingsOptions ' . implode(' ', $options) . ']';
+    }
+}

+ 37 - 0
plugins/Twilio/Rest/Video/V1/RecordingSettingsPage.php

@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * This code was generated by
+ * \ / _    _  _|   _  _
+ * | (_)\/(_)(_|\/| |(/_  v1.0.0
+ * /       /
+ */
+
+namespace Twilio\Rest\Video\V1;
+
+use Twilio\Page;
+
+/**
+ * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ */
+class RecordingSettingsPage extends Page {
+    public function __construct($version, $response, $solution) {
+        parent::__construct($version, $response);
+
+        // Path Solution
+        $this->solution = $solution;
+    }
+
+    public function buildInstance(array $payload) {
+        return new RecordingSettingsInstance($this->version, $payload);
+    }
+
+    /**
+     * Provide a friendly representation
+     * 
+     * @return string Machine friendly representation
+     */
+    public function __toString() {
+        return '[Twilio.Video.V1.RecordingSettingsPage]';
+    }
+}

+ 18 - 0
plugins/Twilio/TwiML/GenericNode.php

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