<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * 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 array<string>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField
     */
    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 array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAllowedValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->allowed_values = $arr;

        return $this;
    }

}


