<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetDirectDebitRecordsBatch-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetDirectDebitRecordsBatch-Response
 * @subpackage Structs
 */
class GetDirectDebitRecordsBatch_Response extends AbstractStructBase
{
    /**
     * The CollectRecords
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfDirectDebitRecord
     */
    public $CollectRecords;
    /**
     * The ReturnRecords
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfDirectDebitRecord
     */
    public $ReturnRecords;
    /**
     * Constructor method for GetDirectDebitRecordsBatch-Response
     * @uses GetDirectDebitRecordsBatch_Response::setCollectRecords()
     * @uses GetDirectDebitRecordsBatch_Response::setReturnRecords()
     * @param \patest\ArrayType\ArrayOfDirectDebitRecord $collectRecords
     * @param \patest\ArrayType\ArrayOfDirectDebitRecord $returnRecords
     */
    public function __construct(\patest\ArrayType\ArrayOfDirectDebitRecord $collectRecords = null, \patest\ArrayType\ArrayOfDirectDebitRecord $returnRecords = null)
    {
        $this
            ->setCollectRecords($collectRecords)
            ->setReturnRecords($returnRecords);
    }
    /**
     * Get CollectRecords 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\ArrayOfDirectDebitRecord|null
     */
    public function getCollectRecords()
    {
        return isset($this->CollectRecords) ? $this->CollectRecords : null;
    }
    /**
     * Set CollectRecords 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\ArrayOfDirectDebitRecord $collectRecords
     * @return \patest\StructType\GetDirectDebitRecordsBatch_Response
     */
    public function setCollectRecords(\patest\ArrayType\ArrayOfDirectDebitRecord $collectRecords = null)
    {
        if (is_null($collectRecords) || (is_array($collectRecords) && empty($collectRecords))) {
            unset($this->CollectRecords);
        } else {
            $this->CollectRecords = $collectRecords;
        }
        return $this;
    }
    /**
     * Get ReturnRecords 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\ArrayOfDirectDebitRecord|null
     */
    public function getReturnRecords()
    {
        return isset($this->ReturnRecords) ? $this->ReturnRecords : null;
    }
    /**
     * Set ReturnRecords 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\ArrayOfDirectDebitRecord $returnRecords
     * @return \patest\StructType\GetDirectDebitRecordsBatch_Response
     */
    public function setReturnRecords(\patest\ArrayType\ArrayOfDirectDebitRecord $returnRecords = null)
    {
        if (is_null($returnRecords) || (is_array($returnRecords) && empty($returnRecords))) {
            unset($this->ReturnRecords);
        } else {
            $this->ReturnRecords = $returnRecords;
        }
        return $this;
    }
}
