PageRenderTime 26ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/Model/GetCharactersCharacterIdPlanetsPlanetIdOkRoutes.php

https://gitlab.com/mglinski/php-esi-lib
PHP | 398 lines | 297 code | 20 blank | 81 comment | 3 complexity | 6b5fe8a87218539cd47fb60828af8c0d MD5 | raw file
  1. <?php
  2. /**
  3. * GetCharactersCharacterIdPlanetsPlanetIdOkRoutes
  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. * GetCharactersCharacterIdPlanetsPlanetIdOkRoutes Class Doc Comment
  43. *
  44. * @category Class */
  45. // @description route 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 GetCharactersCharacterIdPlanetsPlanetIdOkRoutes 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_routes';
  59. /**
  60. * Array of property to type mappings. Used for (de)serialization
  61. * @var string[]
  62. */
  63. protected static $swaggerTypes = array(
  64. 'content_type_id' => 'int',
  65. 'destination_pin_id' => 'int',
  66. 'quantity' => 'int',
  67. 'route_id' => 'int',
  68. 'source_pin_id' => 'int',
  69. 'waypoints' => '\ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkWaypoints[]'
  70. );
  71. public static function swaggerTypes()
  72. {
  73. return self::$swaggerTypes;
  74. }
  75. /**
  76. * Array of attributes where the key is the local name, and the value is the original name
  77. * @var string[]
  78. */
  79. protected static $attributeMap = array(
  80. 'content_type_id' => 'content_type_id',
  81. 'destination_pin_id' => 'destination_pin_id',
  82. 'quantity' => 'quantity',
  83. 'route_id' => 'route_id',
  84. 'source_pin_id' => 'source_pin_id',
  85. 'waypoints' => 'waypoints'
  86. );
  87. public static function attributeMap()
  88. {
  89. return self::$attributeMap;
  90. }
  91. /**
  92. * Array of attributes to setter functions (for deserialization of responses)
  93. * @var string[]
  94. */
  95. protected static $setters = array(
  96. 'content_type_id' => 'setContentTypeId',
  97. 'destination_pin_id' => 'setDestinationPinId',
  98. 'quantity' => 'setQuantity',
  99. 'route_id' => 'setRouteId',
  100. 'source_pin_id' => 'setSourcePinId',
  101. 'waypoints' => 'setWaypoints'
  102. );
  103. public static function setters()
  104. {
  105. return self::$setters;
  106. }
  107. /**
  108. * Array of attributes to getter functions (for serialization of requests)
  109. * @var string[]
  110. */
  111. protected static $getters = array(
  112. 'content_type_id' => 'getContentTypeId',
  113. 'destination_pin_id' => 'getDestinationPinId',
  114. 'quantity' => 'getQuantity',
  115. 'route_id' => 'getRouteId',
  116. 'source_pin_id' => 'getSourcePinId',
  117. 'waypoints' => 'getWaypoints'
  118. );
  119. public static function getters()
  120. {
  121. return self::$getters;
  122. }
  123. /**
  124. * Associative array for storing property values
  125. * @var mixed[]
  126. */
  127. protected $container = array();
  128. /**
  129. * Constructor
  130. * @param mixed[] $data Associated array of property value initalizing the model
  131. */
  132. public function __construct(array $data = null)
  133. {
  134. $this->container['content_type_id'] = isset($data['content_type_id']) ? $data['content_type_id'] : null;
  135. $this->container['destination_pin_id'] = isset($data['destination_pin_id']) ? $data['destination_pin_id'] : null;
  136. $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null;
  137. $this->container['route_id'] = isset($data['route_id']) ? $data['route_id'] : null;
  138. $this->container['source_pin_id'] = isset($data['source_pin_id']) ? $data['source_pin_id'] : null;
  139. $this->container['waypoints'] = isset($data['waypoints']) ? $data['waypoints'] : null;
  140. }
  141. /**
  142. * show all the invalid properties with reasons.
  143. *
  144. * @return array invalid properties with reasons
  145. */
  146. public function listInvalidProperties()
  147. {
  148. $invalid_properties = array();
  149. if ($this->container['content_type_id'] === null) {
  150. $invalid_properties[] = "'content_type_id' can't be null";
  151. }
  152. if ($this->container['destination_pin_id'] === null) {
  153. $invalid_properties[] = "'destination_pin_id' can't be null";
  154. }
  155. if ($this->container['quantity'] === null) {
  156. $invalid_properties[] = "'quantity' can't be null";
  157. }
  158. if ($this->container['route_id'] === null) {
  159. $invalid_properties[] = "'route_id' can't be null";
  160. }
  161. if ($this->container['source_pin_id'] === null) {
  162. $invalid_properties[] = "'source_pin_id' can't be null";
  163. }
  164. return $invalid_properties;
  165. }
  166. /**
  167. * validate all the properties in the model
  168. * return true if all passed
  169. *
  170. * @return bool True if all properteis are valid
  171. */
  172. public function valid()
  173. {
  174. if ($this->container['content_type_id'] === null) {
  175. return false;
  176. }
  177. if ($this->container['destination_pin_id'] === null) {
  178. return false;
  179. }
  180. if ($this->container['quantity'] === null) {
  181. return false;
  182. }
  183. if ($this->container['route_id'] === null) {
  184. return false;
  185. }
  186. if ($this->container['source_pin_id'] === null) {
  187. return false;
  188. }
  189. return true;
  190. }
  191. /**
  192. * Gets content_type_id
  193. * @return int
  194. */
  195. public function getContentTypeId()
  196. {
  197. return $this->container['content_type_id'];
  198. }
  199. /**
  200. * Sets content_type_id
  201. * @param int $content_type_id content_type_id integer
  202. * @return $this
  203. */
  204. public function setContentTypeId($content_type_id)
  205. {
  206. $this->container['content_type_id'] = $content_type_id;
  207. return $this;
  208. }
  209. /**
  210. * Gets destination_pin_id
  211. * @return int
  212. */
  213. public function getDestinationPinId()
  214. {
  215. return $this->container['destination_pin_id'];
  216. }
  217. /**
  218. * Sets destination_pin_id
  219. * @param int $destination_pin_id destination_pin_id integer
  220. * @return $this
  221. */
  222. public function setDestinationPinId($destination_pin_id)
  223. {
  224. $this->container['destination_pin_id'] = $destination_pin_id;
  225. return $this;
  226. }
  227. /**
  228. * Gets quantity
  229. * @return int
  230. */
  231. public function getQuantity()
  232. {
  233. return $this->container['quantity'];
  234. }
  235. /**
  236. * Sets quantity
  237. * @param int $quantity quantity integer
  238. * @return $this
  239. */
  240. public function setQuantity($quantity)
  241. {
  242. $this->container['quantity'] = $quantity;
  243. return $this;
  244. }
  245. /**
  246. * Gets route_id
  247. * @return int
  248. */
  249. public function getRouteId()
  250. {
  251. return $this->container['route_id'];
  252. }
  253. /**
  254. * Sets route_id
  255. * @param int $route_id route_id integer
  256. * @return $this
  257. */
  258. public function setRouteId($route_id)
  259. {
  260. $this->container['route_id'] = $route_id;
  261. return $this;
  262. }
  263. /**
  264. * Gets source_pin_id
  265. * @return int
  266. */
  267. public function getSourcePinId()
  268. {
  269. return $this->container['source_pin_id'];
  270. }
  271. /**
  272. * Sets source_pin_id
  273. * @param int $source_pin_id source_pin_id integer
  274. * @return $this
  275. */
  276. public function setSourcePinId($source_pin_id)
  277. {
  278. $this->container['source_pin_id'] = $source_pin_id;
  279. return $this;
  280. }
  281. /**
  282. * Gets waypoints
  283. * @return \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkWaypoints[]
  284. */
  285. public function getWaypoints()
  286. {
  287. return $this->container['waypoints'];
  288. }
  289. /**
  290. * Sets waypoints
  291. * @param \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkWaypoints[] $waypoints waypoints array
  292. * @return $this
  293. */
  294. public function setWaypoints($waypoints)
  295. {
  296. $this->container['waypoints'] = $waypoints;
  297. return $this;
  298. }
  299. /**
  300. * Returns true if offset exists. False otherwise.
  301. * @param integer $offset Offset
  302. * @return boolean
  303. */
  304. public function offsetExists($offset)
  305. {
  306. return isset($this->container[$offset]);
  307. }
  308. /**
  309. * Gets offset.
  310. * @param integer $offset Offset
  311. * @return mixed
  312. */
  313. public function offsetGet($offset)
  314. {
  315. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  316. }
  317. /**
  318. * Sets value based on offset.
  319. * @param integer $offset Offset
  320. * @param mixed $value Value to be set
  321. * @return void
  322. */
  323. public function offsetSet($offset, $value)
  324. {
  325. if (is_null($offset)) {
  326. $this->container[] = $value;
  327. } else {
  328. $this->container[$offset] = $value;
  329. }
  330. }
  331. /**
  332. * Unsets offset.
  333. * @param integer $offset Offset
  334. * @return void
  335. */
  336. public function offsetUnset($offset)
  337. {
  338. unset($this->container[$offset]);
  339. }
  340. /**
  341. * Gets the string presentation of the object
  342. * @return string
  343. */
  344. public function __toString()
  345. {
  346. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  347. return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
  348. }
  349. return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this));
  350. }
  351. }