<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XExtension StructType
 * @subpackage Structs
 */
class XExtension extends AbstractStructBase
{
    /**
     * The pattern
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $pattern;
    /**
     * The sortOrder
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $sortOrder;
    /**
     * The routePartition
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $routePartition;
    /**
     * 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 XExtension
     * @uses XExtension::setPattern()
     * @uses XExtension::setSortOrder()
     * @uses XExtension::setRoutePartition()
     * @uses XExtension::setLinePrimaryUri()
     * @uses XExtension::setPartition()
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $pattern
     * @param string $sortOrder
     * @param string $routePartition
     * @param string $linePrimaryUri
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $partition
     */
    public function __construct(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $pattern = null, $sortOrder = null, $routePartition = null, $linePrimaryUri = null, \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $partition = null)
    {
        $this
            ->setPattern($pattern)
            ->setSortOrder($sortOrder)
            ->setRoutePartition($routePartition)
            ->setLinePrimaryUri($linePrimaryUri)
            ->setPartition($partition);
    }
    /**
     * Get pattern value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public function getPattern()
    {
        return $this->pattern;
    }
    /**
     * Set pattern value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $pattern
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XExtension
     */
    public function setPattern(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $pattern = null)
    {
        $this->pattern = $pattern;
        return $this;
    }
    /**
     * Get sortOrder 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 getSortOrder()
    {
        return isset($this->sortOrder) ? $this->sortOrder : null;
    }
    /**
     * Set sortOrder 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 $sortOrder
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XExtension
     */
    public function setSortOrder($sortOrder = null)
    {
        if (is_null($sortOrder) || (is_array($sortOrder) && empty($sortOrder))) {
            unset($this->sortOrder);
        } else {
            $this->sortOrder = $sortOrder;
        }
        return $this;
    }
    /**
     * Get routePartition value
     * @return string|null
     */
    public function getRoutePartition()
    {
        return $this->routePartition;
    }
    /**
     * Set routePartition value
     * @param string $routePartition
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XExtension
     */
    public function setRoutePartition($routePartition = null)
    {
        $this->routePartition = $routePartition;
        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\XExtension
     */
    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\XExtension
     */
    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;
    }
}
