<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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