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

/**
 * PtsV2PaymentsPost201ResponseRiskInformation Class Doc Comment
 *
 * @category    Class
 * @description Contains the result of risk assessment.
 * @package     CyberSource
 * @author      Swagger Codegen team
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class PtsV2PaymentsPost201ResponseRiskInformation implements ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'profile' => '\CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationProfile',
        'rules' => '\CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationRules[]',
        'infoCodes' => '\CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationInfoCodes',
        'velocity' => '\CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationVelocity',
        'casePriority' => 'int',
        'localTime' => 'string',
        'score' => '\CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationScore',
        'ipAddress' => '\CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationIpAddress',
        'providers' => 'map[string,map[string,string]]',
        'travel' => '\CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationTravel',
        'processorResults' => '\CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationProcessorResults'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerFormats = [
        'profile' => null,
        'rules' => null,
        'infoCodes' => null,
        'velocity' => null,
        'casePriority' => null,
        'localTime' => null,
        'score' => null,
        'ipAddress' => null,
        'providers' => null,
        'travel' => null,
        'processorResults' => 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 = [
        'profile' => 'profile',
        'rules' => 'rules',
        'infoCodes' => 'infoCodes',
        'velocity' => 'velocity',
        'casePriority' => 'casePriority',
        'localTime' => 'localTime',
        'score' => 'score',
        'ipAddress' => 'ipAddress',
        'providers' => 'providers',
        'travel' => 'travel',
        'processorResults' => 'processorResults'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'profile' => 'setProfile',
        'rules' => 'setRules',
        'infoCodes' => 'setInfoCodes',
        'velocity' => 'setVelocity',
        'casePriority' => 'setCasePriority',
        'localTime' => 'setLocalTime',
        'score' => 'setScore',
        'ipAddress' => 'setIpAddress',
        'providers' => 'setProviders',
        'travel' => 'setTravel',
        'processorResults' => 'setProcessorResults'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'profile' => 'getProfile',
        'rules' => 'getRules',
        'infoCodes' => 'getInfoCodes',
        'velocity' => 'getVelocity',
        'casePriority' => 'getCasePriority',
        'localTime' => 'getLocalTime',
        'score' => 'getScore',
        'ipAddress' => 'getIpAddress',
        'providers' => 'getProviders',
        'travel' => 'getTravel',
        'processorResults' => 'getProcessorResults'
    ];

    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['profile'] = isset($data['profile']) ? $data['profile'] : null;
        $this->container['rules'] = isset($data['rules']) ? $data['rules'] : null;
        $this->container['infoCodes'] = isset($data['infoCodes']) ? $data['infoCodes'] : null;
        $this->container['velocity'] = isset($data['velocity']) ? $data['velocity'] : null;
        $this->container['casePriority'] = isset($data['casePriority']) ? $data['casePriority'] : null;
        $this->container['localTime'] = isset($data['localTime']) ? $data['localTime'] : null;
        $this->container['score'] = isset($data['score']) ? $data['score'] : null;
        $this->container['ipAddress'] = isset($data['ipAddress']) ? $data['ipAddress'] : null;
        $this->container['providers'] = isset($data['providers']) ? $data['providers'] : null;
        $this->container['travel'] = isset($data['travel']) ? $data['travel'] : null;
        $this->container['processorResults'] = isset($data['processorResults']) ? $data['processorResults'] : null;
    }

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

        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()
    {

        return true;
    }


    /**
     * Gets profile
     * @return \CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationProfile
     */
    public function getProfile()
    {
        return $this->container['profile'];
    }

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

        return $this;
    }

    /**
     * Gets rules
     * @return \CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationRules[]
     */
    public function getRules()
    {
        return $this->container['rules'];
    }

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

        return $this;
    }

    /**
     * Gets infoCodes
     * @return \CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationInfoCodes
     */
    public function getInfoCodes()
    {
        return $this->container['infoCodes'];
    }

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

        return $this;
    }

    /**
     * Gets velocity
     * @return \CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationVelocity
     */
    public function getVelocity()
    {
        return $this->container['velocity'];
    }

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

        return $this;
    }

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

    /**
     * Sets casePriority
     * @param int $casePriority You receive this field only if you subscribe to the Enhanced Case Management service. The priority level ranges from 1 (highest) to 5 (lowest); the default value is 3. If you do not assign a priority to your rules or to your profiles, the default value is given to the order.  For all possible values, see the `decision_case_priority` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/) Click **Decision Manager** > **Documentation** > **Guides** > _Decision Manager Using the SCMP API Developer Guide_ (PDF link).
     * @return $this
     */
    public function setCasePriority($casePriority)
    {
        $this->container['casePriority'] = $casePriority;

        return $this;
    }

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

    /**
     * Sets localTime
     * @param string $localTime The customer's local time (`hh:mm:ss`), which is calculated from the transaction request time and the customer's billing address.  For details, see the `score_time_local` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/)
     * @return $this
     */
    public function setLocalTime($localTime)
    {
        $this->container['localTime'] = $localTime;

        return $this;
    }

    /**
     * Gets score
     * @return \CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationScore
     */
    public function getScore()
    {
        return $this->container['score'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets providers
     * @return map[string,map[string,string]]
     */
    public function getProviders()
    {
        return $this->container['providers'];
    }

    /**
     * Sets providers
     * @param map[string,map[string,string]] $providers Name of the 3rd party provider, for example, Emailage. For all possible values, see the `decision_provider_#_name` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/) Click **Decision Manager** > **Documentation** > **Guides** > _Decision Manager Using the SCMP API Developer Guide_ (PDF link).
     * @return $this
     */
    public function setProviders($providers)
    {
        $this->container['providers'] = $providers;

        return $this;
    }

    /**
     * Gets travel
     * @return \CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationTravel
     */
    public function getTravel()
    {
        return $this->container['travel'];
    }

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

        return $this;
    }

    /**
     * Gets processorResults
     * @return \CyberSource\Model\PtsV2PaymentsPost201ResponseRiskInformationProcessorResults
     */
    public function getProcessorResults()
    {
        return $this->container['processorResults'];
    }

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

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


