<?php
/**
 * Performance
 *
 * PHP version 5
 *
 * @category Class
 * @package  EquiblesStocks
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * Stocks
 *
 * <h3>Rate limits</h3>                     Free subscriptions are subject to daily limits. To know how much requests you have left look at the following headers in the response.<br />                     1. <strong>x-ratelimit-limit</strong> - The total number of requests that you are allowed to make in a given period (hour/day)<br />                     2. <strong>x-ratelimit-remaining</strong> - The number of remaining requests that you can perform in the current period.<br />                     3. <strong>x-ratelimit-reset</strong> - The number of seconds until the current period resets.<br />                     <br />                     <br />                     You don't have an API key? <a href=\"https://www.equibles.com/api/pricing\" target=\"_blank\">Get one for free here.</a>
 *
 * OpenAPI spec version: v1
 * Contact: contact@equibles.com
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 3.0.34
 */
/**
 * 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 EquiblesStocks\Models;

use \ArrayAccess;
use \EquiblesStocks\ObjectSerializer;

/**
 * Performance Class Doc Comment
 *
 * @category Class
 * @package  EquiblesStocks
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class Performance implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $swaggerModelName = 'Performance';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'lastUpdate' => '\DateTime',
'oneDay' => 'double',
'oneWeek' => 'double',
'twoWeeks' => 'double',
'oneMonth' => 'double',
'threeMonths' => 'double',
'sixMonths' => 'double',
'yearToDate' => 'double',
'oneYear' => 'double',
'twoYears' => 'double',
'twoYearsAnnualized' => 'double',
'threeYears' => 'double',
'threeYearsAnnualized' => 'double',
'fiveYears' => 'double',
'fiveYearsAnnualized' => 'double',
'tenYears' => 'double',
'tenYearsAnnualized' => 'double',
'twentyYears' => 'double',
'twentyYearsAnnualized' => 'double'    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'lastUpdate' => 'date-time',
'oneDay' => 'double',
'oneWeek' => 'double',
'twoWeeks' => 'double',
'oneMonth' => 'double',
'threeMonths' => 'double',
'sixMonths' => 'double',
'yearToDate' => 'double',
'oneYear' => 'double',
'twoYears' => 'double',
'twoYearsAnnualized' => 'double',
'threeYears' => 'double',
'threeYearsAnnualized' => 'double',
'fiveYears' => 'double',
'fiveYearsAnnualized' => 'double',
'tenYears' => 'double',
'tenYearsAnnualized' => 'double',
'twentyYears' => 'double',
'twentyYearsAnnualized' => 'double'    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'lastUpdate' => 'lastUpdate',
'oneDay' => 'oneDay',
'oneWeek' => 'oneWeek',
'twoWeeks' => 'twoWeeks',
'oneMonth' => 'oneMonth',
'threeMonths' => 'threeMonths',
'sixMonths' => 'sixMonths',
'yearToDate' => 'yearToDate',
'oneYear' => 'oneYear',
'twoYears' => 'twoYears',
'twoYearsAnnualized' => 'twoYearsAnnualized',
'threeYears' => 'threeYears',
'threeYearsAnnualized' => 'threeYearsAnnualized',
'fiveYears' => 'fiveYears',
'fiveYearsAnnualized' => 'fiveYearsAnnualized',
'tenYears' => 'tenYears',
'tenYearsAnnualized' => 'tenYearsAnnualized',
'twentyYears' => 'twentyYears',
'twentyYearsAnnualized' => 'twentyYearsAnnualized'    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'lastUpdate' => 'setLastUpdate',
'oneDay' => 'setOneDay',
'oneWeek' => 'setOneWeek',
'twoWeeks' => 'setTwoWeeks',
'oneMonth' => 'setOneMonth',
'threeMonths' => 'setThreeMonths',
'sixMonths' => 'setSixMonths',
'yearToDate' => 'setYearToDate',
'oneYear' => 'setOneYear',
'twoYears' => 'setTwoYears',
'twoYearsAnnualized' => 'setTwoYearsAnnualized',
'threeYears' => 'setThreeYears',
'threeYearsAnnualized' => 'setThreeYearsAnnualized',
'fiveYears' => 'setFiveYears',
'fiveYearsAnnualized' => 'setFiveYearsAnnualized',
'tenYears' => 'setTenYears',
'tenYearsAnnualized' => 'setTenYearsAnnualized',
'twentyYears' => 'setTwentyYears',
'twentyYearsAnnualized' => 'setTwentyYearsAnnualized'    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'lastUpdate' => 'getLastUpdate',
'oneDay' => 'getOneDay',
'oneWeek' => 'getOneWeek',
'twoWeeks' => 'getTwoWeeks',
'oneMonth' => 'getOneMonth',
'threeMonths' => 'getThreeMonths',
'sixMonths' => 'getSixMonths',
'yearToDate' => 'getYearToDate',
'oneYear' => 'getOneYear',
'twoYears' => 'getTwoYears',
'twoYearsAnnualized' => 'getTwoYearsAnnualized',
'threeYears' => 'getThreeYears',
'threeYearsAnnualized' => 'getThreeYearsAnnualized',
'fiveYears' => 'getFiveYears',
'fiveYearsAnnualized' => 'getFiveYearsAnnualized',
'tenYears' => 'getTenYears',
'tenYearsAnnualized' => 'getTenYearsAnnualized',
'twentyYears' => 'getTwentyYears',
'twentyYearsAnnualized' => 'getTwentyYearsAnnualized'    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$swaggerModelName;
    }

    

    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['lastUpdate'] = isset($data['lastUpdate']) ? $data['lastUpdate'] : null;
        $this->container['oneDay'] = isset($data['oneDay']) ? $data['oneDay'] : null;
        $this->container['oneWeek'] = isset($data['oneWeek']) ? $data['oneWeek'] : null;
        $this->container['twoWeeks'] = isset($data['twoWeeks']) ? $data['twoWeeks'] : null;
        $this->container['oneMonth'] = isset($data['oneMonth']) ? $data['oneMonth'] : null;
        $this->container['threeMonths'] = isset($data['threeMonths']) ? $data['threeMonths'] : null;
        $this->container['sixMonths'] = isset($data['sixMonths']) ? $data['sixMonths'] : null;
        $this->container['yearToDate'] = isset($data['yearToDate']) ? $data['yearToDate'] : null;
        $this->container['oneYear'] = isset($data['oneYear']) ? $data['oneYear'] : null;
        $this->container['twoYears'] = isset($data['twoYears']) ? $data['twoYears'] : null;
        $this->container['twoYearsAnnualized'] = isset($data['twoYearsAnnualized']) ? $data['twoYearsAnnualized'] : null;
        $this->container['threeYears'] = isset($data['threeYears']) ? $data['threeYears'] : null;
        $this->container['threeYearsAnnualized'] = isset($data['threeYearsAnnualized']) ? $data['threeYearsAnnualized'] : null;
        $this->container['fiveYears'] = isset($data['fiveYears']) ? $data['fiveYears'] : null;
        $this->container['fiveYearsAnnualized'] = isset($data['fiveYearsAnnualized']) ? $data['fiveYearsAnnualized'] : null;
        $this->container['tenYears'] = isset($data['tenYears']) ? $data['tenYears'] : null;
        $this->container['tenYearsAnnualized'] = isset($data['tenYearsAnnualized']) ? $data['tenYearsAnnualized'] : null;
        $this->container['twentyYears'] = isset($data['twentyYears']) ? $data['twentyYears'] : null;
        $this->container['twentyYearsAnnualized'] = isset($data['twentyYearsAnnualized']) ? $data['twentyYearsAnnualized'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets lastUpdate
     *
     * @return \DateTime
     */
    public function getLastUpdate()
    {
        return $this->container['lastUpdate'];
    }

    /**
     * Sets lastUpdate
     *
     * @param \DateTime $lastUpdate lastUpdate
     *
     * @return $this
     */
    public function setLastUpdate($lastUpdate)
    {
        $this->container['lastUpdate'] = $lastUpdate;

        return $this;
    }

    /**
     * Gets oneDay
     *
     * @return double
     */
    public function getOneDay()
    {
        return $this->container['oneDay'];
    }

    /**
     * Sets oneDay
     *
     * @param double $oneDay oneDay
     *
     * @return $this
     */
    public function setOneDay($oneDay)
    {
        $this->container['oneDay'] = $oneDay;

        return $this;
    }

    /**
     * Gets oneWeek
     *
     * @return double
     */
    public function getOneWeek()
    {
        return $this->container['oneWeek'];
    }

    /**
     * Sets oneWeek
     *
     * @param double $oneWeek oneWeek
     *
     * @return $this
     */
    public function setOneWeek($oneWeek)
    {
        $this->container['oneWeek'] = $oneWeek;

        return $this;
    }

    /**
     * Gets twoWeeks
     *
     * @return double
     */
    public function getTwoWeeks()
    {
        return $this->container['twoWeeks'];
    }

    /**
     * Sets twoWeeks
     *
     * @param double $twoWeeks twoWeeks
     *
     * @return $this
     */
    public function setTwoWeeks($twoWeeks)
    {
        $this->container['twoWeeks'] = $twoWeeks;

        return $this;
    }

    /**
     * Gets oneMonth
     *
     * @return double
     */
    public function getOneMonth()
    {
        return $this->container['oneMonth'];
    }

    /**
     * Sets oneMonth
     *
     * @param double $oneMonth oneMonth
     *
     * @return $this
     */
    public function setOneMonth($oneMonth)
    {
        $this->container['oneMonth'] = $oneMonth;

        return $this;
    }

    /**
     * Gets threeMonths
     *
     * @return double
     */
    public function getThreeMonths()
    {
        return $this->container['threeMonths'];
    }

    /**
     * Sets threeMonths
     *
     * @param double $threeMonths threeMonths
     *
     * @return $this
     */
    public function setThreeMonths($threeMonths)
    {
        $this->container['threeMonths'] = $threeMonths;

        return $this;
    }

    /**
     * Gets sixMonths
     *
     * @return double
     */
    public function getSixMonths()
    {
        return $this->container['sixMonths'];
    }

    /**
     * Sets sixMonths
     *
     * @param double $sixMonths sixMonths
     *
     * @return $this
     */
    public function setSixMonths($sixMonths)
    {
        $this->container['sixMonths'] = $sixMonths;

        return $this;
    }

    /**
     * Gets yearToDate
     *
     * @return double
     */
    public function getYearToDate()
    {
        return $this->container['yearToDate'];
    }

    /**
     * Sets yearToDate
     *
     * @param double $yearToDate yearToDate
     *
     * @return $this
     */
    public function setYearToDate($yearToDate)
    {
        $this->container['yearToDate'] = $yearToDate;

        return $this;
    }

    /**
     * Gets oneYear
     *
     * @return double
     */
    public function getOneYear()
    {
        return $this->container['oneYear'];
    }

    /**
     * Sets oneYear
     *
     * @param double $oneYear oneYear
     *
     * @return $this
     */
    public function setOneYear($oneYear)
    {
        $this->container['oneYear'] = $oneYear;

        return $this;
    }

    /**
     * Gets twoYears
     *
     * @return double
     */
    public function getTwoYears()
    {
        return $this->container['twoYears'];
    }

    /**
     * Sets twoYears
     *
     * @param double $twoYears twoYears
     *
     * @return $this
     */
    public function setTwoYears($twoYears)
    {
        $this->container['twoYears'] = $twoYears;

        return $this;
    }

    /**
     * Gets twoYearsAnnualized
     *
     * @return double
     */
    public function getTwoYearsAnnualized()
    {
        return $this->container['twoYearsAnnualized'];
    }

    /**
     * Sets twoYearsAnnualized
     *
     * @param double $twoYearsAnnualized twoYearsAnnualized
     *
     * @return $this
     */
    public function setTwoYearsAnnualized($twoYearsAnnualized)
    {
        $this->container['twoYearsAnnualized'] = $twoYearsAnnualized;

        return $this;
    }

    /**
     * Gets threeYears
     *
     * @return double
     */
    public function getThreeYears()
    {
        return $this->container['threeYears'];
    }

    /**
     * Sets threeYears
     *
     * @param double $threeYears threeYears
     *
     * @return $this
     */
    public function setThreeYears($threeYears)
    {
        $this->container['threeYears'] = $threeYears;

        return $this;
    }

    /**
     * Gets threeYearsAnnualized
     *
     * @return double
     */
    public function getThreeYearsAnnualized()
    {
        return $this->container['threeYearsAnnualized'];
    }

    /**
     * Sets threeYearsAnnualized
     *
     * @param double $threeYearsAnnualized threeYearsAnnualized
     *
     * @return $this
     */
    public function setThreeYearsAnnualized($threeYearsAnnualized)
    {
        $this->container['threeYearsAnnualized'] = $threeYearsAnnualized;

        return $this;
    }

    /**
     * Gets fiveYears
     *
     * @return double
     */
    public function getFiveYears()
    {
        return $this->container['fiveYears'];
    }

    /**
     * Sets fiveYears
     *
     * @param double $fiveYears fiveYears
     *
     * @return $this
     */
    public function setFiveYears($fiveYears)
    {
        $this->container['fiveYears'] = $fiveYears;

        return $this;
    }

    /**
     * Gets fiveYearsAnnualized
     *
     * @return double
     */
    public function getFiveYearsAnnualized()
    {
        return $this->container['fiveYearsAnnualized'];
    }

    /**
     * Sets fiveYearsAnnualized
     *
     * @param double $fiveYearsAnnualized fiveYearsAnnualized
     *
     * @return $this
     */
    public function setFiveYearsAnnualized($fiveYearsAnnualized)
    {
        $this->container['fiveYearsAnnualized'] = $fiveYearsAnnualized;

        return $this;
    }

    /**
     * Gets tenYears
     *
     * @return double
     */
    public function getTenYears()
    {
        return $this->container['tenYears'];
    }

    /**
     * Sets tenYears
     *
     * @param double $tenYears tenYears
     *
     * @return $this
     */
    public function setTenYears($tenYears)
    {
        $this->container['tenYears'] = $tenYears;

        return $this;
    }

    /**
     * Gets tenYearsAnnualized
     *
     * @return double
     */
    public function getTenYearsAnnualized()
    {
        return $this->container['tenYearsAnnualized'];
    }

    /**
     * Sets tenYearsAnnualized
     *
     * @param double $tenYearsAnnualized tenYearsAnnualized
     *
     * @return $this
     */
    public function setTenYearsAnnualized($tenYearsAnnualized)
    {
        $this->container['tenYearsAnnualized'] = $tenYearsAnnualized;

        return $this;
    }

    /**
     * Gets twentyYears
     *
     * @return double
     */
    public function getTwentyYears()
    {
        return $this->container['twentyYears'];
    }

    /**
     * Sets twentyYears
     *
     * @param double $twentyYears twentyYears
     *
     * @return $this
     */
    public function setTwentyYears($twentyYears)
    {
        $this->container['twentyYears'] = $twentyYears;

        return $this;
    }

    /**
     * Gets twentyYearsAnnualized
     *
     * @return double
     */
    public function getTwentyYearsAnnualized()
    {
        return $this->container['twentyYearsAnnualized'];
    }

    /**
     * Sets twentyYearsAnnualized
     *
     * @param double $twentyYearsAnnualized twentyYearsAnnualized
     *
     * @return $this
     */
    public function setTwentyYearsAnnualized($twentyYearsAnnualized)
    {
        $this->container['twentyYearsAnnualized'] = $twentyYearsAnnualized;

        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(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}
