<?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
{
    /**
     * 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 = '';
    /**
     * 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 = '';
    /**
     * 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 = '';
    /**
     * 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 = '';
    /**
     * The body of the request that triggered the vulnerability.
     *
     * Generated from protobuf field <code>string body = 5;</code>
     */
    private $body = '';
    /**
     * The description of the vulnerability.
     *
     * Generated from protobuf field <code>string description = 6;</code>
     */
    private $description = '';
    /**
     * 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 = '';
    /**
     * 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 = '';
    /**
     * The URL where the browser lands when the vulnerability is detected.
     *
     * Generated from protobuf field <code>string final_url = 9;</code>
     */
    private $final_url = '';
    /**
     * The tracking ID uniquely identifies a vulnerability instance across
     * multiple ScanRuns.
     *
     * Generated from protobuf field <code>string tracking_id = 10;</code>
     */
    private $tracking_id = '';
    /**
     * 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;
    /**
     * 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;
    /**
     * 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;
    /**
     * 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;
    /**
     * 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;
    /**
     * 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
     *           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
     *           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
     *           The http method of the request that triggered the vulnerability, in
     *           uppercase.
     *     @type string $fuzzed_url
     *           The URL produced by the server-side fuzzer and used in the request that
     *           triggered the vulnerability.
     *     @type string $body
     *           The body of the request that triggered the vulnerability.
     *     @type string $description
     *           The description of the vulnerability.
     *     @type string $reproduction_url
     *           The URL containing human-readable payload that user can leverage to
     *           reproduce the vulnerability.
     *     @type string $frame_url
     *           If the vulnerability was originated from nested IFrame, the immediate
     *           parent IFrame is reported.
     *     @type string $final_url
     *           The URL where the browser lands when the vulnerability is detected.
     *     @type string $tracking_id
     *           The tracking ID uniquely identifies a vulnerability instance across
     *           multiple ScanRuns.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\Form $form
     *           An addon containing information reported for a vulnerability with an HTML
     *           form, if any.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\OutdatedLibrary $outdated_library
     *           An addon containing information about outdated libraries.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\ViolatingResource $violating_resource
     *           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
     *           An addon containing information about vulnerable or missing HTTP headers.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\VulnerableParameters $vulnerable_parameters
     *           An addon containing information about request parameters which were found
     *           to be vulnerable.
     *     @type \Google\Cloud\WebSecurityScanner\V1beta\Xss $xss
     *           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);
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

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

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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;
    }

    /**
     * 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 isset($this->form) ? $this->form : null;
    }

    public function hasForm()
    {
        return isset($this->form);
    }

    public function clearForm()
    {
        unset($this->form);
    }

    /**
     * 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;
    }

    /**
     * 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 isset($this->outdated_library) ? $this->outdated_library : null;
    }

    public function hasOutdatedLibrary()
    {
        return isset($this->outdated_library);
    }

    public function clearOutdatedLibrary()
    {
        unset($this->outdated_library);
    }

    /**
     * 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;
    }

    /**
     * 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 isset($this->violating_resource) ? $this->violating_resource : null;
    }

    public function hasViolatingResource()
    {
        return isset($this->violating_resource);
    }

    public function clearViolatingResource()
    {
        unset($this->violating_resource);
    }

    /**
     * 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;
    }

    /**
     * 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 isset($this->vulnerable_headers) ? $this->vulnerable_headers : null;
    }

    public function hasVulnerableHeaders()
    {
        return isset($this->vulnerable_headers);
    }

    public function clearVulnerableHeaders()
    {
        unset($this->vulnerable_headers);
    }

    /**
     * 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;
    }

    /**
     * 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 isset($this->vulnerable_parameters) ? $this->vulnerable_parameters : null;
    }

    public function hasVulnerableParameters()
    {
        return isset($this->vulnerable_parameters);
    }

    public function clearVulnerableParameters()
    {
        unset($this->vulnerable_parameters);
    }

    /**
     * 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;
    }

    /**
     * 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 isset($this->xss) ? $this->xss : null;
    }

    public function hasXss()
    {
        return isset($this->xss);
    }

    public function clearXss()
    {
        unset($this->xss);
    }

    /**
     * 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;
    }

}

