<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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