<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetAvailableDirectDebitMandates-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetAvailableDirectDebitMandates-Response
 * @subpackage Structs
 */
class GetAvailableDirectDebitMandates_Response extends AbstractStructBase
{
    /**
     * The Mandates
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfPayment_DirectDebitMandate
     */
    public $Mandates;
    /**
     * Constructor method for GetAvailableDirectDebitMandates-Response
     * @uses GetAvailableDirectDebitMandates_Response::setMandates()
     * @param \patest\ArrayType\ArrayOfPayment_DirectDebitMandate $mandates
     */
    public function __construct(\patest\ArrayType\ArrayOfPayment_DirectDebitMandate $mandates = null)
    {
        $this
            ->setMandates($mandates);
    }
    /**
     * Get Mandates 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\ArrayOfPayment_DirectDebitMandate|null
     */
    public function getMandates()
    {
        return isset($this->Mandates) ? $this->Mandates : null;
    }
    /**
     * Set Mandates 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\ArrayOfPayment_DirectDebitMandate $mandates
     * @return \patest\StructType\GetAvailableDirectDebitMandates_Response
     */
    public function setMandates(\patest\ArrayType\ArrayOfPayment_DirectDebitMandate $mandates = null)
    {
        if (is_null($mandates) || (is_array($mandates) && empty($mandates))) {
            unset($this->Mandates);
        } else {
            $this->Mandates = $mandates;
        }
        return $this;
    }
}
