<?php

namespace \Losc\CucmBundle\Model\Webservice\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for relatedLocations StructType
 * @subpackage Structs
 */
class RelatedLocations extends AbstractStructBase
{
    /**
     * The relatedLocation
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XLocationRelationship[]
     */
    public $relatedLocation;
    /**
     * Constructor method for relatedLocations
     * @uses RelatedLocations::setRelatedLocation()
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XLocationRelationship[] $relatedLocation
     */
    public function __construct(array $relatedLocation = array())
    {
        $this
            ->setRelatedLocation($relatedLocation);
    }
    /**
     * Get relatedLocation value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XLocationRelationship[]|null
     */
    public function getRelatedLocation()
    {
        return $this->relatedLocation;
    }
    /**
     * Set relatedLocation value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XLocationRelationship[] $relatedLocation
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\RelatedLocations
     */
    public function setRelatedLocation(array $relatedLocation = array())
    {
        $this->relatedLocation = $relatedLocation;
        return $this;
    }
    /**
     * Add item to relatedLocation value
     * @throws \InvalidArgumentException
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XLocationRelationship $item
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\RelatedLocations
     */
    public function addToRelatedLocation(\\Losc\CucmBundle\Model\Webservice\StructType\XLocationRelationship $item)
    {
        $this->relatedLocation[] = $item;
        return $this;
    }
}
