<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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