/lib/Model/GetCharactersCharacterIdPlanetsPlanetIdOk.php
https://gitlab.com/mglinski/php-esi-lib · PHP · 308 lines · 207 code · 20 blank · 81 comment · 2 complexity · ea8a8b547918469324e863aa640dca54 MD5 · raw file
- <?php
- /**
- * GetCharactersCharacterIdPlanetsPlanetIdOk
- *
- * PHP version 5
- *
- * @category Class
- * @package ESI\Client
- * @author http://github.com/swagger-api/swagger-codegen
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
- * @link https://github.com/swagger-api/swagger-codegen
- */
- /**
- * EVE Swagger Interface
- *
- * An OpenAPI for EVE Online
- *
- * OpenAPI spec version: 0.3.9
- *
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- /**
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen
- * Do not edit the class manually.
- */
- namespace ESI\Client\Model;
- use ArrayAccess;
- /**
- * GetCharactersCharacterIdPlanetsPlanetIdOk Class Doc Comment
- *
- * @category Class */
- // @description 200 ok object
- /**
- * @package ESI\Client
- * @author http://github.com/swagger-api/swagger-codegen
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
- * @link https://github.com/swagger-api/swagger-codegen
- */
- class GetCharactersCharacterIdPlanetsPlanetIdOk implements ArrayAccess
- {
- /**
- * The original name of the model.
- * @var string
- */
- protected static $swaggerModelName = 'get_characters_character_id_planets_planet_id_ok';
- /**
- * Array of property to type mappings. Used for (de)serialization
- * @var string[]
- */
- protected static $swaggerTypes = array(
- 'links' => '\ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkLinks[]',
- 'pins' => '\ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkPins[]',
- 'routes' => '\ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkRoutes[]'
- );
- public static function swaggerTypes()
- {
- return self::$swaggerTypes;
- }
- /**
- * Array of attributes where the key is the local name, and the value is the original name
- * @var string[]
- */
- protected static $attributeMap = array(
- 'links' => 'links',
- 'pins' => 'pins',
- 'routes' => 'routes'
- );
- public static function attributeMap()
- {
- return self::$attributeMap;
- }
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
- protected static $setters = array(
- 'links' => 'setLinks',
- 'pins' => 'setPins',
- 'routes' => 'setRoutes'
- );
- public static function setters()
- {
- return self::$setters;
- }
- /**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
- protected static $getters = array(
- 'links' => 'getLinks',
- 'pins' => 'getPins',
- 'routes' => 'getRoutes'
- );
- public static function getters()
- {
- return self::$getters;
- }
-
-
- /**
- * Associative array for storing property values
- * @var mixed[]
- */
- protected $container = array();
- /**
- * Constructor
- * @param mixed[] $data Associated array of property value initalizing the model
- */
- public function __construct(array $data = null)
- {
- $this->container['links'] = isset($data['links']) ? $data['links'] : null;
- $this->container['pins'] = isset($data['pins']) ? $data['pins'] : null;
- $this->container['routes'] = isset($data['routes']) ? $data['routes'] : null;
- }
- /**
- * show all the invalid properties with reasons.
- *
- * @return array invalid properties with reasons
- */
- public function listInvalidProperties()
- {
- $invalid_properties = array();
- if ($this->container['links'] === null) {
- $invalid_properties[] = "'links' can't be null";
- }
- if ($this->container['pins'] === null) {
- $invalid_properties[] = "'pins' can't be null";
- }
- if ($this->container['routes'] === null) {
- $invalid_properties[] = "'routes' can't be null";
- }
- return $invalid_properties;
- }
- /**
- * validate all the properties in the model
- * return true if all passed
- *
- * @return bool True if all properteis are valid
- */
- public function valid()
- {
- if ($this->container['links'] === null) {
- return false;
- }
- if ($this->container['pins'] === null) {
- return false;
- }
- if ($this->container['routes'] === null) {
- return false;
- }
- return true;
- }
- /**
- * Gets links
- * @return \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkLinks[]
- */
- public function getLinks()
- {
- return $this->container['links'];
- }
- /**
- * Sets links
- * @param \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkLinks[] $links links array
- * @return $this
- */
- public function setLinks($links)
- {
- $this->container['links'] = $links;
- return $this;
- }
- /**
- * Gets pins
- * @return \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkPins[]
- */
- public function getPins()
- {
- return $this->container['pins'];
- }
- /**
- * Sets pins
- * @param \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkPins[] $pins pins array
- * @return $this
- */
- public function setPins($pins)
- {
- $this->container['pins'] = $pins;
- return $this;
- }
- /**
- * Gets routes
- * @return \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkRoutes[]
- */
- public function getRoutes()
- {
- return $this->container['routes'];
- }
- /**
- * Sets routes
- * @param \ESI\Client\Model\GetCharactersCharacterIdPlanetsPlanetIdOkRoutes[] $routes routes array
- * @return $this
- */
- public function setRoutes($routes)
- {
- $this->container['routes'] = $routes;
- return $this;
- }
- /**
- * Returns true if offset exists. False otherwise.
- * @param integer $offset Offset
- * @return boolean
- */
- public function offsetExists($offset)
- {
- return isset($this->container[$offset]);
- }
- /**
- * Gets offset.
- * @param integer $offset Offset
- * @return mixed
- */
- public function offsetGet($offset)
- {
- return isset($this->container[$offset]) ? $this->container[$offset] : null;
- }
- /**
- * Sets value based on offset.
- * @param integer $offset Offset
- * @param mixed $value Value to be set
- * @return void
- */
- public function offsetSet($offset, $value)
- {
- if (is_null($offset)) {
- $this->container[] = $value;
- } else {
- $this->container[$offset] = $value;
- }
- }
- /**
- * Unsets offset.
- * @param integer $offset Offset
- * @return void
- */
- public function offsetUnset($offset)
- {
- unset($this->container[$offset]);
- }
- /**
- * Gets the string presentation of the object
- * @return string
- */
- public function __toString()
- {
- if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
- return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
- }
- return json_encode(\ESI\Client\ObjectSerializer::sanitizeForSerialization($this));
- }
- }