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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerTypes = [
        'address1' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'address2' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'administrativeArea' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'buildingNumber' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'country' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'district' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'locality' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'postalCode' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'firstName' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'lastName' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount',
        'company' => '\CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      * @var string[]
      */
    protected static $swaggerFormats = [
        'address1' => null,
        'address2' => null,
        'administrativeArea' => null,
        'buildingNumber' => null,
        'country' => null,
        'district' => null,
        'locality' => null,
        'postalCode' => null,
        'firstName' => null,
        'lastName' => null,
        'company' => 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 = [
        'address1' => 'address1',
        'address2' => 'address2',
        'administrativeArea' => 'administrativeArea',
        'buildingNumber' => 'buildingNumber',
        'country' => 'country',
        'district' => 'district',
        'locality' => 'locality',
        'postalCode' => 'postalCode',
        'firstName' => 'firstName',
        'lastName' => 'lastName',
        'company' => 'company'
    ];


    /**
     * Array of attributes to setter functions (for deserialization of responses)
     * @var string[]
     */
    protected static $setters = [
        'address1' => 'setAddress1',
        'address2' => 'setAddress2',
        'administrativeArea' => 'setAdministrativeArea',
        'buildingNumber' => 'setBuildingNumber',
        'country' => 'setCountry',
        'district' => 'setDistrict',
        'locality' => 'setLocality',
        'postalCode' => 'setPostalCode',
        'firstName' => 'setFirstName',
        'lastName' => 'setLastName',
        'company' => 'setCompany'
    ];


    /**
     * Array of attributes to getter functions (for serialization of requests)
     * @var string[]
     */
    protected static $getters = [
        'address1' => 'getAddress1',
        'address2' => 'getAddress2',
        'administrativeArea' => 'getAdministrativeArea',
        'buildingNumber' => 'getBuildingNumber',
        'country' => 'getCountry',
        'district' => 'getDistrict',
        'locality' => 'getLocality',
        'postalCode' => 'getPostalCode',
        'firstName' => 'getFirstName',
        'lastName' => 'getLastName',
        'company' => 'getCompany'
    ];

    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['address1'] = isset($data['address1']) ? $data['address1'] : null;
        $this->container['address2'] = isset($data['address2']) ? $data['address2'] : null;
        $this->container['administrativeArea'] = isset($data['administrativeArea']) ? $data['administrativeArea'] : null;
        $this->container['buildingNumber'] = isset($data['buildingNumber']) ? $data['buildingNumber'] : null;
        $this->container['country'] = isset($data['country']) ? $data['country'] : null;
        $this->container['district'] = isset($data['district']) ? $data['district'] : null;
        $this->container['locality'] = isset($data['locality']) ? $data['locality'] : null;
        $this->container['postalCode'] = isset($data['postalCode']) ? $data['postalCode'] : null;
        $this->container['firstName'] = isset($data['firstName']) ? $data['firstName'] : null;
        $this->container['lastName'] = isset($data['lastName']) ? $data['lastName'] : null;
        $this->container['company'] = isset($data['company']) ? $data['company'] : 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 address1
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getAddress1()
    {
        return $this->container['address1'];
    }

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

        return $this;
    }

    /**
     * Gets address2
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getAddress2()
    {
        return $this->container['address2'];
    }

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

        return $this;
    }

    /**
     * Gets administrativeArea
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getAdministrativeArea()
    {
        return $this->container['administrativeArea'];
    }

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

        return $this;
    }

    /**
     * Gets buildingNumber
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getBuildingNumber()
    {
        return $this->container['buildingNumber'];
    }

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

        return $this;
    }

    /**
     * Gets country
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getCountry()
    {
        return $this->container['country'];
    }

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

        return $this;
    }

    /**
     * Gets district
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getDistrict()
    {
        return $this->container['district'];
    }

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

        return $this;
    }

    /**
     * Gets locality
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getLocality()
    {
        return $this->container['locality'];
    }

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

        return $this;
    }

    /**
     * Gets postalCode
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getPostalCode()
    {
        return $this->container['postalCode'];
    }

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

        return $this;
    }

    /**
     * Gets firstName
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getFirstName()
    {
        return $this->container['firstName'];
    }

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

        return $this;
    }

    /**
     * Gets lastName
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getLastName()
    {
        return $this->container['lastName'];
    }

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

        return $this;
    }

    /**
     * Gets company
     * @return \CyberSource\Model\Flexv2sessionsFieldsOrderInformationAmountDetailsTotalAmount
     */
    public function getCompany()
    {
        return $this->container['company'];
    }

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

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


