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

namespace Google\Cloud\AlloyDb\V1\SupportedDatabaseFlag;

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

/**
 * Restrictions on STRING type values
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions</code>
 */
class StringRestrictions extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     *
     * Generated from protobuf field <code>repeated string allowed_values = 1;</code>
     */
    private $allowed_values;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[] $allowed_values
     *           The list of allowed values, if bounded. This field will be empty
     *           if there is a unbounded number of allowed values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     *
     * Generated from protobuf field <code>repeated string allowed_values = 1;</code>
     * @return RepeatedField<string>
     */
    public function getAllowedValues()
    {
        return $this->allowed_values;
    }

    /**
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     *
     * Generated from protobuf field <code>repeated string allowed_values = 1;</code>
     * @param string[] $var
     * @return $this
     */
    public function setAllowedValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->allowed_values = $arr;

        return $this;
    }

}

