<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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