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

namespace Google\Cloud\Dlp\V2\InspectConfig;

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

/**
 * Configuration for setting a minimum likelihood per infotype. Used to
 * customize the minimum likelihood level for specific infotypes in the
 * request. For example, use this if you want to lower the precision for
 * PERSON_NAME without lowering the precision for the other infotypes in the
 * request.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood</code>
 */
class InfoTypeLikelihood extends \Google\Protobuf\Internal\Message
{
    /**
     * Type of information the likelihood threshold applies to. Only one
     * likelihood per info_type should be provided. If InfoTypeLikelihood does
     * not have an info_type, the configuration fails.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     */
    protected $info_type = null;
    /**
     * Only returns findings equal to or above this threshold. This field is
     * required or else the configuration fails.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code>
     */
    protected $min_likelihood = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\InfoType $info_type
     *           Type of information the likelihood threshold applies to. Only one
     *           likelihood per info_type should be provided. If InfoTypeLikelihood does
     *           not have an info_type, the configuration fails.
     *     @type int $min_likelihood
     *           Only returns findings equal to or above this threshold. This field is
     *           required or else the configuration fails.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Type of information the likelihood threshold applies to. Only one
     * likelihood per info_type should be provided. If InfoTypeLikelihood does
     * not have an info_type, the configuration fails.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
     * @return \Google\Cloud\Dlp\V2\InfoType|null
     */
    public function getInfoType()
    {
        return $this->info_type;
    }

    public function hasInfoType()
    {
        return isset($this->info_type);
    }

    public function clearInfoType()
    {
        unset($this->info_type);
    }

    /**
     * Type of information the likelihood threshold applies to. Only one
     * likelihood per info_type should be provided. If InfoTypeLikelihood does
     * not have an info_type, the configuration fails.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoType info_type = 1;</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;
    }

    /**
     * Only returns findings equal to or above this threshold. This field is
     * required or else the configuration fails.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code>
     * @return int
     */
    public function getMinLikelihood()
    {
        return $this->min_likelihood;
    }

    /**
     * Only returns findings equal to or above this threshold. This field is
     * required or else the configuration fails.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.Likelihood min_likelihood = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMinLikelihood($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\Likelihood::class);
        $this->min_likelihood = $var;

        return $this;
    }

}


