<?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 the spec of a NasJob.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.NasJobSpec</code>
 */
class NasJobSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * The ID of the existing NasJob in the same Project and Location
     * which will be used to resume search. search_space_spec and
     * nas_algorithm_spec are obtained from previous NasJob hence should not
     * provide them again for this NasJob.
     *
     * Generated from protobuf field <code>string resume_nas_job_id = 3;</code>
     */
    private $resume_nas_job_id = '';
    /**
     * It defines the search space for Neural Architecture Search (NAS).
     *
     * Generated from protobuf field <code>string search_space_spec = 1;</code>
     */
    private $search_space_spec = '';
    protected $nas_algorithm_spec;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\NasJobSpec\MultiTrialAlgorithmSpec $multi_trial_algorithm_spec
     *           The spec of multi-trial algorithms.
     *     @type string $resume_nas_job_id
     *           The ID of the existing NasJob in the same Project and Location
     *           which will be used to resume search. search_space_spec and
     *           nas_algorithm_spec are obtained from previous NasJob hence should not
     *           provide them again for this NasJob.
     *     @type string $search_space_spec
     *           It defines the search space for Neural Architecture Search (NAS).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\NasJob::initOnce();
        parent::__construct($data);
    }

    /**
     * The spec of multi-trial algorithms.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2;</code>
     * @return \Google\Cloud\AIPlatform\V1\NasJobSpec\MultiTrialAlgorithmSpec|null
     */
    public function getMultiTrialAlgorithmSpec()
    {
        return $this->readOneof(2);
    }

    public function hasMultiTrialAlgorithmSpec()
    {
        return $this->hasOneof(2);
    }

    /**
     * The spec of multi-trial algorithms.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\NasJobSpec\MultiTrialAlgorithmSpec $var
     * @return $this
     */
    public function setMultiTrialAlgorithmSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NasJobSpec\MultiTrialAlgorithmSpec::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The ID of the existing NasJob in the same Project and Location
     * which will be used to resume search. search_space_spec and
     * nas_algorithm_spec are obtained from previous NasJob hence should not
     * provide them again for this NasJob.
     *
     * Generated from protobuf field <code>string resume_nas_job_id = 3;</code>
     * @return string
     */
    public function getResumeNasJobId()
    {
        return $this->resume_nas_job_id;
    }

    /**
     * The ID of the existing NasJob in the same Project and Location
     * which will be used to resume search. search_space_spec and
     * nas_algorithm_spec are obtained from previous NasJob hence should not
     * provide them again for this NasJob.
     *
     * Generated from protobuf field <code>string resume_nas_job_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setResumeNasJobId($var)
    {
        GPBUtil::checkString($var, True);
        $this->resume_nas_job_id = $var;

        return $this;
    }

    /**
     * It defines the search space for Neural Architecture Search (NAS).
     *
     * Generated from protobuf field <code>string search_space_spec = 1;</code>
     * @return string
     */
    public function getSearchSpaceSpec()
    {
        return $this->search_space_spec;
    }

    /**
     * It defines the search space for Neural Architecture Search (NAS).
     *
     * Generated from protobuf field <code>string search_space_spec = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSearchSpaceSpec($var)
    {
        GPBUtil::checkString($var, True);
        $this->search_space_spec = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getNasAlgorithmSpec()
    {
        return $this->whichOneof("nas_algorithm_spec");
    }

}

