<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.AuxDataItem.VatDetails StructType
 * @subpackage Structs
 */
class Printing_AuxDataItem_VatDetails extends Printing_AuxiliaryDataItem_Base
{
    /**
     * The TotalAmount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalAmount;
    /**
     * The TotalSourceAmount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalSourceAmount;
    /**
     * The TotalVat
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalVat;
    /**
     * The UnitDetails
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfPrinting_AuxDataItem_VatDetail
     */
    public $UnitDetails;
    /**
     * Constructor method for Printing.AuxDataItem.VatDetails
     * @uses Printing_AuxDataItem_VatDetails::setTotalAmount()
     * @uses Printing_AuxDataItem_VatDetails::setTotalSourceAmount()
     * @uses Printing_AuxDataItem_VatDetails::setTotalVat()
     * @uses Printing_AuxDataItem_VatDetails::setUnitDetails()
     * @param \patest\StructType\Money $totalAmount
     * @param \patest\StructType\Money $totalSourceAmount
     * @param \patest\StructType\Money $totalVat
     * @param \patest\StructType\RecordSetOfPrinting_AuxDataItem_VatDetail $unitDetails
     */
    public function __construct(\patest\StructType\Money $totalAmount = null, \patest\StructType\Money $totalSourceAmount = null, \patest\StructType\Money $totalVat = null, \patest\StructType\RecordSetOfPrinting_AuxDataItem_VatDetail $unitDetails = null)
    {
        $this
            ->setTotalAmount($totalAmount)
            ->setTotalSourceAmount($totalSourceAmount)
            ->setTotalVat($totalVat)
            ->setUnitDetails($unitDetails);
    }
    /**
     * Get TotalAmount 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\Money|null
     */
    public function getTotalAmount()
    {
        return isset($this->TotalAmount) ? $this->TotalAmount : null;
    }
    /**
     * Set TotalAmount 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\Money $totalAmount
     * @return \patest\StructType\Printing_AuxDataItem_VatDetails
     */
    public function setTotalAmount(\patest\StructType\Money $totalAmount = null)
    {
        if (is_null($totalAmount) || (is_array($totalAmount) && empty($totalAmount))) {
            unset($this->TotalAmount);
        } else {
            $this->TotalAmount = $totalAmount;
        }
        return $this;
    }
    /**
     * Get TotalSourceAmount 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\Money|null
     */
    public function getTotalSourceAmount()
    {
        return isset($this->TotalSourceAmount) ? $this->TotalSourceAmount : null;
    }
    /**
     * Set TotalSourceAmount 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\Money $totalSourceAmount
     * @return \patest\StructType\Printing_AuxDataItem_VatDetails
     */
    public function setTotalSourceAmount(\patest\StructType\Money $totalSourceAmount = null)
    {
        if (is_null($totalSourceAmount) || (is_array($totalSourceAmount) && empty($totalSourceAmount))) {
            unset($this->TotalSourceAmount);
        } else {
            $this->TotalSourceAmount = $totalSourceAmount;
        }
        return $this;
    }
    /**
     * Get TotalVat 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\Money|null
     */
    public function getTotalVat()
    {
        return isset($this->TotalVat) ? $this->TotalVat : null;
    }
    /**
     * Set TotalVat 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\Money $totalVat
     * @return \patest\StructType\Printing_AuxDataItem_VatDetails
     */
    public function setTotalVat(\patest\StructType\Money $totalVat = null)
    {
        if (is_null($totalVat) || (is_array($totalVat) && empty($totalVat))) {
            unset($this->TotalVat);
        } else {
            $this->TotalVat = $totalVat;
        }
        return $this;
    }
    /**
     * Get UnitDetails 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_AuxDataItem_VatDetail|null
     */
    public function getUnitDetails()
    {
        return isset($this->UnitDetails) ? $this->UnitDetails : null;
    }
    /**
     * Set UnitDetails 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_AuxDataItem_VatDetail $unitDetails
     * @return \patest\StructType\Printing_AuxDataItem_VatDetails
     */
    public function setUnitDetails(\patest\StructType\RecordSetOfPrinting_AuxDataItem_VatDetail $unitDetails = null)
    {
        if (is_null($unitDetails) || (is_array($unitDetails) && empty($unitDetails))) {
            unset($this->UnitDetails);
        } else {
            $this->UnitDetails = $unitDetails;
        }
        return $this;
    }
}
