<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UpdateImeFeatureConfigReq StructType
 * @subpackage Structs
 */
class UpdateImeFeatureConfigReq extends AbstractStructBase
{
    /**
     * The preventImeCallsFromAnalogGateways
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $preventImeCallsFromAnalogGateways;
    /**
     * The enableIntraDomain
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $enableIntraDomain;
    /**
     * The allowMwiNotification
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $allowMwiNotification;
    /**
     * The trunkConnectionTimer
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $trunkConnectionTimer;
    /**
     * The firewallConnectionTimer
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $firewallConnectionTimer;
    /**
     * The firewallTranscationTimer
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $firewallTranscationTimer;
    /**
     * The firewallIdleTimer
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $firewallIdleTimer;
    /**
     * The failedCallAttemptThreshold
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $failedCallAttemptThreshold;
    /**
     * The callFallbackAttemptThreshold
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $callFallbackAttemptThreshold;
    /**
     * The qualityTimer
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $qualityTimer;
    /**
     * The useImeForOutboundCalls
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $useImeForOutboundCalls;
    /**
     * Constructor method for UpdateImeFeatureConfigReq
     * @uses UpdateImeFeatureConfigReq::setPreventImeCallsFromAnalogGateways()
     * @uses UpdateImeFeatureConfigReq::setEnableIntraDomain()
     * @uses UpdateImeFeatureConfigReq::setAllowMwiNotification()
     * @uses UpdateImeFeatureConfigReq::setTrunkConnectionTimer()
     * @uses UpdateImeFeatureConfigReq::setFirewallConnectionTimer()
     * @uses UpdateImeFeatureConfigReq::setFirewallTranscationTimer()
     * @uses UpdateImeFeatureConfigReq::setFirewallIdleTimer()
     * @uses UpdateImeFeatureConfigReq::setFailedCallAttemptThreshold()
     * @uses UpdateImeFeatureConfigReq::setCallFallbackAttemptThreshold()
     * @uses UpdateImeFeatureConfigReq::setQualityTimer()
     * @uses UpdateImeFeatureConfigReq::setUseImeForOutboundCalls()
     * @param string $preventImeCallsFromAnalogGateways
     * @param string $enableIntraDomain
     * @param string $allowMwiNotification
     * @param string $trunkConnectionTimer
     * @param string $firewallConnectionTimer
     * @param string $firewallTranscationTimer
     * @param string $firewallIdleTimer
     * @param string $failedCallAttemptThreshold
     * @param string $callFallbackAttemptThreshold
     * @param string $qualityTimer
     * @param string $useImeForOutboundCalls
     */
    public function __construct($preventImeCallsFromAnalogGateways = null, $enableIntraDomain = null, $allowMwiNotification = null, $trunkConnectionTimer = null, $firewallConnectionTimer = null, $firewallTranscationTimer = null, $firewallIdleTimer = null, $failedCallAttemptThreshold = null, $callFallbackAttemptThreshold = null, $qualityTimer = null, $useImeForOutboundCalls = null)
    {
        $this
            ->setPreventImeCallsFromAnalogGateways($preventImeCallsFromAnalogGateways)
            ->setEnableIntraDomain($enableIntraDomain)
            ->setAllowMwiNotification($allowMwiNotification)
            ->setTrunkConnectionTimer($trunkConnectionTimer)
            ->setFirewallConnectionTimer($firewallConnectionTimer)
            ->setFirewallTranscationTimer($firewallTranscationTimer)
            ->setFirewallIdleTimer($firewallIdleTimer)
            ->setFailedCallAttemptThreshold($failedCallAttemptThreshold)
            ->setCallFallbackAttemptThreshold($callFallbackAttemptThreshold)
            ->setQualityTimer($qualityTimer)
            ->setUseImeForOutboundCalls($useImeForOutboundCalls);
    }
    /**
     * Get preventImeCallsFromAnalogGateways 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 getPreventImeCallsFromAnalogGateways()
    {
        return isset($this->preventImeCallsFromAnalogGateways) ? $this->preventImeCallsFromAnalogGateways : null;
    }
    /**
     * Set preventImeCallsFromAnalogGateways 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 $preventImeCallsFromAnalogGateways
     * @return UpdateImeFeatureConfigReq
     */
    public function setPreventImeCallsFromAnalogGateways($preventImeCallsFromAnalogGateways = null)
    {
        // validation for constraint: pattern
        if (is_scalar($preventImeCallsFromAnalogGateways) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $preventImeCallsFromAnalogGateways)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($preventImeCallsFromAnalogGateways, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($preventImeCallsFromAnalogGateways) && !is_string($preventImeCallsFromAnalogGateways)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($preventImeCallsFromAnalogGateways)), __LINE__);
        }
        if (is_null($preventImeCallsFromAnalogGateways) || (is_array($preventImeCallsFromAnalogGateways) && empty($preventImeCallsFromAnalogGateways))) {
            unset($this->preventImeCallsFromAnalogGateways);
        } else {
            $this->preventImeCallsFromAnalogGateways = $preventImeCallsFromAnalogGateways;
        }
        return $this;
    }
    /**
     * Get enableIntraDomain 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 getEnableIntraDomain()
    {
        return isset($this->enableIntraDomain) ? $this->enableIntraDomain : null;
    }
    /**
     * Set enableIntraDomain 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 $enableIntraDomain
     * @return UpdateImeFeatureConfigReq
     */
    public function setEnableIntraDomain($enableIntraDomain = null)
    {
        // validation for constraint: pattern
        if (is_scalar($enableIntraDomain) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $enableIntraDomain)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($enableIntraDomain, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($enableIntraDomain) && !is_string($enableIntraDomain)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($enableIntraDomain)), __LINE__);
        }
        if (is_null($enableIntraDomain) || (is_array($enableIntraDomain) && empty($enableIntraDomain))) {
            unset($this->enableIntraDomain);
        } else {
            $this->enableIntraDomain = $enableIntraDomain;
        }
        return $this;
    }
    /**
     * Get allowMwiNotification 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 getAllowMwiNotification()
    {
        return isset($this->allowMwiNotification) ? $this->allowMwiNotification : null;
    }
    /**
     * Set allowMwiNotification 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 $allowMwiNotification
     * @return UpdateImeFeatureConfigReq
     */
    public function setAllowMwiNotification($allowMwiNotification = null)
    {
        // validation for constraint: pattern
        if (is_scalar($allowMwiNotification) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $allowMwiNotification)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($allowMwiNotification, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($allowMwiNotification) && !is_string($allowMwiNotification)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($allowMwiNotification)), __LINE__);
        }
        if (is_null($allowMwiNotification) || (is_array($allowMwiNotification) && empty($allowMwiNotification))) {
            unset($this->allowMwiNotification);
        } else {
            $this->allowMwiNotification = $allowMwiNotification;
        }
        return $this;
    }
    /**
     * Get trunkConnectionTimer 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 getTrunkConnectionTimer()
    {
        return isset($this->trunkConnectionTimer) ? $this->trunkConnectionTimer : null;
    }
    /**
     * Set trunkConnectionTimer 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
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $trunkConnectionTimer
     * @return UpdateImeFeatureConfigReq
     */
    public function setTrunkConnectionTimer($trunkConnectionTimer = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($trunkConnectionTimer)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $trunkConnectionTimer, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        if (is_null($trunkConnectionTimer) || (is_array($trunkConnectionTimer) && empty($trunkConnectionTimer))) {
            unset($this->trunkConnectionTimer);
        } else {
            $this->trunkConnectionTimer = $trunkConnectionTimer;
        }
        return $this;
    }
    /**
     * Get firewallConnectionTimer 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 getFirewallConnectionTimer()
    {
        return isset($this->firewallConnectionTimer) ? $this->firewallConnectionTimer : null;
    }
    /**
     * Set firewallConnectionTimer 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
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $firewallConnectionTimer
     * @return UpdateImeFeatureConfigReq
     */
    public function setFirewallConnectionTimer($firewallConnectionTimer = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($firewallConnectionTimer)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $firewallConnectionTimer, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        if (is_null($firewallConnectionTimer) || (is_array($firewallConnectionTimer) && empty($firewallConnectionTimer))) {
            unset($this->firewallConnectionTimer);
        } else {
            $this->firewallConnectionTimer = $firewallConnectionTimer;
        }
        return $this;
    }
    /**
     * Get firewallTranscationTimer 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 getFirewallTranscationTimer()
    {
        return isset($this->firewallTranscationTimer) ? $this->firewallTranscationTimer : null;
    }
    /**
     * Set firewallTranscationTimer 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
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $firewallTranscationTimer
     * @return UpdateImeFeatureConfigReq
     */
    public function setFirewallTranscationTimer($firewallTranscationTimer = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($firewallTranscationTimer)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $firewallTranscationTimer, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        if (is_null($firewallTranscationTimer) || (is_array($firewallTranscationTimer) && empty($firewallTranscationTimer))) {
            unset($this->firewallTranscationTimer);
        } else {
            $this->firewallTranscationTimer = $firewallTranscationTimer;
        }
        return $this;
    }
    /**
     * Get firewallIdleTimer value
     * @return string|null
     */
    public function getFirewallIdleTimer()
    {
        return $this->firewallIdleTimer;
    }
    /**
     * Set firewallIdleTimer value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $firewallIdleTimer
     * @return UpdateImeFeatureConfigReq
     */
    public function setFirewallIdleTimer($firewallIdleTimer = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($firewallIdleTimer)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $firewallIdleTimer, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->firewallIdleTimer = $firewallIdleTimer;
        return $this;
    }
    /**
     * Get failedCallAttemptThreshold 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 getFailedCallAttemptThreshold()
    {
        return isset($this->failedCallAttemptThreshold) ? $this->failedCallAttemptThreshold : null;
    }
    /**
     * Set failedCallAttemptThreshold 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
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $failedCallAttemptThreshold
     * @return UpdateImeFeatureConfigReq
     */
    public function setFailedCallAttemptThreshold($failedCallAttemptThreshold = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($failedCallAttemptThreshold)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $failedCallAttemptThreshold, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        if (is_null($failedCallAttemptThreshold) || (is_array($failedCallAttemptThreshold) && empty($failedCallAttemptThreshold))) {
            unset($this->failedCallAttemptThreshold);
        } else {
            $this->failedCallAttemptThreshold = $failedCallAttemptThreshold;
        }
        return $this;
    }
    /**
     * Get callFallbackAttemptThreshold 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 getCallFallbackAttemptThreshold()
    {
        return isset($this->callFallbackAttemptThreshold) ? $this->callFallbackAttemptThreshold : null;
    }
    /**
     * Set callFallbackAttemptThreshold 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
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $callFallbackAttemptThreshold
     * @return UpdateImeFeatureConfigReq
     */
    public function setCallFallbackAttemptThreshold($callFallbackAttemptThreshold = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($callFallbackAttemptThreshold)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $callFallbackAttemptThreshold, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        if (is_null($callFallbackAttemptThreshold) || (is_array($callFallbackAttemptThreshold) && empty($callFallbackAttemptThreshold))) {
            unset($this->callFallbackAttemptThreshold);
        } else {
            $this->callFallbackAttemptThreshold = $callFallbackAttemptThreshold;
        }
        return $this;
    }
    /**
     * Get qualityTimer 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 getQualityTimer()
    {
        return isset($this->qualityTimer) ? $this->qualityTimer : null;
    }
    /**
     * Set qualityTimer 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
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $qualityTimer
     * @return UpdateImeFeatureConfigReq
     */
    public function setQualityTimer($qualityTimer = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($qualityTimer)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $qualityTimer, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        if (is_null($qualityTimer) || (is_array($qualityTimer) && empty($qualityTimer))) {
            unset($this->qualityTimer);
        } else {
            $this->qualityTimer = $qualityTimer;
        }
        return $this;
    }
    /**
     * Get useImeForOutboundCalls 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 getUseImeForOutboundCalls()
    {
        return isset($this->useImeForOutboundCalls) ? $this->useImeForOutboundCalls : null;
    }
    /**
     * Set useImeForOutboundCalls 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 $useImeForOutboundCalls
     * @return UpdateImeFeatureConfigReq
     */
    public function setUseImeForOutboundCalls($useImeForOutboundCalls = null)
    {
        // validation for constraint: pattern
        if (is_scalar($useImeForOutboundCalls) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $useImeForOutboundCalls)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($useImeForOutboundCalls, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($useImeForOutboundCalls) && !is_string($useImeForOutboundCalls)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($useImeForOutboundCalls)), __LINE__);
        }
        if (is_null($useImeForOutboundCalls) || (is_array($useImeForOutboundCalls) && empty($useImeForOutboundCalls))) {
            unset($this->useImeForOutboundCalls);
        } else {
            $this->useImeForOutboundCalls = $useImeForOutboundCalls;
        }
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return UpdateImeFeatureConfigReq
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
