<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CreateDraftInvoices-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:CreateDraftInvoices-Response
 * @subpackage Structs
 */
class CreateDraftInvoices_Response extends AbstractStructBase
{
    /**
     * The Responses
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfCreateSingleDraftInvoiceResponse
     */
    public $Responses;
    /**
     * Constructor method for CreateDraftInvoices-Response
     * @uses CreateDraftInvoices_Response::setResponses()
     * @param \patest\ArrayType\ArrayOfCreateSingleDraftInvoiceResponse $responses
     */
    public function __construct(\patest\ArrayType\ArrayOfCreateSingleDraftInvoiceResponse $responses = null)
    {
        $this
            ->setResponses($responses);
    }
    /**
     * Get Responses 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\ArrayType\ArrayOfCreateSingleDraftInvoiceResponse|null
     */
    public function getResponses()
    {
        return isset($this->Responses) ? $this->Responses : null;
    }
    /**
     * Set Responses 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\ArrayType\ArrayOfCreateSingleDraftInvoiceResponse $responses
     * @return \patest\StructType\CreateDraftInvoices_Response
     */
    public function setResponses(\patest\ArrayType\ArrayOfCreateSingleDraftInvoiceResponse $responses = null)
    {
        if (is_null($responses) || (is_array($responses) && empty($responses))) {
            unset($this->Responses);
        } else {
            $this->Responses = $responses;
        }
        return $this;
    }
}
