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

https://gitlab.com/i-have-a-green/digitemis-v3 · PHP · 391 lines · 146 code · 46 blank · 199 comment · 3 complexity · 431b13c3a1f02e00118268567e4c00f7 MD5 · raw file

  1. <?php
  2. /**
  3. * RequestContactExport
  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. * RequestContactExport 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 RequestContactExport 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 = 'requestContactExport';
  47. /**
  48. * Array of property to type mappings. Used for (de)serialization
  49. *
  50. * @var string[]
  51. */
  52. protected static $swaggerTypes = [
  53. 'exportAttributes' => 'string[]',
  54. 'contactFilter' => 'object',
  55. 'customContactFilter' => '\SendinBlue\Client\Model\RequestContactExportCustomContactFilter',
  56. 'notifyUrl' => 'string'
  57. ];
  58. /**
  59. * Array of property to format mappings. Used for (de)serialization
  60. *
  61. * @var string[]
  62. */
  63. protected static $swaggerFormats = [
  64. 'exportAttributes' => null,
  65. 'contactFilter' => null,
  66. 'customContactFilter' => null,
  67. 'notifyUrl' => 'url'
  68. ];
  69. /**
  70. * Array of property to type mappings. Used for (de)serialization
  71. *
  72. * @return array
  73. */
  74. public static function swaggerTypes()
  75. {
  76. return self::$swaggerTypes;
  77. }
  78. /**
  79. * Array of property to format mappings. Used for (de)serialization
  80. *
  81. * @return array
  82. */
  83. public static function swaggerFormats()
  84. {
  85. return self::$swaggerFormats;
  86. }
  87. /**
  88. * Array of attributes where the key is the local name,
  89. * and the value is the original name
  90. *
  91. * @var string[]
  92. */
  93. protected static $attributeMap = [
  94. 'exportAttributes' => 'exportAttributes',
  95. 'contactFilter' => 'contactFilter',
  96. 'customContactFilter' => 'customContactFilter',
  97. 'notifyUrl' => 'notifyUrl'
  98. ];
  99. /**
  100. * Array of attributes to setter functions (for deserialization of responses)
  101. *
  102. * @var string[]
  103. */
  104. protected static $setters = [
  105. 'exportAttributes' => 'setExportAttributes',
  106. 'contactFilter' => 'setContactFilter',
  107. 'customContactFilter' => 'setCustomContactFilter',
  108. 'notifyUrl' => 'setNotifyUrl'
  109. ];
  110. /**
  111. * Array of attributes to getter functions (for serialization of requests)
  112. *
  113. * @var string[]
  114. */
  115. protected static $getters = [
  116. 'exportAttributes' => 'getExportAttributes',
  117. 'contactFilter' => 'getContactFilter',
  118. 'customContactFilter' => 'getCustomContactFilter',
  119. 'notifyUrl' => 'getNotifyUrl'
  120. ];
  121. /**
  122. * Array of attributes where the key is the local name,
  123. * and the value is the original name
  124. *
  125. * @return array
  126. */
  127. public static function attributeMap()
  128. {
  129. return self::$attributeMap;
  130. }
  131. /**
  132. * Array of attributes to setter functions (for deserialization of responses)
  133. *
  134. * @return array
  135. */
  136. public static function setters()
  137. {
  138. return self::$setters;
  139. }
  140. /**
  141. * Array of attributes to getter functions (for serialization of requests)
  142. *
  143. * @return array
  144. */
  145. public static function getters()
  146. {
  147. return self::$getters;
  148. }
  149. /**
  150. * The original name of the model.
  151. *
  152. * @return string
  153. */
  154. public function getModelName()
  155. {
  156. return self::$swaggerModelName;
  157. }
  158. /**
  159. * Associative array for storing property values
  160. *
  161. * @var mixed[]
  162. */
  163. protected $container = [];
  164. /**
  165. * Constructor
  166. *
  167. * @param mixed[] $data Associated array of property values
  168. * initializing the model
  169. */
  170. public function __construct(array $data = null)
  171. {
  172. $this->container['exportAttributes'] = isset($data['exportAttributes']) ? $data['exportAttributes'] : null;
  173. $this->container['contactFilter'] = isset($data['contactFilter']) ? $data['contactFilter'] : null;
  174. $this->container['customContactFilter'] = isset($data['customContactFilter']) ? $data['customContactFilter'] : null;
  175. $this->container['notifyUrl'] = isset($data['notifyUrl']) ? $data['notifyUrl'] : null;
  176. }
  177. /**
  178. * Show all the invalid properties with reasons.
  179. *
  180. * @return array invalid properties with reasons
  181. */
  182. public function listInvalidProperties()
  183. {
  184. $invalidProperties = [];
  185. return $invalidProperties;
  186. }
  187. /**
  188. * Validate all the properties in the model
  189. * return true if all passed
  190. *
  191. * @return bool True if all properties are valid
  192. */
  193. public function valid()
  194. {
  195. return count($this->listInvalidProperties()) === 0;
  196. }
  197. /**
  198. * Gets exportAttributes
  199. *
  200. * @return string[]
  201. */
  202. public function getExportAttributes()
  203. {
  204. return $this->container['exportAttributes'];
  205. }
  206. /**
  207. * Sets exportAttributes
  208. *
  209. * @param string[] $exportAttributes List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email'].
  210. *
  211. * @return $this
  212. */
  213. public function setExportAttributes($exportAttributes)
  214. {
  215. $this->container['exportAttributes'] = $exportAttributes;
  216. return $this;
  217. }
  218. /**
  219. * Gets contactFilter
  220. *
  221. * @return object
  222. */
  223. public function getContactFilter()
  224. {
  225. return $this->container['contactFilter'];
  226. }
  227. /**
  228. * Sets contactFilter
  229. *
  230. * @param object $contactFilter This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {\"blacklisted\":true} will export all the blacklisted contacts.
  231. *
  232. * @return $this
  233. */
  234. public function setContactFilter($contactFilter)
  235. {
  236. $this->container['contactFilter'] = $contactFilter;
  237. return $this;
  238. }
  239. /**
  240. * Gets customContactFilter
  241. *
  242. * @return \SendinBlue\Client\Model\RequestContactExportCustomContactFilter
  243. */
  244. public function getCustomContactFilter()
  245. {
  246. return $this->container['customContactFilter'];
  247. }
  248. /**
  249. * Sets customContactFilter
  250. *
  251. * @param \SendinBlue\Client\Model\RequestContactExportCustomContactFilter $customContactFilter customContactFilter
  252. *
  253. * @return $this
  254. */
  255. public function setCustomContactFilter($customContactFilter)
  256. {
  257. $this->container['customContactFilter'] = $customContactFilter;
  258. return $this;
  259. }
  260. /**
  261. * Gets notifyUrl
  262. *
  263. * @return string
  264. */
  265. public function getNotifyUrl()
  266. {
  267. return $this->container['notifyUrl'];
  268. }
  269. /**
  270. * Sets notifyUrl
  271. *
  272. * @param string $notifyUrl Webhook that will be called once the export process is finished
  273. *
  274. * @return $this
  275. */
  276. public function setNotifyUrl($notifyUrl)
  277. {
  278. $this->container['notifyUrl'] = $notifyUrl;
  279. return $this;
  280. }
  281. /**
  282. * Returns true if offset exists. False otherwise.
  283. *
  284. * @param integer $offset Offset
  285. *
  286. * @return boolean
  287. */
  288. public function offsetExists($offset)
  289. {
  290. return isset($this->container[$offset]);
  291. }
  292. /**
  293. * Gets offset.
  294. *
  295. * @param integer $offset Offset
  296. *
  297. * @return mixed
  298. */
  299. public function offsetGet($offset)
  300. {
  301. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  302. }
  303. /**
  304. * Sets value based on offset.
  305. *
  306. * @param integer $offset Offset
  307. * @param mixed $value Value to be set
  308. *
  309. * @return void
  310. */
  311. public function offsetSet($offset, $value)
  312. {
  313. if (is_null($offset)) {
  314. $this->container[] = $value;
  315. } else {
  316. $this->container[$offset] = $value;
  317. }
  318. }
  319. /**
  320. * Unsets offset.
  321. *
  322. * @param integer $offset Offset
  323. *
  324. * @return void
  325. */
  326. public function offsetUnset($offset)
  327. {
  328. unset($this->container[$offset]);
  329. }
  330. /**
  331. * Gets the string presentation of the object
  332. *
  333. * @return string
  334. */
  335. public function __toString()
  336. {
  337. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  338. return json_encode(
  339. ObjectSerializer::sanitizeForSerialization($this),
  340. JSON_PRETTY_PRINT
  341. );
  342. }
  343. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  344. }
  345. }