<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XVoiceMailProfile StructType
 * @subpackage Structs
 */
class XVoiceMailProfile extends AbstractStructBase
{
    /**
     * The name
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - maxLength: 50
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * @var string
     */
    public $name;
    /**
     * The voiceMailPilot
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XVmPilot
     */
    public $voiceMailPilot;
    /**
     * The description
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - maxLength: 50
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $description;
    /**
     * The isDefault
     * Meta information extracted from the WSDL
     * - documentation: In Update setting isDefault tag as false would not disable this VoiceMailProfile as Default. Instead, the corresponding tag of another VoiceMailProfile should be set to true.
     * - base: xsd:string
     * - default: false
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $isDefault;
    /**
     * The voiceMailboxMask
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $voiceMailboxMask;
    /**
     * Constructor method for XVoiceMailProfile
     * @uses XVoiceMailProfile::setName()
     * @uses XVoiceMailProfile::setVoiceMailPilot()
     * @uses XVoiceMailProfile::setDescription()
     * @uses XVoiceMailProfile::setIsDefault()
     * @uses XVoiceMailProfile::setVoiceMailboxMask()
     * @param string $name
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XVmPilot $voiceMailPilot
     * @param string $description
     * @param string $isDefault
     * @param string $voiceMailboxMask
     */
    public function __construct($name = null, \\Losc\CucmBundle\Model\Webservice\StructType\XVmPilot $voiceMailPilot = null, $description = null, $isDefault = 'false', $voiceMailboxMask = null)
    {
        $this
            ->setName($name)
            ->setVoiceMailPilot($voiceMailPilot)
            ->setDescription($description)
            ->setIsDefault($isDefault)
            ->setVoiceMailboxMask($voiceMailboxMask);
    }
    /**
     * Get name value
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XVoiceMailProfile
     */
    public function setName($name = null)
    {
        $this->name = $name;
        return $this;
    }
    /**
     * Get voiceMailPilot value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XVmPilot
     */
    public function getVoiceMailPilot()
    {
        return $this->voiceMailPilot;
    }
    /**
     * Set voiceMailPilot value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XVmPilot $voiceMailPilot
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XVoiceMailProfile
     */
    public function setVoiceMailPilot(\\Losc\CucmBundle\Model\Webservice\StructType\XVmPilot $voiceMailPilot = null)
    {
        $this->voiceMailPilot = $voiceMailPilot;
        return $this;
    }
    /**
     * Get description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Set description value
     * @param string $description
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XVoiceMailProfile
     */
    public function setDescription($description = null)
    {
        $this->description = $description;
        return $this;
    }
    /**
     * Get isDefault value
     * @return string|null
     */
    public function getIsDefault()
    {
        return $this->isDefault;
    }
    /**
     * Set isDefault value
     * @param string $isDefault
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XVoiceMailProfile
     */
    public function setIsDefault($isDefault = 'false')
    {
        $this->isDefault = $isDefault;
        return $this;
    }
    /**
     * Get voiceMailboxMask 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 getVoiceMailboxMask()
    {
        return isset($this->voiceMailboxMask) ? $this->voiceMailboxMask : null;
    }
    /**
     * Set voiceMailboxMask 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 $voiceMailboxMask
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XVoiceMailProfile
     */
    public function setVoiceMailboxMask($voiceMailboxMask = null)
    {
        if (is_null($voiceMailboxMask) || (is_array($voiceMailboxMask) && empty($voiceMailboxMask))) {
            unset($this->voiceMailboxMask);
        } else {
            $this->voiceMailboxMask = $voiceMailboxMask;
        }
        return $this;
    }
}
