<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XServiceProfileList StructType
 * @subpackage Structs
 */
class XServiceProfileList extends AbstractStructBase
{
    /**
     * The profileName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $profileName;
    /**
     * The primary
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $primary;
    /**
     * The secondary
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $secondary;
    /**
     * The tertiary
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $tertiary;
    /**
     * The serverCertificateVerification
     * Meta informations extracted from the WSDL
     * - documentation: Applicable only for Conferencing Profile
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $serverCertificateVerification;
    /**
     * The serviceProfileXml
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var XVendorConfig
     */
    public $serviceProfileXml;
    /**
     * Constructor method for XServiceProfileList
     * @uses XServiceProfileList::setProfileName()
     * @uses XServiceProfileList::setPrimary()
     * @uses XServiceProfileList::setSecondary()
     * @uses XServiceProfileList::setTertiary()
     * @uses XServiceProfileList::setServerCertificateVerification()
     * @uses XServiceProfileList::setServiceProfileXml()
     * @param string $profileName
     * @param string $primary
     * @param string $secondary
     * @param string $tertiary
     * @param string $serverCertificateVerification
     * @param XVendorConfig $serviceProfileXml
     */
    public function __construct($profileName = null, $primary = null, $secondary = null, $tertiary = null, $serverCertificateVerification = null, XVendorConfig $serviceProfileXml = null)
    {
        $this
            ->setProfileName($profileName)
            ->setPrimary($primary)
            ->setSecondary($secondary)
            ->setTertiary($tertiary)
            ->setServerCertificateVerification($serverCertificateVerification)
            ->setServiceProfileXml($serviceProfileXml);
    }
    /**
     * Get profileName value
     * @return string
     */
    public function getProfileName()
    {
        return $this->profileName;
    }
    /**
     * Set profileName value
     * @param string $profileName
     * @return XServiceProfileList
     */
    public function setProfileName($profileName = null)
    {
        // validation for constraint: string
        if (!is_null($profileName) && !is_string($profileName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($profileName)), __LINE__);
        }
        $this->profileName = $profileName;
        return $this;
    }
    /**
     * Get primary 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 getPrimary()
    {
        return isset($this->primary) ? $this->primary : null;
    }
    /**
     * Set primary 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 $primary
     * @return XServiceProfileList
     */
    public function setPrimary($primary = null)
    {
        // validation for constraint: string
        if (!is_null($primary) && !is_string($primary)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($primary)), __LINE__);
        }
        if (is_null($primary) || (is_array($primary) && empty($primary))) {
            unset($this->primary);
        } else {
            $this->primary = $primary;
        }
        return $this;
    }
    /**
     * Get secondary 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 getSecondary()
    {
        return isset($this->secondary) ? $this->secondary : null;
    }
    /**
     * Set secondary 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 $secondary
     * @return XServiceProfileList
     */
    public function setSecondary($secondary = null)
    {
        // validation for constraint: string
        if (!is_null($secondary) && !is_string($secondary)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($secondary)), __LINE__);
        }
        if (is_null($secondary) || (is_array($secondary) && empty($secondary))) {
            unset($this->secondary);
        } else {
            $this->secondary = $secondary;
        }
        return $this;
    }
    /**
     * Get tertiary 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 getTertiary()
    {
        return isset($this->tertiary) ? $this->tertiary : null;
    }
    /**
     * Set tertiary 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 $tertiary
     * @return XServiceProfileList
     */
    public function setTertiary($tertiary = null)
    {
        // validation for constraint: string
        if (!is_null($tertiary) && !is_string($tertiary)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($tertiary)), __LINE__);
        }
        if (is_null($tertiary) || (is_array($tertiary) && empty($tertiary))) {
            unset($this->tertiary);
        } else {
            $this->tertiary = $tertiary;
        }
        return $this;
    }
    /**
     * Get serverCertificateVerification 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 getServerCertificateVerification()
    {
        return isset($this->serverCertificateVerification) ? $this->serverCertificateVerification : null;
    }
    /**
     * Set serverCertificateVerification 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 XCertificateVerificationLevel::valueIsValid()
     * @uses XCertificateVerificationLevel::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $serverCertificateVerification
     * @return XServiceProfileList
     */
    public function setServerCertificateVerification($serverCertificateVerification = null)
    {
        // validation for constraint: enumeration
        if (!XCertificateVerificationLevel::valueIsValid($serverCertificateVerification)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $serverCertificateVerification, implode(', ', XCertificateVerificationLevel::getValidValues())), __LINE__);
        }
        if (is_null($serverCertificateVerification) || (is_array($serverCertificateVerification) && empty($serverCertificateVerification))) {
            unset($this->serverCertificateVerification);
        } else {
            $this->serverCertificateVerification = $serverCertificateVerification;
        }
        return $this;
    }
    /**
     * Get serviceProfileXml value
     * @return XVendorConfig|null
     */
    public function getServiceProfileXml()
    {
        return $this->serviceProfileXml;
    }
    /**
     * Set serviceProfileXml value
     * @param XVendorConfig $serviceProfileXml
     * @return XServiceProfileList
     */
    public function setServiceProfileXml(XVendorConfig $serviceProfileXml = null)
    {
        $this->serviceProfileXml = $serviceProfileXml;
        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 XServiceProfileList
     */
    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__;
    }
}
