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

namespace Google\Cloud\Dlp\V2\CustomInfoType\DetectionRule;

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

/**
 * Message for specifying a window around a finding to apply a detection
 * rule.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity</code>
 */
class Proximity extends \Google\Protobuf\Internal\Message
{
    /**
     * Number of characters before the finding to consider.
     *
     * Generated from protobuf field <code>int32 window_before = 1;</code>
     */
    private $window_before = 0;
    /**
     * Number of characters after the finding to consider.
     *
     * Generated from protobuf field <code>int32 window_after = 2;</code>
     */
    private $window_after = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $window_before
     *           Number of characters before the finding to consider.
     *     @type int $window_after
     *           Number of characters after the finding to consider.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Storage::initOnce();
        parent::__construct($data);
    }

    /**
     * Number of characters before the finding to consider.
     *
     * Generated from protobuf field <code>int32 window_before = 1;</code>
     * @return int
     */
    public function getWindowBefore()
    {
        return $this->window_before;
    }

    /**
     * Number of characters before the finding to consider.
     *
     * Generated from protobuf field <code>int32 window_before = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setWindowBefore($var)
    {
        GPBUtil::checkInt32($var);
        $this->window_before = $var;

        return $this;
    }

    /**
     * Number of characters after the finding to consider.
     *
     * Generated from protobuf field <code>int32 window_after = 2;</code>
     * @return int
     */
    public function getWindowAfter()
    {
        return $this->window_after;
    }

    /**
     * Number of characters after the finding to consider.
     *
     * Generated from protobuf field <code>int32 window_after = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setWindowAfter($var)
    {
        GPBUtil::checkInt32($var);
        $this->window_after = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Proximity::class, \Google\Cloud\Dlp\V2\CustomInfoType_DetectionRule_Proximity::class);

