<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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