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

https://gitlab.com/i-have-a-green/digitemis-v3 · PHP · 427 lines · 167 code · 49 blank · 211 comment · 4 complexity · 5d67af8fbcd85c03018a366671e9a025 MD5 · raw file

  1. <?php
  2. /**
  3. * PostSendFailed
  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. * PostSendFailed 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 PostSendFailed 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 = 'postSendFailed';
  47. /**
  48. * Array of property to type mappings. Used for (de)serialization
  49. *
  50. * @var string[]
  51. */
  52. protected static $swaggerTypes = [
  53. 'code' => 'int',
  54. 'message' => 'string',
  55. 'unexistingEmails' => 'string[]',
  56. 'withoutListEmails' => 'string[]',
  57. 'blackListedEmails' => 'string[]'
  58. ];
  59. /**
  60. * Array of property to format mappings. Used for (de)serialization
  61. *
  62. * @var string[]
  63. */
  64. protected static $swaggerFormats = [
  65. 'code' => 'int64',
  66. 'message' => null,
  67. 'unexistingEmails' => 'email',
  68. 'withoutListEmails' => 'email',
  69. 'blackListedEmails' => 'email'
  70. ];
  71. /**
  72. * Array of property to type mappings. Used for (de)serialization
  73. *
  74. * @return array
  75. */
  76. public static function swaggerTypes()
  77. {
  78. return self::$swaggerTypes;
  79. }
  80. /**
  81. * Array of property to format mappings. Used for (de)serialization
  82. *
  83. * @return array
  84. */
  85. public static function swaggerFormats()
  86. {
  87. return self::$swaggerFormats;
  88. }
  89. /**
  90. * Array of attributes where the key is the local name,
  91. * and the value is the original name
  92. *
  93. * @var string[]
  94. */
  95. protected static $attributeMap = [
  96. 'code' => 'code',
  97. 'message' => 'message',
  98. 'unexistingEmails' => 'unexistingEmails',
  99. 'withoutListEmails' => 'withoutListEmails',
  100. 'blackListedEmails' => 'blackListedEmails'
  101. ];
  102. /**
  103. * Array of attributes to setter functions (for deserialization of responses)
  104. *
  105. * @var string[]
  106. */
  107. protected static $setters = [
  108. 'code' => 'setCode',
  109. 'message' => 'setMessage',
  110. 'unexistingEmails' => 'setUnexistingEmails',
  111. 'withoutListEmails' => 'setWithoutListEmails',
  112. 'blackListedEmails' => 'setBlackListedEmails'
  113. ];
  114. /**
  115. * Array of attributes to getter functions (for serialization of requests)
  116. *
  117. * @var string[]
  118. */
  119. protected static $getters = [
  120. 'code' => 'getCode',
  121. 'message' => 'getMessage',
  122. 'unexistingEmails' => 'getUnexistingEmails',
  123. 'withoutListEmails' => 'getWithoutListEmails',
  124. 'blackListedEmails' => 'getBlackListedEmails'
  125. ];
  126. /**
  127. * Array of attributes where the key is the local name,
  128. * and the value is the original name
  129. *
  130. * @return array
  131. */
  132. public static function attributeMap()
  133. {
  134. return self::$attributeMap;
  135. }
  136. /**
  137. * Array of attributes to setter functions (for deserialization of responses)
  138. *
  139. * @return array
  140. */
  141. public static function setters()
  142. {
  143. return self::$setters;
  144. }
  145. /**
  146. * Array of attributes to getter functions (for serialization of requests)
  147. *
  148. * @return array
  149. */
  150. public static function getters()
  151. {
  152. return self::$getters;
  153. }
  154. /**
  155. * The original name of the model.
  156. *
  157. * @return string
  158. */
  159. public function getModelName()
  160. {
  161. return self::$swaggerModelName;
  162. }
  163. /**
  164. * Associative array for storing property values
  165. *
  166. * @var mixed[]
  167. */
  168. protected $container = [];
  169. /**
  170. * Constructor
  171. *
  172. * @param mixed[] $data Associated array of property values
  173. * initializing the model
  174. */
  175. public function __construct(array $data = null)
  176. {
  177. $this->container['code'] = isset($data['code']) ? $data['code'] : null;
  178. $this->container['message'] = isset($data['message']) ? $data['message'] : null;
  179. $this->container['unexistingEmails'] = isset($data['unexistingEmails']) ? $data['unexistingEmails'] : null;
  180. $this->container['withoutListEmails'] = isset($data['withoutListEmails']) ? $data['withoutListEmails'] : null;
  181. $this->container['blackListedEmails'] = isset($data['blackListedEmails']) ? $data['blackListedEmails'] : null;
  182. }
  183. /**
  184. * Show all the invalid properties with reasons.
  185. *
  186. * @return array invalid properties with reasons
  187. */
  188. public function listInvalidProperties()
  189. {
  190. $invalidProperties = [];
  191. if ($this->container['code'] === null) {
  192. $invalidProperties[] = "'code' can't be null";
  193. }
  194. if ($this->container['message'] === null) {
  195. $invalidProperties[] = "'message' can't be null";
  196. }
  197. return $invalidProperties;
  198. }
  199. /**
  200. * Validate all the properties in the model
  201. * return true if all passed
  202. *
  203. * @return bool True if all properties are valid
  204. */
  205. public function valid()
  206. {
  207. return count($this->listInvalidProperties()) === 0;
  208. }
  209. /**
  210. * Gets code
  211. *
  212. * @return int
  213. */
  214. public function getCode()
  215. {
  216. return $this->container['code'];
  217. }
  218. /**
  219. * Sets code
  220. *
  221. * @param int $code Response code
  222. *
  223. * @return $this
  224. */
  225. public function setCode($code)
  226. {
  227. $this->container['code'] = $code;
  228. return $this;
  229. }
  230. /**
  231. * Gets message
  232. *
  233. * @return string
  234. */
  235. public function getMessage()
  236. {
  237. return $this->container['message'];
  238. }
  239. /**
  240. * Sets message
  241. *
  242. * @param string $message Response message
  243. *
  244. * @return $this
  245. */
  246. public function setMessage($message)
  247. {
  248. $this->container['message'] = $message;
  249. return $this;
  250. }
  251. /**
  252. * Gets unexistingEmails
  253. *
  254. * @return string[]
  255. */
  256. public function getUnexistingEmails()
  257. {
  258. return $this->container['unexistingEmails'];
  259. }
  260. /**
  261. * Sets unexistingEmails
  262. *
  263. * @param string[] $unexistingEmails unexistingEmails
  264. *
  265. * @return $this
  266. */
  267. public function setUnexistingEmails($unexistingEmails)
  268. {
  269. $this->container['unexistingEmails'] = $unexistingEmails;
  270. return $this;
  271. }
  272. /**
  273. * Gets withoutListEmails
  274. *
  275. * @return string[]
  276. */
  277. public function getWithoutListEmails()
  278. {
  279. return $this->container['withoutListEmails'];
  280. }
  281. /**
  282. * Sets withoutListEmails
  283. *
  284. * @param string[] $withoutListEmails withoutListEmails
  285. *
  286. * @return $this
  287. */
  288. public function setWithoutListEmails($withoutListEmails)
  289. {
  290. $this->container['withoutListEmails'] = $withoutListEmails;
  291. return $this;
  292. }
  293. /**
  294. * Gets blackListedEmails
  295. *
  296. * @return string[]
  297. */
  298. public function getBlackListedEmails()
  299. {
  300. return $this->container['blackListedEmails'];
  301. }
  302. /**
  303. * Sets blackListedEmails
  304. *
  305. * @param string[] $blackListedEmails blackListedEmails
  306. *
  307. * @return $this
  308. */
  309. public function setBlackListedEmails($blackListedEmails)
  310. {
  311. $this->container['blackListedEmails'] = $blackListedEmails;
  312. return $this;
  313. }
  314. /**
  315. * Returns true if offset exists. False otherwise.
  316. *
  317. * @param integer $offset Offset
  318. *
  319. * @return boolean
  320. */
  321. public function offsetExists($offset)
  322. {
  323. return isset($this->container[$offset]);
  324. }
  325. /**
  326. * Gets offset.
  327. *
  328. * @param integer $offset Offset
  329. *
  330. * @return mixed
  331. */
  332. public function offsetGet($offset)
  333. {
  334. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  335. }
  336. /**
  337. * Sets value based on offset.
  338. *
  339. * @param integer $offset Offset
  340. * @param mixed $value Value to be set
  341. *
  342. * @return void
  343. */
  344. public function offsetSet($offset, $value)
  345. {
  346. if (is_null($offset)) {
  347. $this->container[] = $value;
  348. } else {
  349. $this->container[$offset] = $value;
  350. }
  351. }
  352. /**
  353. * Unsets offset.
  354. *
  355. * @param integer $offset Offset
  356. *
  357. * @return void
  358. */
  359. public function offsetUnset($offset)
  360. {
  361. unset($this->container[$offset]);
  362. }
  363. /**
  364. * Gets the string presentation of the object
  365. *
  366. * @return string
  367. */
  368. public function __toString()
  369. {
  370. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  371. return json_encode(
  372. ObjectSerializer::sanitizeForSerialization($this),
  373. JSON_PRETTY_PRINT
  374. );
  375. }
  376. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  377. }
  378. }