<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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