<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.PrintableTransaction StructType
 * @subpackage Structs
 */
class Printing_PrintableTransaction extends AnyEntity
{
    /**
     * The AvailableDocumentTypesToSelect
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfPrinting_AvailableDocumentTypes
     */
    public $AvailableDocumentTypesToSelect;
    /**
     * The PrintableItems
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfPrinting_ItemDataForAdvancedPrinting
     */
    public $PrintableItems;
    /**
     * The TransactionGuid
     * Meta information extracted from the WSDL
     * - base: xs:string
     * - minOccurs: 0
     * - nillable: true
     * - pattern: [\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}
     * - type: tns:guid
     * @var string
     */
    public $TransactionGuid;
    /**
     * The TransactionNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $TransactionNumber;
    /**
     * Constructor method for Printing.PrintableTransaction
     * @uses Printing_PrintableTransaction::setAvailableDocumentTypesToSelect()
     * @uses Printing_PrintableTransaction::setPrintableItems()
     * @uses Printing_PrintableTransaction::setTransactionGuid()
     * @uses Printing_PrintableTransaction::setTransactionNumber()
     * @param \patest\StructType\RecordSetOfPrinting_AvailableDocumentTypes $availableDocumentTypesToSelect
     * @param \patest\StructType\RecordSetOfPrinting_ItemDataForAdvancedPrinting $printableItems
     * @param string $transactionGuid
     * @param string $transactionNumber
     */
    public function __construct(\patest\StructType\RecordSetOfPrinting_AvailableDocumentTypes $availableDocumentTypesToSelect = null, \patest\StructType\RecordSetOfPrinting_ItemDataForAdvancedPrinting $printableItems = null, $transactionGuid = null, $transactionNumber = null)
    {
        $this
            ->setAvailableDocumentTypesToSelect($availableDocumentTypesToSelect)
            ->setPrintableItems($printableItems)
            ->setTransactionGuid($transactionGuid)
            ->setTransactionNumber($transactionNumber);
    }
    /**
     * Get AvailableDocumentTypesToSelect 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_AvailableDocumentTypes|null
     */
    public function getAvailableDocumentTypesToSelect()
    {
        return isset($this->AvailableDocumentTypesToSelect) ? $this->AvailableDocumentTypesToSelect : null;
    }
    /**
     * Set AvailableDocumentTypesToSelect 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_AvailableDocumentTypes $availableDocumentTypesToSelect
     * @return \patest\StructType\Printing_PrintableTransaction
     */
    public function setAvailableDocumentTypesToSelect(\patest\StructType\RecordSetOfPrinting_AvailableDocumentTypes $availableDocumentTypesToSelect = null)
    {
        if (is_null($availableDocumentTypesToSelect) || (is_array($availableDocumentTypesToSelect) && empty($availableDocumentTypesToSelect))) {
            unset($this->AvailableDocumentTypesToSelect);
        } else {
            $this->AvailableDocumentTypesToSelect = $availableDocumentTypesToSelect;
        }
        return $this;
    }
    /**
     * Get PrintableItems 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_ItemDataForAdvancedPrinting|null
     */
    public function getPrintableItems()
    {
        return isset($this->PrintableItems) ? $this->PrintableItems : null;
    }
    /**
     * Set PrintableItems 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_ItemDataForAdvancedPrinting $printableItems
     * @return \patest\StructType\Printing_PrintableTransaction
     */
    public function setPrintableItems(\patest\StructType\RecordSetOfPrinting_ItemDataForAdvancedPrinting $printableItems = null)
    {
        if (is_null($printableItems) || (is_array($printableItems) && empty($printableItems))) {
            unset($this->PrintableItems);
        } else {
            $this->PrintableItems = $printableItems;
        }
        return $this;
    }
    /**
     * Get TransactionGuid 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 string|null
     */
    public function getTransactionGuid()
    {
        return isset($this->TransactionGuid) ? $this->TransactionGuid : null;
    }
    /**
     * Set TransactionGuid 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 string $transactionGuid
     * @return \patest\StructType\Printing_PrintableTransaction
     */
    public function setTransactionGuid($transactionGuid = null)
    {
        // validation for constraint: string
        if (!is_null($transactionGuid) && !is_string($transactionGuid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($transactionGuid, true), gettype($transactionGuid)), __LINE__);
        }
        // validation for constraint: pattern([\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12})
        if (!is_null($transactionGuid) && !preg_match('/[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}/', $transactionGuid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression [\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}', var_export($transactionGuid, true)), __LINE__);
        }
        if (is_null($transactionGuid) || (is_array($transactionGuid) && empty($transactionGuid))) {
            unset($this->TransactionGuid);
        } else {
            $this->TransactionGuid = $transactionGuid;
        }
        return $this;
    }
    /**
     * Get TransactionNumber 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 string|null
     */
    public function getTransactionNumber()
    {
        return isset($this->TransactionNumber) ? $this->TransactionNumber : null;
    }
    /**
     * Set TransactionNumber 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 string $transactionNumber
     * @return \patest\StructType\Printing_PrintableTransaction
     */
    public function setTransactionNumber($transactionNumber = null)
    {
        // validation for constraint: string
        if (!is_null($transactionNumber) && !is_string($transactionNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($transactionNumber, true), gettype($transactionNumber)), __LINE__);
        }
        if (is_null($transactionNumber) || (is_array($transactionNumber) && empty($transactionNumber))) {
            unset($this->TransactionNumber);
        } else {
            $this->TransactionNumber = $transactionNumber;
        }
        return $this;
    }
}
