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

/**
 * The rule to exclude findings based on a hotword. For record inspection of
 * tables, column names are considered hotwords. An example of this is to
 * exclude a finding if it belongs to a BigQuery column that matches a specific
 * pattern.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.ExcludeByHotword</code>
 */
class ExcludeByHotword extends \Google\Protobuf\Internal\Message
{
    /**
     * Regular expression pattern defining what qualifies as a hotword.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
     */
    protected $hotword_regex = null;
    /**
     * Range of characters within which the entire hotword must reside.
     * The total length of the window cannot exceed 1000 characters.
     * The windowBefore property in proximity should be set to 1 if the hotword
     * needs to be included in a column header.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
     */
    protected $proximity = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\CustomInfoType\Regex $hotword_regex
     *           Regular expression pattern defining what qualifies as a hotword.
     *     @type \Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule\Proximity $proximity
     *           Range of characters within which the entire hotword must reside.
     *           The total length of the window cannot exceed 1000 characters.
     *           The windowBefore property in proximity should be set to 1 if the hotword
     *           needs to be included in a column header.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Regular expression pattern defining what qualifies as a hotword.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
     * @return \Google\Cloud\Dlp\V2\CustomInfoType\Regex|null
     */
    public function getHotwordRegex()
    {
        return $this->hotword_regex;
    }

    public function hasHotwordRegex()
    {
        return isset($this->hotword_regex);
    }

    public function clearHotwordRegex()
    {
        unset($this->hotword_regex);
    }

    /**
     * Regular expression pattern defining what qualifies as a hotword.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
     * @param \Google\Cloud\Dlp\V2\CustomInfoType\Regex $var
     * @return $this
     */
    public function setHotwordRegex($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType\Regex::class);
        $this->hotword_regex = $var;

        return $this;
    }

    /**
     * Range of characters within which the entire hotword must reside.
     * The total length of the window cannot exceed 1000 characters.
     * The windowBefore property in proximity should be set to 1 if the hotword
     * needs to be included in a column header.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
     * @return \Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule\Proximity|null
     */
    public function getProximity()
    {
        return $this->proximity;
    }

    public function hasProximity()
    {
        return isset($this->proximity);
    }

    public function clearProximity()
    {
        unset($this->proximity);
    }

    /**
     * Range of characters within which the entire hotword must reside.
     * The total length of the window cannot exceed 1000 characters.
     * The windowBefore property in proximity should be set to 1 if the hotword
     * needs to be included in a column header.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
     * @param \Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule\Proximity $var
     * @return $this
     */
    public function setProximity($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule\Proximity::class);
        $this->proximity = $var;

        return $this;
    }

}

