PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://gitlab.com/i-have-a-green/digitemis-v3
PHP | 535 lines | 230 code | 58 blank | 247 comment | 7 complexity | 8e8f218b2943f76e01895e8fb7c95c17 MD5 | raw file
  1. <?php
  2. /**
  3. * GetExtendedCampaignStats
  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. * GetExtendedCampaignStats 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 GetExtendedCampaignStats 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 = 'getExtendedCampaignStats';
  47. /**
  48. * Array of property to type mappings. Used for (de)serialization
  49. *
  50. * @var string[]
  51. */
  52. protected static $swaggerTypes = [
  53. 'globalStats' => 'object',
  54. 'campaignStats' => 'object[]',
  55. 'mirrorClick' => 'int',
  56. 'remaining' => 'int',
  57. 'linksStats' => 'object',
  58. 'statsByDomain' => '\SendinBlue\Client\Model\GetStatsByDomain',
  59. 'statsByDevice' => '\SendinBlue\Client\Model\GetStatsByDevice',
  60. 'statsByBrowser' => '\SendinBlue\Client\Model\GetStatsByBrowser'
  61. ];
  62. /**
  63. * Array of property to format mappings. Used for (de)serialization
  64. *
  65. * @var string[]
  66. */
  67. protected static $swaggerFormats = [
  68. 'globalStats' => null,
  69. 'campaignStats' => null,
  70. 'mirrorClick' => 'int64',
  71. 'remaining' => 'int64',
  72. 'linksStats' => null,
  73. 'statsByDomain' => null,
  74. 'statsByDevice' => null,
  75. 'statsByBrowser' => 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. 'globalStats' => 'globalStats',
  103. 'campaignStats' => 'campaignStats',
  104. 'mirrorClick' => 'mirrorClick',
  105. 'remaining' => 'remaining',
  106. 'linksStats' => 'linksStats',
  107. 'statsByDomain' => 'statsByDomain',
  108. 'statsByDevice' => 'statsByDevice',
  109. 'statsByBrowser' => 'statsByBrowser'
  110. ];
  111. /**
  112. * Array of attributes to setter functions (for deserialization of responses)
  113. *
  114. * @var string[]
  115. */
  116. protected static $setters = [
  117. 'globalStats' => 'setGlobalStats',
  118. 'campaignStats' => 'setCampaignStats',
  119. 'mirrorClick' => 'setMirrorClick',
  120. 'remaining' => 'setRemaining',
  121. 'linksStats' => 'setLinksStats',
  122. 'statsByDomain' => 'setStatsByDomain',
  123. 'statsByDevice' => 'setStatsByDevice',
  124. 'statsByBrowser' => 'setStatsByBrowser'
  125. ];
  126. /**
  127. * Array of attributes to getter functions (for serialization of requests)
  128. *
  129. * @var string[]
  130. */
  131. protected static $getters = [
  132. 'globalStats' => 'getGlobalStats',
  133. 'campaignStats' => 'getCampaignStats',
  134. 'mirrorClick' => 'getMirrorClick',
  135. 'remaining' => 'getRemaining',
  136. 'linksStats' => 'getLinksStats',
  137. 'statsByDomain' => 'getStatsByDomain',
  138. 'statsByDevice' => 'getStatsByDevice',
  139. 'statsByBrowser' => 'getStatsByBrowser'
  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['globalStats'] = isset($data['globalStats']) ? $data['globalStats'] : null;
  193. $this->container['campaignStats'] = isset($data['campaignStats']) ? $data['campaignStats'] : null;
  194. $this->container['mirrorClick'] = isset($data['mirrorClick']) ? $data['mirrorClick'] : null;
  195. $this->container['remaining'] = isset($data['remaining']) ? $data['remaining'] : null;
  196. $this->container['linksStats'] = isset($data['linksStats']) ? $data['linksStats'] : null;
  197. $this->container['statsByDomain'] = isset($data['statsByDomain']) ? $data['statsByDomain'] : null;
  198. $this->container['statsByDevice'] = isset($data['statsByDevice']) ? $data['statsByDevice'] : null;
  199. $this->container['statsByBrowser'] = isset($data['statsByBrowser']) ? $data['statsByBrowser'] : 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['globalStats'] === null) {
  210. $invalidProperties[] = "'globalStats' can't be null";
  211. }
  212. if ($this->container['campaignStats'] === null) {
  213. $invalidProperties[] = "'campaignStats' can't be null";
  214. }
  215. if ($this->container['mirrorClick'] === null) {
  216. $invalidProperties[] = "'mirrorClick' can't be null";
  217. }
  218. if ($this->container['remaining'] === null) {
  219. $invalidProperties[] = "'remaining' can't be null";
  220. }
  221. if ($this->container['linksStats'] === null) {
  222. $invalidProperties[] = "'linksStats' can't be null";
  223. }
  224. if ($this->container['statsByDomain'] === null) {
  225. $invalidProperties[] = "'statsByDomain' can't be null";
  226. }
  227. if ($this->container['statsByDevice'] === null) {
  228. $invalidProperties[] = "'statsByDevice' can't be null";
  229. }
  230. if ($this->container['statsByBrowser'] === null) {
  231. $invalidProperties[] = "'statsByBrowser' can't be null";
  232. }
  233. return $invalidProperties;
  234. }
  235. /**
  236. * Validate all the properties in the model
  237. * return true if all passed
  238. *
  239. * @return bool True if all properties are valid
  240. */
  241. public function valid()
  242. {
  243. return count($this->listInvalidProperties()) === 0;
  244. }
  245. /**
  246. * Gets globalStats
  247. *
  248. * @return object
  249. */
  250. public function getGlobalStats()
  251. {
  252. return $this->container['globalStats'];
  253. }
  254. /**
  255. * Sets globalStats
  256. *
  257. * @param object $globalStats Overall statistics of the campaign
  258. *
  259. * @return $this
  260. */
  261. public function setGlobalStats($globalStats)
  262. {
  263. $this->container['globalStats'] = $globalStats;
  264. return $this;
  265. }
  266. /**
  267. * Gets campaignStats
  268. *
  269. * @return object[]
  270. */
  271. public function getCampaignStats()
  272. {
  273. return $this->container['campaignStats'];
  274. }
  275. /**
  276. * Sets campaignStats
  277. *
  278. * @param object[] $campaignStats List-wise statistics of the campaign.
  279. *
  280. * @return $this
  281. */
  282. public function setCampaignStats($campaignStats)
  283. {
  284. $this->container['campaignStats'] = $campaignStats;
  285. return $this;
  286. }
  287. /**
  288. * Gets mirrorClick
  289. *
  290. * @return int
  291. */
  292. public function getMirrorClick()
  293. {
  294. return $this->container['mirrorClick'];
  295. }
  296. /**
  297. * Sets mirrorClick
  298. *
  299. * @param int $mirrorClick Number of clicks on mirror link
  300. *
  301. * @return $this
  302. */
  303. public function setMirrorClick($mirrorClick)
  304. {
  305. $this->container['mirrorClick'] = $mirrorClick;
  306. return $this;
  307. }
  308. /**
  309. * Gets remaining
  310. *
  311. * @return int
  312. */
  313. public function getRemaining()
  314. {
  315. return $this->container['remaining'];
  316. }
  317. /**
  318. * Sets remaining
  319. *
  320. * @param int $remaining Number of remaning emails to send
  321. *
  322. * @return $this
  323. */
  324. public function setRemaining($remaining)
  325. {
  326. $this->container['remaining'] = $remaining;
  327. return $this;
  328. }
  329. /**
  330. * Gets linksStats
  331. *
  332. * @return object
  333. */
  334. public function getLinksStats()
  335. {
  336. return $this->container['linksStats'];
  337. }
  338. /**
  339. * Sets linksStats
  340. *
  341. * @param object $linksStats Statistics about the number of clicks for the links
  342. *
  343. * @return $this
  344. */
  345. public function setLinksStats($linksStats)
  346. {
  347. $this->container['linksStats'] = $linksStats;
  348. return $this;
  349. }
  350. /**
  351. * Gets statsByDomain
  352. *
  353. * @return \SendinBlue\Client\Model\GetStatsByDomain
  354. */
  355. public function getStatsByDomain()
  356. {
  357. return $this->container['statsByDomain'];
  358. }
  359. /**
  360. * Sets statsByDomain
  361. *
  362. * @param \SendinBlue\Client\Model\GetStatsByDomain $statsByDomain statsByDomain
  363. *
  364. * @return $this
  365. */
  366. public function setStatsByDomain($statsByDomain)
  367. {
  368. $this->container['statsByDomain'] = $statsByDomain;
  369. return $this;
  370. }
  371. /**
  372. * Gets statsByDevice
  373. *
  374. * @return \SendinBlue\Client\Model\GetStatsByDevice
  375. */
  376. public function getStatsByDevice()
  377. {
  378. return $this->container['statsByDevice'];
  379. }
  380. /**
  381. * Sets statsByDevice
  382. *
  383. * @param \SendinBlue\Client\Model\GetStatsByDevice $statsByDevice Statistics about the campaign on the basis of various devices
  384. *
  385. * @return $this
  386. */
  387. public function setStatsByDevice($statsByDevice)
  388. {
  389. $this->container['statsByDevice'] = $statsByDevice;
  390. return $this;
  391. }
  392. /**
  393. * Gets statsByBrowser
  394. *
  395. * @return \SendinBlue\Client\Model\GetStatsByBrowser
  396. */
  397. public function getStatsByBrowser()
  398. {
  399. return $this->container['statsByBrowser'];
  400. }
  401. /**
  402. * Sets statsByBrowser
  403. *
  404. * @param \SendinBlue\Client\Model\GetStatsByBrowser $statsByBrowser Statistics about the campaign on the basis of various browsers
  405. *
  406. * @return $this
  407. */
  408. public function setStatsByBrowser($statsByBrowser)
  409. {
  410. $this->container['statsByBrowser'] = $statsByBrowser;
  411. return $this;
  412. }
  413. /**
  414. * Returns true if offset exists. False otherwise.
  415. *
  416. * @param integer $offset Offset
  417. *
  418. * @return boolean
  419. */
  420. public function offsetExists($offset)
  421. {
  422. return isset($this->container[$offset]);
  423. }
  424. /**
  425. * Gets offset.
  426. *
  427. * @param integer $offset Offset
  428. *
  429. * @return mixed
  430. */
  431. public function offsetGet($offset)
  432. {
  433. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  434. }
  435. /**
  436. * Sets value based on offset.
  437. *
  438. * @param integer $offset Offset
  439. * @param mixed $value Value to be set
  440. *
  441. * @return void
  442. */
  443. public function offsetSet($offset, $value)
  444. {
  445. if (is_null($offset)) {
  446. $this->container[] = $value;
  447. } else {
  448. $this->container[$offset] = $value;
  449. }
  450. }
  451. /**
  452. * Unsets offset.
  453. *
  454. * @param integer $offset Offset
  455. *
  456. * @return void
  457. */
  458. public function offsetUnset($offset)
  459. {
  460. unset($this->container[$offset]);
  461. }
  462. /**
  463. * Gets the string presentation of the object
  464. *
  465. * @return string
  466. */
  467. public function __toString()
  468. {
  469. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  470. return json_encode(
  471. ObjectSerializer::sanitizeForSerialization($this),
  472. JSON_PRETTY_PRINT
  473. );
  474. }
  475. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  476. }
  477. }