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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Response message for
 * [VizierService.SuggestTrials][google.cloud.aiplatform.v1.VizierService.SuggestTrials].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.SuggestTrialsResponse</code>
 */
class SuggestTrialsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of Trials.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.Trial trials = 1;</code>
     */
    private $trials;
    /**
     * The state of the Study.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Study.State study_state = 2;</code>
     */
    private $study_state = 0;
    /**
     * The time at which the operation was started.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 3;</code>
     */
    private $start_time = null;
    /**
     * The time at which operation processing completed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 4;</code>
     */
    private $end_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AIPlatform\V1\Trial>|\Google\Protobuf\Internal\RepeatedField $trials
     *           A list of Trials.
     *     @type int $study_state
     *           The state of the Study.
     *     @type \Google\Protobuf\Timestamp $start_time
     *           The time at which the operation was started.
     *     @type \Google\Protobuf\Timestamp $end_time
     *           The time at which operation processing completed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\VizierService::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of Trials.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.Trial trials = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTrials()
    {
        return $this->trials;
    }

    /**
     * A list of Trials.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.Trial trials = 1;</code>
     * @param array<\Google\Cloud\AIPlatform\V1\Trial>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTrials($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\Trial::class);
        $this->trials = $arr;

        return $this;
    }

    /**
     * The state of the Study.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Study.State study_state = 2;</code>
     * @return int
     */
    public function getStudyState()
    {
        return $this->study_state;
    }

    /**
     * The state of the Study.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Study.State study_state = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setStudyState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\Study\State::class);
        $this->study_state = $var;

        return $this;
    }

    /**
     * The time at which the operation was started.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 3;</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);
    }

    /**
     * The time at which the operation was started.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 3;</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;
    }

    /**
     * The time at which operation processing completed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 4;</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);
    }

    /**
     * The time at which operation processing completed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp end_time = 4;</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;
    }

}

