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

namespace Google\Cloud\WebSecurityScanner\V1beta;

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

/**
 * Information reported for an XSS.
 *
 * Generated from protobuf message <code>google.cloud.websecurityscanner.v1beta.Xss</code>
 */
class Xss extends \Google\Protobuf\Internal\Message
{
    /**
     * Stack traces leading to the point where the XSS occurred.
     *
     * Generated from protobuf field <code>repeated string stack_traces = 1;</code>
     */
    private $stack_traces;
    /**
     * An error message generated by a javascript breakage.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     */
    private $error_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $stack_traces
     *           Stack traces leading to the point where the XSS occurred.
     *     @type string $error_message
     *           An error message generated by a javascript breakage.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\FindingAddon::initOnce();
        parent::__construct($data);
    }

    /**
     * Stack traces leading to the point where the XSS occurred.
     *
     * Generated from protobuf field <code>repeated string stack_traces = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getStackTraces()
    {
        return $this->stack_traces;
    }

    /**
     * Stack traces leading to the point where the XSS occurred.
     *
     * Generated from protobuf field <code>repeated string stack_traces = 1;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setStackTraces($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->stack_traces = $arr;

        return $this;
    }

    /**
     * An error message generated by a javascript breakage.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     * @return string
     */
    public function getErrorMessage()
    {
        return $this->error_message;
    }

    /**
     * An error message generated by a javascript breakage.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setErrorMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->error_message = $var;

        return $this;
    }

}

