<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for subunits StructType
 * @subpackage Structs
 */
class Subunits extends AbstractStructBase
{
    /**
     * The subunit
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * - nillable: false
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\Subunit[]
     */
    public $subunit;
    /**
     * Constructor method for subunits
     * @uses Subunits::setSubunit()
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Subunit[] $subunit
     */
    public function __construct(array $subunit = array())
    {
        $this
            ->setSubunit($subunit);
    }
    /**
     * Get subunit value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Subunit[]|null
     */
    public function getSubunit()
    {
        return $this->subunit;
    }
    /**
     * Set subunit value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Subunit[] $subunit
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Subunits
     */
    public function setSubunit(array $subunit = array())
    {
        $this->subunit = $subunit;
        return $this;
    }
    /**
     * Add item to subunit value
     * @throws \InvalidArgumentException
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Subunit $item
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Subunits
     */
    public function addToSubunit(\\Losc\CucmBundle\Model\Webservice\StructType\Subunit $item)
    {
        $this->subunit[] = $item;
        return $this;
    }
}
