<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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