<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for LoginResponse StructType
 * @subpackage Structs
 */
class LoginResponse extends AbstractStructBase
{
    /**
     * The LoginResult
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var Login_Result
     */
    public $LoginResult;
    /**
     * Constructor method for LoginResponse
     * @uses LoginResponse::setLoginResult()
     * @param Login_Result $loginResult
     */
    public function __construct(Login_Result $loginResult = null)
    {
        $this
            ->setLoginResult($loginResult);
    }
    /**
     * Get LoginResult 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 Login_Result|null
     */
    public function getLoginResult()
    {
        return isset($this->LoginResult) ? $this->LoginResult : null;
    }
    /**
     * Set LoginResult 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 Login_Result $loginResult
     * @return LoginResponse
     */
    public function setLoginResult(Login_Result $loginResult = null)
    {
        if (is_null($loginResult) || (is_array($loginResult) && empty($loginResult))) {
            unset($this->LoginResult);
        } else {
            $this->LoginResult = $loginResult;
        }
        return $this;
    }
}
