<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

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

/**
 * Represents a piece of potentially sensitive content.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.Finding</code>
 */
class Finding extends \Google\Protobuf\Internal\Message
{
    /**
     * The content that was found. Even if the content is not textual, it
     * may be converted to a textual representation here.
     * Provided if requested by the `InspectConfig` and the finding is
     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
     * in length, the quote may be omitted.
     *
     * Generated from protobuf field <code>string quote = 1;</code>
     */
    private $quote = '';
    /**
     * The type of content that might have been found.
     * Provided if requested by the `InspectConfig`.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType info_type = 2;</code>
     */
    private $info_type = null;
    /**
     * Estimate of how likely it is that the `info_type` is correct.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Likelihood likelihood = 3;</code>
     */
    private $likelihood = 0;
    /**
     * Where the content was found.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Location location = 4;</code>
     */
    private $location = null;
    /**
     * Timestamp when finding was detected.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6;</code>
     */
    private $create_time = null;
    /**
     * Contains data parsed from quotes. Only populated if include_quote was set
     * to true and a supported infoType was requested. Currently supported
     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.QuoteInfo quote_info = 7;</code>
     */
    private $quote_info = null;

    public function __construct() {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct();
    }

    /**
     * The content that was found. Even if the content is not textual, it
     * may be converted to a textual representation here.
     * Provided if requested by the `InspectConfig` and the finding is
     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
     * in length, the quote may be omitted.
     *
     * Generated from protobuf field <code>string quote = 1;</code>
     * @return string
     */
    public function getQuote()
    {
        return $this->quote;
    }

    /**
     * The content that was found. Even if the content is not textual, it
     * may be converted to a textual representation here.
     * Provided if requested by the `InspectConfig` and the finding is
     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
     * in length, the quote may be omitted.
     *
     * Generated from protobuf field <code>string quote = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setQuote($var)
    {
        GPBUtil::checkString($var, True);
        $this->quote = $var;

        return $this;
    }

    /**
     * The type of content that might have been found.
     * Provided if requested by the `InspectConfig`.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType info_type = 2;</code>
     * @return \Google\Cloud\Dlp\V2\InfoType
     */
    public function getInfoType()
    {
        return $this->info_type;
    }

    /**
     * The type of content that might have been found.
     * Provided if requested by the `InspectConfig`.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType info_type = 2;</code>
     * @param \Google\Cloud\Dlp\V2\InfoType $var
     * @return $this
     */
    public function setInfoType($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\InfoType::class);
        $this->info_type = $var;

        return $this;
    }

    /**
     * Estimate of how likely it is that the `info_type` is correct.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Likelihood likelihood = 3;</code>
     * @return int
     */
    public function getLikelihood()
    {
        return $this->likelihood;
    }

    /**
     * Estimate of how likely it is that the `info_type` is correct.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Likelihood likelihood = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setLikelihood($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\Likelihood::class);
        $this->likelihood = $var;

        return $this;
    }

    /**
     * Where the content was found.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Location location = 4;</code>
     * @return \Google\Cloud\Dlp\V2\Location
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * Where the content was found.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Location location = 4;</code>
     * @param \Google\Cloud\Dlp\V2\Location $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Location::class);
        $this->location = $var;

        return $this;
    }

    /**
     * Timestamp when finding was detected.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6;</code>
     * @return \Google\Protobuf\Timestamp
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    /**
     * Timestamp when finding was detected.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Contains data parsed from quotes. Only populated if include_quote was set
     * to true and a supported infoType was requested. Currently supported
     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.QuoteInfo quote_info = 7;</code>
     * @return \Google\Cloud\Dlp\V2\QuoteInfo
     */
    public function getQuoteInfo()
    {
        return $this->quote_info;
    }

    /**
     * Contains data parsed from quotes. Only populated if include_quote was set
     * to true and a supported infoType was requested. Currently supported
     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.QuoteInfo quote_info = 7;</code>
     * @param \Google\Cloud\Dlp\V2\QuoteInfo $var
     * @return $this
     */
    public function setQuoteInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\QuoteInfo::class);
        $this->quote_info = $var;

        return $this;
    }

}

