<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.AuxiliaryDataItem.DonationsData StructType
 * @subpackage Structs
 */
class Printing_AuxiliaryDataItem_DonationsData extends Printing_AuxiliaryDataItem_Base
{
    /**
     * The AllDonations
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfPrinting_PrintableItem_DonationInfo
     */
    public $AllDonations;
    /**
     * Constructor method for Printing.AuxiliaryDataItem.DonationsData
     * @uses Printing_AuxiliaryDataItem_DonationsData::setAllDonations()
     * @param \patest\StructType\RecordSetOfPrinting_PrintableItem_DonationInfo $allDonations
     */
    public function __construct(\patest\StructType\RecordSetOfPrinting_PrintableItem_DonationInfo $allDonations = null)
    {
        $this
            ->setAllDonations($allDonations);
    }
    /**
     * Get AllDonations 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\RecordSetOfPrinting_PrintableItem_DonationInfo|null
     */
    public function getAllDonations()
    {
        return isset($this->AllDonations) ? $this->AllDonations : null;
    }
    /**
     * Set AllDonations 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\RecordSetOfPrinting_PrintableItem_DonationInfo $allDonations
     * @return \patest\StructType\Printing_AuxiliaryDataItem_DonationsData
     */
    public function setAllDonations(\patest\StructType\RecordSetOfPrinting_PrintableItem_DonationInfo $allDonations = null)
    {
        if (is_null($allDonations) || (is_array($allDonations) && empty($allDonations))) {
            unset($this->AllDonations);
        } else {
            $this->AllDonations = $allDonations;
        }
        return $this;
    }
}
