/lib/Model/GetKillmailsKillmailIdKillmailHashOkAttackers.php

https://gitlab.com/mglinski/php-esi-lib · PHP · 464 lines · 363 code · 20 blank · 81 comment · 2 complexity · 6a7be519ed87dbf74e1a5484d6c31ed2 MD5 · raw file

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