PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 1ms

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

https://gitlab.com/i-have-a-green/digitemis-v3
PHP | 337 lines | 122 code | 40 blank | 175 comment | 4 complexity | adf97989875654acd67910718d589f61 MD5 | raw file
  1. <?php
  2. /**
  3. * GetChildInfoApiKeysV2
  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. * GetChildInfoApiKeysV2 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 GetChildInfoApiKeysV2 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 = 'getChildInfo_apiKeys_v2';
  47. /**
  48. * Array of property to type mappings. Used for (de)serialization
  49. *
  50. * @var string[]
  51. */
  52. protected static $swaggerTypes = [
  53. 'name' => 'string',
  54. 'key' => 'string'
  55. ];
  56. /**
  57. * Array of property to format mappings. Used for (de)serialization
  58. *
  59. * @var string[]
  60. */
  61. protected static $swaggerFormats = [
  62. 'name' => null,
  63. 'key' => 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. 'name' => 'name',
  91. 'key' => 'key'
  92. ];
  93. /**
  94. * Array of attributes to setter functions (for deserialization of responses)
  95. *
  96. * @var string[]
  97. */
  98. protected static $setters = [
  99. 'name' => 'setName',
  100. 'key' => 'setKey'
  101. ];
  102. /**
  103. * Array of attributes to getter functions (for serialization of requests)
  104. *
  105. * @var string[]
  106. */
  107. protected static $getters = [
  108. 'name' => 'getName',
  109. 'key' => 'getKey'
  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['name'] = isset($data['name']) ? $data['name'] : null;
  163. $this->container['key'] = isset($data['key']) ? $data['key'] : 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['name'] === null) {
  174. $invalidProperties[] = "'name' can't be null";
  175. }
  176. if ($this->container['key'] === null) {
  177. $invalidProperties[] = "'key' can't be null";
  178. }
  179. return $invalidProperties;
  180. }
  181. /**
  182. * Validate all the properties in the model
  183. * return true if all passed
  184. *
  185. * @return bool True if all properties are valid
  186. */
  187. public function valid()
  188. {
  189. return count($this->listInvalidProperties()) === 0;
  190. }
  191. /**
  192. * Gets name
  193. *
  194. * @return string
  195. */
  196. public function getName()
  197. {
  198. return $this->container['name'];
  199. }
  200. /**
  201. * Sets name
  202. *
  203. * @param string $name Name of the key for version 2
  204. *
  205. * @return $this
  206. */
  207. public function setName($name)
  208. {
  209. $this->container['name'] = $name;
  210. return $this;
  211. }
  212. /**
  213. * Gets key
  214. *
  215. * @return string
  216. */
  217. public function getKey()
  218. {
  219. return $this->container['key'];
  220. }
  221. /**
  222. * Sets key
  223. *
  224. * @param string $key API Key for version 2
  225. *
  226. * @return $this
  227. */
  228. public function setKey($key)
  229. {
  230. $this->container['key'] = $key;
  231. return $this;
  232. }
  233. /**
  234. * Returns true if offset exists. False otherwise.
  235. *
  236. * @param integer $offset Offset
  237. *
  238. * @return boolean
  239. */
  240. public function offsetExists($offset)
  241. {
  242. return isset($this->container[$offset]);
  243. }
  244. /**
  245. * Gets offset.
  246. *
  247. * @param integer $offset Offset
  248. *
  249. * @return mixed
  250. */
  251. public function offsetGet($offset)
  252. {
  253. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  254. }
  255. /**
  256. * Sets value based on offset.
  257. *
  258. * @param integer $offset Offset
  259. * @param mixed $value Value to be set
  260. *
  261. * @return void
  262. */
  263. public function offsetSet($offset, $value)
  264. {
  265. if (is_null($offset)) {
  266. $this->container[] = $value;
  267. } else {
  268. $this->container[$offset] = $value;
  269. }
  270. }
  271. /**
  272. * Unsets offset.
  273. *
  274. * @param integer $offset Offset
  275. *
  276. * @return void
  277. */
  278. public function offsetUnset($offset)
  279. {
  280. unset($this->container[$offset]);
  281. }
  282. /**
  283. * Gets the string presentation of the object
  284. *
  285. * @return string
  286. */
  287. public function __toString()
  288. {
  289. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  290. return json_encode(
  291. ObjectSerializer::sanitizeForSerialization($this),
  292. JSON_PRETTY_PRINT
  293. );
  294. }
  295. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  296. }
  297. }