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

https://gitlab.com/i-have-a-green/digitemis-v3 · PHP · 334 lines · 198 code · 25 blank · 111 comment · 1 complexity · c2dfcdf21251d76849fc7989773b2233 MD5 · raw file

  1. <?php
  2. /**
  3. * UploadImageToGallery
  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. * UploadImageToGallery 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 UploadImageToGallery 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 = 'uploadImageToGallery';
  47. /**
  48. * Array of property to type mappings. Used for (de)serialization
  49. *
  50. * @var string[]
  51. */
  52. protected static $swaggerTypes = [
  53. 'imageUrl' => 'string',
  54. 'name' => 'string'
  55. ];
  56. /**
  57. * Array of property to format mappings. Used for (de)serialization
  58. *
  59. * @var string[]
  60. */
  61. protected static $swaggerFormats = [
  62. 'imageUrl' => null,
  63. 'name' => null
  64. ];
  65. /**
  66. * Array of property to type mappings. Used for (de)serialization
  67. *
  68. * @return array
  69. */
  70. public static function swaggerTypes()
  71. {
  72. return self::$swaggerTypes;
  73. }
  74. /**
  75. * Array of property to format mappings. Used for (de)serialization
  76. *
  77. * @return array
  78. */
  79. public static function swaggerFormats()
  80. {
  81. return self::$swaggerFormats;
  82. }
  83. /**
  84. * Array of attributes where the key is the local name,
  85. * and the value is the original name
  86. *
  87. * @var string[]
  88. */
  89. protected static $attributeMap = [
  90. 'imageUrl' => 'imageUrl',
  91. 'name' => 'name'
  92. ];
  93. /**
  94. * Array of attributes to setter functions (for deserialization of responses)
  95. *
  96. * @var string[]
  97. */
  98. protected static $setters = [
  99. 'imageUrl' => 'setImageUrl',
  100. 'name' => 'setName'
  101. ];
  102. /**
  103. * Array of attributes to getter functions (for serialization of requests)
  104. *
  105. * @var string[]
  106. */
  107. protected static $getters = [
  108. 'imageUrl' => 'getImageUrl',
  109. 'name' => 'getName'
  110. ];
  111. /**
  112. * Array of attributes where the key is the local name,
  113. * and the value is the original name
  114. *
  115. * @return array
  116. */
  117. public static function attributeMap()
  118. {
  119. return self::$attributeMap;
  120. }
  121. /**
  122. * Array of attributes to setter functions (for deserialization of responses)
  123. *
  124. * @return array
  125. */
  126. public static function setters()
  127. {
  128. return self::$setters;
  129. }
  130. /**
  131. * Array of attributes to getter functions (for serialization of requests)
  132. *
  133. * @return array
  134. */
  135. public static function getters()
  136. {
  137. return self::$getters;
  138. }
  139. /**
  140. * The original name of the model.
  141. *
  142. * @return string
  143. */
  144. public function getModelName()
  145. {
  146. return self::$swaggerModelName;
  147. }
  148. /**
  149. * Associative array for storing property values
  150. *
  151. * @var mixed[]
  152. */
  153. protected $container = [];
  154. /**
  155. * Constructor
  156. *
  157. * @param mixed[] $data Associated array of property values
  158. * initializing the model
  159. */
  160. public function __construct(array $data = null)
  161. {
  162. $this->container['imageUrl'] = isset($data['imageUrl']) ? $data['imageUrl'] : null;
  163. $this->container['name'] = isset($data['name']) ? $data['name'] : null;
  164. }
  165. /**
  166. * Show all the invalid properties with reasons.
  167. *
  168. * @return array invalid properties with reasons
  169. */
  170. public function listInvalidProperties()
  171. {
  172. $invalidProperties = [];
  173. if ($this->container['imageUrl'] === null) {
  174. $invalidProperties[] = "'imageUrl' can't be null";
  175. }
  176. return $invalidProperties;
  177. }
  178. /**
  179. * Validate all the properties in the model
  180. * return true if all passed
  181. *
  182. * @return bool True if all properties are valid
  183. */
  184. public function valid()
  185. {
  186. return count($this->listInvalidProperties()) === 0;
  187. }
  188. /**
  189. * Gets imageUrl
  190. *
  191. * @return string
  192. */
  193. public function getImageUrl()
  194. {
  195. return $this->container['imageUrl'];
  196. }
  197. /**
  198. * Sets imageUrl
  199. *
  200. * @param string $imageUrl The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are - jpeg, jpg, png, bmp, gif.
  201. *
  202. * @return $this
  203. */
  204. public function setImageUrl($imageUrl)
  205. {
  206. $this->container['imageUrl'] = $imageUrl;
  207. return $this;
  208. }
  209. /**
  210. * Gets name
  211. *
  212. * @return string
  213. */
  214. public function getName()
  215. {
  216. return $this->container['name'];
  217. }
  218. /**
  219. * Sets name
  220. *
  221. * @param string $name Name of the image.
  222. *
  223. * @return $this
  224. */
  225. public function setName($name)
  226. {
  227. $this->container['name'] = $name;
  228. return $this;
  229. }
  230. /**
  231. * Returns true if offset exists. False otherwise.
  232. *
  233. * @param integer $offset Offset
  234. *
  235. * @return boolean
  236. */
  237. public function offsetExists($offset)
  238. {
  239. return isset($this->container[$offset]);
  240. }
  241. /**
  242. * Gets offset.
  243. *
  244. * @param integer $offset Offset
  245. *
  246. * @return mixed
  247. */
  248. public function offsetGet($offset)
  249. {
  250. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  251. }
  252. /**
  253. * Sets value based on offset.
  254. *
  255. * @param integer $offset Offset
  256. * @param mixed $value Value to be set
  257. *
  258. * @return void
  259. */
  260. public function offsetSet($offset, $value)
  261. {
  262. if (is_null($offset)) {
  263. $this->container[] = $value;
  264. } else {
  265. $this->container[$offset] = $value;
  266. }
  267. }
  268. /**
  269. * Unsets offset.
  270. *
  271. * @param integer $offset Offset
  272. *
  273. * @return void
  274. */
  275. public function offsetUnset($offset)
  276. {
  277. unset($this->container[$offset]);
  278. }
  279. /**
  280. * Gets the string presentation of the object
  281. *
  282. * @return string
  283. */
  284. public function __toString()
  285. {
  286. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  287. return json_encode(
  288. ObjectSerializer::sanitizeForSerialization($this),
  289. JSON_PRETTY_PRINT
  290. );
  291. }
  292. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  293. }
  294. }