<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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