<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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