/vendor/sendinblue/api-v3-sdk/lib/Model/GetTransacSmsReportReports.php

https://gitlab.com/i-have-a-green/digitemis-v3 · PHP · 601 lines · 266 code · 64 blank · 271 comment · 8 complexity · 3463dbdc76f6c132220179cae7657b52 MD5 · raw file

  1. <?php
  2. /**
  3. * GetTransacSmsReportReports
  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 | | 406 | Error. Not Acceptable |
  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.4.12
  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. * GetTransacSmsReportReports 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 GetTransacSmsReportReports 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 = 'getTransacSmsReport_reports';
  47. /**
  48. * Array of property to type mappings. Used for (de)serialization
  49. *
  50. * @var string[]
  51. */
  52. protected static $swaggerTypes = [
  53. 'date' => '\DateTime',
  54. 'requests' => 'int',
  55. 'delivered' => 'int',
  56. 'hardBounces' => 'int',
  57. 'softBounces' => 'int',
  58. 'blocked' => 'int',
  59. 'unsubscribed' => 'int',
  60. 'replied' => 'int',
  61. 'accepted' => 'int',
  62. 'rejected' => 'int'
  63. ];
  64. /**
  65. * Array of property to format mappings. Used for (de)serialization
  66. *
  67. * @var string[]
  68. */
  69. protected static $swaggerFormats = [
  70. 'date' => 'date',
  71. 'requests' => 'int64',
  72. 'delivered' => 'int64',
  73. 'hardBounces' => 'int64',
  74. 'softBounces' => 'int64',
  75. 'blocked' => 'int64',
  76. 'unsubscribed' => 'int64',
  77. 'replied' => 'int64',
  78. 'accepted' => 'int64',
  79. 'rejected' => 'int64'
  80. ];
  81. /**
  82. * Array of property to type mappings. Used for (de)serialization
  83. *
  84. * @return array
  85. */
  86. public static function swaggerTypes()
  87. {
  88. return self::$swaggerTypes;
  89. }
  90. /**
  91. * Array of property to format mappings. Used for (de)serialization
  92. *
  93. * @return array
  94. */
  95. public static function swaggerFormats()
  96. {
  97. return self::$swaggerFormats;
  98. }
  99. /**
  100. * Array of attributes where the key is the local name,
  101. * and the value is the original name
  102. *
  103. * @var string[]
  104. */
  105. protected static $attributeMap = [
  106. 'date' => 'date',
  107. 'requests' => 'requests',
  108. 'delivered' => 'delivered',
  109. 'hardBounces' => 'hardBounces',
  110. 'softBounces' => 'softBounces',
  111. 'blocked' => 'blocked',
  112. 'unsubscribed' => 'unsubscribed',
  113. 'replied' => 'replied',
  114. 'accepted' => 'accepted',
  115. 'rejected' => 'rejected'
  116. ];
  117. /**
  118. * Array of attributes to setter functions (for deserialization of responses)
  119. *
  120. * @var string[]
  121. */
  122. protected static $setters = [
  123. 'date' => 'setDate',
  124. 'requests' => 'setRequests',
  125. 'delivered' => 'setDelivered',
  126. 'hardBounces' => 'setHardBounces',
  127. 'softBounces' => 'setSoftBounces',
  128. 'blocked' => 'setBlocked',
  129. 'unsubscribed' => 'setUnsubscribed',
  130. 'replied' => 'setReplied',
  131. 'accepted' => 'setAccepted',
  132. 'rejected' => 'setRejected'
  133. ];
  134. /**
  135. * Array of attributes to getter functions (for serialization of requests)
  136. *
  137. * @var string[]
  138. */
  139. protected static $getters = [
  140. 'date' => 'getDate',
  141. 'requests' => 'getRequests',
  142. 'delivered' => 'getDelivered',
  143. 'hardBounces' => 'getHardBounces',
  144. 'softBounces' => 'getSoftBounces',
  145. 'blocked' => 'getBlocked',
  146. 'unsubscribed' => 'getUnsubscribed',
  147. 'replied' => 'getReplied',
  148. 'accepted' => 'getAccepted',
  149. 'rejected' => 'getRejected'
  150. ];
  151. /**
  152. * Array of attributes where the key is the local name,
  153. * and the value is the original name
  154. *
  155. * @return array
  156. */
  157. public static function attributeMap()
  158. {
  159. return self::$attributeMap;
  160. }
  161. /**
  162. * Array of attributes to setter functions (for deserialization of responses)
  163. *
  164. * @return array
  165. */
  166. public static function setters()
  167. {
  168. return self::$setters;
  169. }
  170. /**
  171. * Array of attributes to getter functions (for serialization of requests)
  172. *
  173. * @return array
  174. */
  175. public static function getters()
  176. {
  177. return self::$getters;
  178. }
  179. /**
  180. * The original name of the model.
  181. *
  182. * @return string
  183. */
  184. public function getModelName()
  185. {
  186. return self::$swaggerModelName;
  187. }
  188. /**
  189. * Associative array for storing property values
  190. *
  191. * @var mixed[]
  192. */
  193. protected $container = [];
  194. /**
  195. * Constructor
  196. *
  197. * @param mixed[] $data Associated array of property values
  198. * initializing the model
  199. */
  200. public function __construct(array $data = null)
  201. {
  202. $this->container['date'] = isset($data['date']) ? $data['date'] : null;
  203. $this->container['requests'] = isset($data['requests']) ? $data['requests'] : null;
  204. $this->container['delivered'] = isset($data['delivered']) ? $data['delivered'] : null;
  205. $this->container['hardBounces'] = isset($data['hardBounces']) ? $data['hardBounces'] : null;
  206. $this->container['softBounces'] = isset($data['softBounces']) ? $data['softBounces'] : null;
  207. $this->container['blocked'] = isset($data['blocked']) ? $data['blocked'] : null;
  208. $this->container['unsubscribed'] = isset($data['unsubscribed']) ? $data['unsubscribed'] : null;
  209. $this->container['replied'] = isset($data['replied']) ? $data['replied'] : null;
  210. $this->container['accepted'] = isset($data['accepted']) ? $data['accepted'] : null;
  211. $this->container['rejected'] = isset($data['rejected']) ? $data['rejected'] : null;
  212. }
  213. /**
  214. * Show all the invalid properties with reasons.
  215. *
  216. * @return array invalid properties with reasons
  217. */
  218. public function listInvalidProperties()
  219. {
  220. $invalidProperties = [];
  221. if ($this->container['date'] === null) {
  222. $invalidProperties[] = "'date' can't be null";
  223. }
  224. if ($this->container['requests'] === null) {
  225. $invalidProperties[] = "'requests' can't be null";
  226. }
  227. if ($this->container['delivered'] === null) {
  228. $invalidProperties[] = "'delivered' can't be null";
  229. }
  230. if ($this->container['hardBounces'] === null) {
  231. $invalidProperties[] = "'hardBounces' can't be null";
  232. }
  233. if ($this->container['softBounces'] === null) {
  234. $invalidProperties[] = "'softBounces' can't be null";
  235. }
  236. if ($this->container['blocked'] === null) {
  237. $invalidProperties[] = "'blocked' can't be null";
  238. }
  239. if ($this->container['unsubscribed'] === null) {
  240. $invalidProperties[] = "'unsubscribed' can't be null";
  241. }
  242. if ($this->container['replied'] === null) {
  243. $invalidProperties[] = "'replied' can't be null";
  244. }
  245. if ($this->container['accepted'] === null) {
  246. $invalidProperties[] = "'accepted' can't be null";
  247. }
  248. if ($this->container['rejected'] === null) {
  249. $invalidProperties[] = "'rejected' can't be null";
  250. }
  251. return $invalidProperties;
  252. }
  253. /**
  254. * Validate all the properties in the model
  255. * return true if all passed
  256. *
  257. * @return bool True if all properties are valid
  258. */
  259. public function valid()
  260. {
  261. return count($this->listInvalidProperties()) === 0;
  262. }
  263. /**
  264. * Gets date
  265. *
  266. * @return \DateTime
  267. */
  268. public function getDate()
  269. {
  270. return $this->container['date'];
  271. }
  272. /**
  273. * Sets date
  274. *
  275. * @param \DateTime $date Date for which statistics are retrieved
  276. *
  277. * @return $this
  278. */
  279. public function setDate($date)
  280. {
  281. $this->container['date'] = $date;
  282. return $this;
  283. }
  284. /**
  285. * Gets requests
  286. *
  287. * @return int
  288. */
  289. public function getRequests()
  290. {
  291. return $this->container['requests'];
  292. }
  293. /**
  294. * Sets requests
  295. *
  296. * @param int $requests Number of requests for the date
  297. *
  298. * @return $this
  299. */
  300. public function setRequests($requests)
  301. {
  302. $this->container['requests'] = $requests;
  303. return $this;
  304. }
  305. /**
  306. * Gets delivered
  307. *
  308. * @return int
  309. */
  310. public function getDelivered()
  311. {
  312. return $this->container['delivered'];
  313. }
  314. /**
  315. * Sets delivered
  316. *
  317. * @param int $delivered Number of delivered SMS for the date
  318. *
  319. * @return $this
  320. */
  321. public function setDelivered($delivered)
  322. {
  323. $this->container['delivered'] = $delivered;
  324. return $this;
  325. }
  326. /**
  327. * Gets hardBounces
  328. *
  329. * @return int
  330. */
  331. public function getHardBounces()
  332. {
  333. return $this->container['hardBounces'];
  334. }
  335. /**
  336. * Sets hardBounces
  337. *
  338. * @param int $hardBounces Number of hardbounces for the date
  339. *
  340. * @return $this
  341. */
  342. public function setHardBounces($hardBounces)
  343. {
  344. $this->container['hardBounces'] = $hardBounces;
  345. return $this;
  346. }
  347. /**
  348. * Gets softBounces
  349. *
  350. * @return int
  351. */
  352. public function getSoftBounces()
  353. {
  354. return $this->container['softBounces'];
  355. }
  356. /**
  357. * Sets softBounces
  358. *
  359. * @param int $softBounces Number of softbounces for the date
  360. *
  361. * @return $this
  362. */
  363. public function setSoftBounces($softBounces)
  364. {
  365. $this->container['softBounces'] = $softBounces;
  366. return $this;
  367. }
  368. /**
  369. * Gets blocked
  370. *
  371. * @return int
  372. */
  373. public function getBlocked()
  374. {
  375. return $this->container['blocked'];
  376. }
  377. /**
  378. * Sets blocked
  379. *
  380. * @param int $blocked Number of blocked contact for the date
  381. *
  382. * @return $this
  383. */
  384. public function setBlocked($blocked)
  385. {
  386. $this->container['blocked'] = $blocked;
  387. return $this;
  388. }
  389. /**
  390. * Gets unsubscribed
  391. *
  392. * @return int
  393. */
  394. public function getUnsubscribed()
  395. {
  396. return $this->container['unsubscribed'];
  397. }
  398. /**
  399. * Sets unsubscribed
  400. *
  401. * @param int $unsubscribed Number of unsubscription for the date
  402. *
  403. * @return $this
  404. */
  405. public function setUnsubscribed($unsubscribed)
  406. {
  407. $this->container['unsubscribed'] = $unsubscribed;
  408. return $this;
  409. }
  410. /**
  411. * Gets replied
  412. *
  413. * @return int
  414. */
  415. public function getReplied()
  416. {
  417. return $this->container['replied'];
  418. }
  419. /**
  420. * Sets replied
  421. *
  422. * @param int $replied Number of answered SMS for the date
  423. *
  424. * @return $this
  425. */
  426. public function setReplied($replied)
  427. {
  428. $this->container['replied'] = $replied;
  429. return $this;
  430. }
  431. /**
  432. * Gets accepted
  433. *
  434. * @return int
  435. */
  436. public function getAccepted()
  437. {
  438. return $this->container['accepted'];
  439. }
  440. /**
  441. * Sets accepted
  442. *
  443. * @param int $accepted Number of accepted for the date
  444. *
  445. * @return $this
  446. */
  447. public function setAccepted($accepted)
  448. {
  449. $this->container['accepted'] = $accepted;
  450. return $this;
  451. }
  452. /**
  453. * Gets rejected
  454. *
  455. * @return int
  456. */
  457. public function getRejected()
  458. {
  459. return $this->container['rejected'];
  460. }
  461. /**
  462. * Sets rejected
  463. *
  464. * @param int $rejected Number of rejected for the date
  465. *
  466. * @return $this
  467. */
  468. public function setRejected($rejected)
  469. {
  470. $this->container['rejected'] = $rejected;
  471. return $this;
  472. }
  473. /**
  474. * Returns true if offset exists. False otherwise.
  475. *
  476. * @param integer $offset Offset
  477. *
  478. * @return boolean
  479. */
  480. public function offsetExists($offset)
  481. {
  482. return isset($this->container[$offset]);
  483. }
  484. /**
  485. * Gets offset.
  486. *
  487. * @param integer $offset Offset
  488. *
  489. * @return mixed
  490. */
  491. public function offsetGet($offset)
  492. {
  493. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  494. }
  495. /**
  496. * Sets value based on offset.
  497. *
  498. * @param integer $offset Offset
  499. * @param mixed $value Value to be set
  500. *
  501. * @return void
  502. */
  503. public function offsetSet($offset, $value)
  504. {
  505. if (is_null($offset)) {
  506. $this->container[] = $value;
  507. } else {
  508. $this->container[$offset] = $value;
  509. }
  510. }
  511. /**
  512. * Unsets offset.
  513. *
  514. * @param integer $offset Offset
  515. *
  516. * @return void
  517. */
  518. public function offsetUnset($offset)
  519. {
  520. unset($this->container[$offset]);
  521. }
  522. /**
  523. * Gets the string presentation of the object
  524. *
  525. * @return string
  526. */
  527. public function __toString()
  528. {
  529. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  530. return json_encode(
  531. ObjectSerializer::sanitizeForSerialization($this),
  532. JSON_PRETTY_PRINT
  533. );
  534. }
  535. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  536. }
  537. }