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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'links' => '\CyberSource\Model\Tmsv2customersLinks',
        'id' => 'string',
        'objectInformation' => '\CyberSource\Model\Tmsv2customersObjectInformation',
        'buyerInformation' => '\CyberSource\Model\Tmsv2customersBuyerInformation',
        'clientReferenceInformation' => '\CyberSource\Model\Tmsv2customersClientReferenceInformation',
        'merchantDefinedInformation' => '\CyberSource\Model\Tmsv2customersMerchantDefinedInformation[]',
        'defaultPaymentInstrument' => '\CyberSource\Model\Tmsv2customersDefaultPaymentInstrument',
        'defaultShippingAddress' => '\CyberSource\Model\Tmsv2customersDefaultShippingAddress',
        'metadata' => '\CyberSource\Model\Tmsv2customersMetadata',
        'embedded' => '\CyberSource\Model\Tmsv2customersEmbedded'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerFormats = [
        'links' => null,
        'id' => null,
        'objectInformation' => null,
        'buyerInformation' => null,
        'clientReferenceInformation' => null,
        'merchantDefinedInformation' => null,
        'defaultPaymentInstrument' => null,
        'defaultShippingAddress' => null,
        'metadata' => null,
        'embedded' => 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 = [
        'links' => '_links',
        'id' => 'id',
        'objectInformation' => 'objectInformation',
        'buyerInformation' => 'buyerInformation',
        'clientReferenceInformation' => 'clientReferenceInformation',
        'merchantDefinedInformation' => 'merchantDefinedInformation',
        'defaultPaymentInstrument' => 'defaultPaymentInstrument',
        'defaultShippingAddress' => 'defaultShippingAddress',
        'metadata' => 'metadata',
        'embedded' => '_embedded'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'links' => 'setLinks',
        'id' => 'setId',
        'objectInformation' => 'setObjectInformation',
        'buyerInformation' => 'setBuyerInformation',
        'clientReferenceInformation' => 'setClientReferenceInformation',
        'merchantDefinedInformation' => 'setMerchantDefinedInformation',
        'defaultPaymentInstrument' => 'setDefaultPaymentInstrument',
        'defaultShippingAddress' => 'setDefaultShippingAddress',
        'metadata' => 'setMetadata',
        'embedded' => 'setEmbedded'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'links' => 'getLinks',
        'id' => 'getId',
        'objectInformation' => 'getObjectInformation',
        'buyerInformation' => 'getBuyerInformation',
        'clientReferenceInformation' => 'getClientReferenceInformation',
        'merchantDefinedInformation' => 'getMerchantDefinedInformation',
        'defaultPaymentInstrument' => 'getDefaultPaymentInstrument',
        'defaultShippingAddress' => 'getDefaultShippingAddress',
        'metadata' => 'getMetadata',
        'embedded' => 'getEmbedded'
    ];

    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['links'] = isset($data['links']) ? $data['links'] : null;
        $this->container['id'] = isset($data['id']) ? $data['id'] : null;
        $this->container['objectInformation'] = isset($data['objectInformation']) ? $data['objectInformation'] : null;
        $this->container['buyerInformation'] = isset($data['buyerInformation']) ? $data['buyerInformation'] : null;
        $this->container['clientReferenceInformation'] = isset($data['clientReferenceInformation']) ? $data['clientReferenceInformation'] : null;
        $this->container['merchantDefinedInformation'] = isset($data['merchantDefinedInformation']) ? $data['merchantDefinedInformation'] : null;
        $this->container['defaultPaymentInstrument'] = isset($data['defaultPaymentInstrument']) ? $data['defaultPaymentInstrument'] : null;
        $this->container['defaultShippingAddress'] = isset($data['defaultShippingAddress']) ? $data['defaultShippingAddress'] : null;
        $this->container['metadata'] = isset($data['metadata']) ? $data['metadata'] : null;
        $this->container['embedded'] = isset($data['embedded']) ? $data['embedded'] : 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 links
     * @return \CyberSource\Model\Tmsv2customersLinks
     */
    public function getLinks()
    {
        return $this->container['links'];
    }

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

        return $this;
    }

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

    /**
     * Sets id
     * @param string $id The Id of the Customer Token.
     * @return $this
     */
    public function setId($id)
    {
        $this->container['id'] = $id;

        return $this;
    }

    /**
     * Gets objectInformation
     * @return \CyberSource\Model\Tmsv2customersObjectInformation
     */
    public function getObjectInformation()
    {
        return $this->container['objectInformation'];
    }

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

        return $this;
    }

    /**
     * Gets buyerInformation
     * @return \CyberSource\Model\Tmsv2customersBuyerInformation
     */
    public function getBuyerInformation()
    {
        return $this->container['buyerInformation'];
    }

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

        return $this;
    }

    /**
     * Gets clientReferenceInformation
     * @return \CyberSource\Model\Tmsv2customersClientReferenceInformation
     */
    public function getClientReferenceInformation()
    {
        return $this->container['clientReferenceInformation'];
    }

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

        return $this;
    }

    /**
     * Gets merchantDefinedInformation
     * @return \CyberSource\Model\Tmsv2customersMerchantDefinedInformation[]
     */
    public function getMerchantDefinedInformation()
    {
        return $this->container['merchantDefinedInformation'];
    }

    /**
     * Sets merchantDefinedInformation
     * @param \CyberSource\Model\Tmsv2customersMerchantDefinedInformation[] $merchantDefinedInformation Object containing the custom data that the merchant defines.
     * @return $this
     */
    public function setMerchantDefinedInformation($merchantDefinedInformation)
    {
        $this->container['merchantDefinedInformation'] = $merchantDefinedInformation;

        return $this;
    }

    /**
     * Gets defaultPaymentInstrument
     * @return \CyberSource\Model\Tmsv2customersDefaultPaymentInstrument
     */
    public function getDefaultPaymentInstrument()
    {
        return $this->container['defaultPaymentInstrument'];
    }

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

        return $this;
    }

    /**
     * Gets defaultShippingAddress
     * @return \CyberSource\Model\Tmsv2customersDefaultShippingAddress
     */
    public function getDefaultShippingAddress()
    {
        return $this->container['defaultShippingAddress'];
    }

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

        return $this;
    }

    /**
     * Gets metadata
     * @return \CyberSource\Model\Tmsv2customersMetadata
     */
    public function getMetadata()
    {
        return $this->container['metadata'];
    }

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

        return $this;
    }

    /**
     * Gets embedded
     * @return \CyberSource\Model\Tmsv2customersEmbedded
     */
    public function getEmbedded()
    {
        return $this->container['embedded'];
    }

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

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


