<?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;

/**
 * Rule set for modifying a set of infoTypes to alter behavior under certain
 * circumstances, depending on the specific details of the rules within the set.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.InspectionRuleSet</code>
 */
class InspectionRuleSet extends \Google\Protobuf\Internal\Message
{
    /**
     * List of infoTypes this rule set is applied to.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code>
     */
    private $info_types;
    /**
     * Set of rules to be applied to infoTypes. The rules are applied in order.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InspectionRule rules = 2;</code>
     */
    private $rules;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\InfoType[]|\Google\Protobuf\Internal\RepeatedField $info_types
     *           List of infoTypes this rule set is applied to.
     *     @type \Google\Cloud\Dlp\V2\InspectionRule[]|\Google\Protobuf\Internal\RepeatedField $rules
     *           Set of rules to be applied to infoTypes. The rules are applied in order.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * List of infoTypes this rule set is applied to.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInfoTypes()
    {
        return $this->info_types;
    }

    /**
     * List of infoTypes this rule set is applied to.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InfoType info_types = 1;</code>
     * @param \Google\Cloud\Dlp\V2\InfoType[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInfoTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\InfoType::class);
        $this->info_types = $arr;

        return $this;
    }

    /**
     * Set of rules to be applied to infoTypes. The rules are applied in order.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InspectionRule rules = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRules()
    {
        return $this->rules;
    }

    /**
     * Set of rules to be applied to infoTypes. The rules are applied in order.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.InspectionRule rules = 2;</code>
     * @param \Google\Cloud\Dlp\V2\InspectionRule[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\InspectionRule::class);
        $this->rules = $arr;

        return $this;
    }

}

