QueryOptions.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <?php
  2. /**
  3. * This code was generated by
  4. * \ / _ _ _| _ _
  5. * | (_)\/(_)(_|\/| |(/_ v1.0.0
  6. * / /
  7. */
  8. namespace Twilio\Rest\Preview\Understand\Service;
  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 QueryOptions {
  15. /**
  16. * @param string $language The language
  17. * @param string $modelBuild The model_build
  18. * @param string $status The status
  19. * @return ReadQueryOptions Options builder
  20. */
  21. public static function read($language = Values::NONE, $modelBuild = Values::NONE, $status = Values::NONE) {
  22. return new ReadQueryOptions($language, $modelBuild, $status);
  23. }
  24. /**
  25. * @param string $intent The intent
  26. * @param string $modelBuild The model_build
  27. * @param string $field The field
  28. * @param string $namedEntity The named_entity
  29. * @return CreateQueryOptions Options builder
  30. */
  31. public static function create($intent = Values::NONE, $modelBuild = Values::NONE, $field = Values::NONE, $namedEntity = Values::NONE) {
  32. return new CreateQueryOptions($intent, $modelBuild, $field, $namedEntity);
  33. }
  34. /**
  35. * @param string $sampleSid The sample_sid
  36. * @param string $status The status
  37. * @return UpdateQueryOptions Options builder
  38. */
  39. public static function update($sampleSid = Values::NONE, $status = Values::NONE) {
  40. return new UpdateQueryOptions($sampleSid, $status);
  41. }
  42. }
  43. class ReadQueryOptions extends Options {
  44. /**
  45. * @param string $language The language
  46. * @param string $modelBuild The model_build
  47. * @param string $status The status
  48. */
  49. public function __construct($language = Values::NONE, $modelBuild = Values::NONE, $status = Values::NONE) {
  50. $this->options['language'] = $language;
  51. $this->options['modelBuild'] = $modelBuild;
  52. $this->options['status'] = $status;
  53. }
  54. /**
  55. * The language
  56. *
  57. * @param string $language The language
  58. * @return $this Fluent Builder
  59. */
  60. public function setLanguage($language) {
  61. $this->options['language'] = $language;
  62. return $this;
  63. }
  64. /**
  65. * The model_build
  66. *
  67. * @param string $modelBuild The model_build
  68. * @return $this Fluent Builder
  69. */
  70. public function setModelBuild($modelBuild) {
  71. $this->options['modelBuild'] = $modelBuild;
  72. return $this;
  73. }
  74. /**
  75. * The status
  76. *
  77. * @param string $status The status
  78. * @return $this Fluent Builder
  79. */
  80. public function setStatus($status) {
  81. $this->options['status'] = $status;
  82. return $this;
  83. }
  84. /**
  85. * Provide a friendly representation
  86. *
  87. * @return string Machine friendly representation
  88. */
  89. public function __toString() {
  90. $options = array();
  91. foreach ($this->options as $key => $value) {
  92. if ($value != Values::NONE) {
  93. $options[] = "$key=$value";
  94. }
  95. }
  96. return '[Twilio.Preview.Understand.ReadQueryOptions ' . implode(' ', $options) . ']';
  97. }
  98. }
  99. class CreateQueryOptions extends Options {
  100. /**
  101. * @param string $intent The intent
  102. * @param string $modelBuild The model_build
  103. * @param string $field The field
  104. * @param string $namedEntity The named_entity
  105. */
  106. public function __construct($intent = Values::NONE, $modelBuild = Values::NONE, $field = Values::NONE, $namedEntity = Values::NONE) {
  107. $this->options['intent'] = $intent;
  108. $this->options['modelBuild'] = $modelBuild;
  109. $this->options['field'] = $field;
  110. $this->options['namedEntity'] = $namedEntity;
  111. }
  112. /**
  113. * The intent
  114. *
  115. * @param string $intent The intent
  116. * @return $this Fluent Builder
  117. */
  118. public function setIntent($intent) {
  119. $this->options['intent'] = $intent;
  120. return $this;
  121. }
  122. /**
  123. * The model_build
  124. *
  125. * @param string $modelBuild The model_build
  126. * @return $this Fluent Builder
  127. */
  128. public function setModelBuild($modelBuild) {
  129. $this->options['modelBuild'] = $modelBuild;
  130. return $this;
  131. }
  132. /**
  133. * The field
  134. *
  135. * @param string $field The field
  136. * @return $this Fluent Builder
  137. */
  138. public function setField($field) {
  139. $this->options['field'] = $field;
  140. return $this;
  141. }
  142. /**
  143. * The named_entity
  144. *
  145. * @param string $namedEntity The named_entity
  146. * @return $this Fluent Builder
  147. */
  148. public function setNamedEntity($namedEntity) {
  149. $this->options['namedEntity'] = $namedEntity;
  150. return $this;
  151. }
  152. /**
  153. * Provide a friendly representation
  154. *
  155. * @return string Machine friendly representation
  156. */
  157. public function __toString() {
  158. $options = array();
  159. foreach ($this->options as $key => $value) {
  160. if ($value != Values::NONE) {
  161. $options[] = "$key=$value";
  162. }
  163. }
  164. return '[Twilio.Preview.Understand.CreateQueryOptions ' . implode(' ', $options) . ']';
  165. }
  166. }
  167. class UpdateQueryOptions extends Options {
  168. /**
  169. * @param string $sampleSid The sample_sid
  170. * @param string $status The status
  171. */
  172. public function __construct($sampleSid = Values::NONE, $status = Values::NONE) {
  173. $this->options['sampleSid'] = $sampleSid;
  174. $this->options['status'] = $status;
  175. }
  176. /**
  177. * The sample_sid
  178. *
  179. * @param string $sampleSid The sample_sid
  180. * @return $this Fluent Builder
  181. */
  182. public function setSampleSid($sampleSid) {
  183. $this->options['sampleSid'] = $sampleSid;
  184. return $this;
  185. }
  186. /**
  187. * The status
  188. *
  189. * @param string $status The status
  190. * @return $this Fluent Builder
  191. */
  192. public function setStatus($status) {
  193. $this->options['status'] = $status;
  194. return $this;
  195. }
  196. /**
  197. * Provide a friendly representation
  198. *
  199. * @return string Machine friendly representation
  200. */
  201. public function __toString() {
  202. $options = array();
  203. foreach ($this->options as $key => $value) {
  204. if ($value != Values::NONE) {
  205. $options[] = "$key=$value";
  206. }
  207. }
  208. return '[Twilio.Preview.Understand.UpdateQueryOptions ' . implode(' ', $options) . ']';
  209. }
  210. }