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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.TrialContext</code>
 */
class TrialContext extends \Google\Protobuf\Internal\Message
{
    /**
     * A human-readable field which can store a description of this context.
     * This will become part of the resulting Trial's description field.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     */
    protected $description = '';
    /**
     * If/when a Trial is generated or selected from this Context,
     * its Parameters will match any parameters specified here.
     * (I.e. if this context specifies parameter name:'a' int_value:3,
     * then a resulting Trial will have int_value:3 for its parameter named
     * 'a'.) Note that we first attempt to match existing REQUESTED Trials with
     * contexts, and if there are no matches, we generate suggestions in the
     * subspace defined by the parameters specified here.
     * NOTE: a Context without any Parameters matches the entire feasible search
     *   space.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 2;</code>
     */
    private $parameters;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $description
     *           A human-readable field which can store a description of this context.
     *           This will become part of the resulting Trial's description field.
     *     @type \Google\Cloud\AIPlatform\V1\Trial\Parameter[] $parameters
     *           If/when a Trial is generated or selected from this Context,
     *           its Parameters will match any parameters specified here.
     *           (I.e. if this context specifies parameter name:'a' int_value:3,
     *           then a resulting Trial will have int_value:3 for its parameter named
     *           'a'.) Note that we first attempt to match existing REQUESTED Trials with
     *           contexts, and if there are no matches, we generate suggestions in the
     *           subspace defined by the parameters specified here.
     *           NOTE: a Context without any Parameters matches the entire feasible search
     *             space.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Study::initOnce();
        parent::__construct($data);
    }

    /**
     * A human-readable field which can store a description of this context.
     * This will become part of the resulting Trial's description field.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * A human-readable field which can store a description of this context.
     * This will become part of the resulting Trial's description field.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * If/when a Trial is generated or selected from this Context,
     * its Parameters will match any parameters specified here.
     * (I.e. if this context specifies parameter name:'a' int_value:3,
     * then a resulting Trial will have int_value:3 for its parameter named
     * 'a'.) Note that we first attempt to match existing REQUESTED Trials with
     * contexts, and if there are no matches, we generate suggestions in the
     * subspace defined by the parameters specified here.
     * NOTE: a Context without any Parameters matches the entire feasible search
     *   space.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 2;</code>
     * @return RepeatedField<\Google\Cloud\AIPlatform\V1\Trial\Parameter>
     */
    public function getParameters()
    {
        return $this->parameters;
    }

    /**
     * If/when a Trial is generated or selected from this Context,
     * its Parameters will match any parameters specified here.
     * (I.e. if this context specifies parameter name:'a' int_value:3,
     * then a resulting Trial will have int_value:3 for its parameter named
     * 'a'.) Note that we first attempt to match existing REQUESTED Trials with
     * contexts, and if there are no matches, we generate suggestions in the
     * subspace defined by the parameters specified here.
     * NOTE: a Context without any Parameters matches the entire feasible search
     *   space.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.Trial.Parameter parameters = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\Trial\Parameter[] $var
     * @return $this
     */
    public function setParameters($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\Trial\Parameter::class);
        $this->parameters = $arr;

        return $this;
    }

}

