<?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 RParameterMember[]
     */
    public $dialParameter;
    /**
     * Constructor method for dialParameters
     * @uses DialParameters::setDialParameter()
     * @param RParameterMember[] $dialParameter
     */
    public function __construct(array $dialParameter = array())
    {
        $this
            ->setDialParameter($dialParameter);
    }
    /**
     * Get dialParameter value
     * @return RParameterMember[]
     */
    public function getDialParameter()
    {
        return $this->dialParameter;
    }
    /**
     * Set dialParameter value
     * @throws \InvalidArgumentException
     * @param RParameterMember[] $dialParameter
     * @return DialParameters
     */
    public function setDialParameter(array $dialParameter = array())
    {
        foreach ($dialParameter as $dialParametersDialParameterItem) {
            // validation for constraint: itemType
            if (!$dialParametersDialParameterItem instanceof RParameterMember) {
                throw new \InvalidArgumentException(sprintf('The dialParameter property can only contain items of RParameterMember, "%s" given', is_object($dialParametersDialParameterItem) ? get_class($dialParametersDialParameterItem) : gettype($dialParametersDialParameterItem)), __LINE__);
            }
        }
        $this->dialParameter = $dialParameter;
        return $this;
    }
    /**
     * Add item to dialParameter value
     * @throws \InvalidArgumentException
     * @param RParameterMember $item
     * @return DialParameters
     */
    public function addToDialParameter(RParameterMember $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof RParameterMember) {
            throw new \InvalidArgumentException(sprintf('The dialParameter property can only contain items of RParameterMember, "%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__;
    }
}
