<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CheckSessionForExistenceResponse Parameters
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:CheckSessionForExistenceResponse
 * @subpackage Structs
 */
class CheckSessionForExistenceResponse extends Response
{
    /**
     * The SessionIsValid
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $SessionIsValid;
    /**
     * The CheckSessionForExistenceResult
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var CheckSessionForExistenceResponse
     */
    public $CheckSessionForExistenceResult;
    /**
     * Constructor method for CheckSessionForExistenceResponse
     * @uses CheckSessionForExistenceResponse::setSessionIsValid()
     * @uses CheckSessionForExistenceResponse::setCheckSessionForExistenceResult()
     * @param bool $sessionIsValid
     * @param CheckSessionForExistenceResponse $checkSessionForExistenceResult
     */
    public function __construct($sessionIsValid = null, CheckSessionForExistenceResponse $checkSessionForExistenceResult = null)
    {
        $this
            ->setSessionIsValid($sessionIsValid)
            ->setCheckSessionForExistenceResult($checkSessionForExistenceResult);
    }
    /**
     * Get SessionIsValid value
     * @return bool|null
     */
    public function getSessionIsValid()
    {
        return $this->SessionIsValid;
    }
    /**
     * Set SessionIsValid value
     * @param bool $sessionIsValid
     * @return CheckSessionForExistenceResponse
     */
    public function setSessionIsValid($sessionIsValid = null)
    {
        // validation for constraint: boolean
        if (!is_null($sessionIsValid) && !is_bool($sessionIsValid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($sessionIsValid, true), gettype($sessionIsValid)), __LINE__);
        }
        $this->SessionIsValid = $sessionIsValid;
        return $this;
    }
    /**
     * Get CheckSessionForExistenceResult 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 CheckSessionForExistenceResponse|null
     */
    public function getCheckSessionForExistenceResult()
    {
        return isset($this->CheckSessionForExistenceResult) ? $this->CheckSessionForExistenceResult : null;
    }
    /**
     * Set CheckSessionForExistenceResult 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 CheckSessionForExistenceResponse $checkSessionForExistenceResult
     * @return CheckSessionForExistenceResponse
     */
    public function setCheckSessionForExistenceResult(CheckSessionForExistenceResponse $checkSessionForExistenceResult = null)
    {
        if (is_null($checkSessionForExistenceResult) || (is_array($checkSessionForExistenceResult) && empty($checkSessionForExistenceResult))) {
            unset($this->CheckSessionForExistenceResult);
        } else {
            $this->CheckSessionForExistenceResult = $checkSessionForExistenceResult;
        }
        return $this;
    }
}
