<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/model_monitoring.proto

namespace Google\Cloud\AIPlatform\V1\ModelMonitoringObjectiveConfig;

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

/**
 * The config for Prediction data drift detection.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig.PredictionDriftDetectionConfig</code>
 */
class PredictionDriftDetectionConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Key is the feature name and value is the threshold. If a feature needs to
     * be monitored for drift, a value threshold must be configured for that
     * feature. The threshold here is against feature distribution distance
     * between different time windws.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> drift_thresholds = 1;</code>
     */
    private $drift_thresholds;
    /**
     * Key is the feature name and value is the threshold. The threshold here is
     * against attribution score distance between different time windows.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> attribution_score_drift_thresholds = 2;</code>
     */
    private $attribution_score_drift_thresholds;
    /**
     * Drift anomaly detection threshold used by all features.
     * When the per-feature thresholds are not set, this field can be used to
     * specify a threshold for all features.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ThresholdConfig default_drift_threshold = 5;</code>
     */
    protected $default_drift_threshold = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $drift_thresholds
     *           Key is the feature name and value is the threshold. If a feature needs to
     *           be monitored for drift, a value threshold must be configured for that
     *           feature. The threshold here is against feature distribution distance
     *           between different time windws.
     *     @type array|\Google\Protobuf\Internal\MapField $attribution_score_drift_thresholds
     *           Key is the feature name and value is the threshold. The threshold here is
     *           against attribution score distance between different time windows.
     *     @type \Google\Cloud\AIPlatform\V1\ThresholdConfig $default_drift_threshold
     *           Drift anomaly detection threshold used by all features.
     *           When the per-feature thresholds are not set, this field can be used to
     *           specify a threshold for all features.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\ModelMonitoring::initOnce();
        parent::__construct($data);
    }

    /**
     * Key is the feature name and value is the threshold. If a feature needs to
     * be monitored for drift, a value threshold must be configured for that
     * feature. The threshold here is against feature distribution distance
     * between different time windws.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> drift_thresholds = 1;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getDriftThresholds()
    {
        return $this->drift_thresholds;
    }

    /**
     * Key is the feature name and value is the threshold. If a feature needs to
     * be monitored for drift, a value threshold must be configured for that
     * feature. The threshold here is against feature distribution distance
     * between different time windws.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> drift_thresholds = 1;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setDriftThresholds($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ThresholdConfig::class);
        $this->drift_thresholds = $arr;

        return $this;
    }

    /**
     * Key is the feature name and value is the threshold. The threshold here is
     * against attribution score distance between different time windows.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> attribution_score_drift_thresholds = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAttributionScoreDriftThresholds()
    {
        return $this->attribution_score_drift_thresholds;
    }

    /**
     * Key is the feature name and value is the threshold. The threshold here is
     * against attribution score distance between different time windows.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> attribution_score_drift_thresholds = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAttributionScoreDriftThresholds($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ThresholdConfig::class);
        $this->attribution_score_drift_thresholds = $arr;

        return $this;
    }

    /**
     * Drift anomaly detection threshold used by all features.
     * When the per-feature thresholds are not set, this field can be used to
     * specify a threshold for all features.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ThresholdConfig default_drift_threshold = 5;</code>
     * @return \Google\Cloud\AIPlatform\V1\ThresholdConfig|null
     */
    public function getDefaultDriftThreshold()
    {
        return $this->default_drift_threshold;
    }

    public function hasDefaultDriftThreshold()
    {
        return isset($this->default_drift_threshold);
    }

    public function clearDefaultDriftThreshold()
    {
        unset($this->default_drift_threshold);
    }

    /**
     * Drift anomaly detection threshold used by all features.
     * When the per-feature thresholds are not set, this field can be used to
     * specify a threshold for all features.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ThresholdConfig default_drift_threshold = 5;</code>
     * @param \Google\Cloud\AIPlatform\V1\ThresholdConfig $var
     * @return $this
     */
    public function setDefaultDriftThreshold($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ThresholdConfig::class);
        $this->default_drift_threshold = $var;

        return $this;
    }

}


