<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PhoneNumber StructType
 * Meta informations extracted from the WSDL
 * - nillable: true
 * - type: tns:PhoneNumber
 * @subpackage Structs
 */
class PhoneNumber extends AbstractStructBase
{
    /**
     * The CountryCode
     * Meta informations extracted from the WSDL
     * - nillable: true
     * @var string
     */
    public $CountryCode;
    /**
     * The AreaCode
     * Meta informations extracted from the WSDL
     * - nillable: true
     * @var string
     */
    public $AreaCode;
    /**
     * The Phone
     * Meta informations extracted from the WSDL
     * - nillable: true
     * @var string
     */
    public $Phone;
    /**
     * The Extension
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Extension;
    /**
     * Constructor method for PhoneNumber
     * @uses PhoneNumber::setCountryCode()
     * @uses PhoneNumber::setAreaCode()
     * @uses PhoneNumber::setPhone()
     * @uses PhoneNumber::setExtension()
     * @param string $countryCode
     * @param string $areaCode
     * @param string $phone
     * @param string $extension
     */
    public function __construct($countryCode = null, $areaCode = null, $phone = null, $extension = null)
    {
        $this
            ->setCountryCode($countryCode)
            ->setAreaCode($areaCode)
            ->setPhone($phone)
            ->setExtension($extension);
    }
    /**
     * Get CountryCode value
     * @return string|null
     */
    public function getCountryCode()
    {
        return $this->CountryCode;
    }
    /**
     * Set CountryCode value
     * @param string $countryCode
     * @return PhoneNumber
     */
    public function setCountryCode($countryCode = null)
    {
        $this->CountryCode = $countryCode;
        return $this;
    }
    /**
     * Get AreaCode value
     * @return string|null
     */
    public function getAreaCode()
    {
        return $this->AreaCode;
    }
    /**
     * Set AreaCode value
     * @param string $areaCode
     * @return PhoneNumber
     */
    public function setAreaCode($areaCode = null)
    {
        $this->AreaCode = $areaCode;
        return $this;
    }
    /**
     * Get Phone value
     * @return string|null
     */
    public function getPhone()
    {
        return $this->Phone;
    }
    /**
     * Set Phone value
     * @param string $phone
     * @return PhoneNumber
     */
    public function setPhone($phone = null)
    {
        $this->Phone = $phone;
        return $this;
    }
    /**
     * Get Extension value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getExtension()
    {
        return isset($this->Extension) ? $this->Extension : null;
    }
    /**
     * Set Extension value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $extension
     * @return PhoneNumber
     */
    public function setExtension($extension = null)
    {
        if (is_null($extension) || (is_array($extension) && empty($extension))) {
            unset($this->Extension);
        } else {
            $this->Extension = $extension;
        }
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return PhoneNumber
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
