/lib/Model/GetCharactersCharacterIdPlanetsPlanetIdOkPins.php

https://gitlab.com/mglinski/php-esi-lib · PHP · 496 lines · 235 code · 59 blank · 202 comment · 9 complexity · d8bfad6f6a2fc04dcdfc0130d9d1c67d MD5 · raw file

  1. <?php
  2. /**
  3. * GetCharactersCharacterIdPlanetsPlanetIdOkPins
  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. * GetCharactersCharacterIdPlanetsPlanetIdOkPins Class Doc Comment
  43. *
  44. * @category Class */
  45. // @description pin 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 GetCharactersCharacterIdPlanetsPlanetIdOkPins implements ArrayAccess
  53. {
  54. /**
  55. * The original name of the model.
  56. * @var string
  57. */
  58. protected static $swaggerModelName = 'get_characters_character_id_planets_planet_id_ok_pins';
  59. /**
  60. * Array of property to type mappings. Used for (de)serialization
  61. * @var string[]
  62. */
  63. protected static $swaggerTypes = array(
  64. 'expiry_time' => '\DateTime',
  65. 'extractor_details' => '\ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkExtractorDetails',
  66. 'factory_details' => '\ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkFactoryDetails',
  67. 'install_time' => '\DateTime',
  68. 'last_cycle_start' => '\DateTime',
  69. 'latitude' => 'float',
  70. 'longitude' => 'float',
  71. 'pin_id' => 'int',
  72. 'schematic_id' => 'int',
  73. 'type_id' => 'int'
  74. );
  75. public static function swaggerTypes()
  76. {
  77. return self::$swaggerTypes;
  78. }
  79. /**
  80. * Array of attributes where the key is the local name, and the value is the original name
  81. * @var string[]
  82. */
  83. protected static $attributeMap = array(
  84. 'expiry_time' => 'expiry_time',
  85. 'extractor_details' => 'extractor_details',
  86. 'factory_details' => 'factory_details',
  87. 'install_time' => 'install_time',
  88. 'last_cycle_start' => 'last_cycle_start',
  89. 'latitude' => 'latitude',
  90. 'longitude' => 'longitude',
  91. 'pin_id' => 'pin_id',
  92. 'schematic_id' => 'schematic_id',
  93. 'type_id' => 'type_id'
  94. );
  95. public static function attributeMap()
  96. {
  97. return self::$attributeMap;
  98. }
  99. /**
  100. * Array of attributes to setter functions (for deserialization of responses)
  101. * @var string[]
  102. */
  103. protected static $setters = array(
  104. 'expiry_time' => 'setExpiryTime',
  105. 'extractor_details' => 'setExtractorDetails',
  106. 'factory_details' => 'setFactoryDetails',
  107. 'install_time' => 'setInstallTime',
  108. 'last_cycle_start' => 'setLastCycleStart',
  109. 'latitude' => 'setLatitude',
  110. 'longitude' => 'setLongitude',
  111. 'pin_id' => 'setPinId',
  112. 'schematic_id' => 'setSchematicId',
  113. 'type_id' => 'setTypeId'
  114. );
  115. public static function setters()
  116. {
  117. return self::$setters;
  118. }
  119. /**
  120. * Array of attributes to getter functions (for serialization of requests)
  121. * @var string[]
  122. */
  123. protected static $getters = array(
  124. 'expiry_time' => 'getExpiryTime',
  125. 'extractor_details' => 'getExtractorDetails',
  126. 'factory_details' => 'getFactoryDetails',
  127. 'install_time' => 'getInstallTime',
  128. 'last_cycle_start' => 'getLastCycleStart',
  129. 'latitude' => 'getLatitude',
  130. 'longitude' => 'getLongitude',
  131. 'pin_id' => 'getPinId',
  132. 'schematic_id' => 'getSchematicId',
  133. 'type_id' => 'getTypeId'
  134. );
  135. public static function getters()
  136. {
  137. return self::$getters;
  138. }
  139. /**
  140. * Associative array for storing property values
  141. * @var mixed[]
  142. */
  143. protected $container = array();
  144. /**
  145. * Constructor
  146. * @param mixed[] $data Associated array of property value initalizing the model
  147. */
  148. public function __construct(array $data = null)
  149. {
  150. $this->container['expiry_time'] = isset($data['expiry_time']) ? $data['expiry_time'] : null;
  151. $this->container['extractor_details'] = isset($data['extractor_details']) ? $data['extractor_details'] : null;
  152. $this->container['factory_details'] = isset($data['factory_details']) ? $data['factory_details'] : null;
  153. $this->container['install_time'] = isset($data['install_time']) ? $data['install_time'] : null;
  154. $this->container['last_cycle_start'] = isset($data['last_cycle_start']) ? $data['last_cycle_start'] : null;
  155. $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null;
  156. $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null;
  157. $this->container['pin_id'] = isset($data['pin_id']) ? $data['pin_id'] : null;
  158. $this->container['schematic_id'] = isset($data['schematic_id']) ? $data['schematic_id'] : null;
  159. $this->container['type_id'] = isset($data['type_id']) ? $data['type_id'] : null;
  160. }
  161. /**
  162. * show all the invalid properties with reasons.
  163. *
  164. * @return array invalid properties with reasons
  165. */
  166. public function listInvalidProperties()
  167. {
  168. $invalid_properties = array();
  169. if ($this->container['latitude'] === null) {
  170. $invalid_properties[] = "'latitude' can't be null";
  171. }
  172. if ($this->container['longitude'] === null) {
  173. $invalid_properties[] = "'longitude' can't be null";
  174. }
  175. if ($this->container['pin_id'] === null) {
  176. $invalid_properties[] = "'pin_id' can't be null";
  177. }
  178. if ($this->container['type_id'] === null) {
  179. $invalid_properties[] = "'type_id' can't be null";
  180. }
  181. return $invalid_properties;
  182. }
  183. /**
  184. * validate all the properties in the model
  185. * return true if all passed
  186. *
  187. * @return bool True if all properteis are valid
  188. */
  189. public function valid()
  190. {
  191. if ($this->container['latitude'] === null) {
  192. return false;
  193. }
  194. if ($this->container['longitude'] === null) {
  195. return false;
  196. }
  197. if ($this->container['pin_id'] === null) {
  198. return false;
  199. }
  200. if ($this->container['type_id'] === null) {
  201. return false;
  202. }
  203. return true;
  204. }
  205. /**
  206. * Gets expiry_time
  207. * @return \DateTime
  208. */
  209. public function getExpiryTime()
  210. {
  211. return $this->container['expiry_time'];
  212. }
  213. /**
  214. * Sets expiry_time
  215. * @param \DateTime $expiry_time expiry_time string
  216. * @return $this
  217. */
  218. public function setExpiryTime($expiry_time)
  219. {
  220. $this->container['expiry_time'] = $expiry_time;
  221. return $this;
  222. }
  223. /**
  224. * Gets extractor_details
  225. * @return \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkExtractorDetails
  226. */
  227. public function getExtractorDetails()
  228. {
  229. return $this->container['extractor_details'];
  230. }
  231. /**
  232. * Sets extractor_details
  233. * @param \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkExtractorDetails $extractor_details
  234. * @return $this
  235. */
  236. public function setExtractorDetails($extractor_details)
  237. {
  238. $this->container['extractor_details'] = $extractor_details;
  239. return $this;
  240. }
  241. /**
  242. * Gets factory_details
  243. * @return \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkFactoryDetails
  244. */
  245. public function getFactoryDetails()
  246. {
  247. return $this->container['factory_details'];
  248. }
  249. /**
  250. * Sets factory_details
  251. * @param \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkFactoryDetails $factory_details
  252. * @return $this
  253. */
  254. public function setFactoryDetails($factory_details)
  255. {
  256. $this->container['factory_details'] = $factory_details;
  257. return $this;
  258. }
  259. /**
  260. * Gets install_time
  261. * @return \DateTime
  262. */
  263. public function getInstallTime()
  264. {
  265. return $this->container['install_time'];
  266. }
  267. /**
  268. * Sets install_time
  269. * @param \DateTime $install_time install_time string
  270. * @return $this
  271. */
  272. public function setInstallTime($install_time)
  273. {
  274. $this->container['install_time'] = $install_time;
  275. return $this;
  276. }
  277. /**
  278. * Gets last_cycle_start
  279. * @return \DateTime
  280. */
  281. public function getLastCycleStart()
  282. {
  283. return $this->container['last_cycle_start'];
  284. }
  285. /**
  286. * Sets last_cycle_start
  287. * @param \DateTime $last_cycle_start last_cycle_start string
  288. * @return $this
  289. */
  290. public function setLastCycleStart($last_cycle_start)
  291. {
  292. $this->container['last_cycle_start'] = $last_cycle_start;
  293. return $this;
  294. }
  295. /**
  296. * Gets latitude
  297. * @return float
  298. */
  299. public function getLatitude()
  300. {
  301. return $this->container['latitude'];
  302. }
  303. /**
  304. * Sets latitude
  305. * @param float $latitude latitude number
  306. * @return $this
  307. */
  308. public function setLatitude($latitude)
  309. {
  310. $this->container['latitude'] = $latitude;
  311. return $this;
  312. }
  313. /**
  314. * Gets longitude
  315. * @return float
  316. */
  317. public function getLongitude()
  318. {
  319. return $this->container['longitude'];
  320. }
  321. /**
  322. * Sets longitude
  323. * @param float $longitude longitude number
  324. * @return $this
  325. */
  326. public function setLongitude($longitude)
  327. {
  328. $this->container['longitude'] = $longitude;
  329. return $this;
  330. }
  331. /**
  332. * Gets pin_id
  333. * @return int
  334. */
  335. public function getPinId()
  336. {
  337. return $this->container['pin_id'];
  338. }
  339. /**
  340. * Sets pin_id
  341. * @param int $pin_id pin_id integer
  342. * @return $this
  343. */
  344. public function setPinId($pin_id)
  345. {
  346. $this->container['pin_id'] = $pin_id;
  347. return $this;
  348. }
  349. /**
  350. * Gets schematic_id
  351. * @return int
  352. */
  353. public function getSchematicId()
  354. {
  355. return $this->container['schematic_id'];
  356. }
  357. /**
  358. * Sets schematic_id
  359. * @param int $schematic_id schematic_id integer
  360. * @return $this
  361. */
  362. public function setSchematicId($schematic_id)
  363. {
  364. $this->container['schematic_id'] = $schematic_id;
  365. return $this;
  366. }
  367. /**
  368. * Gets type_id
  369. * @return int
  370. */
  371. public function getTypeId()
  372. {
  373. return $this->container['type_id'];
  374. }
  375. /**
  376. * Sets type_id
  377. * @param int $type_id type_id integer
  378. * @return $this
  379. */
  380. public function setTypeId($type_id)
  381. {
  382. $this->container['type_id'] = $type_id;
  383. return $this;
  384. }
  385. /**
  386. * Returns true if offset exists. False otherwise.
  387. * @param integer $offset Offset
  388. * @return boolean
  389. */
  390. public function offsetExists($offset)
  391. {
  392. return isset($this->container[$offset]);
  393. }
  394. /**
  395. * Gets offset.
  396. * @param integer $offset Offset
  397. * @return mixed
  398. */
  399. public function offsetGet($offset)
  400. {
  401. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  402. }
  403. /**
  404. * Sets value based on offset.
  405. * @param integer $offset Offset
  406. * @param mixed $value Value to be set
  407. * @return void
  408. */
  409. public function offsetSet($offset, $value)
  410. {
  411. if (is_null($offset)) {
  412. $this->container[] = $value;
  413. } else {
  414. $this->container[$offset] = $value;
  415. }
  416. }
  417. /**
  418. * Unsets offset.
  419. * @param integer $offset Offset
  420. * @return void
  421. */
  422. public function offsetUnset($offset)
  423. {
  424. unset($this->container[$offset]);
  425. }
  426. /**
  427. * Gets the string presentation of the object
  428. * @return string
  429. */
  430. public function __toString()
  431. {
  432. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  433. return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
  434. }
  435. return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this));
  436. }
  437. }