<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/study.proto

namespace Google\Cloud\AIPlatform\V1\StudySpec\ParameterSpec;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Value specification for a parameter in `DOUBLE` type.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.StudySpec.ParameterSpec.DoubleValueSpec</code>
 */
class DoubleValueSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Inclusive minimum value of the parameter.
     *
     * Generated from protobuf field <code>double min_value = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $min_value = 0.0;
    /**
     * Required. Inclusive maximum value of the parameter.
     *
     * Generated from protobuf field <code>double max_value = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $max_value = 0.0;
    /**
     * A default value for a `DOUBLE` parameter that is assumed to be a
     * relatively good starting point.  Unset value signals that there is no
     * offered starting point.
     * Currently only supported by the Vertex AI Vizier service. Not supported
     * by HyperparameterTuningJob or TrainingPipeline.
     *
     * Generated from protobuf field <code>optional double default_value = 4;</code>
     */
    private $default_value = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $min_value
     *           Required. Inclusive minimum value of the parameter.
     *     @type float $max_value
     *           Required. Inclusive maximum value of the parameter.
     *     @type float $default_value
     *           A default value for a `DOUBLE` parameter that is assumed to be a
     *           relatively good starting point.  Unset value signals that there is no
     *           offered starting point.
     *           Currently only supported by the Vertex AI Vizier service. Not supported
     *           by HyperparameterTuningJob or TrainingPipeline.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Study::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Inclusive minimum value of the parameter.
     *
     * Generated from protobuf field <code>double min_value = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return float
     */
    public function getMinValue()
    {
        return $this->min_value;
    }

    /**
     * Required. Inclusive minimum value of the parameter.
     *
     * Generated from protobuf field <code>double min_value = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param float $var
     * @return $this
     */
    public function setMinValue($var)
    {
        GPBUtil::checkDouble($var);
        $this->min_value = $var;

        return $this;
    }

    /**
     * Required. Inclusive maximum value of the parameter.
     *
     * Generated from protobuf field <code>double max_value = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return float
     */
    public function getMaxValue()
    {
        return $this->max_value;
    }

    /**
     * Required. Inclusive maximum value of the parameter.
     *
     * Generated from protobuf field <code>double max_value = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param float $var
     * @return $this
     */
    public function setMaxValue($var)
    {
        GPBUtil::checkDouble($var);
        $this->max_value = $var;

        return $this;
    }

    /**
     * A default value for a `DOUBLE` parameter that is assumed to be a
     * relatively good starting point.  Unset value signals that there is no
     * offered starting point.
     * Currently only supported by the Vertex AI Vizier service. Not supported
     * by HyperparameterTuningJob or TrainingPipeline.
     *
     * Generated from protobuf field <code>optional double default_value = 4;</code>
     * @return float
     */
    public function getDefaultValue()
    {
        return isset($this->default_value) ? $this->default_value : 0.0;
    }

    public function hasDefaultValue()
    {
        return isset($this->default_value);
    }

    public function clearDefaultValue()
    {
        unset($this->default_value);
    }

    /**
     * A default value for a `DOUBLE` parameter that is assumed to be a
     * relatively good starting point.  Unset value signals that there is no
     * offered starting point.
     * Currently only supported by the Vertex AI Vizier service. Not supported
     * by HyperparameterTuningJob or TrainingPipeline.
     *
     * Generated from protobuf field <code>optional double default_value = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setDefaultValue($var)
    {
        GPBUtil::checkDouble($var);
        $this->default_value = $var;

        return $this;
    }

}


