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

namespace Google\Cloud\AIPlatform\V1\Measurement;

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

/**
 * A message representing a metric in the measurement.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.Measurement.Metric</code>
 */
class Metric extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The ID of the Metric. The Metric should be defined in
     * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
     *
     * Generated from protobuf field <code>string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $metric_id = '';
    /**
     * Output only. The value for this metric.
     *
     * Generated from protobuf field <code>double value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $value = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $metric_id
     *           Output only. The ID of the Metric. The Metric should be defined in
     *           [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
     *     @type float $value
     *           Output only. The value for this metric.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Study::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The ID of the Metric. The Metric should be defined in
     * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
     *
     * Generated from protobuf field <code>string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getMetricId()
    {
        return $this->metric_id;
    }

    /**
     * Output only. The ID of the Metric. The Metric should be defined in
     * [StudySpec's Metrics][google.cloud.aiplatform.v1.StudySpec.metrics].
     *
     * Generated from protobuf field <code>string metric_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setMetricId($var)
    {
        GPBUtil::checkString($var, True);
        $this->metric_id = $var;

        return $this;
    }

    /**
     * Output only. The value for this metric.
     *
     * Generated from protobuf field <code>double value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Output only. The value for this metric.
     *
     * Generated from protobuf field <code>double value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkDouble($var);
        $this->value = $var;

        return $this;
    }

}


