<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.PrintableItem.ChequePayment StructType
 * @subpackage Structs
 */
class Printing_PrintableItem_ChequePayment extends Printing_PrintableItem_PaymentItemBase
{
    /**
     * The ChequeDetails
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Payment_Printing_ChequeDetails
     */
    public $ChequeDetails;
    /**
     * Constructor method for Printing.PrintableItem.ChequePayment
     * @uses Printing_PrintableItem_ChequePayment::setChequeDetails()
     * @param \patest\StructType\Payment_Printing_ChequeDetails $chequeDetails
     */
    public function __construct(\patest\StructType\Payment_Printing_ChequeDetails $chequeDetails = null)
    {
        $this
            ->setChequeDetails($chequeDetails);
    }
    /**
     * Get ChequeDetails 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\Payment_Printing_ChequeDetails|null
     */
    public function getChequeDetails()
    {
        return isset($this->ChequeDetails) ? $this->ChequeDetails : null;
    }
    /**
     * Set ChequeDetails 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\Payment_Printing_ChequeDetails $chequeDetails
     * @return \patest\StructType\Printing_PrintableItem_ChequePayment
     */
    public function setChequeDetails(\patest\StructType\Payment_Printing_ChequeDetails $chequeDetails = null)
    {
        if (is_null($chequeDetails) || (is_array($chequeDetails) && empty($chequeDetails))) {
            unset($this->ChequeDetails);
        } else {
            $this->ChequeDetails = $chequeDetails;
        }
        return $this;
    }
}
