<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Facade.BundleRelatedMembershipsPart StructType
 * @subpackage Structs
 */
class Facade_BundleRelatedMembershipsPart extends AnyEntity
{
    /**
     * The Elements
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfFacade_ProductBundleElementRecord
     */
    public $Elements;
    /**
     * Constructor method for Facade.BundleRelatedMembershipsPart
     * @uses Facade_BundleRelatedMembershipsPart::setElements()
     * @param \patest\StructType\RecordSetOfFacade_ProductBundleElementRecord $elements
     */
    public function __construct(\patest\StructType\RecordSetOfFacade_ProductBundleElementRecord $elements = null)
    {
        $this
            ->setElements($elements);
    }
    /**
     * Get Elements 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\RecordSetOfFacade_ProductBundleElementRecord|null
     */
    public function getElements()
    {
        return isset($this->Elements) ? $this->Elements : null;
    }
    /**
     * Set Elements 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\RecordSetOfFacade_ProductBundleElementRecord $elements
     * @return \patest\StructType\Facade_BundleRelatedMembershipsPart
     */
    public function setElements(\patest\StructType\RecordSetOfFacade_ProductBundleElementRecord $elements = null)
    {
        if (is_null($elements) || (is_array($elements) && empty($elements))) {
            unset($this->Elements);
        } else {
            $this->Elements = $elements;
        }
        return $this;
    }
}
