<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XMohServer StructType
 * @subpackage Structs
 */
class XMohServer extends AbstractStructBase
{
    /**
     * The name
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * @var string
     */
    public $name;
    /**
     * The processNodeName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var XFkType
     */
    public $processNodeName;
    /**
     * The devicePoolName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var XFkType
     */
    public $devicePoolName;
    /**
     * The locationName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * @var XFkType
     */
    public $locationName;
    /**
     * The description
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $description;
    /**
     * The maxUnicastConnections
     * Meta informations extracted from the WSDL
     * - default: 250
     * - documentation: Maximum Half Duplex Streams must be a number in the range 0 to 500.
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $maxUnicastConnections;
    /**
     * The maxMulticastConnections
     * Meta informations extracted from the WSDL
     * - default: 250000
     * - documentation: Maximum Multicast Connections must be a number in the range 0 to 999999.
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $maxMulticastConnections;
    /**
     * The fixedAudioSourceDevice
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $fixedAudioSourceDevice;
    /**
     * The runFlag
     * Meta informations extracted from the WSDL
     * - default: true
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $runFlag;
    /**
     * The useTrustedRelayPoint
     * Meta informations extracted from the WSDL
     * - default: Default
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $useTrustedRelayPoint;
    /**
     * The isMultiCastEnabled
     * Meta informations extracted from the WSDL
     * - documentation: If isMultiCastEnabled is false then these elements are not necessary.MOHServer will be added to the database without the values of these tags. ie. The table MOHServerMulticastInfo table will be empty. Multicast Base Port number must
     * be an even number in the range 16384 to 32766.
     * - maxOccurs: 1
     * - minOccurs: 0
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $isMultiCastEnabled;
    /**
     * The baseMulticastIpaddress
     * Meta informations extracted from the WSDL
     * - default: 239.1.1.1
     * - documentation: If isMultiCastEnabled is false then these elements are not necessary.MOHServer will be added to the database without the values of these tags. ie. The table MOHServerMulticastInfo table will be empty. Multicast Base Port number must
     * be an even number in the range 16384 to 32766. baseMulticastIPAddress and baseMulticastPort must be a unique pair. All Multicast IP Addresses must be in the range 239.1.1.1 to 239.255.255.255
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $baseMulticastIpaddress;
    /**
     * The baseMulticastPort
     * Meta informations extracted from the WSDL
     * - default: 0
     * - documentation: If isMultiCastEnabled is false then these elements are not necessary.MOHServer will be added to the database without the values of these tags. ie. The table MOHServerMulticastInfo table will be empty. Multicast Base Port number must
     * be an even number in the range 16384 to 32766
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $baseMulticastPort;
    /**
     * The multicastIncrementOnIp
     * Meta informations extracted from the WSDL
     * - default: false
     * - documentation: If isMultiCastEnabled is false then these elements are not necessary.MOHServer will be added to the database without the values of these tags. ie. The table MOHServerMulticastInfo table will be empty.
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * - pattern: (t)|(f)|(true)|(false)|(0)|(1)
     * @var string
     */
    public $multicastIncrementOnIp;
    /**
     * The audioSources
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var AudioSources
     */
    public $audioSources;
    /**
     * Constructor method for XMohServer
     * @uses XMohServer::setName()
     * @uses XMohServer::setProcessNodeName()
     * @uses XMohServer::setDevicePoolName()
     * @uses XMohServer::setLocationName()
     * @uses XMohServer::setDescription()
     * @uses XMohServer::setMaxUnicastConnections()
     * @uses XMohServer::setMaxMulticastConnections()
     * @uses XMohServer::setFixedAudioSourceDevice()
     * @uses XMohServer::setRunFlag()
     * @uses XMohServer::setUseTrustedRelayPoint()
     * @uses XMohServer::setIsMultiCastEnabled()
     * @uses XMohServer::setBaseMulticastIpaddress()
     * @uses XMohServer::setBaseMulticastPort()
     * @uses XMohServer::setMulticastIncrementOnIp()
     * @uses XMohServer::setAudioSources()
     * @param string $name
     * @param XFkType $processNodeName
     * @param XFkType $devicePoolName
     * @param XFkType $locationName
     * @param string $description
     * @param string $maxUnicastConnections
     * @param string $maxMulticastConnections
     * @param string $fixedAudioSourceDevice
     * @param string $runFlag
     * @param string $useTrustedRelayPoint
     * @param string $isMultiCastEnabled
     * @param string $baseMulticastIpaddress
     * @param string $baseMulticastPort
     * @param string $multicastIncrementOnIp
     * @param AudioSources $audioSources
     */
    public function __construct($name = null, XFkType $processNodeName = null, XFkType $devicePoolName = null, XFkType $locationName = null, $description = null, $maxUnicastConnections = '250', $maxMulticastConnections = '250000', $fixedAudioSourceDevice = null, $runFlag = true, $useTrustedRelayPoint = 'Default', $isMultiCastEnabled = null, $baseMulticastIpaddress = '239.1.1.1', $baseMulticastPort = '0', $multicastIncrementOnIp = false, AudioSources $audioSources = null)
    {
        $this
            ->setName($name)
            ->setProcessNodeName($processNodeName)
            ->setDevicePoolName($devicePoolName)
            ->setLocationName($locationName)
            ->setDescription($description)
            ->setMaxUnicastConnections($maxUnicastConnections)
            ->setMaxMulticastConnections($maxMulticastConnections)
            ->setFixedAudioSourceDevice($fixedAudioSourceDevice)
            ->setRunFlag($runFlag)
            ->setUseTrustedRelayPoint($useTrustedRelayPoint)
            ->setIsMultiCastEnabled($isMultiCastEnabled)
            ->setBaseMulticastIpaddress($baseMulticastIpaddress)
            ->setBaseMulticastPort($baseMulticastPort)
            ->setMulticastIncrementOnIp($multicastIncrementOnIp)
            ->setAudioSources($audioSources);
    }
    /**
     * Get name value
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return XMohServer
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name)), __LINE__);
        }
        $this->name = $name;
        return $this;
    }
    /**
     * Get processNodeName value
     * @return XFkType
     */
    public function getProcessNodeName()
    {
        return $this->processNodeName;
    }
    /**
     * Set processNodeName value
     * @param XFkType $processNodeName
     * @return XMohServer
     */
    public function setProcessNodeName(XFkType $processNodeName = null)
    {
        $this->processNodeName = $processNodeName;
        return $this;
    }
    /**
     * Get devicePoolName value
     * @return XFkType
     */
    public function getDevicePoolName()
    {
        return $this->devicePoolName;
    }
    /**
     * Set devicePoolName value
     * @param XFkType $devicePoolName
     * @return XMohServer
     */
    public function setDevicePoolName(XFkType $devicePoolName = null)
    {
        $this->devicePoolName = $devicePoolName;
        return $this;
    }
    /**
     * Get locationName value
     * @return XFkType
     */
    public function getLocationName()
    {
        return $this->locationName;
    }
    /**
     * Set locationName value
     * @param XFkType $locationName
     * @return XMohServer
     */
    public function setLocationName(XFkType $locationName = null)
    {
        $this->locationName = $locationName;
        return $this;
    }
    /**
     * Get description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Set description value
     * @param string $description
     * @return XMohServer
     */
    public function setDescription($description = null)
    {
        // validation for constraint: string
        if (!is_null($description) && !is_string($description)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($description)), __LINE__);
        }
        $this->description = $description;
        return $this;
    }
    /**
     * Get maxUnicastConnections value
     * @return string|null
     */
    public function getMaxUnicastConnections()
    {
        return $this->maxUnicastConnections;
    }
    /**
     * Set maxUnicastConnections value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $maxUnicastConnections
     * @return XMohServer
     */
    public function setMaxUnicastConnections($maxUnicastConnections = '250')
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($maxUnicastConnections)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $maxUnicastConnections, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->maxUnicastConnections = $maxUnicastConnections;
        return $this;
    }
    /**
     * Get maxMulticastConnections value
     * @return string|null
     */
    public function getMaxMulticastConnections()
    {
        return $this->maxMulticastConnections;
    }
    /**
     * Set maxMulticastConnections value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $maxMulticastConnections
     * @return XMohServer
     */
    public function setMaxMulticastConnections($maxMulticastConnections = '250000')
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($maxMulticastConnections)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $maxMulticastConnections, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->maxMulticastConnections = $maxMulticastConnections;
        return $this;
    }
    /**
     * Get fixedAudioSourceDevice value
     * @return string|null
     */
    public function getFixedAudioSourceDevice()
    {
        return $this->fixedAudioSourceDevice;
    }
    /**
     * Set fixedAudioSourceDevice value
     * @param string $fixedAudioSourceDevice
     * @return XMohServer
     */
    public function setFixedAudioSourceDevice($fixedAudioSourceDevice = null)
    {
        // validation for constraint: string
        if (!is_null($fixedAudioSourceDevice) && !is_string($fixedAudioSourceDevice)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($fixedAudioSourceDevice)), __LINE__);
        }
        $this->fixedAudioSourceDevice = $fixedAudioSourceDevice;
        return $this;
    }
    /**
     * Get runFlag value
     * @return string|null
     */
    public function getRunFlag()
    {
        return $this->runFlag;
    }
    /**
     * Set runFlag value
     * @param string $runFlag
     * @return XMohServer
     */
    public function setRunFlag($runFlag = true)
    {
        // validation for constraint: pattern
        if (is_scalar($runFlag) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $runFlag)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($runFlag, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($runFlag) && !is_string($runFlag)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($runFlag)), __LINE__);
        }
        $this->runFlag = $runFlag;
        return $this;
    }
    /**
     * Get useTrustedRelayPoint value
     * @return string|null
     */
    public function getUseTrustedRelayPoint()
    {
        return $this->useTrustedRelayPoint;
    }
    /**
     * Set useTrustedRelayPoint value
     * @uses XStatus::valueIsValid()
     * @uses XStatus::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $useTrustedRelayPoint
     * @return XMohServer
     */
    public function setUseTrustedRelayPoint($useTrustedRelayPoint = 'Default')
    {
        // validation for constraint: enumeration
        if (!XStatus::valueIsValid($useTrustedRelayPoint)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $useTrustedRelayPoint, implode(', ', XStatus::getValidValues())), __LINE__);
        }
        $this->useTrustedRelayPoint = $useTrustedRelayPoint;
        return $this;
    }
    /**
     * Get isMultiCastEnabled value
     * @return string|null
     */
    public function getIsMultiCastEnabled()
    {
        return $this->isMultiCastEnabled;
    }
    /**
     * Set isMultiCastEnabled value
     * @param string $isMultiCastEnabled
     * @return XMohServer
     */
    public function setIsMultiCastEnabled($isMultiCastEnabled = null)
    {
        // validation for constraint: pattern
        if (is_scalar($isMultiCastEnabled) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $isMultiCastEnabled)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($isMultiCastEnabled, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($isMultiCastEnabled) && !is_string($isMultiCastEnabled)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($isMultiCastEnabled)), __LINE__);
        }
        $this->isMultiCastEnabled = $isMultiCastEnabled;
        return $this;
    }
    /**
     * Get baseMulticastIpaddress value
     * @return string|null
     */
    public function getBaseMulticastIpaddress()
    {
        return $this->baseMulticastIpaddress;
    }
    /**
     * Set baseMulticastIpaddress value
     * @param string $baseMulticastIpaddress
     * @return XMohServer
     */
    public function setBaseMulticastIpaddress($baseMulticastIpaddress = '239.1.1.1')
    {
        // validation for constraint: string
        if (!is_null($baseMulticastIpaddress) && !is_string($baseMulticastIpaddress)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($baseMulticastIpaddress)), __LINE__);
        }
        $this->baseMulticastIpaddress = $baseMulticastIpaddress;
        return $this;
    }
    /**
     * Get baseMulticastPort value
     * @return string|null
     */
    public function getBaseMulticastPort()
    {
        return $this->baseMulticastPort;
    }
    /**
     * Set baseMulticastPort value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $baseMulticastPort
     * @return XMohServer
     */
    public function setBaseMulticastPort($baseMulticastPort = '0')
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($baseMulticastPort)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $baseMulticastPort, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->baseMulticastPort = $baseMulticastPort;
        return $this;
    }
    /**
     * Get multicastIncrementOnIp value
     * @return string|null
     */
    public function getMulticastIncrementOnIp()
    {
        return $this->multicastIncrementOnIp;
    }
    /**
     * Set multicastIncrementOnIp value
     * @param string $multicastIncrementOnIp
     * @return XMohServer
     */
    public function setMulticastIncrementOnIp($multicastIncrementOnIp = false)
    {
        // validation for constraint: pattern
        if (is_scalar($multicastIncrementOnIp) && !preg_match('/(t)|(f)|(true)|(false)|(0)|(1)/', $multicastIncrementOnIp)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "(t)|(f)|(true)|(false)|(0)|(1)", "%s" given', var_export($multicastIncrementOnIp, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($multicastIncrementOnIp) && !is_string($multicastIncrementOnIp)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($multicastIncrementOnIp)), __LINE__);
        }
        $this->multicastIncrementOnIp = $multicastIncrementOnIp;
        return $this;
    }
    /**
     * Get audioSources value
     * @return AudioSources|null
     */
    public function getAudioSources()
    {
        return $this->audioSources;
    }
    /**
     * Set audioSources value
     * @param AudioSources $audioSources
     * @return XMohServer
     */
    public function setAudioSources(AudioSources $audioSources = null)
    {
        $this->audioSources = $audioSources;
        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 XMohServer
     */
    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__;
    }
}
