<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

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