<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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