<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for sipPorts StructType
 * @subpackage Structs
 */
class SipPorts extends AbstractStructBase
{
    /**
     * The sipPhonePort
     * Meta informations extracted from the WSDL
     * - default: 5060
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $sipPhonePort;
    /**
     * The sipPhoneSecurePort
     * Meta informations extracted from the WSDL
     * - default: 5061
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $sipPhoneSecurePort;
    /**
     * Constructor method for sipPorts
     * @uses SipPorts::setSipPhonePort()
     * @uses SipPorts::setSipPhoneSecurePort()
     * @param string $sipPhonePort
     * @param string $sipPhoneSecurePort
     */
    public function __construct($sipPhonePort = '5060', $sipPhoneSecurePort = '5061')
    {
        $this
            ->setSipPhonePort($sipPhonePort)
            ->setSipPhoneSecurePort($sipPhoneSecurePort);
    }
    /**
     * Get sipPhonePort value
     * @return string|null
     */
    public function getSipPhonePort()
    {
        return $this->sipPhonePort;
    }
    /**
     * Set sipPhonePort value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $sipPhonePort
     * @return SipPorts
     */
    public function setSipPhonePort($sipPhonePort = '5060')
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($sipPhonePort)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $sipPhonePort, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->sipPhonePort = $sipPhonePort;
        return $this;
    }
    /**
     * Get sipPhoneSecurePort value
     * @return string|null
     */
    public function getSipPhoneSecurePort()
    {
        return $this->sipPhoneSecurePort;
    }
    /**
     * Set sipPhoneSecurePort value
     * @uses XInteger::valueIsValid()
     * @uses XInteger::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $sipPhoneSecurePort
     * @return SipPorts
     */
    public function setSipPhoneSecurePort($sipPhoneSecurePort = '5061')
    {
        // validation for constraint: enumeration
        if (!XInteger::valueIsValid($sipPhoneSecurePort)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $sipPhoneSecurePort, implode(', ', XInteger::getValidValues())), __LINE__);
        }
        $this->sipPhoneSecurePort = $sipPhoneSecurePort;
        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 SipPorts
     */
    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__;
    }
}
