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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Represents a uCAIP NasJob trial.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.NasTrial</code>
 */
class NasTrial extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The identifier of the NasTrial assigned by the service.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $id = '';
    /**
     * Output only. The detailed state of the NasTrial.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;
    /**
     * Output only. The final measurement containing the objective value.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $final_measurement = null;
    /**
     * Output only. Time when the NasTrial was started.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $start_time = null;
    /**
     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
     * `INFEASIBLE`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $end_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Output only. The identifier of the NasTrial assigned by the service.
     *     @type int $state
     *           Output only. The detailed state of the NasTrial.
     *     @type \Google\Cloud\AIPlatform\V1\Measurement $final_measurement
     *           Output only. The final measurement containing the objective value.
     *     @type \Google\Protobuf\Timestamp $start_time
     *           Output only. Time when the NasTrial was started.
     *     @type \Google\Protobuf\Timestamp $end_time
     *           Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
     *           `INFEASIBLE`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\NasJob::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The identifier of the NasTrial assigned by the service.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Output only. The identifier of the NasTrial assigned by the service.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Output only. The detailed state of the NasTrial.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. The detailed state of the NasTrial.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\NasTrial\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. The final measurement containing the objective value.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\AIPlatform\V1\Measurement|null
     */
    public function getFinalMeasurement()
    {
        return $this->final_measurement;
    }

    public function hasFinalMeasurement()
    {
        return isset($this->final_measurement);
    }

    public function clearFinalMeasurement()
    {
        unset($this->final_measurement);
    }

    /**
     * Output only. The final measurement containing the objective value.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\AIPlatform\V1\Measurement $var
     * @return $this
     */
    public function setFinalMeasurement($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Measurement::class);
        $this->final_measurement = $var;

        return $this;
    }

    /**
     * Output only. Time when the NasTrial was started.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getStartTime()
    {
        return $this->start_time;
    }

    public function hasStartTime()
    {
        return isset($this->start_time);
    }

    public function clearStartTime()
    {
        unset($this->start_time);
    }

    /**
     * Output only. Time when the NasTrial was started.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setStartTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->start_time = $var;

        return $this;
    }

    /**
     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
     * `INFEASIBLE`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getEndTime()
    {
        return $this->end_time;
    }

    public function hasEndTime()
    {
        return isset($this->end_time);
    }

    public function clearEndTime()
    {
        unset($this->end_time);
    }

    /**
     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
     * `INFEASIBLE`.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setEndTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->end_time = $var;

        return $this;
    }

}

