SampleOptions.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?php
  2. /**
  3. * This code was generated by
  4. * \ / _ _ _| _ _
  5. * | (_)\/(_)(_|\/| |(/_ v1.0.0
  6. * / /
  7. */
  8. namespace Twilio\Rest\Preview\Understand\Assistant\Intent;
  9. use Twilio\Options;
  10. use Twilio\Values;
  11. /**
  12. * 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.
  13. */
  14. abstract class SampleOptions {
  15. /**
  16. * @param string $language An ISO language-country string of the sample.
  17. * @return ReadSampleOptions Options builder
  18. */
  19. public static function read($language = Values::NONE) {
  20. return new ReadSampleOptions($language);
  21. }
  22. /**
  23. * @param string $sourceChannel The communication channel the sample was
  24. * captured. It can be: voice, sms, chat, alexa,
  25. * google-assistant, or slack. If not included the
  26. * value will be null
  27. * @return CreateSampleOptions Options builder
  28. */
  29. public static function create($sourceChannel = Values::NONE) {
  30. return new CreateSampleOptions($sourceChannel);
  31. }
  32. /**
  33. * @param string $language An ISO language-country string of the sample.
  34. * @param string $taggedText The text example of how end-users may express this
  35. * intent. The sample may contain Field tag blocks.
  36. * @param string $sourceChannel The communication channel the sample was
  37. * captured. It can be: voice, sms, chat, alexa,
  38. * google-assistant, or slack. If not included the
  39. * value will be null
  40. * @return UpdateSampleOptions Options builder
  41. */
  42. public static function update($language = Values::NONE, $taggedText = Values::NONE, $sourceChannel = Values::NONE) {
  43. return new UpdateSampleOptions($language, $taggedText, $sourceChannel);
  44. }
  45. }
  46. class ReadSampleOptions extends Options {
  47. /**
  48. * @param string $language An ISO language-country string of the sample.
  49. */
  50. public function __construct($language = Values::NONE) {
  51. $this->options['language'] = $language;
  52. }
  53. /**
  54. * An ISO language-country string of the sample.
  55. *
  56. * @param string $language An ISO language-country string of the sample.
  57. * @return $this Fluent Builder
  58. */
  59. public function setLanguage($language) {
  60. $this->options['language'] = $language;
  61. return $this;
  62. }
  63. /**
  64. * Provide a friendly representation
  65. *
  66. * @return string Machine friendly representation
  67. */
  68. public function __toString() {
  69. $options = array();
  70. foreach ($this->options as $key => $value) {
  71. if ($value != Values::NONE) {
  72. $options[] = "$key=$value";
  73. }
  74. }
  75. return '[Twilio.Preview.Understand.ReadSampleOptions ' . implode(' ', $options) . ']';
  76. }
  77. }
  78. class CreateSampleOptions extends Options {
  79. /**
  80. * @param string $sourceChannel The communication channel the sample was
  81. * captured. It can be: voice, sms, chat, alexa,
  82. * google-assistant, or slack. If not included the
  83. * value will be null
  84. */
  85. public function __construct($sourceChannel = Values::NONE) {
  86. $this->options['sourceChannel'] = $sourceChannel;
  87. }
  88. /**
  89. * 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
  90. *
  91. * @param string $sourceChannel The communication channel the sample was
  92. * captured. It can be: voice, sms, chat, alexa,
  93. * google-assistant, or slack. If not included the
  94. * value will be null
  95. * @return $this Fluent Builder
  96. */
  97. public function setSourceChannel($sourceChannel) {
  98. $this->options['sourceChannel'] = $sourceChannel;
  99. return $this;
  100. }
  101. /**
  102. * Provide a friendly representation
  103. *
  104. * @return string Machine friendly representation
  105. */
  106. public function __toString() {
  107. $options = array();
  108. foreach ($this->options as $key => $value) {
  109. if ($value != Values::NONE) {
  110. $options[] = "$key=$value";
  111. }
  112. }
  113. return '[Twilio.Preview.Understand.CreateSampleOptions ' . implode(' ', $options) . ']';
  114. }
  115. }
  116. class UpdateSampleOptions extends Options {
  117. /**
  118. * @param string $language An ISO language-country string of the sample.
  119. * @param string $taggedText The text example of how end-users may express this
  120. * intent. The sample may contain Field tag blocks.
  121. * @param string $sourceChannel The communication channel the sample was
  122. * captured. It can be: voice, sms, chat, alexa,
  123. * google-assistant, or slack. If not included the
  124. * value will be null
  125. */
  126. public function __construct($language = Values::NONE, $taggedText = Values::NONE, $sourceChannel = Values::NONE) {
  127. $this->options['language'] = $language;
  128. $this->options['taggedText'] = $taggedText;
  129. $this->options['sourceChannel'] = $sourceChannel;
  130. }
  131. /**
  132. * An ISO language-country string of the sample.
  133. *
  134. * @param string $language An ISO language-country string of the sample.
  135. * @return $this Fluent Builder
  136. */
  137. public function setLanguage($language) {
  138. $this->options['language'] = $language;
  139. return $this;
  140. }
  141. /**
  142. * The text example of how end-users may express this intent. The sample may contain Field tag blocks.
  143. *
  144. * @param string $taggedText The text example of how end-users may express this
  145. * intent. The sample may contain Field tag blocks.
  146. * @return $this Fluent Builder
  147. */
  148. public function setTaggedText($taggedText) {
  149. $this->options['taggedText'] = $taggedText;
  150. return $this;
  151. }
  152. /**
  153. * 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
  154. *
  155. * @param string $sourceChannel The communication channel the sample was
  156. * captured. It can be: voice, sms, chat, alexa,
  157. * google-assistant, or slack. If not included the
  158. * value will be null
  159. * @return $this Fluent Builder
  160. */
  161. public function setSourceChannel($sourceChannel) {
  162. $this->options['sourceChannel'] = $sourceChannel;
  163. return $this;
  164. }
  165. /**
  166. * Provide a friendly representation
  167. *
  168. * @return string Machine friendly representation
  169. */
  170. public function __toString() {
  171. $options = array();
  172. foreach ($this->options as $key => $value) {
  173. if ($value != Values::NONE) {
  174. $options[] = "$key=$value";
  175. }
  176. }
  177. return '[Twilio.Preview.Understand.UpdateSampleOptions ' . implode(' ', $options) . ']';
  178. }
  179. }