<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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