<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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