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

/**
 * CyberSource Merged Spec
 *
 * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
 *
 * OpenAPI spec version: 0.0.1
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 */
/**
 * 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 CyberSource\Model;

use \ArrayAccess;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'ipAddress' => 'string',
        'rawData' => '\CyberSource\Model\Ptsv2paymentsDeviceInformationRawData[]',
        'httpAcceptBrowserValue' => 'string',
        'httpAcceptContent' => 'string',
        'httpBrowserLanguage' => 'string',
        'httpBrowserJavaEnabled' => 'bool',
        'httpBrowserJavaScriptEnabled' => 'bool',
        'httpBrowserColorDepth' => 'string',
        'httpBrowserScreenHeight' => 'string',
        'httpBrowserScreenWidth' => 'string',
        'httpBrowserTimeDifference' => 'string',
        'userAgentBrowserValue' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerFormats = [
        'ipAddress' => null,
        'rawData' => null,
        'httpAcceptBrowserValue' => null,
        'httpAcceptContent' => null,
        'httpBrowserLanguage' => null,
        'httpBrowserJavaEnabled' => null,
        'httpBrowserJavaScriptEnabled' => null,
        'httpBrowserColorDepth' => null,
        'httpBrowserScreenHeight' => null,
        'httpBrowserScreenWidth' => null,
        'httpBrowserTimeDifference' => null,
        'userAgentBrowserValue' => null
    ];

    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    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 = [
        'ipAddress' => 'ipAddress',
        'rawData' => 'rawData',
        'httpAcceptBrowserValue' => 'httpAcceptBrowserValue',
        'httpAcceptContent' => 'httpAcceptContent',
        'httpBrowserLanguage' => 'httpBrowserLanguage',
        'httpBrowserJavaEnabled' => 'httpBrowserJavaEnabled',
        'httpBrowserJavaScriptEnabled' => 'httpBrowserJavaScriptEnabled',
        'httpBrowserColorDepth' => 'httpBrowserColorDepth',
        'httpBrowserScreenHeight' => 'httpBrowserScreenHeight',
        'httpBrowserScreenWidth' => 'httpBrowserScreenWidth',
        'httpBrowserTimeDifference' => 'httpBrowserTimeDifference',
        'userAgentBrowserValue' => 'userAgentBrowserValue'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'ipAddress' => 'setIpAddress',
        'rawData' => 'setRawData',
        'httpAcceptBrowserValue' => 'setHttpAcceptBrowserValue',
        'httpAcceptContent' => 'setHttpAcceptContent',
        'httpBrowserLanguage' => 'setHttpBrowserLanguage',
        'httpBrowserJavaEnabled' => 'setHttpBrowserJavaEnabled',
        'httpBrowserJavaScriptEnabled' => 'setHttpBrowserJavaScriptEnabled',
        'httpBrowserColorDepth' => 'setHttpBrowserColorDepth',
        'httpBrowserScreenHeight' => 'setHttpBrowserScreenHeight',
        'httpBrowserScreenWidth' => 'setHttpBrowserScreenWidth',
        'httpBrowserTimeDifference' => 'setHttpBrowserTimeDifference',
        'userAgentBrowserValue' => 'setUserAgentBrowserValue'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'ipAddress' => 'getIpAddress',
        'rawData' => 'getRawData',
        'httpAcceptBrowserValue' => 'getHttpAcceptBrowserValue',
        'httpAcceptContent' => 'getHttpAcceptContent',
        'httpBrowserLanguage' => 'getHttpBrowserLanguage',
        'httpBrowserJavaEnabled' => 'getHttpBrowserJavaEnabled',
        'httpBrowserJavaScriptEnabled' => 'getHttpBrowserJavaScriptEnabled',
        'httpBrowserColorDepth' => 'getHttpBrowserColorDepth',
        'httpBrowserScreenHeight' => 'getHttpBrowserScreenHeight',
        'httpBrowserScreenWidth' => 'getHttpBrowserScreenWidth',
        'httpBrowserTimeDifference' => 'getHttpBrowserTimeDifference',
        'userAgentBrowserValue' => 'getUserAgentBrowserValue'
    ];

    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    public static function setters()
    {
        return self::$setters;
    }

    public static function getters()
    {
        return self::$getters;
    }

    

    

    /**
     * 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['ipAddress'] = isset($data['ipAddress']) ? $data['ipAddress'] : null;
        $this->container['rawData'] = isset($data['rawData']) ? $data['rawData'] : null;
        $this->container['httpAcceptBrowserValue'] = isset($data['httpAcceptBrowserValue']) ? $data['httpAcceptBrowserValue'] : null;
        $this->container['httpAcceptContent'] = isset($data['httpAcceptContent']) ? $data['httpAcceptContent'] : null;
        $this->container['httpBrowserLanguage'] = isset($data['httpBrowserLanguage']) ? $data['httpBrowserLanguage'] : null;
        $this->container['httpBrowserJavaEnabled'] = isset($data['httpBrowserJavaEnabled']) ? $data['httpBrowserJavaEnabled'] : null;
        $this->container['httpBrowserJavaScriptEnabled'] = isset($data['httpBrowserJavaScriptEnabled']) ? $data['httpBrowserJavaScriptEnabled'] : null;
        $this->container['httpBrowserColorDepth'] = isset($data['httpBrowserColorDepth']) ? $data['httpBrowserColorDepth'] : null;
        $this->container['httpBrowserScreenHeight'] = isset($data['httpBrowserScreenHeight']) ? $data['httpBrowserScreenHeight'] : null;
        $this->container['httpBrowserScreenWidth'] = isset($data['httpBrowserScreenWidth']) ? $data['httpBrowserScreenWidth'] : null;
        $this->container['httpBrowserTimeDifference'] = isset($data['httpBrowserTimeDifference']) ? $data['httpBrowserTimeDifference'] : null;
        $this->container['userAgentBrowserValue'] = isset($data['userAgentBrowserValue']) ? $data['userAgentBrowserValue'] : null;
    }

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

        if ($this->container['httpAcceptContent'] === null) {
            $invalid_properties[] = "'httpAcceptContent' can't be null";
        }
        if ($this->container['httpBrowserLanguage'] === null) {
            $invalid_properties[] = "'httpBrowserLanguage' can't be null";
        }
        if ($this->container['httpBrowserJavaEnabled'] === null) {
            $invalid_properties[] = "'httpBrowserJavaEnabled' can't be null";
        }
        if ($this->container['httpBrowserColorDepth'] === null) {
            $invalid_properties[] = "'httpBrowserColorDepth' can't be null";
        }
        if ($this->container['httpBrowserScreenHeight'] === null) {
            $invalid_properties[] = "'httpBrowserScreenHeight' can't be null";
        }
        if ($this->container['httpBrowserScreenWidth'] === null) {
            $invalid_properties[] = "'httpBrowserScreenWidth' can't be null";
        }
        if ($this->container['httpBrowserTimeDifference'] === null) {
            $invalid_properties[] = "'httpBrowserTimeDifference' can't be null";
        }
        if ($this->container['userAgentBrowserValue'] === null) {
            $invalid_properties[] = "'userAgentBrowserValue' can't be null";
        }
        return $invalid_properties;
    }

    /**
     * validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {

        if ($this->container['httpAcceptContent'] === null) {
            return false;
        }
        if ($this->container['httpBrowserLanguage'] === null) {
            return false;
        }
        if ($this->container['httpBrowserJavaEnabled'] === null) {
            return false;
        }
        if ($this->container['httpBrowserColorDepth'] === null) {
            return false;
        }
        if ($this->container['httpBrowserScreenHeight'] === null) {
            return false;
        }
        if ($this->container['httpBrowserScreenWidth'] === null) {
            return false;
        }
        if ($this->container['httpBrowserTimeDifference'] === null) {
            return false;
        }
        if ($this->container['userAgentBrowserValue'] === null) {
            return false;
        }
        return true;
    }


    /**
     * Gets ipAddress
     * @return string
     */
    public function getIpAddress()
    {
        return $this->container['ipAddress'];
    }

    /**
     * Sets ipAddress
     * @param string $ipAddress IP address of the customer.  #### Used by **Authorization, Capture, and Credit** Optional field.
     * @return $this
     */
    public function setIpAddress($ipAddress)
    {
        $this->container['ipAddress'] = $ipAddress;

        return $this;
    }

    /**
     * Gets rawData
     * @return \CyberSource\Model\Ptsv2paymentsDeviceInformationRawData[]
     */
    public function getRawData()
    {
        return $this->container['rawData'];
    }

    /**
     * Sets rawData
     * @param \CyberSource\Model\Ptsv2paymentsDeviceInformationRawData[] $rawData
     * @return $this
     */
    public function setRawData($rawData)
    {
        $this->container['rawData'] = $rawData;

        return $this;
    }

    /**
     * Gets httpAcceptBrowserValue
     * @return string
     */
    public function getHttpAcceptBrowserValue()
    {
        return $this->container['httpAcceptBrowserValue'];
    }

    /**
     * Sets httpAcceptBrowserValue
     * @param string $httpAcceptBrowserValue Value of the Accept header sent by the customer's web browser. **Note** If the customer's browser provides a value, you must include it in your request.
     * @return $this
     */
    public function setHttpAcceptBrowserValue($httpAcceptBrowserValue)
    {
        $this->container['httpAcceptBrowserValue'] = $httpAcceptBrowserValue;

        return $this;
    }

    /**
     * Gets httpAcceptContent
     * @return string
     */
    public function getHttpAcceptContent()
    {
        return $this->container['httpAcceptContent'];
    }

    /**
     * Sets httpAcceptContent
     * @param string $httpAcceptContent The exact content of the HTTP accept header.
     * @return $this
     */
    public function setHttpAcceptContent($httpAcceptContent)
    {
        $this->container['httpAcceptContent'] = $httpAcceptContent;

        return $this;
    }

    /**
     * Gets httpBrowserLanguage
     * @return string
     */
    public function getHttpBrowserLanguage()
    {
        return $this->container['httpBrowserLanguage'];
    }

    /**
     * Sets httpBrowserLanguage
     * @param string $httpBrowserLanguage Value represents the browser language as defined in IETF BCP47. Example:en-US, refer  https://en.wikipedia.org/wiki/IETF_language_tag for more details.
     * @return $this
     */
    public function setHttpBrowserLanguage($httpBrowserLanguage)
    {
        $this->container['httpBrowserLanguage'] = $httpBrowserLanguage;

        return $this;
    }

    /**
     * Gets httpBrowserJavaEnabled
     * @return bool
     */
    public function getHttpBrowserJavaEnabled()
    {
        return $this->container['httpBrowserJavaEnabled'];
    }

    /**
     * Sets httpBrowserJavaEnabled
     * @param bool $httpBrowserJavaEnabled A Boolean value that represents the ability of the cardholder browser to execute Java. Value is returned from the navigator.javaEnabled property. Possible Values:True/False
     * @return $this
     */
    public function setHttpBrowserJavaEnabled($httpBrowserJavaEnabled)
    {
        $this->container['httpBrowserJavaEnabled'] = $httpBrowserJavaEnabled;

        return $this;
    }

    /**
     * Gets httpBrowserJavaScriptEnabled
     * @return bool
     */
    public function getHttpBrowserJavaScriptEnabled()
    {
        return $this->container['httpBrowserJavaScriptEnabled'];
    }

    /**
     * Sets httpBrowserJavaScriptEnabled
     * @param bool $httpBrowserJavaScriptEnabled A Boolean value that represents the ability of the cardholder browser to execute JavaScript. Possible Values:True/False. **Note**: Merchants should be able to know the values from fingerprint details of cardholder's browser.
     * @return $this
     */
    public function setHttpBrowserJavaScriptEnabled($httpBrowserJavaScriptEnabled)
    {
        $this->container['httpBrowserJavaScriptEnabled'] = $httpBrowserJavaScriptEnabled;

        return $this;
    }

    /**
     * Gets httpBrowserColorDepth
     * @return string
     */
    public function getHttpBrowserColorDepth()
    {
        return $this->container['httpBrowserColorDepth'];
    }

    /**
     * Sets httpBrowserColorDepth
     * @param string $httpBrowserColorDepth Value represents the bit depth of the color palette for displaying images, in bits per pixel. Example : 24, refer https://en.wikipedia.org/wiki/Color_depth for more details
     * @return $this
     */
    public function setHttpBrowserColorDepth($httpBrowserColorDepth)
    {
        $this->container['httpBrowserColorDepth'] = $httpBrowserColorDepth;

        return $this;
    }

    /**
     * Gets httpBrowserScreenHeight
     * @return string
     */
    public function getHttpBrowserScreenHeight()
    {
        return $this->container['httpBrowserScreenHeight'];
    }

    /**
     * Sets httpBrowserScreenHeight
     * @param string $httpBrowserScreenHeight Total height of the Cardholder's scree in pixels, example: 864.
     * @return $this
     */
    public function setHttpBrowserScreenHeight($httpBrowserScreenHeight)
    {
        $this->container['httpBrowserScreenHeight'] = $httpBrowserScreenHeight;

        return $this;
    }

    /**
     * Gets httpBrowserScreenWidth
     * @return string
     */
    public function getHttpBrowserScreenWidth()
    {
        return $this->container['httpBrowserScreenWidth'];
    }

    /**
     * Sets httpBrowserScreenWidth
     * @param string $httpBrowserScreenWidth Total width of the cardholder's screen in pixels. Example: 1536.
     * @return $this
     */
    public function setHttpBrowserScreenWidth($httpBrowserScreenWidth)
    {
        $this->container['httpBrowserScreenWidth'] = $httpBrowserScreenWidth;

        return $this;
    }

    /**
     * Gets httpBrowserTimeDifference
     * @return string
     */
    public function getHttpBrowserTimeDifference()
    {
        return $this->container['httpBrowserTimeDifference'];
    }

    /**
     * Sets httpBrowserTimeDifference
     * @param string $httpBrowserTimeDifference Time difference between UTC time and the cardholder browser local time, in minutes, Example:300
     * @return $this
     */
    public function setHttpBrowserTimeDifference($httpBrowserTimeDifference)
    {
        $this->container['httpBrowserTimeDifference'] = $httpBrowserTimeDifference;

        return $this;
    }

    /**
     * Gets userAgentBrowserValue
     * @return string
     */
    public function getUserAgentBrowserValue()
    {
        return $this->container['userAgentBrowserValue'];
    }

    /**
     * Sets userAgentBrowserValue
     * @param string $userAgentBrowserValue Value of the User-Agent header sent by the customer's web browser. Note If the customer's browser provides a value, you must include it in your request.
     * @return $this
     */
    public function setUserAgentBrowserValue($userAgentBrowserValue)
    {
        $this->container['userAgentBrowserValue'] = $userAgentBrowserValue;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     * @param  integer $offset Offset
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     * @param  integer $offset Offset
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    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
     */
    #[\ReturnTypeWillChange]
    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
     */
    #[\ReturnTypeWillChange]
    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(\CyberSource\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
        }

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


