<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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