<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XAnalogPort StructType
 * @subpackage Structs
 */
class XAnalogPort extends AbstractStructBase
{
    /**
     * The portNumber
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $portNumber;
    /**
     * The callerIdEnable
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $callerIdEnable;
    /**
     * The expectedDigits
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $expectedDigits;
    /**
     * The sigDigits
     * Meta informations extracted from the WSDL
     * - minOccurs: 1
     * @var SigDigits
     */
    public $sigDigits;
    /**
     * The smdiPortNumber
     * Meta informations extracted from the WSDL
     * - default: 0
     * - documentation: Not used by T1 Ports
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $smdiPortNumber;
    /**
     * The trunkDirection
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $trunkDirection;
    /**
     * The timer1
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $timer1;
    /**
     * The timer2
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $timer2;
    /**
     * The timer3
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $timer3;
    /**
     * The timer4
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $timer4;
    /**
     * The timer5
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $timer5;
    /**
     * The timer6
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $timer6;
    /**
     * The attendantDn
     * Meta informations extracted from the WSDL
     * - documentation: Mandatory for ground start and loop start
     * - maxOccurs: 1
     * - minOccurs: 0
     * - maxLength: 255
     * @var string
     */
    public $attendantDn;
    /**
     * The unattendedPort
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $unattendedPort;
    /**
     * The callerIdDn
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * - maxLength: 255
     * @var string
     */
    public $callerIdDn;
    /**
     * The callingPartySelection
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $callingPartySelection;
    /**
     * The digitSending
     * Meta informations extracted from the WSDL
     * - default: DTMF
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $digitSending;
    /**
     * The lines
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var Lines
     */
    public $lines;
    /**
     * The prefixDn
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * - maxLength: 255
     * @var string
     */
    public $prefixDn;
    /**
     * The presentationBit
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $presentationBit;
    /**
     * The silenceSuppressionThreshold
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $silenceSuppressionThreshold;
    /**
     * The startDialProtocol
     * Meta informations extracted from the WSDL
     * - default: Not Set
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $startDialProtocol;
    /**
     * The trunk
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $trunk;
    /**
     * The trunkLevel
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $trunkLevel;
    /**
     * The trunkPadRx
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $trunkPadRx;
    /**
     * The trunkPadTx
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $trunkPadTx;
    /**
     * The vendorConfig
     * Meta informations extracted from the WSDL
     * - documentation: Arbitrary XML defined by 3rd party vendors.
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var XVendorConfig
     */
    public $vendorConfig;
    /**
     * Constructor method for XAnalogPort
     * @uses XAnalogPort::setPortNumber()
     * @uses XAnalogPort::setCallerIdEnable()
     * @uses XAnalogPort::setExpectedDigits()
     * @uses XAnalogPort::setSigDigits()
     * @uses XAnalogPort::setSmdiPortNumber()
     * @uses XAnalogPort::setTrunkDirection()
     * @uses XAnalogPort::setTimer1()
     * @uses XAnalogPort::setTimer2()
     * @uses XAnalogPort::setTimer3()
     * @uses XAnalogPort::setTimer4()
     * @uses XAnalogPort::setTimer5()
     * @uses XAnalogPort::setTimer6()
     * @uses XAnalogPort::setAttendantDn()
     * @uses XAnalogPort::setUnattendedPort()
     * @uses XAnalogPort::setCallerIdDn()
     * @uses XAnalogPort::setCallingPartySelection()
     * @uses XAnalogPort::setDigitSending()
     * @uses XAnalogPort::setLines()
     * @uses XAnalogPort::setPrefixDn()
     * @uses XAnalogPort::setPresentationBit()
     * @uses XAnalogPort::setSilenceSuppressionThreshold()
     * @uses XAnalogPort::setStartDialProtocol()
     * @uses XAnalogPort::setTrunk()
     * @uses XAnalogPort::setTrunkLevel()
     * @uses XAnalogPort::setTrunkPadRx()
     * @uses XAnalogPort::setTrunkPadTx()
     * @uses XAnalogPort::setVendorConfig()
     * @param string $portNumber
     * @param string $callerIdEnable
     * @param string $expectedDigits
     * @param SigDigits $sigDigits
     * @param string $smdiPortNumber
     * @param string $trunkDirection
     * @param string $timer1
     * @param string $timer2
     * @param string $timer3
     * @param string $timer4
     * @param string $timer5
     * @param string $timer6
     * @param string $attendantDn
     * @param string $unattendedPort
     * @param string $callerIdDn
     * @param string $callingPartySelection
     * @param string $digitSending
     * @param Lines $lines
     * @param string $prefixDn
     * @param string $presentationBit
     * @param string $silenceSuppressionThreshold
     * @param string $startDialProtocol
     * @param string $trunk
     * @param string $trunkLevel
     * @param string $trunkPadRx
     * @param string $trunkPadTx
     * @param XVendorConfig $vendorConfig
     */
    public function __construct($portNumber = null, $callerIdEnable = null, $expectedDigits = null, SigDigits $sigDigits = null, $smdiPortNumber = '0', $trunkDirection = null, $timer1 = null, $timer2 = null, $timer3 = null, $timer4 = null, $timer5 = null, $timer6 = null, $attendantDn = null, $unattendedPort = null, $callerIdDn = null, $callingPartySelection = null, $digitSending = 'DTMF', Lines $lines = null, $prefixDn = null, $presentationBit = null, $silenceSuppressionThreshold = null, $startDialProtocol = 'Not Set', $trunk = null, $trunkLevel = null, $trunkPadRx = null, $trunkPadTx = null, XVendorConfig $vendorConfig = null)
    {
        $this
            ->setPortNumber($portNumber)
            ->setCallerIdEnable($callerIdEnable)
            ->setExpectedDigits($expectedDigits)
            ->setSigDigits($sigDigits)
            ->setSmdiPortNumber($smdiPortNumber)
            ->setTrunkDirection($trunkDirection)
            ->setTimer1($timer1)
            ->setTimer2($timer2)
            ->setTimer3($timer3)
            ->setTimer4($timer4)
            ->setTimer5($timer5)
            ->setTimer6($timer6)
            ->setAttendantDn($attendantDn)
            ->setUnattendedPort($unattendedPort)
            ->setCallerIdDn($callerIdDn)
            ->setCallingPartySelection($callingPartySelection)
            ->setDigitSending($digitSending)
            ->setLines($lines)
            ->setPrefixDn($prefixDn)
            ->setPresentationBit($presentationBit)
            ->setSilenceSuppressionThreshold($silenceSuppressionThreshold)
            ->setStartDialProtocol($startDialProtocol)
            ->setTrunk($trunk)
            ->setTrunkLevel($trunkLevel)
            ->setTrunkPadRx($trunkPadRx)
            ->setTrunkPadTx($trunkPadTx)
            ->setVendorConfig($vendorConfig);
    }
    /**
     * Get portNumber value
     * @return string
     */
    public function getPortNumber()
    {
        return $this->portNumber;
    }
    /**
     * Set portNumber value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $portNumber
     * @return XAnalogPort
     */
    public function setPortNumber($portNumber = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($portNumber)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $portNumber, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->portNumber = $portNumber;
        return $this;
    }
    /**
     * Get callerIdEnable value
     * @return string
     */
    public function getCallerIdEnable()
    {
        return $this->callerIdEnable;
    }
    /**
     * Set callerIdEnable value
     * @param string $callerIdEnable
     * @return XAnalogPort
     */
    public function setCallerIdEnable($callerIdEnable = null)
    {
        // validation for constraint: pattern
        if (is_scalar($callerIdEnable) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $callerIdEnable)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($callerIdEnable, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($callerIdEnable) && !is_string($callerIdEnable)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($callerIdEnable)), __LINE__);
        }
        $this->callerIdEnable = $callerIdEnable;
        return $this;
    }
    /**
     * Get expectedDigits value
     * @return string
     */
    public function getExpectedDigits()
    {
        return $this->expectedDigits;
    }
    /**
     * Set expectedDigits value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $expectedDigits
     * @return XAnalogPort
     */
    public function setExpectedDigits($expectedDigits = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($expectedDigits)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $expectedDigits, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->expectedDigits = $expectedDigits;
        return $this;
    }
    /**
     * Get sigDigits value
     * @return SigDigits
     */
    public function getSigDigits()
    {
        return $this->sigDigits;
    }
    /**
     * Set sigDigits value
     * @param SigDigits $sigDigits
     * @return XAnalogPort
     */
    public function setSigDigits(SigDigits $sigDigits = null)
    {
        $this->sigDigits = $sigDigits;
        return $this;
    }
    /**
     * Get smdiPortNumber value
     * @return string
     */
    public function getSmdiPortNumber()
    {
        return $this->smdiPortNumber;
    }
    /**
     * Set smdiPortNumber value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $smdiPortNumber
     * @return XAnalogPort
     */
    public function setSmdiPortNumber($smdiPortNumber = '0')
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($smdiPortNumber)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $smdiPortNumber, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->smdiPortNumber = $smdiPortNumber;
        return $this;
    }
    /**
     * Get trunkDirection value
     * @return string
     */
    public function getTrunkDirection()
    {
        return $this->trunkDirection;
    }
    /**
     * Set trunkDirection value
     * @uses XTrunkDirection::valueIsValid()
     * @uses XTrunkDirection::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $trunkDirection
     * @return XAnalogPort
     */
    public function setTrunkDirection($trunkDirection = null)
    {
        // validation for constraint: enumeration
        if (!XTrunkDirection::valueIsValid($trunkDirection)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $trunkDirection, implode(', ', XTrunkDirection::getValidValues())), __LINE__);
        }
        $this->trunkDirection = $trunkDirection;
        return $this;
    }
    /**
     * Get timer1 value
     * @return string
     */
    public function getTimer1()
    {
        return $this->timer1;
    }
    /**
     * Set timer1 value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $timer1
     * @return XAnalogPort
     */
    public function setTimer1($timer1 = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($timer1)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $timer1, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->timer1 = $timer1;
        return $this;
    }
    /**
     * Get timer2 value
     * @return string
     */
    public function getTimer2()
    {
        return $this->timer2;
    }
    /**
     * Set timer2 value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $timer2
     * @return XAnalogPort
     */
    public function setTimer2($timer2 = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($timer2)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $timer2, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->timer2 = $timer2;
        return $this;
    }
    /**
     * Get timer3 value
     * @return string
     */
    public function getTimer3()
    {
        return $this->timer3;
    }
    /**
     * Set timer3 value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $timer3
     * @return XAnalogPort
     */
    public function setTimer3($timer3 = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($timer3)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $timer3, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->timer3 = $timer3;
        return $this;
    }
    /**
     * Get timer4 value
     * @return string
     */
    public function getTimer4()
    {
        return $this->timer4;
    }
    /**
     * Set timer4 value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $timer4
     * @return XAnalogPort
     */
    public function setTimer4($timer4 = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($timer4)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $timer4, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->timer4 = $timer4;
        return $this;
    }
    /**
     * Get timer5 value
     * @return string
     */
    public function getTimer5()
    {
        return $this->timer5;
    }
    /**
     * Set timer5 value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $timer5
     * @return XAnalogPort
     */
    public function setTimer5($timer5 = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($timer5)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $timer5, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->timer5 = $timer5;
        return $this;
    }
    /**
     * Get timer6 value
     * @return string
     */
    public function getTimer6()
    {
        return $this->timer6;
    }
    /**
     * Set timer6 value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $timer6
     * @return XAnalogPort
     */
    public function setTimer6($timer6 = null)
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($timer6)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $timer6, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->timer6 = $timer6;
        return $this;
    }
    /**
     * Get attendantDn value
     * @return string|null
     */
    public function getAttendantDn()
    {
        return $this->attendantDn;
    }
    /**
     * Set attendantDn value
     * @param string $attendantDn
     * @return XAnalogPort
     */
    public function setAttendantDn($attendantDn = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($attendantDn) && strlen($attendantDn) > 255) || (is_array($attendantDn) && count($attendantDn) > 255)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 255 element(s) or a scalar of 255 character(s) at most, "%d" length given', is_scalar($attendantDn) ? strlen($attendantDn) : count($attendantDn)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($attendantDn) && !is_string($attendantDn)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($attendantDn)), __LINE__);
        }
        $this->attendantDn = $attendantDn;
        return $this;
    }
    /**
     * Get unattendedPort 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 getUnattendedPort()
    {
        return isset($this->unattendedPort) ? $this->unattendedPort : null;
    }
    /**
     * Set unattendedPort 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 $unattendedPort
     * @return XAnalogPort
     */
    public function setUnattendedPort($unattendedPort = null)
    {
        // validation for constraint: pattern
        if (is_scalar($unattendedPort) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $unattendedPort)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($unattendedPort, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($unattendedPort) && !is_string($unattendedPort)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($unattendedPort)), __LINE__);
        }
        if (is_null($unattendedPort) || (is_array($unattendedPort) && empty($unattendedPort))) {
            unset($this->unattendedPort);
        } else {
            $this->unattendedPort = $unattendedPort;
        }
        return $this;
    }
    /**
     * Get callerIdDn 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 getCallerIdDn()
    {
        return isset($this->callerIdDn) ? $this->callerIdDn : null;
    }
    /**
     * Set callerIdDn 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 $callerIdDn
     * @return XAnalogPort
     */
    public function setCallerIdDn($callerIdDn = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($callerIdDn) && strlen($callerIdDn) > 255) || (is_array($callerIdDn) && count($callerIdDn) > 255)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 255 element(s) or a scalar of 255 character(s) at most, "%d" length given', is_scalar($callerIdDn) ? strlen($callerIdDn) : count($callerIdDn)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($callerIdDn) && !is_string($callerIdDn)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($callerIdDn)), __LINE__);
        }
        if (is_null($callerIdDn) || (is_array($callerIdDn) && empty($callerIdDn))) {
            unset($this->callerIdDn);
        } else {
            $this->callerIdDn = $callerIdDn;
        }
        return $this;
    }
    /**
     * Get callingPartySelection value
     * @return string|null
     */
    public function getCallingPartySelection()
    {
        return $this->callingPartySelection;
    }
    /**
     * Set callingPartySelection value
     * @uses XCallingPartySelection::valueIsValid()
     * @uses XCallingPartySelection::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $callingPartySelection
     * @return XAnalogPort
     */
    public function setCallingPartySelection($callingPartySelection = null)
    {
        // validation for constraint: enumeration
        if (!XCallingPartySelection::valueIsValid($callingPartySelection)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $callingPartySelection, implode(', ', XCallingPartySelection::getValidValues())), __LINE__);
        }
        $this->callingPartySelection = $callingPartySelection;
        return $this;
    }
    /**
     * Get digitSending value
     * @return string|null
     */
    public function getDigitSending()
    {
        return $this->digitSending;
    }
    /**
     * Set digitSending value
     * @uses XDigitSending::valueIsValid()
     * @uses XDigitSending::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $digitSending
     * @return XAnalogPort
     */
    public function setDigitSending($digitSending = 'DTMF')
    {
        // validation for constraint: enumeration
        if (!XDigitSending::valueIsValid($digitSending)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $digitSending, implode(', ', XDigitSending::getValidValues())), __LINE__);
        }
        $this->digitSending = $digitSending;
        return $this;
    }
    /**
     * Get lines value
     * @return Lines|null
     */
    public function getLines()
    {
        return $this->lines;
    }
    /**
     * Set lines value
     * @param Lines $lines
     * @return XAnalogPort
     */
    public function setLines(Lines $lines = null)
    {
        $this->lines = $lines;
        return $this;
    }
    /**
     * Get prefixDn 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 getPrefixDn()
    {
        return isset($this->prefixDn) ? $this->prefixDn : null;
    }
    /**
     * Set prefixDn 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 $prefixDn
     * @return XAnalogPort
     */
    public function setPrefixDn($prefixDn = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($prefixDn) && strlen($prefixDn) > 255) || (is_array($prefixDn) && count($prefixDn) > 255)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 255 element(s) or a scalar of 255 character(s) at most, "%d" length given', is_scalar($prefixDn) ? strlen($prefixDn) : count($prefixDn)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($prefixDn) && !is_string($prefixDn)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($prefixDn)), __LINE__);
        }
        if (is_null($prefixDn) || (is_array($prefixDn) && empty($prefixDn))) {
            unset($this->prefixDn);
        } else {
            $this->prefixDn = $prefixDn;
        }
        return $this;
    }
    /**
     * Get presentationBit value
     * @return string|null
     */
    public function getPresentationBit()
    {
        return $this->presentationBit;
    }
    /**
     * Set presentationBit value
     * @uses XPresentationBit::valueIsValid()
     * @uses XPresentationBit::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $presentationBit
     * @return XAnalogPort
     */
    public function setPresentationBit($presentationBit = null)
    {
        // validation for constraint: enumeration
        if (!XPresentationBit::valueIsValid($presentationBit)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $presentationBit, implode(', ', XPresentationBit::getValidValues())), __LINE__);
        }
        $this->presentationBit = $presentationBit;
        return $this;
    }
    /**
     * Get silenceSuppressionThreshold value
     * @return string|null
     */
    public function getSilenceSuppressionThreshold()
    {
        return $this->silenceSuppressionThreshold;
    }
    /**
     * Set silenceSuppressionThreshold value
     * @uses XSilenceSuppressionThreshold::valueIsValid()
     * @uses XSilenceSuppressionThreshold::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $silenceSuppressionThreshold
     * @return XAnalogPort
     */
    public function setSilenceSuppressionThreshold($silenceSuppressionThreshold = null)
    {
        // validation for constraint: enumeration
        if (!XSilenceSuppressionThreshold::valueIsValid($silenceSuppressionThreshold)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $silenceSuppressionThreshold, implode(', ', XSilenceSuppressionThreshold::getValidValues())), __LINE__);
        }
        $this->silenceSuppressionThreshold = $silenceSuppressionThreshold;
        return $this;
    }
    /**
     * Get startDialProtocol value
     * @return string|null
     */
    public function getStartDialProtocol()
    {
        return $this->startDialProtocol;
    }
    /**
     * Set startDialProtocol value
     * @uses XStartDialProtocol::valueIsValid()
     * @uses XStartDialProtocol::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $startDialProtocol
     * @return XAnalogPort
     */
    public function setStartDialProtocol($startDialProtocol = 'Not Set')
    {
        // validation for constraint: enumeration
        if (!XStartDialProtocol::valueIsValid($startDialProtocol)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $startDialProtocol, implode(', ', XStartDialProtocol::getValidValues())), __LINE__);
        }
        $this->startDialProtocol = $startDialProtocol;
        return $this;
    }
    /**
     * Get trunk value
     * @return string|null
     */
    public function getTrunk()
    {
        return $this->trunk;
    }
    /**
     * Set trunk value
     * @uses XTrunk::valueIsValid()
     * @uses XTrunk::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $trunk
     * @return XAnalogPort
     */
    public function setTrunk($trunk = null)
    {
        // validation for constraint: enumeration
        if (!XTrunk::valueIsValid($trunk)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $trunk, implode(', ', XTrunk::getValidValues())), __LINE__);
        }
        $this->trunk = $trunk;
        return $this;
    }
    /**
     * Get trunkLevel value
     * @return string|null
     */
    public function getTrunkLevel()
    {
        return $this->trunkLevel;
    }
    /**
     * Set trunkLevel value
     * @uses XTrunkLevel::valueIsValid()
     * @uses XTrunkLevel::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $trunkLevel
     * @return XAnalogPort
     */
    public function setTrunkLevel($trunkLevel = null)
    {
        // validation for constraint: enumeration
        if (!XTrunkLevel::valueIsValid($trunkLevel)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $trunkLevel, implode(', ', XTrunkLevel::getValidValues())), __LINE__);
        }
        $this->trunkLevel = $trunkLevel;
        return $this;
    }
    /**
     * Get trunkPadRx value
     * @return string|null
     */
    public function getTrunkPadRx()
    {
        return $this->trunkPadRx;
    }
    /**
     * Set trunkPadRx value
     * @uses XTrunkPad::valueIsValid()
     * @uses XTrunkPad::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $trunkPadRx
     * @return XAnalogPort
     */
    public function setTrunkPadRx($trunkPadRx = null)
    {
        // validation for constraint: enumeration
        if (!XTrunkPad::valueIsValid($trunkPadRx)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $trunkPadRx, implode(', ', XTrunkPad::getValidValues())), __LINE__);
        }
        $this->trunkPadRx = $trunkPadRx;
        return $this;
    }
    /**
     * Get trunkPadTx value
     * @return string|null
     */
    public function getTrunkPadTx()
    {
        return $this->trunkPadTx;
    }
    /**
     * Set trunkPadTx value
     * @uses XTrunkPad::valueIsValid()
     * @uses XTrunkPad::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $trunkPadTx
     * @return XAnalogPort
     */
    public function setTrunkPadTx($trunkPadTx = null)
    {
        // validation for constraint: enumeration
        if (!XTrunkPad::valueIsValid($trunkPadTx)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $trunkPadTx, implode(', ', XTrunkPad::getValidValues())), __LINE__);
        }
        $this->trunkPadTx = $trunkPadTx;
        return $this;
    }
    /**
     * Get vendorConfig 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 XVendorConfig|null
     */
    public function getVendorConfig()
    {
        return isset($this->vendorConfig) ? $this->vendorConfig : null;
    }
    /**
     * Set vendorConfig 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 XVendorConfig $vendorConfig
     * @return XAnalogPort
     */
    public function setVendorConfig(XVendorConfig $vendorConfig = null)
    {
        if (is_null($vendorConfig) || (is_array($vendorConfig) && empty($vendorConfig))) {
            unset($this->vendorConfig);
        } else {
            $this->vendorConfig = $vendorConfig;
        }
        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 XAnalogPort
     */
    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__;
    }
}
