<?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.WafExpressionSet</code>
 */
class WafExpressionSet extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of alternate IDs. The format should be: - E.g. XSS-stable Generic suffix like "stable" is particularly useful if a policy likes to avail newer set of expressions without having to change the policy. A given alias name can't be used for more than one entity set.
     *
     * Generated from protobuf field <code>repeated string aliases = 159207166;</code>
     */
    private $aliases;
    /**
     * List of available expressions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.WafExpressionSetExpression expressions = 175554779;</code>
     */
    private $expressions;
    /**
     * Google specified expression set ID. The format should be: - E.g. XSS-20170329 required
     *
     * Generated from protobuf field <code>optional string id = 3355;</code>
     */
    private $id = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $aliases
     *           A list of alternate IDs. The format should be: - E.g. XSS-stable Generic suffix like "stable" is particularly useful if a policy likes to avail newer set of expressions without having to change the policy. A given alias name can't be used for more than one entity set.
     *     @type array<\Google\Cloud\Compute\V1\WafExpressionSetExpression>|\Google\Protobuf\Internal\RepeatedField $expressions
     *           List of available expressions.
     *     @type string $id
     *           Google specified expression set ID. The format should be: - E.g. XSS-20170329 required
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of alternate IDs. The format should be: - E.g. XSS-stable Generic suffix like "stable" is particularly useful if a policy likes to avail newer set of expressions without having to change the policy. A given alias name can't be used for more than one entity set.
     *
     * Generated from protobuf field <code>repeated string aliases = 159207166;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAliases()
    {
        return $this->aliases;
    }

    /**
     * A list of alternate IDs. The format should be: - E.g. XSS-stable Generic suffix like "stable" is particularly useful if a policy likes to avail newer set of expressions without having to change the policy. A given alias name can't be used for more than one entity set.
     *
     * Generated from protobuf field <code>repeated string aliases = 159207166;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAliases($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->aliases = $arr;

        return $this;
    }

    /**
     * List of available expressions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.WafExpressionSetExpression expressions = 175554779;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getExpressions()
    {
        return $this->expressions;
    }

    /**
     * List of available expressions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.WafExpressionSetExpression expressions = 175554779;</code>
     * @param array<\Google\Cloud\Compute\V1\WafExpressionSetExpression>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setExpressions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\WafExpressionSetExpression::class);
        $this->expressions = $arr;

        return $this;
    }

    /**
     * Google specified expression set ID. The format should be: - E.g. XSS-20170329 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);
    }

    /**
     * Google specified expression set ID. The format should be: - E.g. XSS-20170329 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;
    }

}

