<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XMobileVoiceAccess StructType
 * @subpackage Structs
 */
class XMobileVoiceAccess extends AbstractStructBase
{
    /**
     * The pattern
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * @var string
     */
    public $pattern;
    /**
     * The locales
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\Locales
     */
    public $locales;
    /**
     * The routePartitionName
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XFkType
     */
    public $routePartitionName;
    /**
     * Constructor method for XMobileVoiceAccess
     * @uses XMobileVoiceAccess::setPattern()
     * @uses XMobileVoiceAccess::setLocales()
     * @uses XMobileVoiceAccess::setRoutePartitionName()
     * @param string $pattern
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Locales $locales
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $routePartitionName
     */
    public function __construct($pattern = null, \\Losc\CucmBundle\Model\Webservice\StructType\Locales $locales = null, \\Losc\CucmBundle\Model\Webservice\StructType\XFkType $routePartitionName = null)
    {
        $this
            ->setPattern($pattern)
            ->setLocales($locales)
            ->setRoutePartitionName($routePartitionName);
    }
    /**
     * Get pattern value
     * @return string
     */
    public function getPattern()
    {
        return $this->pattern;
    }
    /**
     * Set pattern value
     * @param string $pattern
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XMobileVoiceAccess
     */
    public function setPattern($pattern = null)
    {
        $this->pattern = $pattern;
        return $this;
    }
    /**
     * Get locales value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Locales
     */
    public function getLocales()
    {
        return $this->locales;
    }
    /**
     * Set locales value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\Locales $locales
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XMobileVoiceAccess
     */
    public function setLocales(\\Losc\CucmBundle\Model\Webservice\StructType\Locales $locales = null)
    {
        $this->locales = $locales;
        return $this;
    }
    /**
     * Get routePartitionName 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 getRoutePartitionName()
    {
        return isset($this->routePartitionName) ? $this->routePartitionName : null;
    }
    /**
     * Set routePartitionName 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 $routePartitionName
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XMobileVoiceAccess
     */
    public function setRoutePartitionName(\\Losc\CucmBundle\Model\Webservice\StructType\XFkType $routePartitionName = null)
    {
        if (is_null($routePartitionName) || (is_array($routePartitionName) && empty($routePartitionName))) {
            unset($this->routePartitionName);
        } else {
            $this->routePartitionName = $routePartitionName;
        }
        return $this;
    }
}
