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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'defaultTokenType' => 'string',
        'location' => 'string',
        'tokenFormats' => '\CyberSource\Model\TmsTokenFormats',
        'tokenPermissions' => '\CyberSource\Model\TokenPermissions',
        'sensitivePrivileges' => '\CyberSource\Model\TmsSensitivePrivileges',
        'nullify' => '\CyberSource\Model\TmsNullify',
        'networkTokenServices' => '\CyberSource\Model\TmsNetworkTokenServices'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerFormats = [
        'defaultTokenType' => null,
        'location' => null,
        'tokenFormats' => null,
        'tokenPermissions' => null,
        'sensitivePrivileges' => null,
        'nullify' => null,
        'networkTokenServices' => 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 = [
        'defaultTokenType' => 'defaultTokenType',
        'location' => 'location',
        'tokenFormats' => 'tokenFormats',
        'tokenPermissions' => 'tokenPermissions',
        'sensitivePrivileges' => 'sensitivePrivileges',
        'nullify' => 'nullify',
        'networkTokenServices' => 'networkTokenServices'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'defaultTokenType' => 'setDefaultTokenType',
        'location' => 'setLocation',
        'tokenFormats' => 'setTokenFormats',
        'tokenPermissions' => 'setTokenPermissions',
        'sensitivePrivileges' => 'setSensitivePrivileges',
        'nullify' => 'setNullify',
        'networkTokenServices' => 'setNetworkTokenServices'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'defaultTokenType' => 'getDefaultTokenType',
        'location' => 'getLocation',
        'tokenFormats' => 'getTokenFormats',
        'tokenPermissions' => 'getTokenPermissions',
        'sensitivePrivileges' => 'getSensitivePrivileges',
        'nullify' => 'getNullify',
        'networkTokenServices' => 'getNetworkTokenServices'
    ];

    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['defaultTokenType'] = isset($data['defaultTokenType']) ? $data['defaultTokenType'] : null;
        $this->container['location'] = isset($data['location']) ? $data['location'] : null;
        $this->container['tokenFormats'] = isset($data['tokenFormats']) ? $data['tokenFormats'] : null;
        $this->container['tokenPermissions'] = isset($data['tokenPermissions']) ? $data['tokenPermissions'] : null;
        $this->container['sensitivePrivileges'] = isset($data['sensitivePrivileges']) ? $data['sensitivePrivileges'] : null;
        $this->container['nullify'] = isset($data['nullify']) ? $data['nullify'] : null;
        $this->container['networkTokenServices'] = isset($data['networkTokenServices']) ? $data['networkTokenServices'] : 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 defaultTokenType
     * @return string
     */
    public function getDefaultTokenType()
    {
        return $this->container['defaultTokenType'];
    }

    /**
     * Sets defaultTokenType
     * @param string $defaultTokenType Default token type to be used. Possible Values:   - 'CUSTOMER'  - 'PAYMENT_INSTRUMENT'  - 'INSTRUMENT_IDENTIFIER'
     * @return $this
     */
    public function setDefaultTokenType($defaultTokenType)
    {
        $this->container['defaultTokenType'] = $defaultTokenType;

        return $this;
    }

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

    /**
     * Sets location
     * @param string $location Location where the vault will be stored.  Use 'IDC' (the Indian Data Centre) when merchant is storing token data in India  or 'GDC' (the Global Data Centre) for all other cases.  Possible Values:    - 'IDC'   - 'GDC'
     * @return $this
     */
    public function setLocation($location)
    {
        $this->container['location'] = $location;

        return $this;
    }

    /**
     * Gets tokenFormats
     * @return \CyberSource\Model\TmsTokenFormats
     */
    public function getTokenFormats()
    {
        return $this->container['tokenFormats'];
    }

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

        return $this;
    }

    /**
     * Gets tokenPermissions
     * @return \CyberSource\Model\TokenPermissions
     */
    public function getTokenPermissions()
    {
        return $this->container['tokenPermissions'];
    }

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

        return $this;
    }

    /**
     * Gets sensitivePrivileges
     * @return \CyberSource\Model\TmsSensitivePrivileges
     */
    public function getSensitivePrivileges()
    {
        return $this->container['sensitivePrivileges'];
    }

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

        return $this;
    }

    /**
     * Gets nullify
     * @return \CyberSource\Model\TmsNullify
     */
    public function getNullify()
    {
        return $this->container['nullify'];
    }

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

        return $this;
    }

    /**
     * Gets networkTokenServices
     * @return \CyberSource\Model\TmsNetworkTokenServices
     */
    public function getNetworkTokenServices()
    {
        return $this->container['networkTokenServices'];
    }

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

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


