<?php
/**
 * PriceSummary
 *
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'companyName' => 'string',
'marketCap' => 'int',
'currentPrice' => 'double',
'todayOpen' => 'double',
'todayHigh' => 'double',
'todayLow' => 'double',
'todayTime' => '\DateTime',
'todayVolume' => 'int',
'todayChange' => 'double',
'todayChangePercentage' => 'double',
'latestCompletedTradingDayOpen' => 'double',
'latestCompletedTradingDayHigh' => 'double',
'latestCompletedTradingDayLow' => 'double',
'latestCompletedTradingDayClose' => 'double',
'latestCompletedTradingDayChangePercentage' => 'double',
'latestCompletedTradingDayChange' => 'double',
'latestCompletedTradingDayTime' => '\DateTime',
'latestCompletedTradingDayVolume' => 'int',
'fiftyTwoWeekLow' => 'double',
'fiftyTwoWeekHigh' => 'double'    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'companyName' => null,
'marketCap' => 'int64',
'currentPrice' => 'double',
'todayOpen' => 'double',
'todayHigh' => 'double',
'todayLow' => 'double',
'todayTime' => 'date-time',
'todayVolume' => 'int64',
'todayChange' => 'double',
'todayChangePercentage' => 'double',
'latestCompletedTradingDayOpen' => 'double',
'latestCompletedTradingDayHigh' => 'double',
'latestCompletedTradingDayLow' => 'double',
'latestCompletedTradingDayClose' => 'double',
'latestCompletedTradingDayChangePercentage' => 'double',
'latestCompletedTradingDayChange' => 'double',
'latestCompletedTradingDayTime' => 'date-time',
'latestCompletedTradingDayVolume' => 'int64',
'fiftyTwoWeekLow' => 'double',
'fiftyTwoWeekHigh' => '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 = [
        'companyName' => 'companyName',
'marketCap' => 'marketCap',
'currentPrice' => 'currentPrice',
'todayOpen' => 'todayOpen',
'todayHigh' => 'todayHigh',
'todayLow' => 'todayLow',
'todayTime' => 'todayTime',
'todayVolume' => 'todayVolume',
'todayChange' => 'todayChange',
'todayChangePercentage' => 'todayChangePercentage',
'latestCompletedTradingDayOpen' => 'latestCompletedTradingDayOpen',
'latestCompletedTradingDayHigh' => 'latestCompletedTradingDayHigh',
'latestCompletedTradingDayLow' => 'latestCompletedTradingDayLow',
'latestCompletedTradingDayClose' => 'latestCompletedTradingDayClose',
'latestCompletedTradingDayChangePercentage' => 'latestCompletedTradingDayChangePercentage',
'latestCompletedTradingDayChange' => 'latestCompletedTradingDayChange',
'latestCompletedTradingDayTime' => 'latestCompletedTradingDayTime',
'latestCompletedTradingDayVolume' => 'latestCompletedTradingDayVolume',
'fiftyTwoWeekLow' => 'fiftyTwoWeekLow',
'fiftyTwoWeekHigh' => 'fiftyTwoWeekHigh'    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'companyName' => 'setCompanyName',
'marketCap' => 'setMarketCap',
'currentPrice' => 'setCurrentPrice',
'todayOpen' => 'setTodayOpen',
'todayHigh' => 'setTodayHigh',
'todayLow' => 'setTodayLow',
'todayTime' => 'setTodayTime',
'todayVolume' => 'setTodayVolume',
'todayChange' => 'setTodayChange',
'todayChangePercentage' => 'setTodayChangePercentage',
'latestCompletedTradingDayOpen' => 'setLatestCompletedTradingDayOpen',
'latestCompletedTradingDayHigh' => 'setLatestCompletedTradingDayHigh',
'latestCompletedTradingDayLow' => 'setLatestCompletedTradingDayLow',
'latestCompletedTradingDayClose' => 'setLatestCompletedTradingDayClose',
'latestCompletedTradingDayChangePercentage' => 'setLatestCompletedTradingDayChangePercentage',
'latestCompletedTradingDayChange' => 'setLatestCompletedTradingDayChange',
'latestCompletedTradingDayTime' => 'setLatestCompletedTradingDayTime',
'latestCompletedTradingDayVolume' => 'setLatestCompletedTradingDayVolume',
'fiftyTwoWeekLow' => 'setFiftyTwoWeekLow',
'fiftyTwoWeekHigh' => 'setFiftyTwoWeekHigh'    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'companyName' => 'getCompanyName',
'marketCap' => 'getMarketCap',
'currentPrice' => 'getCurrentPrice',
'todayOpen' => 'getTodayOpen',
'todayHigh' => 'getTodayHigh',
'todayLow' => 'getTodayLow',
'todayTime' => 'getTodayTime',
'todayVolume' => 'getTodayVolume',
'todayChange' => 'getTodayChange',
'todayChangePercentage' => 'getTodayChangePercentage',
'latestCompletedTradingDayOpen' => 'getLatestCompletedTradingDayOpen',
'latestCompletedTradingDayHigh' => 'getLatestCompletedTradingDayHigh',
'latestCompletedTradingDayLow' => 'getLatestCompletedTradingDayLow',
'latestCompletedTradingDayClose' => 'getLatestCompletedTradingDayClose',
'latestCompletedTradingDayChangePercentage' => 'getLatestCompletedTradingDayChangePercentage',
'latestCompletedTradingDayChange' => 'getLatestCompletedTradingDayChange',
'latestCompletedTradingDayTime' => 'getLatestCompletedTradingDayTime',
'latestCompletedTradingDayVolume' => 'getLatestCompletedTradingDayVolume',
'fiftyTwoWeekLow' => 'getFiftyTwoWeekLow',
'fiftyTwoWeekHigh' => 'getFiftyTwoWeekHigh'    ];

    /**
     * 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['companyName'] = isset($data['companyName']) ? $data['companyName'] : null;
        $this->container['marketCap'] = isset($data['marketCap']) ? $data['marketCap'] : null;
        $this->container['currentPrice'] = isset($data['currentPrice']) ? $data['currentPrice'] : null;
        $this->container['todayOpen'] = isset($data['todayOpen']) ? $data['todayOpen'] : null;
        $this->container['todayHigh'] = isset($data['todayHigh']) ? $data['todayHigh'] : null;
        $this->container['todayLow'] = isset($data['todayLow']) ? $data['todayLow'] : null;
        $this->container['todayTime'] = isset($data['todayTime']) ? $data['todayTime'] : null;
        $this->container['todayVolume'] = isset($data['todayVolume']) ? $data['todayVolume'] : null;
        $this->container['todayChange'] = isset($data['todayChange']) ? $data['todayChange'] : null;
        $this->container['todayChangePercentage'] = isset($data['todayChangePercentage']) ? $data['todayChangePercentage'] : null;
        $this->container['latestCompletedTradingDayOpen'] = isset($data['latestCompletedTradingDayOpen']) ? $data['latestCompletedTradingDayOpen'] : null;
        $this->container['latestCompletedTradingDayHigh'] = isset($data['latestCompletedTradingDayHigh']) ? $data['latestCompletedTradingDayHigh'] : null;
        $this->container['latestCompletedTradingDayLow'] = isset($data['latestCompletedTradingDayLow']) ? $data['latestCompletedTradingDayLow'] : null;
        $this->container['latestCompletedTradingDayClose'] = isset($data['latestCompletedTradingDayClose']) ? $data['latestCompletedTradingDayClose'] : null;
        $this->container['latestCompletedTradingDayChangePercentage'] = isset($data['latestCompletedTradingDayChangePercentage']) ? $data['latestCompletedTradingDayChangePercentage'] : null;
        $this->container['latestCompletedTradingDayChange'] = isset($data['latestCompletedTradingDayChange']) ? $data['latestCompletedTradingDayChange'] : null;
        $this->container['latestCompletedTradingDayTime'] = isset($data['latestCompletedTradingDayTime']) ? $data['latestCompletedTradingDayTime'] : null;
        $this->container['latestCompletedTradingDayVolume'] = isset($data['latestCompletedTradingDayVolume']) ? $data['latestCompletedTradingDayVolume'] : null;
        $this->container['fiftyTwoWeekLow'] = isset($data['fiftyTwoWeekLow']) ? $data['fiftyTwoWeekLow'] : null;
        $this->container['fiftyTwoWeekHigh'] = isset($data['fiftyTwoWeekHigh']) ? $data['fiftyTwoWeekHigh'] : 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 companyName
     *
     * @return string
     */
    public function getCompanyName()
    {
        return $this->container['companyName'];
    }

    /**
     * Sets companyName
     *
     * @param string $companyName companyName
     *
     * @return $this
     */
    public function setCompanyName($companyName)
    {
        $this->container['companyName'] = $companyName;

        return $this;
    }

    /**
     * Gets marketCap
     *
     * @return int
     */
    public function getMarketCap()
    {
        return $this->container['marketCap'];
    }

    /**
     * Sets marketCap
     *
     * @param int $marketCap marketCap
     *
     * @return $this
     */
    public function setMarketCap($marketCap)
    {
        $this->container['marketCap'] = $marketCap;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets todayVolume
     *
     * @return int
     */
    public function getTodayVolume()
    {
        return $this->container['todayVolume'];
    }

    /**
     * Sets todayVolume
     *
     * @param int $todayVolume todayVolume
     *
     * @return $this
     */
    public function setTodayVolume($todayVolume)
    {
        $this->container['todayVolume'] = $todayVolume;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets latestCompletedTradingDayVolume
     *
     * @return int
     */
    public function getLatestCompletedTradingDayVolume()
    {
        return $this->container['latestCompletedTradingDayVolume'];
    }

    /**
     * Sets latestCompletedTradingDayVolume
     *
     * @param int $latestCompletedTradingDayVolume latestCompletedTradingDayVolume
     *
     * @return $this
     */
    public function setLatestCompletedTradingDayVolume($latestCompletedTradingDayVolume)
    {
        $this->container['latestCompletedTradingDayVolume'] = $latestCompletedTradingDayVolume;

        return $this;
    }

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

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

        return $this;
    }

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

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

        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));
    }
}
