<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for unit StructType
 * Meta information extracted from the WSDL
 * - documentation: In the IOS model unit corresponds to a SLOT(Slot Module)
 * @subpackage Structs
 */
class Unit extends AbstractStructBase
{
    /**
     * The index
     * Meta information extracted from the WSDL
     * - default: 0
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $index;
    /**
     * The product
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $product;
    /**
     * The subunits
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\Subunits
     */
    public $subunits;
    /**
     * Constructor method for unit
     * @uses Unit::setIndex()
     * @uses Unit::setProduct()
     * @uses Unit::setSubunits()
     * @param string $index
     * @param string $product
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Subunits $subunits
     */
    public function __construct($index = '0', $product = null, \\Losc\CucmBundle\Model\Webservice\StructType\Subunits $subunits = null)
    {
        $this
            ->setIndex($index)
            ->setProduct($product)
            ->setSubunits($subunits);
    }
    /**
     * Get index value
     * @return string|null
     */
    public function getIndex()
    {
        return $this->index;
    }
    /**
     * Set index value
     * @param string $index
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Unit
     */
    public function setIndex($index = '0')
    {
        $this->index = $index;
        return $this;
    }
    /**
     * Get product value
     * @return string|null
     */
    public function getProduct()
    {
        return $this->product;
    }
    /**
     * Set product value
     * @param string $product
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Unit
     */
    public function setProduct($product = null)
    {
        $this->product = $product;
        return $this;
    }
    /**
     * Get subunits value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Subunits|null
     */
    public function getSubunits()
    {
        return $this->subunits;
    }
    /**
     * Set subunits value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Subunits $subunits
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Unit
     */
    public function setSubunits(\\Losc\CucmBundle\Model\Webservice\StructType\Subunits $subunits = null)
    {
        $this->subunits = $subunits;
        return $this;
    }
}
