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

namespace Google\Cloud\Dlp\V2\PrivacyMetric;

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

/**
 * Compute numerical stats over an individual column, including
 * number of distinct values and value count distribution.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig</code>
 */
class CategoricalStatsConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Field to compute categorical stats on. All column types are
     * supported except for arrays and structs. However, it may be more
     * informative to use NumericalStats when the field type is supported,
     * depending on the data.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.FieldId field = 1;</code>
     */
    private $field = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\FieldId $field
     *           Field to compute categorical stats on. All column types are
     *           supported except for arrays and structs. However, it may be more
     *           informative to use NumericalStats when the field type is supported,
     *           depending on the data.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Field to compute categorical stats on. All column types are
     * supported except for arrays and structs. However, it may be more
     * informative to use NumericalStats when the field type is supported,
     * depending on the data.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.FieldId field = 1;</code>
     * @return \Google\Cloud\Dlp\V2\FieldId|null
     */
    public function getField()
    {
        return $this->field;
    }

    public function hasField()
    {
        return isset($this->field);
    }

    public function clearField()
    {
        unset($this->field);
    }

    /**
     * Field to compute categorical stats on. All column types are
     * supported except for arrays and structs. However, it may be more
     * informative to use NumericalStats when the field type is supported,
     * depending on the data.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.FieldId field = 1;</code>
     * @param \Google\Cloud\Dlp\V2\FieldId $var
     * @return $this
     */
    public function setField($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\FieldId::class);
        $this->field = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CategoricalStatsConfig::class, \Google\Cloud\Dlp\V2\PrivacyMetric_CategoricalStatsConfig::class);

