<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TpegAreaDescriptor StructType
 * @subpackage Structs
 */
class TpegAreaDescriptor extends TpegDescriptor
{
    /**
     * The tpegAreaDescriptorType
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $tpegAreaDescriptorType;
    /**
     * The tpegAreaDescriptorExtension
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ExtensionType
     */
    public $tpegAreaDescriptorExtension;
    /**
     * Constructor method for TpegAreaDescriptor
     * @uses TpegAreaDescriptor::setTpegAreaDescriptorType()
     * @uses TpegAreaDescriptor::setTpegAreaDescriptorExtension()
     * @param string $tpegAreaDescriptorType
     * @param \StructType\ExtensionType $tpegAreaDescriptorExtension
     */
    public function __construct($tpegAreaDescriptorType = null, \StructType\ExtensionType $tpegAreaDescriptorExtension = null)
    {
        $this
            ->setTpegAreaDescriptorType($tpegAreaDescriptorType)
            ->setTpegAreaDescriptorExtension($tpegAreaDescriptorExtension);
    }
    /**
     * Get tpegAreaDescriptorType value
     * @return string
     */
    public function getTpegAreaDescriptorType()
    {
        return $this->tpegAreaDescriptorType;
    }
    /**
     * Set tpegAreaDescriptorType value
     * @uses \EnumType\TpegLoc03AreaDescriptorSubtypeEnum::valueIsValid()
     * @uses \EnumType\TpegLoc03AreaDescriptorSubtypeEnum::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $tpegAreaDescriptorType
     * @return \StructType\TpegAreaDescriptor
     */
    public function setTpegAreaDescriptorType($tpegAreaDescriptorType = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\TpegLoc03AreaDescriptorSubtypeEnum::valueIsValid($tpegAreaDescriptorType)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $tpegAreaDescriptorType, implode(', ', \EnumType\TpegLoc03AreaDescriptorSubtypeEnum::getValidValues())), __LINE__);
        }
        $this->tpegAreaDescriptorType = $tpegAreaDescriptorType;
        return $this;
    }
    /**
     * Get tpegAreaDescriptorExtension value
     * @return \StructType\ExtensionType|null
     */
    public function getTpegAreaDescriptorExtension()
    {
        return $this->tpegAreaDescriptorExtension;
    }
    /**
     * Set tpegAreaDescriptorExtension value
     * @param \StructType\ExtensionType $tpegAreaDescriptorExtension
     * @return \StructType\TpegAreaDescriptor
     */
    public function setTpegAreaDescriptorExtension(\StructType\ExtensionType $tpegAreaDescriptorExtension = null)
    {
        $this->tpegAreaDescriptorExtension = $tpegAreaDescriptorExtension;
        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\TpegAreaDescriptor
     */
    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__;
    }
}
