<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for changedTags StructType
 * @subpackage Structs
 */
class ChangedTags extends AbstractStructBase
{
    /**
     * The changedTag
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var ChangedTag[]
     */
    public $changedTag;
    /**
     * Constructor method for changedTags
     * @uses ChangedTags::setChangedTag()
     * @param ChangedTag[] $changedTag
     */
    public function __construct(array $changedTag = array())
    {
        $this
            ->setChangedTag($changedTag);
    }
    /**
     * Get changedTag value
     * @return ChangedTag[]|null
     */
    public function getChangedTag()
    {
        return $this->changedTag;
    }
    /**
     * Set changedTag value
     * @throws \InvalidArgumentException
     * @param ChangedTag[] $changedTag
     * @return ChangedTags
     */
    public function setChangedTag(array $changedTag = array())
    {
        foreach ($changedTag as $changedTagsChangedTagItem) {
            // validation for constraint: itemType
            if (!$changedTagsChangedTagItem instanceof ChangedTag) {
                throw new \InvalidArgumentException(sprintf('The changedTag property can only contain items of ChangedTag, "%s" given', is_object($changedTagsChangedTagItem) ? get_class($changedTagsChangedTagItem) : gettype($changedTagsChangedTagItem)), __LINE__);
            }
        }
        $this->changedTag = $changedTag;
        return $this;
    }
    /**
     * Add item to changedTag value
     * @throws \InvalidArgumentException
     * @param ChangedTag $item
     * @return ChangedTags
     */
    public function addToChangedTag(ChangedTag $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof ChangedTag) {
            throw new \InvalidArgumentException(sprintf('The changedTag property can only contain items of ChangedTag, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->changedTag[] = $item;
        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 ChangedTags
     */
    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__;
    }
}
