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

namespace Google\Cloud\Dlp\V2;

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

/**
 * Detection rule that adjusts the likelihood of findings within a certain
 * proximity of hotwords.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule</code>
 */
class CustomInfoType_DetectionRule_HotwordRule extends \Google\Protobuf\Internal\Message
{
    /**
     * Regex pattern defining what qualifies as a hotword.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
     */
    private $hotword_regex = null;
    /**
     * Proximity of the finding within which the entire hotword must reside.
     * The total length of the window cannot exceed 1000 characters. Note that
     * the finding itself will be included in the window, so that hotwords may
     * be used to match substrings of the finding itself. For example, the
     * certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
     * adjusted upwards if the area code is known to be the local area code of
     * a company office using the hotword regex "\(xxx\)", where "xxx"
     * is the area code in question.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
     */
    private $proximity = null;
    /**
     * Likelihood adjustment to apply to all matching findings.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;</code>
     */
    private $likelihood_adjustment = null;

    public function __construct() {
        \GPBMetadata\Google\Privacy\Dlp\V2\Storage::initOnce();
        parent::__construct();
    }

    /**
     * Regex 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
     */
    public function getHotwordRegex()
    {
        return $this->hotword_regex;
    }

    /**
     * Regex 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;
    }

    /**
     * Proximity of the finding within which the entire hotword must reside.
     * The total length of the window cannot exceed 1000 characters. Note that
     * the finding itself will be included in the window, so that hotwords may
     * be used to match substrings of the finding itself. For example, the
     * certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
     * adjusted upwards if the area code is known to be the local area code of
     * a company office using the hotword regex "\(xxx\)", where "xxx"
     * is the area code in question.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
     * @return \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_Proximity
     */
    public function getProximity()
    {
        return $this->proximity;
    }

    /**
     * Proximity of the finding within which the entire hotword must reside.
     * The total length of the window cannot exceed 1000 characters. Note that
     * the finding itself will be included in the window, so that hotwords may
     * be used to match substrings of the finding itself. For example, the
     * certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
     * adjusted upwards if the area code is known to be the local area code of
     * a company office using the hotword regex "\(xxx\)", where "xxx"
     * is the area code in question.
     *
     * 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;
    }

    /**
     * Likelihood adjustment to apply to all matching findings.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;</code>
     * @return \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_LikelihoodAdjustment
     */
    public function getLikelihoodAdjustment()
    {
        return $this->likelihood_adjustment;
    }

    /**
     * Likelihood adjustment to apply to all matching findings.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;</code>
     * @param \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_LikelihoodAdjustment $var
     * @return $this
     */
    public function setLikelihoodAdjustment($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_LikelihoodAdjustment::class);
        $this->likelihood_adjustment = $var;

        return $this;
    }

}

