<?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 Training & Prediction data skew detection. It specifies the
 * training dataset sources and the skew detection parameters.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig.TrainingPredictionSkewDetectionConfig</code>
 */
class TrainingPredictionSkewDetectionConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Key is the feature name and value is the threshold. If a feature needs to
     * be monitored for skew, a value threshold must be configured for that
     * feature. The threshold here is against feature distribution distance
     * between the training and prediction feature.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> skew_thresholds = 1;</code>
     */
    private $skew_thresholds;
    /**
     * Key is the feature name and value is the threshold. The threshold here is
     * against attribution score distance between the training and prediction
     * feature.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> attribution_score_skew_thresholds = 2;</code>
     */
    private $attribution_score_skew_thresholds;
    /**
     * Skew 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_skew_threshold = 6;</code>
     */
    private $default_skew_threshold = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $skew_thresholds
     *           Key is the feature name and value is the threshold. If a feature needs to
     *           be monitored for skew, a value threshold must be configured for that
     *           feature. The threshold here is against feature distribution distance
     *           between the training and prediction feature.
     *     @type array|\Google\Protobuf\Internal\MapField $attribution_score_skew_thresholds
     *           Key is the feature name and value is the threshold. The threshold here is
     *           against attribution score distance between the training and prediction
     *           feature.
     *     @type \Google\Cloud\AIPlatform\V1\ThresholdConfig $default_skew_threshold
     *           Skew 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 skew, a value threshold must be configured for that
     * feature. The threshold here is against feature distribution distance
     * between the training and prediction feature.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.aiplatform.v1.ThresholdConfig> skew_thresholds = 1;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getSkewThresholds()
    {
        return $this->skew_thresholds;
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Skew 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_skew_threshold = 6;</code>
     * @return \Google\Cloud\AIPlatform\V1\ThresholdConfig|null
     */
    public function getDefaultSkewThreshold()
    {
        return $this->default_skew_threshold;
    }

    public function hasDefaultSkewThreshold()
    {
        return isset($this->default_skew_threshold);
    }

    public function clearDefaultSkewThreshold()
    {
        unset($this->default_skew_threshold);
    }

    /**
     * Skew 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_skew_threshold = 6;</code>
     * @param \Google\Cloud\AIPlatform\V1\ThresholdConfig $var
     * @return $this
     */
    public function setDefaultSkewThreshold($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ThresholdConfig::class);
        $this->default_skew_threshold = $var;

        return $this;
    }

}


