<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for AlertCArea StructType
 * @subpackage Structs
 */
class AlertCArea extends AbstractStructBase
{
    /**
     * The alertCLocationCountryCode
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - maxLength: 1024
     * @var string
     */
    public $alertCLocationCountryCode;
    /**
     * The alertCLocationTableNumber
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - maxLength: 1024
     * @var string
     */
    public $alertCLocationTableNumber;
    /**
     * The alertCLocationTableVersion
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - maxLength: 1024
     * @var string
     */
    public $alertCLocationTableVersion;
    /**
     * The areaLocation
     * @var \StructType\AlertCLocation
     */
    public $areaLocation;
    /**
     * The alertCAreaExtension
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ExtensionType
     */
    public $alertCAreaExtension;
    /**
     * Constructor method for AlertCArea
     * @uses AlertCArea::setAlertCLocationCountryCode()
     * @uses AlertCArea::setAlertCLocationTableNumber()
     * @uses AlertCArea::setAlertCLocationTableVersion()
     * @uses AlertCArea::setAreaLocation()
     * @uses AlertCArea::setAlertCAreaExtension()
     * @param string $alertCLocationCountryCode
     * @param string $alertCLocationTableNumber
     * @param string $alertCLocationTableVersion
     * @param \StructType\AlertCLocation $areaLocation
     * @param \StructType\ExtensionType $alertCAreaExtension
     */
    public function __construct($alertCLocationCountryCode = null, $alertCLocationTableNumber = null, $alertCLocationTableVersion = null, \StructType\AlertCLocation $areaLocation = null, \StructType\ExtensionType $alertCAreaExtension = null)
    {
        $this
            ->setAlertCLocationCountryCode($alertCLocationCountryCode)
            ->setAlertCLocationTableNumber($alertCLocationTableNumber)
            ->setAlertCLocationTableVersion($alertCLocationTableVersion)
            ->setAreaLocation($areaLocation)
            ->setAlertCAreaExtension($alertCAreaExtension);
    }
    /**
     * Get alertCLocationCountryCode value
     * @return string
     */
    public function getAlertCLocationCountryCode()
    {
        return $this->alertCLocationCountryCode;
    }
    /**
     * Set alertCLocationCountryCode value
     * @param string $alertCLocationCountryCode
     * @return \StructType\AlertCArea
     */
    public function setAlertCLocationCountryCode($alertCLocationCountryCode = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($alertCLocationCountryCode) && strlen($alertCLocationCountryCode) > 1024) || (is_array($alertCLocationCountryCode) && count($alertCLocationCountryCode) > 1024)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 1024 element(s) or a scalar of 1024 character(s) at most, "%d" length given', is_scalar($alertCLocationCountryCode) ? strlen($alertCLocationCountryCode) : count($alertCLocationCountryCode)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($alertCLocationCountryCode) && !is_string($alertCLocationCountryCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($alertCLocationCountryCode)), __LINE__);
        }
        $this->alertCLocationCountryCode = $alertCLocationCountryCode;
        return $this;
    }
    /**
     * Get alertCLocationTableNumber value
     * @return string
     */
    public function getAlertCLocationTableNumber()
    {
        return $this->alertCLocationTableNumber;
    }
    /**
     * Set alertCLocationTableNumber value
     * @param string $alertCLocationTableNumber
     * @return \StructType\AlertCArea
     */
    public function setAlertCLocationTableNumber($alertCLocationTableNumber = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($alertCLocationTableNumber) && strlen($alertCLocationTableNumber) > 1024) || (is_array($alertCLocationTableNumber) && count($alertCLocationTableNumber) > 1024)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 1024 element(s) or a scalar of 1024 character(s) at most, "%d" length given', is_scalar($alertCLocationTableNumber) ? strlen($alertCLocationTableNumber) : count($alertCLocationTableNumber)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($alertCLocationTableNumber) && !is_string($alertCLocationTableNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($alertCLocationTableNumber)), __LINE__);
        }
        $this->alertCLocationTableNumber = $alertCLocationTableNumber;
        return $this;
    }
    /**
     * Get alertCLocationTableVersion value
     * @return string
     */
    public function getAlertCLocationTableVersion()
    {
        return $this->alertCLocationTableVersion;
    }
    /**
     * Set alertCLocationTableVersion value
     * @param string $alertCLocationTableVersion
     * @return \StructType\AlertCArea
     */
    public function setAlertCLocationTableVersion($alertCLocationTableVersion = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($alertCLocationTableVersion) && strlen($alertCLocationTableVersion) > 1024) || (is_array($alertCLocationTableVersion) && count($alertCLocationTableVersion) > 1024)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 1024 element(s) or a scalar of 1024 character(s) at most, "%d" length given', is_scalar($alertCLocationTableVersion) ? strlen($alertCLocationTableVersion) : count($alertCLocationTableVersion)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($alertCLocationTableVersion) && !is_string($alertCLocationTableVersion)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($alertCLocationTableVersion)), __LINE__);
        }
        $this->alertCLocationTableVersion = $alertCLocationTableVersion;
        return $this;
    }
    /**
     * Get areaLocation value
     * @return \StructType\AlertCLocation|null
     */
    public function getAreaLocation()
    {
        return $this->areaLocation;
    }
    /**
     * Set areaLocation value
     * @param \StructType\AlertCLocation $areaLocation
     * @return \StructType\AlertCArea
     */
    public function setAreaLocation(\StructType\AlertCLocation $areaLocation = null)
    {
        $this->areaLocation = $areaLocation;
        return $this;
    }
    /**
     * Get alertCAreaExtension value
     * @return \StructType\ExtensionType|null
     */
    public function getAlertCAreaExtension()
    {
        return $this->alertCAreaExtension;
    }
    /**
     * Set alertCAreaExtension value
     * @param \StructType\ExtensionType $alertCAreaExtension
     * @return \StructType\AlertCArea
     */
    public function setAlertCAreaExtension(\StructType\ExtensionType $alertCAreaExtension = null)
    {
        $this->alertCAreaExtension = $alertCAreaExtension;
        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 \StructType\AlertCArea
     */
    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__;
    }
}
