<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for EffectiveAvailabilityFilterList StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:EffectiveAvailabilityFilterList
 * @subpackage Structs
 */
class EffectiveAvailabilityFilterList extends AbstractStructBase
{
    /**
     * The Ids
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfguid
     */
    public $Ids;
    /**
     * The Type
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $Type;
    /**
     * Constructor method for EffectiveAvailabilityFilterList
     * @uses EffectiveAvailabilityFilterList::setIds()
     * @uses EffectiveAvailabilityFilterList::setType()
     * @param \patest\ArrayType\ArrayOfguid $ids
     * @param string $type
     */
    public function __construct(\patest\ArrayType\ArrayOfguid $ids = null, $type = null)
    {
        $this
            ->setIds($ids)
            ->setType($type);
    }
    /**
     * Get Ids 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\ArrayOfguid|null
     */
    public function getIds()
    {
        return isset($this->Ids) ? $this->Ids : null;
    }
    /**
     * Set Ids 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\ArrayOfguid $ids
     * @return \patest\StructType\EffectiveAvailabilityFilterList
     */
    public function setIds(\patest\ArrayType\ArrayOfguid $ids = null)
    {
        if (is_null($ids) || (is_array($ids) && empty($ids))) {
            unset($this->Ids);
        } else {
            $this->Ids = $ids;
        }
        return $this;
    }
    /**
     * Get Type value
     * @return string|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @uses \patest\EnumType\EffectiveAvailabilityFilterType::valueIsValid()
     * @uses \patest\EnumType\EffectiveAvailabilityFilterType::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $type
     * @return \patest\StructType\EffectiveAvailabilityFilterList
     */
    public function setType($type = null)
    {
        // validation for constraint: enumeration
        if (!\patest\EnumType\EffectiveAvailabilityFilterType::valueIsValid($type)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \patest\EnumType\EffectiveAvailabilityFilterType', is_array($type) ? implode(', ', $type) : var_export($type, true), implode(', ', \patest\EnumType\EffectiveAvailabilityFilterType::getValidValues())), __LINE__);
        }
        $this->Type = $type;
        return $this;
    }
}
