<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BasketSalesBatchPrintingTransaction StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:BasketSalesBatchPrintingTransaction
 * @subpackage Structs
 */
class BasketSalesBatchPrintingTransaction extends AbstractStructBase
{
    /**
     * The ItemTypes
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfint
     */
    public $ItemTypes;
    /**
     * The Transaction
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\BatchPrintingTransaction
     */
    public $Transaction;
    /**
     * Constructor method for BasketSalesBatchPrintingTransaction
     * @uses BasketSalesBatchPrintingTransaction::setItemTypes()
     * @uses BasketSalesBatchPrintingTransaction::setTransaction()
     * @param \patest\ArrayType\ArrayOfint $itemTypes
     * @param \patest\StructType\BatchPrintingTransaction $transaction
     */
    public function __construct(\patest\ArrayType\ArrayOfint $itemTypes = null, \patest\StructType\BatchPrintingTransaction $transaction = null)
    {
        $this
            ->setItemTypes($itemTypes)
            ->setTransaction($transaction);
    }
    /**
     * Get ItemTypes 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\ArrayOfint|null
     */
    public function getItemTypes()
    {
        return isset($this->ItemTypes) ? $this->ItemTypes : null;
    }
    /**
     * Set ItemTypes 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\ArrayOfint $itemTypes
     * @return \patest\StructType\BasketSalesBatchPrintingTransaction
     */
    public function setItemTypes(\patest\ArrayType\ArrayOfint $itemTypes = null)
    {
        if (is_null($itemTypes) || (is_array($itemTypes) && empty($itemTypes))) {
            unset($this->ItemTypes);
        } else {
            $this->ItemTypes = $itemTypes;
        }
        return $this;
    }
    /**
     * Get Transaction 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\BatchPrintingTransaction|null
     */
    public function getTransaction()
    {
        return isset($this->Transaction) ? $this->Transaction : null;
    }
    /**
     * Set Transaction 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\BatchPrintingTransaction $transaction
     * @return \patest\StructType\BasketSalesBatchPrintingTransaction
     */
    public function setTransaction(\patest\StructType\BatchPrintingTransaction $transaction = null)
    {
        if (is_null($transaction) || (is_array($transaction) && empty($transaction))) {
            unset($this->Transaction);
        } else {
            $this->Transaction = $transaction;
        }
        return $this;
    }
}
