<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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