<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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