1
0

AssistantOptions.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <?php
  2. /**
  3. * This code was generated by
  4. * \ / _ _ _| _ _
  5. * | (_)\/(_)(_|\/| |(/_ v1.0.0
  6. * / /
  7. */
  8. namespace Twilio\Rest\Preview\Understand;
  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 AssistantOptions {
  15. /**
  16. * @param string $friendlyName A text description for the Assistant. It is
  17. * non-unique and can up to 255 characters long.
  18. * @param boolean $logQueries A boolean that specifies whether queries should
  19. * be logged for 30 days further training. If false,
  20. * no queries will be stored, if true, queries will
  21. * be stored for 30 days and deleted thereafter.
  22. * Defaults to true if no value is provided.
  23. * @param integer $ttl The ttl
  24. * @param string $uniqueName A user-provided string that uniquely identifies
  25. * this resource as an alternative to the sid. Unique
  26. * up to 64 characters long.
  27. * @param string $responseUrl The webhook URL called to fetch the response to
  28. * an incoming communication expressed in Assistant
  29. * TwiML.
  30. * @param string $callbackUrl The callback_url
  31. * @param string $callbackEvents The callback_events
  32. * @return CreateAssistantOptions Options builder
  33. */
  34. 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) {
  35. return new CreateAssistantOptions($friendlyName, $logQueries, $ttl, $uniqueName, $responseUrl, $callbackUrl, $callbackEvents);
  36. }
  37. /**
  38. * @param string $friendlyName A text description for the Assistant. It is
  39. * non-unique and can up to 255 characters long.
  40. * @param boolean $logQueries A boolean that specifies whether queries should
  41. * be logged for 30 days further training. If false,
  42. * no queries will be stored, if true, queries will
  43. * be stored for 30 days and deleted thereafter.
  44. * Defaults to true if no value is provided.
  45. * @param integer $ttl The ttl
  46. * @param string $uniqueName A user-provided string that uniquely identifies
  47. * this resource as an alternative to the sid. Unique
  48. * up to 64 characters long.
  49. * @param string $responseUrl The webhook URL called to fetch the response to
  50. * an incoming communication expressed in Assistant
  51. * TwiML.
  52. * @param string $callbackUrl The callback_url
  53. * @param string $callbackEvents The callback_events
  54. * @return UpdateAssistantOptions Options builder
  55. */
  56. 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) {
  57. return new UpdateAssistantOptions($friendlyName, $logQueries, $ttl, $uniqueName, $responseUrl, $callbackUrl, $callbackEvents);
  58. }
  59. }
  60. class CreateAssistantOptions extends Options {
  61. /**
  62. * @param string $friendlyName A text description for the Assistant. It is
  63. * non-unique and can up to 255 characters long.
  64. * @param boolean $logQueries A boolean that specifies whether queries should
  65. * be logged for 30 days further training. If false,
  66. * no queries will be stored, if true, queries will
  67. * be stored for 30 days and deleted thereafter.
  68. * Defaults to true if no value is provided.
  69. * @param integer $ttl The ttl
  70. * @param string $uniqueName A user-provided string that uniquely identifies
  71. * this resource as an alternative to the sid. Unique
  72. * up to 64 characters long.
  73. * @param string $responseUrl The webhook URL called to fetch the response to
  74. * an incoming communication expressed in Assistant
  75. * TwiML.
  76. * @param string $callbackUrl The callback_url
  77. * @param string $callbackEvents The callback_events
  78. */
  79. public function __construct($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE, $responseUrl = Values::NONE, $callbackUrl = Values::NONE, $callbackEvents = Values::NONE) {
  80. $this->options['friendlyName'] = $friendlyName;
  81. $this->options['logQueries'] = $logQueries;
  82. $this->options['ttl'] = $ttl;
  83. $this->options['uniqueName'] = $uniqueName;
  84. $this->options['responseUrl'] = $responseUrl;
  85. $this->options['callbackUrl'] = $callbackUrl;
  86. $this->options['callbackEvents'] = $callbackEvents;
  87. }
  88. /**
  89. * A text description for the Assistant. It is non-unique and can up to 255 characters long.
  90. *
  91. * @param string $friendlyName A text description for the Assistant. It is
  92. * non-unique and can up to 255 characters long.
  93. * @return $this Fluent Builder
  94. */
  95. public function setFriendlyName($friendlyName) {
  96. $this->options['friendlyName'] = $friendlyName;
  97. return $this;
  98. }
  99. /**
  100. * 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.
  101. *
  102. * @param boolean $logQueries A boolean that specifies whether queries should
  103. * be logged for 30 days further training. If false,
  104. * no queries will be stored, if true, queries will
  105. * be stored for 30 days and deleted thereafter.
  106. * Defaults to true if no value is provided.
  107. * @return $this Fluent Builder
  108. */
  109. public function setLogQueries($logQueries) {
  110. $this->options['logQueries'] = $logQueries;
  111. return $this;
  112. }
  113. /**
  114. * The ttl
  115. *
  116. * @param integer $ttl The ttl
  117. * @return $this Fluent Builder
  118. */
  119. public function setTtl($ttl) {
  120. $this->options['ttl'] = $ttl;
  121. return $this;
  122. }
  123. /**
  124. * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
  125. *
  126. * @param string $uniqueName A user-provided string that uniquely identifies
  127. * this resource as an alternative to the sid. Unique
  128. * up to 64 characters long.
  129. * @return $this Fluent Builder
  130. */
  131. public function setUniqueName($uniqueName) {
  132. $this->options['uniqueName'] = $uniqueName;
  133. return $this;
  134. }
  135. /**
  136. * The webhook URL called to fetch the response to an incoming communication expressed in Assistant TwiML.
  137. *
  138. * @param string $responseUrl The webhook URL called to fetch the response to
  139. * an incoming communication expressed in Assistant
  140. * TwiML.
  141. * @return $this Fluent Builder
  142. */
  143. public function setResponseUrl($responseUrl) {
  144. $this->options['responseUrl'] = $responseUrl;
  145. return $this;
  146. }
  147. /**
  148. * The callback_url
  149. *
  150. * @param string $callbackUrl The callback_url
  151. * @return $this Fluent Builder
  152. */
  153. public function setCallbackUrl($callbackUrl) {
  154. $this->options['callbackUrl'] = $callbackUrl;
  155. return $this;
  156. }
  157. /**
  158. * The callback_events
  159. *
  160. * @param string $callbackEvents The callback_events
  161. * @return $this Fluent Builder
  162. */
  163. public function setCallbackEvents($callbackEvents) {
  164. $this->options['callbackEvents'] = $callbackEvents;
  165. return $this;
  166. }
  167. /**
  168. * Provide a friendly representation
  169. *
  170. * @return string Machine friendly representation
  171. */
  172. public function __toString() {
  173. $options = array();
  174. foreach ($this->options as $key => $value) {
  175. if ($value != Values::NONE) {
  176. $options[] = "$key=$value";
  177. }
  178. }
  179. return '[Twilio.Preview.Understand.CreateAssistantOptions ' . implode(' ', $options) . ']';
  180. }
  181. }
  182. class UpdateAssistantOptions extends Options {
  183. /**
  184. * @param string $friendlyName A text description for the Assistant. It is
  185. * non-unique and can up to 255 characters long.
  186. * @param boolean $logQueries A boolean that specifies whether queries should
  187. * be logged for 30 days further training. If false,
  188. * no queries will be stored, if true, queries will
  189. * be stored for 30 days and deleted thereafter.
  190. * Defaults to true if no value is provided.
  191. * @param integer $ttl The ttl
  192. * @param string $uniqueName A user-provided string that uniquely identifies
  193. * this resource as an alternative to the sid. Unique
  194. * up to 64 characters long.
  195. * @param string $responseUrl The webhook URL called to fetch the response to
  196. * an incoming communication expressed in Assistant
  197. * TwiML.
  198. * @param string $callbackUrl The callback_url
  199. * @param string $callbackEvents The callback_events
  200. */
  201. public function __construct($friendlyName = Values::NONE, $logQueries = Values::NONE, $ttl = Values::NONE, $uniqueName = Values::NONE, $responseUrl = Values::NONE, $callbackUrl = Values::NONE, $callbackEvents = Values::NONE) {
  202. $this->options['friendlyName'] = $friendlyName;
  203. $this->options['logQueries'] = $logQueries;
  204. $this->options['ttl'] = $ttl;
  205. $this->options['uniqueName'] = $uniqueName;
  206. $this->options['responseUrl'] = $responseUrl;
  207. $this->options['callbackUrl'] = $callbackUrl;
  208. $this->options['callbackEvents'] = $callbackEvents;
  209. }
  210. /**
  211. * A text description for the Assistant. It is non-unique and can up to 255 characters long.
  212. *
  213. * @param string $friendlyName A text description for the Assistant. It is
  214. * non-unique and can up to 255 characters long.
  215. * @return $this Fluent Builder
  216. */
  217. public function setFriendlyName($friendlyName) {
  218. $this->options['friendlyName'] = $friendlyName;
  219. return $this;
  220. }
  221. /**
  222. * 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.
  223. *
  224. * @param boolean $logQueries A boolean that specifies whether queries should
  225. * be logged for 30 days further training. If false,
  226. * no queries will be stored, if true, queries will
  227. * be stored for 30 days and deleted thereafter.
  228. * Defaults to true if no value is provided.
  229. * @return $this Fluent Builder
  230. */
  231. public function setLogQueries($logQueries) {
  232. $this->options['logQueries'] = $logQueries;
  233. return $this;
  234. }
  235. /**
  236. * The ttl
  237. *
  238. * @param integer $ttl The ttl
  239. * @return $this Fluent Builder
  240. */
  241. public function setTtl($ttl) {
  242. $this->options['ttl'] = $ttl;
  243. return $this;
  244. }
  245. /**
  246. * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
  247. *
  248. * @param string $uniqueName A user-provided string that uniquely identifies
  249. * this resource as an alternative to the sid. Unique
  250. * up to 64 characters long.
  251. * @return $this Fluent Builder
  252. */
  253. public function setUniqueName($uniqueName) {
  254. $this->options['uniqueName'] = $uniqueName;
  255. return $this;
  256. }
  257. /**
  258. * The webhook URL called to fetch the response to an incoming communication expressed in Assistant TwiML.
  259. *
  260. * @param string $responseUrl The webhook URL called to fetch the response to
  261. * an incoming communication expressed in Assistant
  262. * TwiML.
  263. * @return $this Fluent Builder
  264. */
  265. public function setResponseUrl($responseUrl) {
  266. $this->options['responseUrl'] = $responseUrl;
  267. return $this;
  268. }
  269. /**
  270. * The callback_url
  271. *
  272. * @param string $callbackUrl The callback_url
  273. * @return $this Fluent Builder
  274. */
  275. public function setCallbackUrl($callbackUrl) {
  276. $this->options['callbackUrl'] = $callbackUrl;
  277. return $this;
  278. }
  279. /**
  280. * The callback_events
  281. *
  282. * @param string $callbackEvents The callback_events
  283. * @return $this Fluent Builder
  284. */
  285. public function setCallbackEvents($callbackEvents) {
  286. $this->options['callbackEvents'] = $callbackEvents;
  287. return $this;
  288. }
  289. /**
  290. * Provide a friendly representation
  291. *
  292. * @return string Machine friendly representation
  293. */
  294. public function __toString() {
  295. $options = array();
  296. foreach ($this->options as $key => $value) {
  297. if ($value != Values::NONE) {
  298. $options[] = "$key=$value";
  299. }
  300. }
  301. return '[Twilio.Preview.Understand.UpdateAssistantOptions ' . implode(' ', $options) . ']';
  302. }
  303. }