<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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