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

namespace Google\Cloud\AIPlatform\V1\StudySpec;

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

/**
 * The median automated stopping rule stops a pending Trial if the Trial's
 * best objective_value is strictly below the median 'performance' of all
 * completed Trials reported up to the Trial's last measurement.
 * Currently, 'performance' refers to the running average of the objective
 * values reported by the Trial in each measurement.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.StudySpec.MedianAutomatedStoppingSpec</code>
 */
class MedianAutomatedStoppingSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * True if median automated stopping rule applies on
     * [Measurement.elapsed_duration][google.cloud.aiplatform.v1.Measurement.elapsed_duration].
     * It means that elapsed_duration field of latest measurement of current
     * Trial is used to compute median objective value for each completed
     * Trials.
     *
     * Generated from protobuf field <code>bool use_elapsed_duration = 1;</code>
     */
    private $use_elapsed_duration = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $use_elapsed_duration
     *           True if median automated stopping rule applies on
     *           [Measurement.elapsed_duration][google.cloud.aiplatform.v1.Measurement.elapsed_duration].
     *           It means that elapsed_duration field of latest measurement of current
     *           Trial is used to compute median objective value for each completed
     *           Trials.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Study::initOnce();
        parent::__construct($data);
    }

    /**
     * True if median automated stopping rule applies on
     * [Measurement.elapsed_duration][google.cloud.aiplatform.v1.Measurement.elapsed_duration].
     * It means that elapsed_duration field of latest measurement of current
     * Trial is used to compute median objective value for each completed
     * Trials.
     *
     * Generated from protobuf field <code>bool use_elapsed_duration = 1;</code>
     * @return bool
     */
    public function getUseElapsedDuration()
    {
        return $this->use_elapsed_duration;
    }

    /**
     * True if median automated stopping rule applies on
     * [Measurement.elapsed_duration][google.cloud.aiplatform.v1.Measurement.elapsed_duration].
     * It means that elapsed_duration field of latest measurement of current
     * Trial is used to compute median objective value for each completed
     * Trials.
     *
     * Generated from protobuf field <code>bool use_elapsed_duration = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setUseElapsedDuration($var)
    {
        GPBUtil::checkBool($var);
        $this->use_elapsed_duration = $var;

        return $this;
    }

}


