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

/**
 * Privacy metric to compute for reidentification risk analysis.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.PrivacyMetric</code>
 */
class PrivacyMetric extends \Google\Protobuf\Internal\Message
{
    protected $type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\PrivacyMetric\NumericalStatsConfig $numerical_stats_config
     *           Numerical stats
     *     @type \Google\Cloud\Dlp\V2\PrivacyMetric\CategoricalStatsConfig $categorical_stats_config
     *           Categorical stats
     *     @type \Google\Cloud\Dlp\V2\PrivacyMetric\KAnonymityConfig $k_anonymity_config
     *           K-anonymity
     *     @type \Google\Cloud\Dlp\V2\PrivacyMetric\LDiversityConfig $l_diversity_config
     *           l-diversity
     *     @type \Google\Cloud\Dlp\V2\PrivacyMetric\KMapEstimationConfig $k_map_estimation_config
     *           k-map
     *     @type \Google\Cloud\Dlp\V2\PrivacyMetric\DeltaPresenceEstimationConfig $delta_presence_estimation_config
     *           delta-presence
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Numerical stats
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1;</code>
     * @return \Google\Cloud\Dlp\V2\PrivacyMetric\NumericalStatsConfig
     */
    public function getNumericalStatsConfig()
    {
        return $this->readOneof(1);
    }

    public function hasNumericalStatsConfig()
    {
        return $this->hasOneof(1);
    }

    /**
     * Numerical stats
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1;</code>
     * @param \Google\Cloud\Dlp\V2\PrivacyMetric\NumericalStatsConfig $var
     * @return $this
     */
    public function setNumericalStatsConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\PrivacyMetric\NumericalStatsConfig::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Categorical stats
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2;</code>
     * @return \Google\Cloud\Dlp\V2\PrivacyMetric\CategoricalStatsConfig
     */
    public function getCategoricalStatsConfig()
    {
        return $this->readOneof(2);
    }

    public function hasCategoricalStatsConfig()
    {
        return $this->hasOneof(2);
    }

    /**
     * Categorical stats
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2;</code>
     * @param \Google\Cloud\Dlp\V2\PrivacyMetric\CategoricalStatsConfig $var
     * @return $this
     */
    public function setCategoricalStatsConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\PrivacyMetric\CategoricalStatsConfig::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * K-anonymity
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3;</code>
     * @return \Google\Cloud\Dlp\V2\PrivacyMetric\KAnonymityConfig
     */
    public function getKAnonymityConfig()
    {
        return $this->readOneof(3);
    }

    public function hasKAnonymityConfig()
    {
        return $this->hasOneof(3);
    }

    /**
     * K-anonymity
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3;</code>
     * @param \Google\Cloud\Dlp\V2\PrivacyMetric\KAnonymityConfig $var
     * @return $this
     */
    public function setKAnonymityConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\PrivacyMetric\KAnonymityConfig::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * l-diversity
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4;</code>
     * @return \Google\Cloud\Dlp\V2\PrivacyMetric\LDiversityConfig
     */
    public function getLDiversityConfig()
    {
        return $this->readOneof(4);
    }

    public function hasLDiversityConfig()
    {
        return $this->hasOneof(4);
    }

    /**
     * l-diversity
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4;</code>
     * @param \Google\Cloud\Dlp\V2\PrivacyMetric\LDiversityConfig $var
     * @return $this
     */
    public function setLDiversityConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\PrivacyMetric\LDiversityConfig::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * k-map
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5;</code>
     * @return \Google\Cloud\Dlp\V2\PrivacyMetric\KMapEstimationConfig
     */
    public function getKMapEstimationConfig()
    {
        return $this->readOneof(5);
    }

    public function hasKMapEstimationConfig()
    {
        return $this->hasOneof(5);
    }

    /**
     * k-map
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5;</code>
     * @param \Google\Cloud\Dlp\V2\PrivacyMetric\KMapEstimationConfig $var
     * @return $this
     */
    public function setKMapEstimationConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\PrivacyMetric\KMapEstimationConfig::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * delta-presence
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6;</code>
     * @return \Google\Cloud\Dlp\V2\PrivacyMetric\DeltaPresenceEstimationConfig
     */
    public function getDeltaPresenceEstimationConfig()
    {
        return $this->readOneof(6);
    }

    public function hasDeltaPresenceEstimationConfig()
    {
        return $this->hasOneof(6);
    }

    /**
     * delta-presence
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6;</code>
     * @param \Google\Cloud\Dlp\V2\PrivacyMetric\DeltaPresenceEstimationConfig $var
     * @return $this
     */
    public function setDeltaPresenceEstimationConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\PrivacyMetric\DeltaPresenceEstimationConfig::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getType()
    {
        return $this->whichOneof("type");
    }

}

