PageRenderTime 60ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://bitbucket.org/RickCalder/durawp_new
PHP | 548 lines | 242 code | 59 blank | 247 comment | 12 complexity | 8425e3871ea099aeb0be56bd37c960b6 MD5 | raw file
Possible License(s): GPL-3.0, BSD-3-Clause, Apache-2.0, 0BSD
  1. <?php
  2. /**
  3. * GetExtendedList
  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. * GetExtendedList 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 GetExtendedList 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 = 'getExtendedList';
  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. 'totalBlacklisted' => 'int',
  56. 'totalSubscribers' => 'int',
  57. 'folderId' => 'int',
  58. 'createdAt' => '\DateTime',
  59. 'campaignStats' => '\SendinBlue\Client\Model\GetExtendedListCampaignStats[]',
  60. 'dynamicList' => 'bool'
  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. 'totalBlacklisted' => 'int64',
  71. 'totalSubscribers' => 'int64',
  72. 'folderId' => 'int64',
  73. 'createdAt' => 'date-time',
  74. 'campaignStats' => null,
  75. 'dynamicList' => null
  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. 'totalBlacklisted' => 'totalBlacklisted',
  105. 'totalSubscribers' => 'totalSubscribers',
  106. 'folderId' => 'folderId',
  107. 'createdAt' => 'createdAt',
  108. 'campaignStats' => 'campaignStats',
  109. 'dynamicList' => 'dynamicList'
  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. 'totalBlacklisted' => 'setTotalBlacklisted',
  120. 'totalSubscribers' => 'setTotalSubscribers',
  121. 'folderId' => 'setFolderId',
  122. 'createdAt' => 'setCreatedAt',
  123. 'campaignStats' => 'setCampaignStats',
  124. 'dynamicList' => 'setDynamicList'
  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. 'totalBlacklisted' => 'getTotalBlacklisted',
  135. 'totalSubscribers' => 'getTotalSubscribers',
  136. 'folderId' => 'getFolderId',
  137. 'createdAt' => 'getCreatedAt',
  138. 'campaignStats' => 'getCampaignStats',
  139. 'dynamicList' => 'getDynamicList'
  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. /**
  179. * Associative array for storing property values
  180. *
  181. * @var mixed[]
  182. */
  183. protected $container = [];
  184. /**
  185. * Constructor
  186. *
  187. * @param mixed[] $data Associated array of property values
  188. * initializing the model
  189. */
  190. public function __construct(array $data = null)
  191. {
  192. $this->container['id'] = isset($data['id']) ? $data['id'] : null;
  193. $this->container['name'] = isset($data['name']) ? $data['name'] : null;
  194. $this->container['totalBlacklisted'] = isset($data['totalBlacklisted']) ? $data['totalBlacklisted'] : null;
  195. $this->container['totalSubscribers'] = isset($data['totalSubscribers']) ? $data['totalSubscribers'] : null;
  196. $this->container['folderId'] = isset($data['folderId']) ? $data['folderId'] : null;
  197. $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null;
  198. $this->container['campaignStats'] = isset($data['campaignStats']) ? $data['campaignStats'] : null;
  199. $this->container['dynamicList'] = isset($data['dynamicList']) ? $data['dynamicList'] : null;
  200. }
  201. /**
  202. * Show all the invalid properties with reasons.
  203. *
  204. * @return array invalid properties with reasons
  205. */
  206. public function listInvalidProperties()
  207. {
  208. $invalidProperties = [];
  209. if ($this->container['id'] === null) {
  210. $invalidProperties[] = "'id' can't be null";
  211. }
  212. if ($this->container['name'] === null) {
  213. $invalidProperties[] = "'name' can't be null";
  214. }
  215. if ($this->container['totalBlacklisted'] === null) {
  216. $invalidProperties[] = "'totalBlacklisted' can't be null";
  217. }
  218. if ($this->container['totalSubscribers'] === null) {
  219. $invalidProperties[] = "'totalSubscribers' can't be null";
  220. }
  221. if ($this->container['folderId'] === null) {
  222. $invalidProperties[] = "'folderId' can't be null";
  223. }
  224. if ($this->container['createdAt'] === null) {
  225. $invalidProperties[] = "'createdAt' can't be null";
  226. }
  227. return $invalidProperties;
  228. }
  229. /**
  230. * Validate all the properties in the model
  231. * return true if all passed
  232. *
  233. * @return bool True if all properties are valid
  234. */
  235. public function valid()
  236. {
  237. if ($this->container['id'] === null) {
  238. return false;
  239. }
  240. if ($this->container['name'] === null) {
  241. return false;
  242. }
  243. if ($this->container['totalBlacklisted'] === null) {
  244. return false;
  245. }
  246. if ($this->container['totalSubscribers'] === null) {
  247. return false;
  248. }
  249. if ($this->container['folderId'] === null) {
  250. return false;
  251. }
  252. if ($this->container['createdAt'] === null) {
  253. return false;
  254. }
  255. return true;
  256. }
  257. /**
  258. * Gets id
  259. *
  260. * @return int
  261. */
  262. public function getId()
  263. {
  264. return $this->container['id'];
  265. }
  266. /**
  267. * Sets id
  268. *
  269. * @param int $id ID of the list
  270. *
  271. * @return $this
  272. */
  273. public function setId($id)
  274. {
  275. $this->container['id'] = $id;
  276. return $this;
  277. }
  278. /**
  279. * Gets name
  280. *
  281. * @return string
  282. */
  283. public function getName()
  284. {
  285. return $this->container['name'];
  286. }
  287. /**
  288. * Sets name
  289. *
  290. * @param string $name Name of the list
  291. *
  292. * @return $this
  293. */
  294. public function setName($name)
  295. {
  296. $this->container['name'] = $name;
  297. return $this;
  298. }
  299. /**
  300. * Gets totalBlacklisted
  301. *
  302. * @return int
  303. */
  304. public function getTotalBlacklisted()
  305. {
  306. return $this->container['totalBlacklisted'];
  307. }
  308. /**
  309. * Sets totalBlacklisted
  310. *
  311. * @param int $totalBlacklisted Number of blacklisted contacts in the list
  312. *
  313. * @return $this
  314. */
  315. public function setTotalBlacklisted($totalBlacklisted)
  316. {
  317. $this->container['totalBlacklisted'] = $totalBlacklisted;
  318. return $this;
  319. }
  320. /**
  321. * Gets totalSubscribers
  322. *
  323. * @return int
  324. */
  325. public function getTotalSubscribers()
  326. {
  327. return $this->container['totalSubscribers'];
  328. }
  329. /**
  330. * Sets totalSubscribers
  331. *
  332. * @param int $totalSubscribers Number of contacts in the list
  333. *
  334. * @return $this
  335. */
  336. public function setTotalSubscribers($totalSubscribers)
  337. {
  338. $this->container['totalSubscribers'] = $totalSubscribers;
  339. return $this;
  340. }
  341. /**
  342. * Gets folderId
  343. *
  344. * @return int
  345. */
  346. public function getFolderId()
  347. {
  348. return $this->container['folderId'];
  349. }
  350. /**
  351. * Sets folderId
  352. *
  353. * @param int $folderId ID of the folder
  354. *
  355. * @return $this
  356. */
  357. public function setFolderId($folderId)
  358. {
  359. $this->container['folderId'] = $folderId;
  360. return $this;
  361. }
  362. /**
  363. * Gets createdAt
  364. *
  365. * @return \DateTime
  366. */
  367. public function getCreatedAt()
  368. {
  369. return $this->container['createdAt'];
  370. }
  371. /**
  372. * Sets createdAt
  373. *
  374. * @param \DateTime $createdAt Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ)
  375. *
  376. * @return $this
  377. */
  378. public function setCreatedAt($createdAt)
  379. {
  380. $this->container['createdAt'] = $createdAt;
  381. return $this;
  382. }
  383. /**
  384. * Gets campaignStats
  385. *
  386. * @return \SendinBlue\Client\Model\GetExtendedListCampaignStats[]
  387. */
  388. public function getCampaignStats()
  389. {
  390. return $this->container['campaignStats'];
  391. }
  392. /**
  393. * Sets campaignStats
  394. *
  395. * @param \SendinBlue\Client\Model\GetExtendedListCampaignStats[] $campaignStats campaignStats
  396. *
  397. * @return $this
  398. */
  399. public function setCampaignStats($campaignStats)
  400. {
  401. $this->container['campaignStats'] = $campaignStats;
  402. return $this;
  403. }
  404. /**
  405. * Gets dynamicList
  406. *
  407. * @return bool
  408. */
  409. public function getDynamicList()
  410. {
  411. return $this->container['dynamicList'];
  412. }
  413. /**
  414. * Sets dynamicList
  415. *
  416. * @param bool $dynamicList Status telling if the list is dynamic or not (true=dynamic, false=not dynamic)
  417. *
  418. * @return $this
  419. */
  420. public function setDynamicList($dynamicList)
  421. {
  422. $this->container['dynamicList'] = $dynamicList;
  423. return $this;
  424. }
  425. /**
  426. * Returns true if offset exists. False otherwise.
  427. *
  428. * @param integer $offset Offset
  429. *
  430. * @return boolean
  431. */
  432. public function offsetExists($offset)
  433. {
  434. return isset($this->container[$offset]);
  435. }
  436. /**
  437. * Gets offset.
  438. *
  439. * @param integer $offset Offset
  440. *
  441. * @return mixed
  442. */
  443. public function offsetGet($offset)
  444. {
  445. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  446. }
  447. /**
  448. * Sets value based on offset.
  449. *
  450. * @param integer $offset Offset
  451. * @param mixed $value Value to be set
  452. *
  453. * @return void
  454. */
  455. public function offsetSet($offset, $value)
  456. {
  457. if (is_null($offset)) {
  458. $this->container[] = $value;
  459. } else {
  460. $this->container[$offset] = $value;
  461. }
  462. }
  463. /**
  464. * Unsets offset.
  465. *
  466. * @param integer $offset Offset
  467. *
  468. * @return void
  469. */
  470. public function offsetUnset($offset)
  471. {
  472. unset($this->container[$offset]);
  473. }
  474. /**
  475. * Gets the string presentation of the object
  476. *
  477. * @return string
  478. */
  479. public function __toString()
  480. {
  481. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  482. return json_encode(
  483. ObjectSerializer::sanitizeForSerialization($this),
  484. JSON_PRETTY_PRINT
  485. );
  486. }
  487. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  488. }
  489. }