<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

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