/lib/Model/GetCharactersCharacterIdMailMailIdOk.php
https://gitlab.com/mglinski/php-esi-lib · PHP · 394 lines · 169 code · 50 blank · 175 comment · 3 complexity · c5f1656e91f6e2c342daf7ce616b0acf MD5 · raw file
- <?php
- /**
- * GetCharactersCharacterIdMailMailIdOk
- *
- * 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;
- /**
- * GetCharactersCharacterIdMailMailIdOk 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 GetCharactersCharacterIdMailMailIdOk implements ArrayAccess
- {
- /**
- * The original name of the model.
- * @var string
- */
- protected static $swaggerModelName = 'get_characters_character_id_mail_mail_id_ok';
- /**
- * Array of property to type mappings. Used for (de)serialization
- * @var string[]
- */
- protected static $swaggerTypes = array(
- 'body' => 'string',
- 'from' => 'int',
- 'labels' => 'int[]',
- 'read' => 'bool',
- 'recipients' => '\ESI\Client\Model\GetCharactersCharacterIdMailMailIdOkRecipients[]',
- 'subject' => 'string',
- 'timestamp' => '\DateTime'
- );
- 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(
- 'body' => 'body',
- 'from' => 'from',
- 'labels' => 'labels',
- 'read' => 'read',
- 'recipients' => 'recipients',
- 'subject' => 'subject',
- 'timestamp' => 'timestamp'
- );
- public static function attributeMap()
- {
- return self::$attributeMap;
- }
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- * @var string[]
- */
- protected static $setters = array(
- 'body' => 'setBody',
- 'from' => 'setFrom',
- 'labels' => 'setLabels',
- 'read' => 'setRead',
- 'recipients' => 'setRecipients',
- 'subject' => 'setSubject',
- 'timestamp' => 'setTimestamp'
- );
- public static function setters()
- {
- return self::$setters;
- }
- /**
- * Array of attributes to getter functions (for serialization of requests)
- * @var string[]
- */
- protected static $getters = array(
- 'body' => 'getBody',
- 'from' => 'getFrom',
- 'labels' => 'getLabels',
- 'read' => 'getRead',
- 'recipients' => 'getRecipients',
- 'subject' => 'getSubject',
- 'timestamp' => 'getTimestamp'
- );
- 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['body'] = isset($data['body']) ? $data['body'] : null;
- $this->container['from'] = isset($data['from']) ? $data['from'] : null;
- $this->container['labels'] = isset($data['labels']) ? $data['labels'] : null;
- $this->container['read'] = isset($data['read']) ? $data['read'] : null;
- $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null;
- $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null;
- $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null;
- }
- /**
- * show all the invalid properties with reasons.
- *
- * @return array invalid properties with reasons
- */
- public function listInvalidProperties()
- {
- $invalid_properties = array();
- 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()
- {
- return true;
- }
- /**
- * Gets body
- * @return string
- */
- public function getBody()
- {
- return $this->container['body'];
- }
- /**
- * Sets body
- * @param string $body Mail's body
- * @return $this
- */
- public function setBody($body)
- {
- $this->container['body'] = $body;
- return $this;
- }
- /**
- * Gets from
- * @return int
- */
- public function getFrom()
- {
- return $this->container['from'];
- }
- /**
- * Sets from
- * @param int $from From whom the mail was sent
- * @return $this
- */
- public function setFrom($from)
- {
- $this->container['from'] = $from;
- return $this;
- }
- /**
- * Gets labels
- * @return int[]
- */
- public function getLabels()
- {
- return $this->container['labels'];
- }
- /**
- * Sets labels
- * @param int[] $labels Labels attached to the mail
- * @return $this
- */
- public function setLabels($labels)
- {
- $this->container['labels'] = $labels;
- return $this;
- }
- /**
- * Gets read
- * @return bool
- */
- public function getRead()
- {
- return $this->container['read'];
- }
- /**
- * Sets read
- * @param bool $read Whether the mail is flagged as read
- * @return $this
- */
- public function setRead($read)
- {
- $this->container['read'] = $read;
- return $this;
- }
- /**
- * Gets recipients
- * @return \ESI\Client\Model\GetCharactersCharacterIdMailMailIdOkRecipients[]
- */
- public function getRecipients()
- {
- return $this->container['recipients'];
- }
- /**
- * Sets recipients
- * @param \ESI\Client\Model\GetCharactersCharacterIdMailMailIdOkRecipients[] $recipients Recipients of the mail
- * @return $this
- */
- public function setRecipients($recipients)
- {
- $this->container['recipients'] = $recipients;
- return $this;
- }
- /**
- * Gets subject
- * @return string
- */
- public function getSubject()
- {
- return $this->container['subject'];
- }
- /**
- * Sets subject
- * @param string $subject Mail subject
- * @return $this
- */
- public function setSubject($subject)
- {
- $this->container['subject'] = $subject;
- return $this;
- }
- /**
- * Gets timestamp
- * @return \DateTime
- */
- public function getTimestamp()
- {
- return $this->container['timestamp'];
- }
- /**
- * Sets timestamp
- * @param \DateTime $timestamp When the mail was sent
- * @return $this
- */
- public function setTimestamp($timestamp)
- {
- $this->container['timestamp'] = $timestamp;
- 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));
- }
- }