<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BundleElementAvailableProductsItem StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:BundleElementAvailableProductsItem
 * @subpackage Structs
 */
class BundleElementAvailableProductsItem extends ElementAvailableProductsItemBase
{
    /**
     * The Selected
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Selected;
    /**
     * Constructor method for BundleElementAvailableProductsItem
     * @uses BundleElementAvailableProductsItem::setSelected()
     * @param bool $selected
     */
    public function __construct($selected = null)
    {
        $this
            ->setSelected($selected);
    }
    /**
     * Get Selected value
     * @return bool|null
     */
    public function getSelected()
    {
        return $this->Selected;
    }
    /**
     * Set Selected value
     * @param bool $selected
     * @return \patest\StructType\BundleElementAvailableProductsItem
     */
    public function setSelected($selected = null)
    {
        // validation for constraint: boolean
        if (!is_null($selected) && !is_bool($selected)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($selected, true), gettype($selected)), __LINE__);
        }
        $this->Selected = $selected;
        return $this;
    }
}
