<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetSyslogConfigurationReq StructType
 * @subpackage Structs
 */
class GetSyslogConfigurationReq extends AbstractStructBase
{
    /**
     * The serverName
     * Meta informations extracted from the WSDL
     * - nillable: false
     * @var string
     */
    public $serverName;
    /**
     * The serviceGroup
     * Meta informations extracted from the WSDL
     * - default: CM Services
     * - nillable: false
     * @var string
     */
    public $serviceGroup;
    /**
     * The service
     * Meta informations extracted from the WSDL
     * - nillable: false
     * @var string
     */
    public $service;
    /**
     * The returnedTags
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var RSyslogConfiguration
     */
    public $returnedTags;
    /**
     * The sequence
     * Meta informations extracted from the WSDL
     * - use: optional
     * @var int
     */
    public $sequence;
    /**
     * Constructor method for GetSyslogConfigurationReq
     * @uses GetSyslogConfigurationReq::setServerName()
     * @uses GetSyslogConfigurationReq::setServiceGroup()
     * @uses GetSyslogConfigurationReq::setService()
     * @uses GetSyslogConfigurationReq::setReturnedTags()
     * @uses GetSyslogConfigurationReq::setSequence()
     * @param string $serverName
     * @param string $serviceGroup
     * @param string $service
     * @param RSyslogConfiguration $returnedTags
     * @param int $sequence
     */
    public function __construct($serverName = null, $serviceGroup = 'CM Services', $service = null, RSyslogConfiguration $returnedTags = null, $sequence = null)
    {
        $this
            ->setServerName($serverName)
            ->setServiceGroup($serviceGroup)
            ->setService($service)
            ->setReturnedTags($returnedTags)
            ->setSequence($sequence);
    }
    /**
     * Get serverName value
     * @return string|null
     */
    public function getServerName()
    {
        return $this->serverName;
    }
    /**
     * Set serverName value
     * @param string $serverName
     * @return GetSyslogConfigurationReq
     */
    public function setServerName($serverName = null)
    {
        // validation for constraint: string
        if (!is_null($serverName) && !is_string($serverName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($serverName)), __LINE__);
        }
        $this->serverName = $serverName;
        return $this;
    }
    /**
     * Get serviceGroup value
     * @return string|null
     */
    public function getServiceGroup()
    {
        return $this->serviceGroup;
    }
    /**
     * Set serviceGroup value
     * @uses XServiceGrouping::valueIsValid()
     * @uses XServiceGrouping::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $serviceGroup
     * @return GetSyslogConfigurationReq
     */
    public function setServiceGroup($serviceGroup = 'CM Services')
    {
        // validation for constraint: enumeration
        if (!XServiceGrouping::valueIsValid($serviceGroup)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $serviceGroup, implode(', ', XServiceGrouping::getValidValues())), __LINE__);
        }
        $this->serviceGroup = $serviceGroup;
        return $this;
    }
    /**
     * Get service value
     * @return string|null
     */
    public function getService()
    {
        return $this->service;
    }
    /**
     * Set service value
     * @param string $service
     * @return GetSyslogConfigurationReq
     */
    public function setService($service = null)
    {
        // validation for constraint: string
        if (!is_null($service) && !is_string($service)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($service)), __LINE__);
        }
        $this->service = $service;
        return $this;
    }
    /**
     * Get returnedTags value
     * @return RSyslogConfiguration|null
     */
    public function getReturnedTags()
    {
        return $this->returnedTags;
    }
    /**
     * Set returnedTags value
     * @param RSyslogConfiguration $returnedTags
     * @return GetSyslogConfigurationReq
     */
    public function setReturnedTags(RSyslogConfiguration $returnedTags = null)
    {
        $this->returnedTags = $returnedTags;
        return $this;
    }
    /**
     * Get sequence value
     * @return int|null
     */
    public function getSequence()
    {
        return $this->sequence;
    }
    /**
     * Set sequence value
     * @param int $sequence
     * @return GetSyslogConfigurationReq
     */
    public function setSequence($sequence = null)
    {
        // validation for constraint: int
        if (!is_null($sequence) && !is_numeric($sequence)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($sequence)), __LINE__);
        }
        $this->sequence = $sequence;
        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 GetSyslogConfigurationReq
     */
    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__;
    }
}
