<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for MembershipValidateBatchBeforeProcessRequest StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:MembershipValidateBatchBeforeProcessRequest
 * @subpackage Structs
 */
class MembershipValidateBatchBeforeProcessRequest extends AbstractStructBase
{
    /**
     * The Batch
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Membership_MembershipEntryBatch
     */
    public $Batch;
    /**
     * The Details
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfPersistableEntity
     */
    public $Details;
    /**
     * Constructor method for MembershipValidateBatchBeforeProcessRequest
     * @uses MembershipValidateBatchBeforeProcessRequest::setBatch()
     * @uses MembershipValidateBatchBeforeProcessRequest::setDetails()
     * @param \patest\StructType\Membership_MembershipEntryBatch $batch
     * @param \patest\ArrayType\ArrayOfPersistableEntity $details
     */
    public function __construct(\patest\StructType\Membership_MembershipEntryBatch $batch = null, \patest\ArrayType\ArrayOfPersistableEntity $details = null)
    {
        $this
            ->setBatch($batch)
            ->setDetails($details);
    }
    /**
     * Get Batch 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\Membership_MembershipEntryBatch|null
     */
    public function getBatch()
    {
        return isset($this->Batch) ? $this->Batch : null;
    }
    /**
     * Set Batch 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\Membership_MembershipEntryBatch $batch
     * @return \patest\StructType\MembershipValidateBatchBeforeProcessRequest
     */
    public function setBatch(\patest\StructType\Membership_MembershipEntryBatch $batch = null)
    {
        if (is_null($batch) || (is_array($batch) && empty($batch))) {
            unset($this->Batch);
        } else {
            $this->Batch = $batch;
        }
        return $this;
    }
    /**
     * Get Details 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\ArrayOfPersistableEntity|null
     */
    public function getDetails()
    {
        return isset($this->Details) ? $this->Details : null;
    }
    /**
     * Set Details 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\ArrayOfPersistableEntity $details
     * @return \patest\StructType\MembershipValidateBatchBeforeProcessRequest
     */
    public function setDetails(\patest\ArrayType\ArrayOfPersistableEntity $details = null)
    {
        if (is_null($details) || (is_array($details) && empty($details))) {
            unset($this->Details);
        } else {
            $this->Details = $details;
        }
        return $this;
    }
}
