<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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