PageRenderTime 28ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/wp-mail-smtp/vendor/sendinblue/api-v3-sdk/lib/Model/GetSmsCampaignOverview.php

https://bitbucket.org/RickCalder/durawp_new
PHP | 604 lines | 292 code | 60 blank | 252 comment | 18 complexity | c6c760a58a31547a36dfe82fefacf78b MD5 | raw file
Possible License(s): GPL-3.0, BSD-3-Clause, Apache-2.0, 0BSD
  1. <?php
  2. /**
  3. * GetSmsCampaignOverview
  4. *
  5. * PHP version 5
  6. *
  7. * @category Class
  8. * @package SendinBlue\Client
  9. * @author Swagger Codegen team
  10. * @link https://github.com/swagger-api/swagger-codegen
  11. */
  12. /**
  13. * SendinBlue API
  14. *
  15. * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
  16. *
  17. * OpenAPI spec version: 3.0.0
  18. * Contact: contact@sendinblue.com
  19. * Generated by: https://github.com/swagger-api/swagger-codegen.git
  20. * Swagger Codegen version: 2.3.1
  21. */
  22. /**
  23. * NOTE: This class is auto generated by the swagger code generator program.
  24. * https://github.com/swagger-api/swagger-codegen
  25. * Do not edit the class manually.
  26. */
  27. namespace SendinBlue\Client\Model;
  28. use \ArrayAccess;
  29. use \SendinBlue\Client\ObjectSerializer;
  30. /**
  31. * GetSmsCampaignOverview Class Doc Comment
  32. *
  33. * @category Class
  34. * @package SendinBlue\Client
  35. * @author Swagger Codegen team
  36. * @link https://github.com/swagger-api/swagger-codegen
  37. */
  38. class GetSmsCampaignOverview implements ModelInterface, ArrayAccess
  39. {
  40. const DISCRIMINATOR = null;
  41. /**
  42. * The original name of the model.
  43. *
  44. * @var string
  45. */
  46. protected static $swaggerModelName = 'getSmsCampaignOverview';
  47. /**
  48. * Array of property to type mappings. Used for (de)serialization
  49. *
  50. * @var string[]
  51. */
  52. protected static $swaggerTypes = [
  53. 'id' => 'int',
  54. 'name' => 'string',
  55. 'status' => 'string',
  56. 'content' => 'string',
  57. 'scheduledAt' => '\DateTime',
  58. 'sender' => 'string',
  59. 'createdAt' => '\DateTime',
  60. 'modifiedAt' => '\DateTime'
  61. ];
  62. /**
  63. * Array of property to format mappings. Used for (de)serialization
  64. *
  65. * @var string[]
  66. */
  67. protected static $swaggerFormats = [
  68. 'id' => 'int64',
  69. 'name' => null,
  70. 'status' => null,
  71. 'content' => null,
  72. 'scheduledAt' => 'date-time',
  73. 'sender' => null,
  74. 'createdAt' => 'date-time',
  75. 'modifiedAt' => 'date-time'
  76. ];
  77. /**
  78. * Array of property to type mappings. Used for (de)serialization
  79. *
  80. * @return array
  81. */
  82. public static function swaggerTypes()
  83. {
  84. return self::$swaggerTypes;
  85. }
  86. /**
  87. * Array of property to format mappings. Used for (de)serialization
  88. *
  89. * @return array
  90. */
  91. public static function swaggerFormats()
  92. {
  93. return self::$swaggerFormats;
  94. }
  95. /**
  96. * Array of attributes where the key is the local name,
  97. * and the value is the original name
  98. *
  99. * @var string[]
  100. */
  101. protected static $attributeMap = [
  102. 'id' => 'id',
  103. 'name' => 'name',
  104. 'status' => 'status',
  105. 'content' => 'content',
  106. 'scheduledAt' => 'scheduledAt',
  107. 'sender' => 'sender',
  108. 'createdAt' => 'createdAt',
  109. 'modifiedAt' => 'modifiedAt'
  110. ];
  111. /**
  112. * Array of attributes to setter functions (for deserialization of responses)
  113. *
  114. * @var string[]
  115. */
  116. protected static $setters = [
  117. 'id' => 'setId',
  118. 'name' => 'setName',
  119. 'status' => 'setStatus',
  120. 'content' => 'setContent',
  121. 'scheduledAt' => 'setScheduledAt',
  122. 'sender' => 'setSender',
  123. 'createdAt' => 'setCreatedAt',
  124. 'modifiedAt' => 'setModifiedAt'
  125. ];
  126. /**
  127. * Array of attributes to getter functions (for serialization of requests)
  128. *
  129. * @var string[]
  130. */
  131. protected static $getters = [
  132. 'id' => 'getId',
  133. 'name' => 'getName',
  134. 'status' => 'getStatus',
  135. 'content' => 'getContent',
  136. 'scheduledAt' => 'getScheduledAt',
  137. 'sender' => 'getSender',
  138. 'createdAt' => 'getCreatedAt',
  139. 'modifiedAt' => 'getModifiedAt'
  140. ];
  141. /**
  142. * Array of attributes where the key is the local name,
  143. * and the value is the original name
  144. *
  145. * @return array
  146. */
  147. public static function attributeMap()
  148. {
  149. return self::$attributeMap;
  150. }
  151. /**
  152. * Array of attributes to setter functions (for deserialization of responses)
  153. *
  154. * @return array
  155. */
  156. public static function setters()
  157. {
  158. return self::$setters;
  159. }
  160. /**
  161. * Array of attributes to getter functions (for serialization of requests)
  162. *
  163. * @return array
  164. */
  165. public static function getters()
  166. {
  167. return self::$getters;
  168. }
  169. /**
  170. * The original name of the model.
  171. *
  172. * @return string
  173. */
  174. public function getModelName()
  175. {
  176. return self::$swaggerModelName;
  177. }
  178. const STATUS_DRAFT = 'draft';
  179. const STATUS_SENT = 'sent';
  180. const STATUS_ARCHIVE = 'archive';
  181. const STATUS_QUEUED = 'queued';
  182. const STATUS_SUSPENDED = 'suspended';
  183. const STATUS_IN_PROCESS = 'inProcess';
  184. /**
  185. * Gets allowable values of the enum
  186. *
  187. * @return string[]
  188. */
  189. public function getStatusAllowableValues()
  190. {
  191. return [
  192. self::STATUS_DRAFT,
  193. self::STATUS_SENT,
  194. self::STATUS_ARCHIVE,
  195. self::STATUS_QUEUED,
  196. self::STATUS_SUSPENDED,
  197. self::STATUS_IN_PROCESS,
  198. ];
  199. }
  200. /**
  201. * Associative array for storing property values
  202. *
  203. * @var mixed[]
  204. */
  205. protected $container = [];
  206. /**
  207. * Constructor
  208. *
  209. * @param mixed[] $data Associated array of property values
  210. * initializing the model
  211. */
  212. public function __construct(array $data = null)
  213. {
  214. $this->container['id'] = isset($data['id']) ? $data['id'] : null;
  215. $this->container['name'] = isset($data['name']) ? $data['name'] : null;
  216. $this->container['status'] = isset($data['status']) ? $data['status'] : null;
  217. $this->container['content'] = isset($data['content']) ? $data['content'] : null;
  218. $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null;
  219. $this->container['sender'] = isset($data['sender']) ? $data['sender'] : null;
  220. $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null;
  221. $this->container['modifiedAt'] = isset($data['modifiedAt']) ? $data['modifiedAt'] : null;
  222. }
  223. /**
  224. * Show all the invalid properties with reasons.
  225. *
  226. * @return array invalid properties with reasons
  227. */
  228. public function listInvalidProperties()
  229. {
  230. $invalidProperties = [];
  231. if ($this->container['id'] === null) {
  232. $invalidProperties[] = "'id' can't be null";
  233. }
  234. if ($this->container['name'] === null) {
  235. $invalidProperties[] = "'name' can't be null";
  236. }
  237. if ($this->container['status'] === null) {
  238. $invalidProperties[] = "'status' can't be null";
  239. }
  240. $allowedValues = $this->getStatusAllowableValues();
  241. if (!in_array($this->container['status'], $allowedValues)) {
  242. $invalidProperties[] = sprintf(
  243. "invalid value for 'status', must be one of '%s'",
  244. implode("', '", $allowedValues)
  245. );
  246. }
  247. if ($this->container['content'] === null) {
  248. $invalidProperties[] = "'content' can't be null";
  249. }
  250. if ($this->container['scheduledAt'] === null) {
  251. $invalidProperties[] = "'scheduledAt' can't be null";
  252. }
  253. if ($this->container['sender'] === null) {
  254. $invalidProperties[] = "'sender' can't be null";
  255. }
  256. if ($this->container['createdAt'] === null) {
  257. $invalidProperties[] = "'createdAt' can't be null";
  258. }
  259. if ($this->container['modifiedAt'] === null) {
  260. $invalidProperties[] = "'modifiedAt' can't be null";
  261. }
  262. return $invalidProperties;
  263. }
  264. /**
  265. * Validate all the properties in the model
  266. * return true if all passed
  267. *
  268. * @return bool True if all properties are valid
  269. */
  270. public function valid()
  271. {
  272. if ($this->container['id'] === null) {
  273. return false;
  274. }
  275. if ($this->container['name'] === null) {
  276. return false;
  277. }
  278. if ($this->container['status'] === null) {
  279. return false;
  280. }
  281. $allowedValues = $this->getStatusAllowableValues();
  282. if (!in_array($this->container['status'], $allowedValues)) {
  283. return false;
  284. }
  285. if ($this->container['content'] === null) {
  286. return false;
  287. }
  288. if ($this->container['scheduledAt'] === null) {
  289. return false;
  290. }
  291. if ($this->container['sender'] === null) {
  292. return false;
  293. }
  294. if ($this->container['createdAt'] === null) {
  295. return false;
  296. }
  297. if ($this->container['modifiedAt'] === null) {
  298. return false;
  299. }
  300. return true;
  301. }
  302. /**
  303. * Gets id
  304. *
  305. * @return int
  306. */
  307. public function getId()
  308. {
  309. return $this->container['id'];
  310. }
  311. /**
  312. * Sets id
  313. *
  314. * @param int $id ID of the SMS Campaign
  315. *
  316. * @return $this
  317. */
  318. public function setId($id)
  319. {
  320. $this->container['id'] = $id;
  321. return $this;
  322. }
  323. /**
  324. * Gets name
  325. *
  326. * @return string
  327. */
  328. public function getName()
  329. {
  330. return $this->container['name'];
  331. }
  332. /**
  333. * Sets name
  334. *
  335. * @param string $name Name of the SMS Campaign
  336. *
  337. * @return $this
  338. */
  339. public function setName($name)
  340. {
  341. $this->container['name'] = $name;
  342. return $this;
  343. }
  344. /**
  345. * Gets status
  346. *
  347. * @return string
  348. */
  349. public function getStatus()
  350. {
  351. return $this->container['status'];
  352. }
  353. /**
  354. * Sets status
  355. *
  356. * @param string $status Status of the SMS Campaign
  357. *
  358. * @return $this
  359. */
  360. public function setStatus($status)
  361. {
  362. $allowedValues = $this->getStatusAllowableValues();
  363. if (!in_array($status, $allowedValues)) {
  364. throw new \InvalidArgumentException(
  365. sprintf(
  366. "Invalid value for 'status', must be one of '%s'",
  367. implode("', '", $allowedValues)
  368. )
  369. );
  370. }
  371. $this->container['status'] = $status;
  372. return $this;
  373. }
  374. /**
  375. * Gets content
  376. *
  377. * @return string
  378. */
  379. public function getContent()
  380. {
  381. return $this->container['content'];
  382. }
  383. /**
  384. * Sets content
  385. *
  386. * @param string $content Content of the SMS Campaign
  387. *
  388. * @return $this
  389. */
  390. public function setContent($content)
  391. {
  392. $this->container['content'] = $content;
  393. return $this;
  394. }
  395. /**
  396. * Gets scheduledAt
  397. *
  398. * @return \DateTime
  399. */
  400. public function getScheduledAt()
  401. {
  402. return $this->container['scheduledAt'];
  403. }
  404. /**
  405. * Sets scheduledAt
  406. *
  407. * @param \DateTime $scheduledAt UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format
  408. *
  409. * @return $this
  410. */
  411. public function setScheduledAt($scheduledAt)
  412. {
  413. $this->container['scheduledAt'] = $scheduledAt;
  414. return $this;
  415. }
  416. /**
  417. * Gets sender
  418. *
  419. * @return string
  420. */
  421. public function getSender()
  422. {
  423. return $this->container['sender'];
  424. }
  425. /**
  426. * Sets sender
  427. *
  428. * @param string $sender Sender of the SMS Campaign
  429. *
  430. * @return $this
  431. */
  432. public function setSender($sender)
  433. {
  434. $this->container['sender'] = $sender;
  435. return $this;
  436. }
  437. /**
  438. * Gets createdAt
  439. *
  440. * @return \DateTime
  441. */
  442. public function getCreatedAt()
  443. {
  444. return $this->container['createdAt'];
  445. }
  446. /**
  447. * Sets createdAt
  448. *
  449. * @param \DateTime $createdAt Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
  450. *
  451. * @return $this
  452. */
  453. public function setCreatedAt($createdAt)
  454. {
  455. $this->container['createdAt'] = $createdAt;
  456. return $this;
  457. }
  458. /**
  459. * Gets modifiedAt
  460. *
  461. * @return \DateTime
  462. */
  463. public function getModifiedAt()
  464. {
  465. return $this->container['modifiedAt'];
  466. }
  467. /**
  468. * Sets modifiedAt
  469. *
  470. * @param \DateTime $modifiedAt UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
  471. *
  472. * @return $this
  473. */
  474. public function setModifiedAt($modifiedAt)
  475. {
  476. $this->container['modifiedAt'] = $modifiedAt;
  477. return $this;
  478. }
  479. /**
  480. * Returns true if offset exists. False otherwise.
  481. *
  482. * @param integer $offset Offset
  483. *
  484. * @return boolean
  485. */
  486. public function offsetExists($offset)
  487. {
  488. return isset($this->container[$offset]);
  489. }
  490. /**
  491. * Gets offset.
  492. *
  493. * @param integer $offset Offset
  494. *
  495. * @return mixed
  496. */
  497. public function offsetGet($offset)
  498. {
  499. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  500. }
  501. /**
  502. * Sets value based on offset.
  503. *
  504. * @param integer $offset Offset
  505. * @param mixed $value Value to be set
  506. *
  507. * @return void
  508. */
  509. public function offsetSet($offset, $value)
  510. {
  511. if (is_null($offset)) {
  512. $this->container[] = $value;
  513. } else {
  514. $this->container[$offset] = $value;
  515. }
  516. }
  517. /**
  518. * Unsets offset.
  519. *
  520. * @param integer $offset Offset
  521. *
  522. * @return void
  523. */
  524. public function offsetUnset($offset)
  525. {
  526. unset($this->container[$offset]);
  527. }
  528. /**
  529. * Gets the string presentation of the object
  530. *
  531. * @return string
  532. */
  533. public function __toString()
  534. {
  535. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  536. return json_encode(
  537. ObjectSerializer::sanitizeForSerialization($this),
  538. JSON_PRETTY_PRINT
  539. );
  540. }
  541. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  542. }
  543. }