<?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 tables to match
 * against.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.BigQueryRegexes</code>
 */
class BigQueryRegexes extends \Google\Protobuf\Internal\Message
{
    /**
     * A single BigQuery regular expression pattern to match against one or more
     * tables, datasets, or projects that contain BigQuery tables.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.BigQueryRegex patterns = 1;</code>
     */
    private $patterns;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Dlp\V2\BigQueryRegex>|\Google\Protobuf\Internal\RepeatedField $patterns
     *           A single BigQuery regular expression pattern to match against one or more
     *           tables, datasets, or projects that contain BigQuery tables.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * A single BigQuery regular expression pattern to match against one or more
     * tables, datasets, or projects that contain BigQuery tables.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.BigQueryRegex patterns = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPatterns()
    {
        return $this->patterns;
    }

    /**
     * A single BigQuery regular expression pattern to match against one or more
     * tables, datasets, or projects that contain BigQuery tables.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.BigQueryRegex patterns = 1;</code>
     * @param array<\Google\Cloud\Dlp\V2\BigQueryRegex>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPatterns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\BigQueryRegex::class);
        $this->patterns = $arr;

        return $this;
    }

}

