<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetVersionResponse StructType
 * @subpackage Structs
 */
class GetVersionResponse extends AbstractStructBase
{
    /**
     * The GetVersionResult
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $GetVersionResult;
    /**
     * Constructor method for GetVersionResponse
     * @uses GetVersionResponse::setGetVersionResult()
     * @param string $getVersionResult
     */
    public function __construct($getVersionResult = null)
    {
        $this
            ->setGetVersionResult($getVersionResult);
    }
    /**
     * Get GetVersionResult 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 getGetVersionResult()
    {
        return isset($this->GetVersionResult) ? $this->GetVersionResult : null;
    }
    /**
     * Set GetVersionResult 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 $getVersionResult
     * @return GetVersionResponse
     */
    public function setGetVersionResult($getVersionResult = null)
    {
        // validation for constraint: string
        if (!is_null($getVersionResult) && !is_string($getVersionResult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($getVersionResult, true), gettype($getVersionResult)), __LINE__);
        }
        if (is_null($getVersionResult) || (is_array($getVersionResult) && empty($getVersionResult))) {
            unset($this->GetVersionResult);
        } else {
            $this->GetVersionResult = $getVersionResult;
        }
        return $this;
    }
}
