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

namespace Google\Cloud\AIPlatform\V1\StudySpec\ParameterSpec;

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

/**
 * Value specification for a parameter in `CATEGORICAL` type.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.StudySpec.ParameterSpec.CategoricalValueSpec</code>
 */
class CategoricalValueSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The list of possible categories.
     *
     * Generated from protobuf field <code>repeated string values = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $values;
    /**
     * A default value for a `CATEGORICAL` parameter that is assumed to be a
     * relatively good starting point.  Unset value signals that there is no
     * offered starting point.
     * Currently only supported by the Vertex AI Vizier service. Not supported
     * by HyperparameterTuningJob or TrainingPipeline.
     *
     * Generated from protobuf field <code>optional string default_value = 3;</code>
     */
    protected $default_value = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $values
     *           Required. The list of possible categories.
     *     @type string $default_value
     *           A default value for a `CATEGORICAL` parameter that is assumed to be a
     *           relatively good starting point.  Unset value signals that there is no
     *           offered starting point.
     *           Currently only supported by the Vertex AI Vizier service. Not supported
     *           by HyperparameterTuningJob or TrainingPipeline.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Study::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The list of possible categories.
     *
     * Generated from protobuf field <code>repeated string values = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getValues()
    {
        return $this->values;
    }

    /**
     * Required. The list of possible categories.
     *
     * Generated from protobuf field <code>repeated string values = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->values = $arr;

        return $this;
    }

    /**
     * A default value for a `CATEGORICAL` parameter that is assumed to be a
     * relatively good starting point.  Unset value signals that there is no
     * offered starting point.
     * Currently only supported by the Vertex AI Vizier service. Not supported
     * by HyperparameterTuningJob or TrainingPipeline.
     *
     * Generated from protobuf field <code>optional string default_value = 3;</code>
     * @return string
     */
    public function getDefaultValue()
    {
        return isset($this->default_value) ? $this->default_value : '';
    }

    public function hasDefaultValue()
    {
        return isset($this->default_value);
    }

    public function clearDefaultValue()
    {
        unset($this->default_value);
    }

    /**
     * A default value for a `CATEGORICAL` parameter that is assumed to be a
     * relatively good starting point.  Unset value signals that there is no
     * offered starting point.
     * Currently only supported by the Vertex AI Vizier service. Not supported
     * by HyperparameterTuningJob or TrainingPipeline.
     *
     * Generated from protobuf field <code>optional string default_value = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDefaultValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->default_value = $var;

        return $this;
    }

}


