PageRenderTime 27ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/src/Twilio/Rest/Authy/V1/ServiceOptions.php

http://github.com/twilio/twilio-php
PHP | 265 lines | 101 code | 26 blank | 138 comment | 0 complexity | 025b6067c3392ea8a2c1b4ef900944d7 MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /**
  3. * This code was generated by
  4. * \ / _ _ _| _ _
  5. * | (_)\/(_)(_|\/| |(/_ v1.0.0
  6. * / /
  7. */
  8. namespace Twilio\Rest\Authy\V1;
  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 ServiceOptions {
  15. /**
  16. * @param string $push Optional service level push factors configuration
  17. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  18. * request header
  19. * @return CreateServiceOptions Options builder
  20. */
  21. public static function create(string $push = Values::NONE, string $twilioAuthySandboxMode = Values::NONE): CreateServiceOptions {
  22. return new CreateServiceOptions($push, $twilioAuthySandboxMode);
  23. }
  24. /**
  25. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  26. * request header
  27. * @return DeleteServiceOptions Options builder
  28. */
  29. public static function delete(string $twilioAuthySandboxMode = Values::NONE): DeleteServiceOptions {
  30. return new DeleteServiceOptions($twilioAuthySandboxMode);
  31. }
  32. /**
  33. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  34. * request header
  35. * @return FetchServiceOptions Options builder
  36. */
  37. public static function fetch(string $twilioAuthySandboxMode = Values::NONE): FetchServiceOptions {
  38. return new FetchServiceOptions($twilioAuthySandboxMode);
  39. }
  40. /**
  41. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  42. * request header
  43. * @return ReadServiceOptions Options builder
  44. */
  45. public static function read(string $twilioAuthySandboxMode = Values::NONE): ReadServiceOptions {
  46. return new ReadServiceOptions($twilioAuthySandboxMode);
  47. }
  48. /**
  49. * @param string $friendlyName A human readable description of this resource.
  50. * @param string $push Optional service level push factors configuration
  51. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  52. * request header
  53. * @return UpdateServiceOptions Options builder
  54. */
  55. public static function update(string $friendlyName = Values::NONE, string $push = Values::NONE, string $twilioAuthySandboxMode = Values::NONE): UpdateServiceOptions {
  56. return new UpdateServiceOptions($friendlyName, $push, $twilioAuthySandboxMode);
  57. }
  58. }
  59. class CreateServiceOptions extends Options {
  60. /**
  61. * @param string $push Optional service level push factors configuration
  62. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  63. * request header
  64. */
  65. public function __construct(string $push = Values::NONE, string $twilioAuthySandboxMode = Values::NONE) {
  66. $this->options['push'] = $push;
  67. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  68. }
  69. /**
  70. * The optional service level push factors configuration. If present it must be a json string with the following format: {"notify_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "include_date": true}
  71. *
  72. * @param string $push Optional service level push factors configuration
  73. * @return $this Fluent Builder
  74. */
  75. public function setPush(string $push): self {
  76. $this->options['push'] = $push;
  77. return $this;
  78. }
  79. /**
  80. * The Twilio-Authy-Sandbox-Mode HTTP request header
  81. *
  82. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  83. * request header
  84. * @return $this Fluent Builder
  85. */
  86. public function setTwilioAuthySandboxMode(string $twilioAuthySandboxMode): self {
  87. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  88. return $this;
  89. }
  90. /**
  91. * Provide a friendly representation
  92. *
  93. * @return string Machine friendly representation
  94. */
  95. public function __toString(): string {
  96. $options = \http_build_query(Values::of($this->options), '', ' ');
  97. return '[Twilio.Authy.V1.CreateServiceOptions ' . $options . ']';
  98. }
  99. }
  100. class DeleteServiceOptions extends Options {
  101. /**
  102. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  103. * request header
  104. */
  105. public function __construct(string $twilioAuthySandboxMode = Values::NONE) {
  106. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  107. }
  108. /**
  109. * The Twilio-Authy-Sandbox-Mode HTTP request header
  110. *
  111. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  112. * request header
  113. * @return $this Fluent Builder
  114. */
  115. public function setTwilioAuthySandboxMode(string $twilioAuthySandboxMode): self {
  116. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  117. return $this;
  118. }
  119. /**
  120. * Provide a friendly representation
  121. *
  122. * @return string Machine friendly representation
  123. */
  124. public function __toString(): string {
  125. $options = \http_build_query(Values::of($this->options), '', ' ');
  126. return '[Twilio.Authy.V1.DeleteServiceOptions ' . $options . ']';
  127. }
  128. }
  129. class FetchServiceOptions extends Options {
  130. /**
  131. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  132. * request header
  133. */
  134. public function __construct(string $twilioAuthySandboxMode = Values::NONE) {
  135. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  136. }
  137. /**
  138. * The Twilio-Authy-Sandbox-Mode HTTP request header
  139. *
  140. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  141. * request header
  142. * @return $this Fluent Builder
  143. */
  144. public function setTwilioAuthySandboxMode(string $twilioAuthySandboxMode): self {
  145. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  146. return $this;
  147. }
  148. /**
  149. * Provide a friendly representation
  150. *
  151. * @return string Machine friendly representation
  152. */
  153. public function __toString(): string {
  154. $options = \http_build_query(Values::of($this->options), '', ' ');
  155. return '[Twilio.Authy.V1.FetchServiceOptions ' . $options . ']';
  156. }
  157. }
  158. class ReadServiceOptions extends Options {
  159. /**
  160. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  161. * request header
  162. */
  163. public function __construct(string $twilioAuthySandboxMode = Values::NONE) {
  164. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  165. }
  166. /**
  167. * The Twilio-Authy-Sandbox-Mode HTTP request header
  168. *
  169. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  170. * request header
  171. * @return $this Fluent Builder
  172. */
  173. public function setTwilioAuthySandboxMode(string $twilioAuthySandboxMode): self {
  174. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  175. return $this;
  176. }
  177. /**
  178. * Provide a friendly representation
  179. *
  180. * @return string Machine friendly representation
  181. */
  182. public function __toString(): string {
  183. $options = \http_build_query(Values::of($this->options), '', ' ');
  184. return '[Twilio.Authy.V1.ReadServiceOptions ' . $options . ']';
  185. }
  186. }
  187. class UpdateServiceOptions extends Options {
  188. /**
  189. * @param string $friendlyName A human readable description of this resource.
  190. * @param string $push Optional service level push factors configuration
  191. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  192. * request header
  193. */
  194. public function __construct(string $friendlyName = Values::NONE, string $push = Values::NONE, string $twilioAuthySandboxMode = Values::NONE) {
  195. $this->options['friendlyName'] = $friendlyName;
  196. $this->options['push'] = $push;
  197. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  198. }
  199. /**
  200. * A human readable description of this resource, up to 64 characters.
  201. *
  202. * @param string $friendlyName A human readable description of this resource.
  203. * @return $this Fluent Builder
  204. */
  205. public function setFriendlyName(string $friendlyName): self {
  206. $this->options['friendlyName'] = $friendlyName;
  207. return $this;
  208. }
  209. /**
  210. * The optional service level push factors configuration. If present it must be a json string with the following format: {"notify_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "include_date": true}
  211. *
  212. * @param string $push Optional service level push factors configuration
  213. * @return $this Fluent Builder
  214. */
  215. public function setPush(string $push): self {
  216. $this->options['push'] = $push;
  217. return $this;
  218. }
  219. /**
  220. * The Twilio-Authy-Sandbox-Mode HTTP request header
  221. *
  222. * @param string $twilioAuthySandboxMode The Twilio-Authy-Sandbox-Mode HTTP
  223. * request header
  224. * @return $this Fluent Builder
  225. */
  226. public function setTwilioAuthySandboxMode(string $twilioAuthySandboxMode): self {
  227. $this->options['twilioAuthySandboxMode'] = $twilioAuthySandboxMode;
  228. return $this;
  229. }
  230. /**
  231. * Provide a friendly representation
  232. *
  233. * @return string Machine friendly representation
  234. */
  235. public function __toString(): string {
  236. $options = \http_build_query(Values::of($this->options), '', ' ');
  237. return '[Twilio.Authy.V1.UpdateServiceOptions ' . $options . ']';
  238. }
  239. }