<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Represents a NasTrial details along with its parameters. If there is a
 * corresponding train NasTrial, the train NasTrial is also returned.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.NasTrialDetail</code>
 */
class NasTrialDetail extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Resource name of the NasTrialDetail.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $name = '';
    /**
     * The parameters for the NasJob NasTrial.
     *
     * Generated from protobuf field <code>string parameters = 2;</code>
     */
    protected $parameters = '';
    /**
     * The requested search NasTrial.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial search_trial = 3;</code>
     */
    protected $search_trial = null;
    /**
     * The train NasTrial corresponding to
     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
     * Only populated if
     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
     * used for training.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial train_trial = 4;</code>
     */
    protected $train_trial = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. Resource name of the NasTrialDetail.
     *     @type string $parameters
     *           The parameters for the NasJob NasTrial.
     *     @type \Google\Cloud\AIPlatform\V1\NasTrial $search_trial
     *           The requested search NasTrial.
     *     @type \Google\Cloud\AIPlatform\V1\NasTrial $train_trial
     *           The train NasTrial corresponding to
     *           [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
     *           Only populated if
     *           [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
     *           used for training.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\NasJob::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Resource name of the NasTrialDetail.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. Resource name of the NasTrialDetail.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The parameters for the NasJob NasTrial.
     *
     * Generated from protobuf field <code>string parameters = 2;</code>
     * @return string
     */
    public function getParameters()
    {
        return $this->parameters;
    }

    /**
     * The parameters for the NasJob NasTrial.
     *
     * Generated from protobuf field <code>string parameters = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setParameters($var)
    {
        GPBUtil::checkString($var, True);
        $this->parameters = $var;

        return $this;
    }

    /**
     * The requested search NasTrial.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial search_trial = 3;</code>
     * @return \Google\Cloud\AIPlatform\V1\NasTrial|null
     */
    public function getSearchTrial()
    {
        return $this->search_trial;
    }

    public function hasSearchTrial()
    {
        return isset($this->search_trial);
    }

    public function clearSearchTrial()
    {
        unset($this->search_trial);
    }

    /**
     * The requested search NasTrial.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial search_trial = 3;</code>
     * @param \Google\Cloud\AIPlatform\V1\NasTrial $var
     * @return $this
     */
    public function setSearchTrial($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NasTrial::class);
        $this->search_trial = $var;

        return $this;
    }

    /**
     * The train NasTrial corresponding to
     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
     * Only populated if
     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
     * used for training.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial train_trial = 4;</code>
     * @return \Google\Cloud\AIPlatform\V1\NasTrial|null
     */
    public function getTrainTrial()
    {
        return $this->train_trial;
    }

    public function hasTrainTrial()
    {
        return isset($this->train_trial);
    }

    public function clearTrainTrial()
    {
        unset($this->train_trial);
    }

    /**
     * The train NasTrial corresponding to
     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
     * Only populated if
     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
     * used for training.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasTrial train_trial = 4;</code>
     * @param \Google\Cloud\AIPlatform\V1\NasTrial $var
     * @return $this
     */
    public function setTrainTrial($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NasTrial::class);
        $this->train_trial = $var;

        return $this;
    }

}

