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

namespace Google\Cloud\WebSecurityScanner\V1beta;

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

/**
 * A Finding resource represents a vulnerability instance identified during a
 * ScanRun.
 *
 * Generated from protobuf message <code>google.cloud.websecurityscanner.v1beta.Finding</code>
 */
class Finding extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only.
     * The resource name of the Finding. The name follows the format of
     * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'.
     * The finding IDs are generated by the system.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Output only.
     * The type of the Finding.
     * Detailed and up-to-date information on findings can be found here:
     * https://cloud.google.com/security-scanner/docs/scan-result-details
     *
     * Generated from protobuf field <code>string finding_type = 2;</code>
     */
    private $finding_type = '';
    /**
     * Output only.
     * The http method of the request that triggered the vulnerability, in
     * uppercase.
     *
     * Generated from protobuf field <code>string http_method = 3;</code>
     */
    private $http_method = '';
    /**
     * Output only.
     * The URL produced by the server-side fuzzer and used in the request that
     * triggered the vulnerability.
     *
     * Generated from protobuf field <code>string fuzzed_url = 4;</code>
     */
    private $fuzzed_url = '';
    /**
     * Output only.
     * The body of the request that triggered the vulnerability.
     *
     * Generated from protobuf field <code>string body = 5;</code>
     */
    private $body = '';
    /**
     * Output only.
     * The description of the vulnerability.
     *
     * Generated from protobuf field <code>string description = 6;</code>
     */
    private $description = '';
    /**
     * Output only.
     * The URL containing human-readable payload that user can leverage to
     * reproduce the vulnerability.
     *
     * Generated from protobuf field <code>string reproduction_url = 7;</code>
     */
    private $reproduction_url = '';
    /**
     * Output only.
     * If the vulnerability was originated from nested IFrame, the immediate
     * parent IFrame is reported.
     *
     * Generated from protobuf field <code>string frame_url = 8;</code>
     */
    private $frame_url = '';
    /**
     * Output only.
     * The URL where the browser lands when the vulnerability is detected.
     *
     * Generated from protobuf field <code>string final_url = 9;</code>
     */
    private $final_url = '';
    /**
     * Output only.
     * The tracking ID uniquely identifies a vulnerability instance across
     * multiple ScanRuns.
     *
     * Generated from protobuf field <code>string tracking_id = 10;</code>
     */
    private $tracking_id = '';
    /**
     * Output only.
     * An addon containing information reported for a vulnerability with an HTML
     * form, if any.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.Form form = 16;</code>
     */
    private $form = null;
    /**
     * Output only.
     * An addon containing information about outdated libraries.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11;</code>
     */
    private $outdated_library = null;
    /**
     * Output only.
     * An addon containing detailed information regarding any resource causing the
     * vulnerability such as JavaScript sources, image, audio files, etc.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12;</code>
     */
    private $violating_resource = null;
    /**
     * Output only.
     * An addon containing information about vulnerable or missing HTTP headers.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15;</code>
     */
    private $vulnerable_headers = null;
    /**
     * Output only.
     * An addon containing information about request parameters which were found
     * to be vulnerable.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13;</code>
     */
    private $vulnerable_parameters = null;
    /**
     * Output only.
     * An addon containing information reported for an XSS, if any.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.Xss xss = 14;</code>
     */
    private $xss = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only.
     *           The resource name of the Finding. The name follows the format of
     *           'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'.
     *           The finding IDs are generated by the system.
     *     @type string $finding_type
     *           Output only.
     *           The type of the Finding.
     *           Detailed and up-to-date information on findings can be found here:
     *           https://cloud.google.com/security-scanner/docs/scan-result-details
     *     @type string $http_method
     *           Output only.
     *           The http method of the request that triggered the vulnerability, in
     *           uppercase.
     *     @type string $fuzzed_url
     *           Output only.
     *           The URL produced by the server-side fuzzer and used in the request that
     *           triggered the vulnerability.
     *     @type string $body
     *           Output only.
     *           The body of the request that triggered the vulnerability.
     *     @type string $description
     *           Output only.
     *           The description of the vulnerability.
     *     @type string $reproduction_url
     *           Output only.
     *           The URL containing human-readable payload that user can leverage to
     *           reproduce the vulnerability.
     *     @type string $frame_url
     *           Output only.
     *           If the vulnerability was originated from nested IFrame, the immediate
     *           parent IFrame is reported.
     *     @type string $final_url
     *           Output only.
     *           The URL where the browser lands when the vulnerability is detected.
     *     @type string $tracking_id
     *           Output only.
     *           The tracking ID uniquely identifies a vulnerability instance across
     *           multiple ScanRuns.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\Form $form
     *           Output only.
     *           An addon containing information reported for a vulnerability with an HTML
     *           form, if any.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary $outdated_library
     *           Output only.
     *           An addon containing information about outdated libraries.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource $violating_resource
     *           Output only.
     *           An addon containing detailed information regarding any resource causing the
     *           vulnerability such as JavaScript sources, image, audio files, etc.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders $vulnerable_headers
     *           Output only.
     *           An addon containing information about vulnerable or missing HTTP headers.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters $vulnerable_parameters
     *           Output only.
     *           An addon containing information about request parameters which were found
     *           to be vulnerable.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\Xss $xss
     *           Output only.
     *           An addon containing information reported for an XSS, if any.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\Finding::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only.
     * The resource name of the Finding. The name follows the format of
     * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'.
     * The finding IDs are generated by the system.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only.
     * The resource name of the Finding. The name follows the format of
     * 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'.
     * The finding IDs are generated by the system.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only.
     * The type of the Finding.
     * Detailed and up-to-date information on findings can be found here:
     * https://cloud.google.com/security-scanner/docs/scan-result-details
     *
     * Generated from protobuf field <code>string finding_type = 2;</code>
     * @return string
     */
    public function getFindingType()
    {
        return $this->finding_type;
    }

    /**
     * Output only.
     * The type of the Finding.
     * Detailed and up-to-date information on findings can be found here:
     * https://cloud.google.com/security-scanner/docs/scan-result-details
     *
     * Generated from protobuf field <code>string finding_type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setFindingType($var)
    {
        GPBUtil::checkString($var, True);
        $this->finding_type = $var;

        return $this;
    }

    /**
     * Output only.
     * The http method of the request that triggered the vulnerability, in
     * uppercase.
     *
     * Generated from protobuf field <code>string http_method = 3;</code>
     * @return string
     */
    public function getHttpMethod()
    {
        return $this->http_method;
    }

    /**
     * Output only.
     * The http method of the request that triggered the vulnerability, in
     * uppercase.
     *
     * Generated from protobuf field <code>string http_method = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setHttpMethod($var)
    {
        GPBUtil::checkString($var, True);
        $this->http_method = $var;

        return $this;
    }

    /**
     * Output only.
     * The URL produced by the server-side fuzzer and used in the request that
     * triggered the vulnerability.
     *
     * Generated from protobuf field <code>string fuzzed_url = 4;</code>
     * @return string
     */
    public function getFuzzedUrl()
    {
        return $this->fuzzed_url;
    }

    /**
     * Output only.
     * The URL produced by the server-side fuzzer and used in the request that
     * triggered the vulnerability.
     *
     * Generated from protobuf field <code>string fuzzed_url = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setFuzzedUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->fuzzed_url = $var;

        return $this;
    }

    /**
     * Output only.
     * The body of the request that triggered the vulnerability.
     *
     * Generated from protobuf field <code>string body = 5;</code>
     * @return string
     */
    public function getBody()
    {
        return $this->body;
    }

    /**
     * Output only.
     * The body of the request that triggered the vulnerability.
     *
     * Generated from protobuf field <code>string body = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setBody($var)
    {
        GPBUtil::checkString($var, True);
        $this->body = $var;

        return $this;
    }

    /**
     * Output only.
     * The description of the vulnerability.
     *
     * Generated from protobuf field <code>string description = 6;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Output only.
     * The description of the vulnerability.
     *
     * Generated from protobuf field <code>string description = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only.
     * The URL containing human-readable payload that user can leverage to
     * reproduce the vulnerability.
     *
     * Generated from protobuf field <code>string reproduction_url = 7;</code>
     * @return string
     */
    public function getReproductionUrl()
    {
        return $this->reproduction_url;
    }

    /**
     * Output only.
     * The URL containing human-readable payload that user can leverage to
     * reproduce the vulnerability.
     *
     * Generated from protobuf field <code>string reproduction_url = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setReproductionUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->reproduction_url = $var;

        return $this;
    }

    /**
     * Output only.
     * If the vulnerability was originated from nested IFrame, the immediate
     * parent IFrame is reported.
     *
     * Generated from protobuf field <code>string frame_url = 8;</code>
     * @return string
     */
    public function getFrameUrl()
    {
        return $this->frame_url;
    }

    /**
     * Output only.
     * If the vulnerability was originated from nested IFrame, the immediate
     * parent IFrame is reported.
     *
     * Generated from protobuf field <code>string frame_url = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setFrameUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->frame_url = $var;

        return $this;
    }

    /**
     * Output only.
     * The URL where the browser lands when the vulnerability is detected.
     *
     * Generated from protobuf field <code>string final_url = 9;</code>
     * @return string
     */
    public function getFinalUrl()
    {
        return $this->final_url;
    }

    /**
     * Output only.
     * The URL where the browser lands when the vulnerability is detected.
     *
     * Generated from protobuf field <code>string final_url = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setFinalUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->final_url = $var;

        return $this;
    }

    /**
     * Output only.
     * The tracking ID uniquely identifies a vulnerability instance across
     * multiple ScanRuns.
     *
     * Generated from protobuf field <code>string tracking_id = 10;</code>
     * @return string
     */
    public function getTrackingId()
    {
        return $this->tracking_id;
    }

    /**
     * Output only.
     * The tracking ID uniquely identifies a vulnerability instance across
     * multiple ScanRuns.
     *
     * Generated from protobuf field <code>string tracking_id = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setTrackingId($var)
    {
        GPBUtil::checkString($var, True);
        $this->tracking_id = $var;

        return $this;
    }

    /**
     * Output only.
     * An addon containing information reported for a vulnerability with an HTML
     * form, if any.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.Form form = 16;</code>
     * @return \Google\Cloud\WebSecurityScanner\V1beta\Form
     */
    public function getForm()
    {
        return $this->form;
    }

    /**
     * Output only.
     * An addon containing information reported for a vulnerability with an HTML
     * form, if any.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.Form form = 16;</code>
     * @param \Google\Cloud\WebSecurityScanner\V1beta\Form $var
     * @return $this
     */
    public function setForm($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\Form::class);
        $this->form = $var;

        return $this;
    }

    /**
     * Output only.
     * An addon containing information about outdated libraries.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11;</code>
     * @return \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary
     */
    public function getOutdatedLibrary()
    {
        return $this->outdated_library;
    }

    /**
     * Output only.
     * An addon containing information about outdated libraries.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.OutdatedLibrary outdated_library = 11;</code>
     * @param \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary $var
     * @return $this
     */
    public function setOutdatedLibrary($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary::class);
        $this->outdated_library = $var;

        return $this;
    }

    /**
     * Output only.
     * An addon containing detailed information regarding any resource causing the
     * vulnerability such as JavaScript sources, image, audio files, etc.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12;</code>
     * @return \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource
     */
    public function getViolatingResource()
    {
        return $this->violating_resource;
    }

    /**
     * Output only.
     * An addon containing detailed information regarding any resource causing the
     * vulnerability such as JavaScript sources, image, audio files, etc.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.ViolatingResource violating_resource = 12;</code>
     * @param \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource $var
     * @return $this
     */
    public function setViolatingResource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource::class);
        $this->violating_resource = $var;

        return $this;
    }

    /**
     * Output only.
     * An addon containing information about vulnerable or missing HTTP headers.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15;</code>
     * @return \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders
     */
    public function getVulnerableHeaders()
    {
        return $this->vulnerable_headers;
    }

    /**
     * Output only.
     * An addon containing information about vulnerable or missing HTTP headers.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.VulnerableHeaders vulnerable_headers = 15;</code>
     * @param \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders $var
     * @return $this
     */
    public function setVulnerableHeaders($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableHeaders::class);
        $this->vulnerable_headers = $var;

        return $this;
    }

    /**
     * Output only.
     * An addon containing information about request parameters which were found
     * to be vulnerable.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13;</code>
     * @return \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters
     */
    public function getVulnerableParameters()
    {
        return $this->vulnerable_parameters;
    }

    /**
     * Output only.
     * An addon containing information about request parameters which were found
     * to be vulnerable.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.VulnerableParameters vulnerable_parameters = 13;</code>
     * @param \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters $var
     * @return $this
     */
    public function setVulnerableParameters($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters::class);
        $this->vulnerable_parameters = $var;

        return $this;
    }

    /**
     * Output only.
     * An addon containing information reported for an XSS, if any.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.Xss xss = 14;</code>
     * @return \Google\Cloud\WebSecurityScanner\V1beta\Xss
     */
    public function getXss()
    {
        return $this->xss;
    }

    /**
     * Output only.
     * An addon containing information reported for an XSS, if any.
     *
     * Generated from protobuf field <code>.google.cloud.websecurityscanner.v1beta.Xss xss = 14;</code>
     * @param \Google\Cloud\WebSecurityScanner\V1beta\Xss $var
     * @return $this
     */
    public function setXss($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\WebSecurityScanner\V1beta\Xss::class);
        $this->xss = $var;

        return $this;
    }

}

