<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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