<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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