<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XExtensions StructType
 * @subpackage Structs
 */
class XExtensions extends AbstractStructBase
{
    /**
     * The extension
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $extension;
    /**
     * The linePrimaryUri
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $linePrimaryUri;
    /**
     * The partition
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $partition;
    /**
     * Constructor method for XExtensions
     * @uses XExtensions::setExtension()
     * @uses XExtensions::setLinePrimaryUri()
     * @uses XExtensions::setPartition()
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $extension
     * @param string $linePrimaryUri
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $partition
     */
    public function __construct(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $extension = null, $linePrimaryUri = null, \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $partition = null)
    {
        $this
            ->setExtension($extension)
            ->setLinePrimaryUri($linePrimaryUri)
            ->setPartition($partition);
    }
    /**
     * Get extension value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XFkType|null
     */
    public function getExtension()
    {
        return $this->extension;
    }
    /**
     * Set extension value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $extension
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XExtensions
     */
    public function setExtension(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $extension = null)
    {
        $this->extension = $extension;
        return $this;
    }
    /**
     * Get linePrimaryUri value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getLinePrimaryUri()
    {
        return isset($this->linePrimaryUri) ? $this->linePrimaryUri : null;
    }
    /**
     * Set linePrimaryUri value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $linePrimaryUri
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XExtensions
     */
    public function setLinePrimaryUri($linePrimaryUri = null)
    {
        if (is_null($linePrimaryUri) || (is_array($linePrimaryUri) && empty($linePrimaryUri))) {
            unset($this->linePrimaryUri);
        } else {
            $this->linePrimaryUri = $linePrimaryUri;
        }
        return $this;
    }
    /**
     * Get partition value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XFkType|null
     */
    public function getPartition()
    {
        return isset($this->partition) ? $this->partition : null;
    }
    /**
     * Set partition value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $partition
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XExtensions
     */
    public function setPartition(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $partition = null)
    {
        if (is_null($partition) || (is_array($partition) && empty($partition))) {
            unset($this->partition);
        } else {
            $this->partition = $partition;
        }
        return $this;
    }
}
