<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetOptionType StructType
 * @subpackage Structs
 */
class GetOptionType extends AbstractStructBase
{
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * The uuid
     * Meta informations extracted from the WSDL
     * - use: optional
     * - pattern: \{........-....-....-....-............\}
     * @var string
     */
    public $uuid;
    /**
     * The altDisplay
     * Meta informations extracted from the WSDL
     * - use: optional
     * - pattern: \{........-....-....-....-............\}
     * @var string
     */
    public $altDisplay;
    /**
     * Constructor method for GetOptionType
     * @uses GetOptionType::set_()
     * @uses GetOptionType::setUuid()
     * @uses GetOptionType::setAltDisplay()
     * @param string $_
     * @param string $uuid
     * @param string $altDisplay
     */
    public function __construct($_ = null, $uuid = null, $altDisplay = null)
    {
        $this
            ->set_($_)
            ->setUuid($uuid)
            ->setAltDisplay($altDisplay);
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return GetOptionType
     */
    public function set_($_ = null)
    {
        // validation for constraint: string
        if (!is_null($_) && !is_string($_)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($_)), __LINE__);
        }
        $this->_ = $_;
        return $this;
    }
    /**
     * Get uuid value
     * @return string|null
     */
    public function getUuid()
    {
        return $this->uuid;
    }
    /**
     * Set uuid value
     * @param string $uuid
     * @return GetOptionType
     */
    public function setUuid($uuid = null)
    {
        // validation for constraint: pattern
        if (is_scalar($uuid) && !preg_match('/\{........-....-....-....-............\}/', $uuid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "\{........-....-....-....-............\}", "%s" given', var_export($uuid, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($uuid) && !is_string($uuid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($uuid)), __LINE__);
        }
        $this->uuid = $uuid;
        return $this;
    }
    /**
     * Get altDisplay value
     * @return string|null
     */
    public function getAltDisplay()
    {
        return $this->altDisplay;
    }
    /**
     * Set altDisplay value
     * @param string $altDisplay
     * @return GetOptionType
     */
    public function setAltDisplay($altDisplay = null)
    {
        // validation for constraint: pattern
        if (is_scalar($altDisplay) && !preg_match('/\{........-....-....-....-............\}/', $altDisplay)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "\{........-....-....-....-............\}", "%s" given', var_export($altDisplay, true)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($altDisplay) && !is_string($altDisplay)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($altDisplay)), __LINE__);
        }
        $this->altDisplay = $altDisplay;
        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 GetOptionType
     */
    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__;
    }
}
