<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for LookupExternalAuthenticationData-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:LookupExternalAuthenticationData-Response
 * @subpackage Structs
 */
class LookupExternalAuthenticationData_Response extends ExtensibleDataContract
{
    /**
     * The Data
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Authentication_ExternalAuthenticationData
     */
    public $Data;
    /**
     * Constructor method for LookupExternalAuthenticationData-Response
     * @uses LookupExternalAuthenticationData_Response::setData()
     * @param \patest\StructType\Authentication_ExternalAuthenticationData $data
     */
    public function __construct(\patest\StructType\Authentication_ExternalAuthenticationData $data = null)
    {
        $this
            ->setData($data);
    }
    /**
     * Get Data 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 \patest\StructType\Authentication_ExternalAuthenticationData|null
     */
    public function getData()
    {
        return isset($this->Data) ? $this->Data : null;
    }
    /**
     * Set Data 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 \patest\StructType\Authentication_ExternalAuthenticationData $data
     * @return \patest\StructType\LookupExternalAuthenticationData_Response
     */
    public function setData(\patest\StructType\Authentication_ExternalAuthenticationData $data = null)
    {
        if (is_null($data) || (is_array($data) && empty($data))) {
            unset($this->Data);
        } else {
            $this->Data = $data;
        }
        return $this;
    }
}
