<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UpdateAudioCodecPreferenceListReq StructType
 * @subpackage Structs
 */
class UpdateAudioCodecPreferenceListReq extends NameAndGUIDRequest
{
    /**
     * The newName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $newName;
    /**
     * The description
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $description;
    /**
     * The codecsInList
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var CodecsInList
     */
    public $codecsInList;
    /**
     * Constructor method for UpdateAudioCodecPreferenceListReq
     * @uses UpdateAudioCodecPreferenceListReq::setNewName()
     * @uses UpdateAudioCodecPreferenceListReq::setDescription()
     * @uses UpdateAudioCodecPreferenceListReq::setCodecsInList()
     * @param string $newName
     * @param string $description
     * @param CodecsInList $codecsInList
     */
    public function __construct($newName = null, $description = null, CodecsInList $codecsInList = null)
    {
        $this
            ->setNewName($newName)
            ->setDescription($description)
            ->setCodecsInList($codecsInList);
    }
    /**
     * Get newName value
     * @return string|null
     */
    public function getNewName()
    {
        return $this->newName;
    }
    /**
     * Set newName value
     * @param string $newName
     * @return UpdateAudioCodecPreferenceListReq
     */
    public function setNewName($newName = null)
    {
        // validation for constraint: string
        if (!is_null($newName) && !is_string($newName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($newName)), __LINE__);
        }
        $this->newName = $newName;
        return $this;
    }
    /**
     * Get description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Set description value
     * @param string $description
     * @return UpdateAudioCodecPreferenceListReq
     */
    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 codecsInList value
     * @return CodecsInList|null
     */
    public function getCodecsInList()
    {
        return $this->codecsInList;
    }
    /**
     * Set codecsInList value
     * @param CodecsInList $codecsInList
     * @return UpdateAudioCodecPreferenceListReq
     */
    public function setCodecsInList(CodecsInList $codecsInList = null)
    {
        $this->codecsInList = $codecsInList;
        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 UpdateAudioCodecPreferenceListReq
     */
    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__;
    }
}
