PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 1ms

/lib/Model/GetCharactersCharacterIdMailMailIdOk.php

https://gitlab.com/mglinski/php-esi-lib
PHP | 394 lines | 169 code | 50 blank | 175 comment | 3 complexity | c5f1656e91f6e2c342daf7ce616b0acf MD5 | raw file
  1. <?php
  2. /**
  3. * GetCharactersCharacterIdMailMailIdOk
  4. *
  5. * PHP version 5
  6. *
  7. * @category Class
  8. * @package ESI\Client
  9. * @author http://github.com/swagger-api/swagger-codegen
  10. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
  11. * @link https://github.com/swagger-api/swagger-codegen
  12. */
  13. /**
  14. * EVE Swagger Interface
  15. *
  16. * An OpenAPI for EVE Online
  17. *
  18. * OpenAPI spec version: 0.3.9
  19. *
  20. * Generated by: https://github.com/swagger-api/swagger-codegen.git
  21. *
  22. * Licensed under the Apache License, Version 2.0 (the "License");
  23. * you may not use this file except in compliance with the License.
  24. * You may obtain a copy of the License at
  25. *
  26. * http://www.apache.org/licenses/LICENSE-2.0
  27. *
  28. * Unless required by applicable law or agreed to in writing, software
  29. * distributed under the License is distributed on an "AS IS" BASIS,
  30. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  31. * See the License for the specific language governing permissions and
  32. * limitations under the License.
  33. */
  34. /**
  35. * NOTE: This class is auto generated by the swagger code generator program.
  36. * https://github.com/swagger-api/swagger-codegen
  37. * Do not edit the class manually.
  38. */
  39. namespace ESI\Client\Model;
  40. use ArrayAccess;
  41. /**
  42. * GetCharactersCharacterIdMailMailIdOk Class Doc Comment
  43. *
  44. * @category Class */
  45. // @description 200 ok object
  46. /**
  47. * @package ESI\Client
  48. * @author http://github.com/swagger-api/swagger-codegen
  49. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
  50. * @link https://github.com/swagger-api/swagger-codegen
  51. */
  52. class GetCharactersCharacterIdMailMailIdOk implements ArrayAccess
  53. {
  54. /**
  55. * The original name of the model.
  56. * @var string
  57. */
  58. protected static $swaggerModelName = 'get_characters_character_id_mail_mail_id_ok';
  59. /**
  60. * Array of property to type mappings. Used for (de)serialization
  61. * @var string[]
  62. */
  63. protected static $swaggerTypes = array(
  64. 'body' => 'string',
  65. 'from' => 'int',
  66. 'labels' => 'int[]',
  67. 'read' => 'bool',
  68. 'recipients' => '\ESI\Client\Model\GetCharactersCharacterIdMailMailIdOkRecipients[]',
  69. 'subject' => 'string',
  70. 'timestamp' => '\DateTime'
  71. );
  72. public static function swaggerTypes()
  73. {
  74. return self::$swaggerTypes;
  75. }
  76. /**
  77. * Array of attributes where the key is the local name, and the value is the original name
  78. * @var string[]
  79. */
  80. protected static $attributeMap = array(
  81. 'body' => 'body',
  82. 'from' => 'from',
  83. 'labels' => 'labels',
  84. 'read' => 'read',
  85. 'recipients' => 'recipients',
  86. 'subject' => 'subject',
  87. 'timestamp' => 'timestamp'
  88. );
  89. public static function attributeMap()
  90. {
  91. return self::$attributeMap;
  92. }
  93. /**
  94. * Array of attributes to setter functions (for deserialization of responses)
  95. * @var string[]
  96. */
  97. protected static $setters = array(
  98. 'body' => 'setBody',
  99. 'from' => 'setFrom',
  100. 'labels' => 'setLabels',
  101. 'read' => 'setRead',
  102. 'recipients' => 'setRecipients',
  103. 'subject' => 'setSubject',
  104. 'timestamp' => 'setTimestamp'
  105. );
  106. public static function setters()
  107. {
  108. return self::$setters;
  109. }
  110. /**
  111. * Array of attributes to getter functions (for serialization of requests)
  112. * @var string[]
  113. */
  114. protected static $getters = array(
  115. 'body' => 'getBody',
  116. 'from' => 'getFrom',
  117. 'labels' => 'getLabels',
  118. 'read' => 'getRead',
  119. 'recipients' => 'getRecipients',
  120. 'subject' => 'getSubject',
  121. 'timestamp' => 'getTimestamp'
  122. );
  123. public static function getters()
  124. {
  125. return self::$getters;
  126. }
  127. /**
  128. * Associative array for storing property values
  129. * @var mixed[]
  130. */
  131. protected $container = array();
  132. /**
  133. * Constructor
  134. * @param mixed[] $data Associated array of property value initalizing the model
  135. */
  136. public function __construct(array $data = null)
  137. {
  138. $this->container['body'] = isset($data['body']) ? $data['body'] : null;
  139. $this->container['from'] = isset($data['from']) ? $data['from'] : null;
  140. $this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
  141. $this->container['read'] = isset($data['read']) ? $data['read'] : null;
  142. $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null;
  143. $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null;
  144. $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null;
  145. }
  146. /**
  147. * show all the invalid properties with reasons.
  148. *
  149. * @return array invalid properties with reasons
  150. */
  151. public function listInvalidProperties()
  152. {
  153. $invalid_properties = array();
  154. return $invalid_properties;
  155. }
  156. /**
  157. * validate all the properties in the model
  158. * return true if all passed
  159. *
  160. * @return bool True if all properteis are valid
  161. */
  162. public function valid()
  163. {
  164. return true;
  165. }
  166. /**
  167. * Gets body
  168. * @return string
  169. */
  170. public function getBody()
  171. {
  172. return $this->container['body'];
  173. }
  174. /**
  175. * Sets body
  176. * @param string $body Mail's body
  177. * @return $this
  178. */
  179. public function setBody($body)
  180. {
  181. $this->container['body'] = $body;
  182. return $this;
  183. }
  184. /**
  185. * Gets from
  186. * @return int
  187. */
  188. public function getFrom()
  189. {
  190. return $this->container['from'];
  191. }
  192. /**
  193. * Sets from
  194. * @param int $from From whom the mail was sent
  195. * @return $this
  196. */
  197. public function setFrom($from)
  198. {
  199. $this->container['from'] = $from;
  200. return $this;
  201. }
  202. /**
  203. * Gets labels
  204. * @return int[]
  205. */
  206. public function getLabels()
  207. {
  208. return $this->container['labels'];
  209. }
  210. /**
  211. * Sets labels
  212. * @param int[] $labels Labels attached to the mail
  213. * @return $this
  214. */
  215. public function setLabels($labels)
  216. {
  217. $this->container['labels'] = $labels;
  218. return $this;
  219. }
  220. /**
  221. * Gets read
  222. * @return bool
  223. */
  224. public function getRead()
  225. {
  226. return $this->container['read'];
  227. }
  228. /**
  229. * Sets read
  230. * @param bool $read Whether the mail is flagged as read
  231. * @return $this
  232. */
  233. public function setRead($read)
  234. {
  235. $this->container['read'] = $read;
  236. return $this;
  237. }
  238. /**
  239. * Gets recipients
  240. * @return \ESI\Client\Model\GetCharactersCharacterIdMailMailIdOkRecipients[]
  241. */
  242. public function getRecipients()
  243. {
  244. return $this->container['recipients'];
  245. }
  246. /**
  247. * Sets recipients
  248. * @param \ESI\Client\Model\GetCharactersCharacterIdMailMailIdOkRecipients[] $recipients Recipients of the mail
  249. * @return $this
  250. */
  251. public function setRecipients($recipients)
  252. {
  253. $this->container['recipients'] = $recipients;
  254. return $this;
  255. }
  256. /**
  257. * Gets subject
  258. * @return string
  259. */
  260. public function getSubject()
  261. {
  262. return $this->container['subject'];
  263. }
  264. /**
  265. * Sets subject
  266. * @param string $subject Mail subject
  267. * @return $this
  268. */
  269. public function setSubject($subject)
  270. {
  271. $this->container['subject'] = $subject;
  272. return $this;
  273. }
  274. /**
  275. * Gets timestamp
  276. * @return \DateTime
  277. */
  278. public function getTimestamp()
  279. {
  280. return $this->container['timestamp'];
  281. }
  282. /**
  283. * Sets timestamp
  284. * @param \DateTime $timestamp When the mail was sent
  285. * @return $this
  286. */
  287. public function setTimestamp($timestamp)
  288. {
  289. $this->container['timestamp'] = $timestamp;
  290. return $this;
  291. }
  292. /**
  293. * Returns true if offset exists. False otherwise.
  294. * @param integer $offset Offset
  295. * @return boolean
  296. */
  297. public function offsetExists($offset)
  298. {
  299. return isset($this->container[$offset]);
  300. }
  301. /**
  302. * Gets offset.
  303. * @param integer $offset Offset
  304. * @return mixed
  305. */
  306. public function offsetGet($offset)
  307. {
  308. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  309. }
  310. /**
  311. * Sets value based on offset.
  312. * @param integer $offset Offset
  313. * @param mixed $value Value to be set
  314. * @return void
  315. */
  316. public function offsetSet($offset, $value)
  317. {
  318. if (is_null($offset)) {
  319. $this->container[] = $value;
  320. } else {
  321. $this->container[$offset] = $value;
  322. }
  323. }
  324. /**
  325. * Unsets offset.
  326. * @param integer $offset Offset
  327. * @return void
  328. */
  329. public function offsetUnset($offset)
  330. {
  331. unset($this->container[$offset]);
  332. }
  333. /**
  334. * Gets the string presentation of the object
  335. * @return string
  336. */
  337. public function __toString()
  338. {
  339. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  340. return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
  341. }
  342. return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this));
  343. }
  344. }