<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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