<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/compute/v1/compute.proto

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.WafExpressionSetExpression</code>
 */
class WafExpressionSetExpression extends \Google\Protobuf\Internal\Message
{
    /**
     * Expression ID should uniquely identify the origin of the expression.
     * E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
     * version 2.9.1 rule id 973337.
     * The ID could be used to determine the individual attack definition
     * that has been detected. It could also be used to exclude it from
     * the policy in case of false positive.
     * required
     *
     * Generated from protobuf field <code>optional string id = 3355;</code>
     */
    protected $id = null;
    /**
     * The sensitivity value associated with the WAF rule ID. This corresponds
     * to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
     * opt-in only rules.
     *
     * Generated from protobuf field <code>optional int32 sensitivity = 27532959;</code>
     */
    protected $sensitivity = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Expression ID should uniquely identify the origin of the expression.
     *           E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
     *           version 2.9.1 rule id 973337.
     *           The ID could be used to determine the individual attack definition
     *           that has been detected. It could also be used to exclude it from
     *           the policy in case of false positive.
     *           required
     *     @type int $sensitivity
     *           The sensitivity value associated with the WAF rule ID. This corresponds
     *           to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
     *           opt-in only rules.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Expression ID should uniquely identify the origin of the expression.
     * E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
     * version 2.9.1 rule id 973337.
     * The ID could be used to determine the individual attack definition
     * that has been detected. It could also be used to exclude it from
     * the policy in case of false positive.
     * required
     *
     * Generated from protobuf field <code>optional string id = 3355;</code>
     * @return string
     */
    public function getId()
    {
        return isset($this->id) ? $this->id : '';
    }

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

    /**
     * Expression ID should uniquely identify the origin of the expression.
     * E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
     * version 2.9.1 rule id 973337.
     * The ID could be used to determine the individual attack definition
     * that has been detected. It could also be used to exclude it from
     * the policy in case of false positive.
     * required
     *
     * Generated from protobuf field <code>optional string id = 3355;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * The sensitivity value associated with the WAF rule ID. This corresponds
     * to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
     * opt-in only rules.
     *
     * Generated from protobuf field <code>optional int32 sensitivity = 27532959;</code>
     * @return int
     */
    public function getSensitivity()
    {
        return isset($this->sensitivity) ? $this->sensitivity : 0;
    }

    public function hasSensitivity()
    {
        return isset($this->sensitivity);
    }

    public function clearSensitivity()
    {
        unset($this->sensitivity);
    }

    /**
     * The sensitivity value associated with the WAF rule ID. This corresponds
     * to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
     * opt-in only rules.
     *
     * Generated from protobuf field <code>optional int32 sensitivity = 27532959;</code>
     * @param int $var
     * @return $this
     */
    public function setSensitivity($var)
    {
        GPBUtil::checkInt32($var);
        $this->sensitivity = $var;

        return $this;
    }

}

