<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for
 * ExtractAuthenticationDataFromIdentityProviderFormPost-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ExtractAuthenticationDataFromIdentityProviderFormPost-Response
 * @subpackage Structs
 */
class ExtractAuthenticationDataFromIdentityProviderFormPost_Response extends AbstractStructBase
{
    /**
     * The IdToken
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $IdToken;
    /**
     * The State
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $State;
    /**
     * The Error
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Error;
    /**
     * The ErrorDescription
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ErrorDescription;
    /**
     * Constructor method for
     * ExtractAuthenticationDataFromIdentityProviderFormPost-Response
     * @uses ExtractAuthenticationDataFromIdentityProviderFormPost_Response::setIdToken()
     * @uses ExtractAuthenticationDataFromIdentityProviderFormPost_Response::setState()
     * @uses ExtractAuthenticationDataFromIdentityProviderFormPost_Response::setError()
     * @uses ExtractAuthenticationDataFromIdentityProviderFormPost_Response::setErrorDescription()
     * @param string $idToken
     * @param string $state
     * @param string $error
     * @param string $errorDescription
     */
    public function __construct($idToken = null, $state = null, $error = null, $errorDescription = null)
    {
        $this
            ->setIdToken($idToken)
            ->setState($state)
            ->setError($error)
            ->setErrorDescription($errorDescription);
    }
    /**
     * Get IdToken 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 getIdToken()
    {
        return isset($this->IdToken) ? $this->IdToken : null;
    }
    /**
     * Set IdToken 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 $idToken
     * @return \patest\StructType\ExtractAuthenticationDataFromIdentityProviderFormPost_Response
     */
    public function setIdToken($idToken = null)
    {
        // validation for constraint: string
        if (!is_null($idToken) && !is_string($idToken)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($idToken, true), gettype($idToken)), __LINE__);
        }
        if (is_null($idToken) || (is_array($idToken) && empty($idToken))) {
            unset($this->IdToken);
        } else {
            $this->IdToken = $idToken;
        }
        return $this;
    }
    /**
     * Get State 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 getState()
    {
        return isset($this->State) ? $this->State : null;
    }
    /**
     * Set State 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 $state
     * @return \patest\StructType\ExtractAuthenticationDataFromIdentityProviderFormPost_Response
     */
    public function setState($state = null)
    {
        // validation for constraint: string
        if (!is_null($state) && !is_string($state)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($state, true), gettype($state)), __LINE__);
        }
        if (is_null($state) || (is_array($state) && empty($state))) {
            unset($this->State);
        } else {
            $this->State = $state;
        }
        return $this;
    }
    /**
     * Get Error 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 getError()
    {
        return isset($this->Error) ? $this->Error : null;
    }
    /**
     * Set Error 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 $error
     * @return \patest\StructType\ExtractAuthenticationDataFromIdentityProviderFormPost_Response
     */
    public function setError($error = null)
    {
        // validation for constraint: string
        if (!is_null($error) && !is_string($error)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($error, true), gettype($error)), __LINE__);
        }
        if (is_null($error) || (is_array($error) && empty($error))) {
            unset($this->Error);
        } else {
            $this->Error = $error;
        }
        return $this;
    }
    /**
     * Get ErrorDescription 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 getErrorDescription()
    {
        return isset($this->ErrorDescription) ? $this->ErrorDescription : null;
    }
    /**
     * Set ErrorDescription 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 $errorDescription
     * @return \patest\StructType\ExtractAuthenticationDataFromIdentityProviderFormPost_Response
     */
    public function setErrorDescription($errorDescription = null)
    {
        // validation for constraint: string
        if (!is_null($errorDescription) && !is_string($errorDescription)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorDescription, true), gettype($errorDescription)), __LINE__);
        }
        if (is_null($errorDescription) || (is_array($errorDescription) && empty($errorDescription))) {
            unset($this->ErrorDescription);
        } else {
            $this->ErrorDescription = $errorDescription;
        }
        return $this;
    }
}
