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

/lib/Model/GetInsurancePrices200Ok.php

https://gitlab.com/mglinski/php-esi-lib
PHP | 276 lines | 111 code | 35 blank | 130 comment | 6 complexity | b8953f3c5abb5a1fcebdb6fe2dc88f99 MD5 | raw file
  1. <?php
  2. /**
  3. * GetInsurancePrices200Ok
  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. * GetInsurancePrices200Ok 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 GetInsurancePrices200Ok implements ArrayAccess
  53. {
  54. /**
  55. * The original name of the model.
  56. * @var string
  57. */
  58. protected static $swaggerModelName = 'get_insurance_prices_200_ok';
  59. /**
  60. * Array of property to type mappings. Used for (de)serialization
  61. * @var string[]
  62. */
  63. protected static $swaggerTypes = array(
  64. 'levels' => '\ESI\Client\Model\InsurancepricesLevels[]',
  65. 'type_id' => 'int'
  66. );
  67. public static function swaggerTypes()
  68. {
  69. return self::$swaggerTypes;
  70. }
  71. /**
  72. * Array of attributes where the key is the local name, and the value is the original name
  73. * @var string[]
  74. */
  75. protected static $attributeMap = array(
  76. 'levels' => 'levels',
  77. 'type_id' => 'type_id'
  78. );
  79. public static function attributeMap()
  80. {
  81. return self::$attributeMap;
  82. }
  83. /**
  84. * Array of attributes to setter functions (for deserialization of responses)
  85. * @var string[]
  86. */
  87. protected static $setters = array(
  88. 'levels' => 'setLevels',
  89. 'type_id' => 'setTypeId'
  90. );
  91. public static function setters()
  92. {
  93. return self::$setters;
  94. }
  95. /**
  96. * Array of attributes to getter functions (for serialization of requests)
  97. * @var string[]
  98. */
  99. protected static $getters = array(
  100. 'levels' => 'getLevels',
  101. 'type_id' => 'getTypeId'
  102. );
  103. public static function getters()
  104. {
  105. return self::$getters;
  106. }
  107. /**
  108. * Associative array for storing property values
  109. * @var mixed[]
  110. */
  111. protected $container = array();
  112. /**
  113. * Constructor
  114. * @param mixed[] $data Associated array of property value initalizing the model
  115. */
  116. public function __construct(array $data = null)
  117. {
  118. $this->container['levels'] = isset($data['levels']) ? $data['levels'] : null;
  119. $this->container['type_id'] = isset($data['type_id']) ? $data['type_id'] : null;
  120. }
  121. /**
  122. * show all the invalid properties with reasons.
  123. *
  124. * @return array invalid properties with reasons
  125. */
  126. public function listInvalidProperties()
  127. {
  128. $invalid_properties = array();
  129. if ($this->container['levels'] === null) {
  130. $invalid_properties[] = "'levels' can't be null";
  131. }
  132. if ($this->container['type_id'] === null) {
  133. $invalid_properties[] = "'type_id' can't be null";
  134. }
  135. return $invalid_properties;
  136. }
  137. /**
  138. * validate all the properties in the model
  139. * return true if all passed
  140. *
  141. * @return bool True if all properteis are valid
  142. */
  143. public function valid()
  144. {
  145. if ($this->container['levels'] === null) {
  146. return false;
  147. }
  148. if ($this->container['type_id'] === null) {
  149. return false;
  150. }
  151. return true;
  152. }
  153. /**
  154. * Gets levels
  155. * @return \ESI\Client\Model\InsurancepricesLevels[]
  156. */
  157. public function getLevels()
  158. {
  159. return $this->container['levels'];
  160. }
  161. /**
  162. * Sets levels
  163. * @param \ESI\Client\Model\InsurancepricesLevels[] $levels A list of a available insurance levels for this ship type
  164. * @return $this
  165. */
  166. public function setLevels($levels)
  167. {
  168. $this->container['levels'] = $levels;
  169. return $this;
  170. }
  171. /**
  172. * Gets type_id
  173. * @return int
  174. */
  175. public function getTypeId()
  176. {
  177. return $this->container['type_id'];
  178. }
  179. /**
  180. * Sets type_id
  181. * @param int $type_id type_id integer
  182. * @return $this
  183. */
  184. public function setTypeId($type_id)
  185. {
  186. $this->container['type_id'] = $type_id;
  187. return $this;
  188. }
  189. /**
  190. * Returns true if offset exists. False otherwise.
  191. * @param integer $offset Offset
  192. * @return boolean
  193. */
  194. public function offsetExists($offset)
  195. {
  196. return isset($this->container[$offset]);
  197. }
  198. /**
  199. * Gets offset.
  200. * @param integer $offset Offset
  201. * @return mixed
  202. */
  203. public function offsetGet($offset)
  204. {
  205. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  206. }
  207. /**
  208. * Sets value based on offset.
  209. * @param integer $offset Offset
  210. * @param mixed $value Value to be set
  211. * @return void
  212. */
  213. public function offsetSet($offset, $value)
  214. {
  215. if (is_null($offset)) {
  216. $this->container[] = $value;
  217. } else {
  218. $this->container[$offset] = $value;
  219. }
  220. }
  221. /**
  222. * Unsets offset.
  223. * @param integer $offset Offset
  224. * @return void
  225. */
  226. public function offsetUnset($offset)
  227. {
  228. unset($this->container[$offset]);
  229. }
  230. /**
  231. * Gets the string presentation of the object
  232. * @return string
  233. */
  234. public function __toString()
  235. {
  236. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  237. return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
  238. }
  239. return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this));
  240. }
  241. }