<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

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

/**
 * A collection of regular expressions to determine what datasets to match
 * against.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.VertexDatasetRegexes</code>
 */
class VertexDatasetRegexes extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The group of regular expression patterns to match against one or
     * more datasets. Maximum of 100 entries. The sum of the lengths of all
     * regular expressions can't exceed 10 KiB.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.VertexDatasetRegex patterns = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $patterns;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Dlp\V2\VertexDatasetRegex>|\Google\Protobuf\Internal\RepeatedField $patterns
     *           Required. The group of regular expression patterns to match against one or
     *           more datasets. Maximum of 100 entries. The sum of the lengths of all
     *           regular expressions can't exceed 10 KiB.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The group of regular expression patterns to match against one or
     * more datasets. Maximum of 100 entries. The sum of the lengths of all
     * regular expressions can't exceed 10 KiB.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.VertexDatasetRegex patterns = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPatterns()
    {
        return $this->patterns;
    }

    /**
     * Required. The group of regular expression patterns to match against one or
     * more datasets. Maximum of 100 entries. The sum of the lengths of all
     * regular expressions can't exceed 10 KiB.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.VertexDatasetRegex patterns = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\Dlp\V2\VertexDatasetRegex>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPatterns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\VertexDatasetRegex::class);
        $this->patterns = $arr;

        return $this;
    }

}

