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

namespace Google\Cloud\ModelArmor\V1beta;

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

/**
 * Finding corresponding to Sensitive Data Protection filter.
 *
 * Generated from protobuf message <code>google.cloud.modelarmor.v1beta.SdpFinding</code>
 */
class SdpFinding extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of Sensitive Data Protection info type for this finding.
     *
     * Generated from protobuf field <code>string info_type = 1;</code>
     */
    protected $info_type = '';
    /**
     * Identified confidence likelihood for `info_type`.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.SdpFindingLikelihood likelihood = 2;</code>
     */
    protected $likelihood = 0;
    /**
     * Location for this finding.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.SdpFinding.SdpFindingLocation location = 3;</code>
     */
    protected $location = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $info_type
     *           Name of Sensitive Data Protection info type for this finding.
     *     @type int $likelihood
     *           Identified confidence likelihood for `info_type`.
     *     @type \Google\Cloud\ModelArmor\V1beta\SdpFinding\SdpFindingLocation $location
     *           Location for this finding.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Modelarmor\V1Beta\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of Sensitive Data Protection info type for this finding.
     *
     * Generated from protobuf field <code>string info_type = 1;</code>
     * @return string
     */
    public function getInfoType()
    {
        return $this->info_type;
    }

    /**
     * Name of Sensitive Data Protection info type for this finding.
     *
     * Generated from protobuf field <code>string info_type = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setInfoType($var)
    {
        GPBUtil::checkString($var, True);
        $this->info_type = $var;

        return $this;
    }

    /**
     * Identified confidence likelihood for `info_type`.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.SdpFindingLikelihood likelihood = 2;</code>
     * @return int
     */
    public function getLikelihood()
    {
        return $this->likelihood;
    }

    /**
     * Identified confidence likelihood for `info_type`.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.SdpFindingLikelihood likelihood = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setLikelihood($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ModelArmor\V1beta\SdpFindingLikelihood::class);
        $this->likelihood = $var;

        return $this;
    }

    /**
     * Location for this finding.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.SdpFinding.SdpFindingLocation location = 3;</code>
     * @return \Google\Cloud\ModelArmor\V1beta\SdpFinding\SdpFindingLocation|null
     */
    public function getLocation()
    {
        return $this->location;
    }

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

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

    /**
     * Location for this finding.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.SdpFinding.SdpFindingLocation location = 3;</code>
     * @param \Google\Cloud\ModelArmor\V1beta\SdpFinding\SdpFindingLocation $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ModelArmor\V1beta\SdpFinding\SdpFindingLocation::class);
        $this->location = $var;

        return $this;
    }

}

