<?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;

/**
 * Details about a piece of potentially sensitive information that was detected
 * when the data resource was profiled.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.DataProfileFinding</code>
 */
class DataProfileFinding 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. If the finding exceeds
     * 4096 bytes in length, the quote may be omitted.
     *
     * Generated from protobuf field <code>string quote = 1;</code>
     */
    protected $quote = '';
    /**
     * The [type of
     * content](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference)
     * that might have been found.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType infotype = 2;</code>
     */
    protected $infotype = null;
    /**
     * Contains data parsed from quotes. Currently supported infoTypes: DATE,
     * DATE_OF_BIRTH, and TIME.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.QuoteInfo quote_info = 3;</code>
     */
    protected $quote_info = null;
    /**
     * Resource name of the data profile associated with the finding.
     *
     * Generated from protobuf field <code>string data_profile_resource_name = 4;</code>
     */
    protected $data_profile_resource_name = '';
    /**
     * A unique identifier for the finding.
     *
     * Generated from protobuf field <code>string finding_id = 5;</code>
     */
    protected $finding_id = '';
    /**
     * Timestamp when the finding was detected.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp timestamp = 6;</code>
     */
    protected $timestamp = null;
    /**
     * Where the content was found.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.DataProfileFindingLocation location = 7;</code>
     */
    protected $location = null;
    /**
     * How broadly a resource has been shared.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ResourceVisibility resource_visibility = 8;</code>
     */
    protected $resource_visibility = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $quote
     *           The content that was found. Even if the content is not textual, it
     *           may be converted to a textual representation here. If the finding exceeds
     *           4096 bytes in length, the quote may be omitted.
     *     @type \Google\Cloud\Dlp\V2\InfoType $infotype
     *           The [type of
     *           content](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference)
     *           that might have been found.
     *     @type \Google\Cloud\Dlp\V2\QuoteInfo $quote_info
     *           Contains data parsed from quotes. Currently supported infoTypes: DATE,
     *           DATE_OF_BIRTH, and TIME.
     *     @type string $data_profile_resource_name
     *           Resource name of the data profile associated with the finding.
     *     @type string $finding_id
     *           A unique identifier for the finding.
     *     @type \Google\Protobuf\Timestamp $timestamp
     *           Timestamp when the finding was detected.
     *     @type \Google\Cloud\Dlp\V2\DataProfileFindingLocation $location
     *           Where the content was found.
     *     @type int $resource_visibility
     *           How broadly a resource has been shared.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * The content that was found. Even if the content is not textual, it
     * may be converted to a textual representation here. 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. 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](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference)
     * that might have been found.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType infotype = 2;</code>
     * @return \Google\Cloud\Dlp\V2\InfoType|null
     */
    public function getInfotype()
    {
        return $this->infotype;
    }

    public function hasInfotype()
    {
        return isset($this->infotype);
    }

    public function clearInfotype()
    {
        unset($this->infotype);
    }

    /**
     * The [type of
     * content](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference)
     * that might have been found.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType infotype = 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->infotype = $var;

        return $this;
    }

    /**
     * Contains data parsed from quotes. Currently supported infoTypes: DATE,
     * DATE_OF_BIRTH, and TIME.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.QuoteInfo quote_info = 3;</code>
     * @return \Google\Cloud\Dlp\V2\QuoteInfo|null
     */
    public function getQuoteInfo()
    {
        return $this->quote_info;
    }

    public function hasQuoteInfo()
    {
        return isset($this->quote_info);
    }

    public function clearQuoteInfo()
    {
        unset($this->quote_info);
    }

    /**
     * Contains data parsed from quotes. Currently supported infoTypes: DATE,
     * DATE_OF_BIRTH, and TIME.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.QuoteInfo quote_info = 3;</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;
    }

    /**
     * Resource name of the data profile associated with the finding.
     *
     * Generated from protobuf field <code>string data_profile_resource_name = 4;</code>
     * @return string
     */
    public function getDataProfileResourceName()
    {
        return $this->data_profile_resource_name;
    }

    /**
     * Resource name of the data profile associated with the finding.
     *
     * Generated from protobuf field <code>string data_profile_resource_name = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setDataProfileResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->data_profile_resource_name = $var;

        return $this;
    }

    /**
     * A unique identifier for the finding.
     *
     * Generated from protobuf field <code>string finding_id = 5;</code>
     * @return string
     */
    public function getFindingId()
    {
        return $this->finding_id;
    }

    /**
     * A unique identifier for the finding.
     *
     * Generated from protobuf field <code>string finding_id = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setFindingId($var)
    {
        GPBUtil::checkString($var, True);
        $this->finding_id = $var;

        return $this;
    }

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

    public function hasTimestamp()
    {
        return isset($this->timestamp);
    }

    public function clearTimestamp()
    {
        unset($this->timestamp);
    }

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

        return $this;
    }

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

    public function hasLocation()
    {
        return isset($this->location);
    }

    public function clearLocation()
    {
        unset($this->location);
    }

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

        return $this;
    }

    /**
     * How broadly a resource has been shared.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ResourceVisibility resource_visibility = 8;</code>
     * @return int
     */
    public function getResourceVisibility()
    {
        return $this->resource_visibility;
    }

    /**
     * How broadly a resource has been shared.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ResourceVisibility resource_visibility = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setResourceVisibility($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\ResourceVisibility::class);
        $this->resource_visibility = $var;

        return $this;
    }

}

