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

namespace Google\Cloud\AIPlatform\V1\FeaturestoreMonitoringConfig\ImportFeaturesAnalysis;

use UnexpectedValueException;

/**
 * Defines the baseline to do anomaly detection for feature values imported
 * by each
 * [ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]
 * operation.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis.Baseline</code>
 */
class Baseline
{
    /**
     * Should not be used.
     *
     * Generated from protobuf enum <code>BASELINE_UNSPECIFIED = 0;</code>
     */
    const BASELINE_UNSPECIFIED = 0;
    /**
     * Choose the later one statistics generated by either most recent
     * snapshot analysis or previous import features analysis. If non of them
     * exists, skip anomaly detection and only generate a statistics.
     *
     * Generated from protobuf enum <code>LATEST_STATS = 1;</code>
     */
    const LATEST_STATS = 1;
    /**
     * Use the statistics generated by the most recent snapshot analysis if
     * exists.
     *
     * Generated from protobuf enum <code>MOST_RECENT_SNAPSHOT_STATS = 2;</code>
     */
    const MOST_RECENT_SNAPSHOT_STATS = 2;
    /**
     * Use the statistics generated by the previous import features analysis
     * if exists.
     *
     * Generated from protobuf enum <code>PREVIOUS_IMPORT_FEATURES_STATS = 3;</code>
     */
    const PREVIOUS_IMPORT_FEATURES_STATS = 3;

    private static $valueToName = [
        self::BASELINE_UNSPECIFIED => 'BASELINE_UNSPECIFIED',
        self::LATEST_STATS => 'LATEST_STATS',
        self::MOST_RECENT_SNAPSHOT_STATS => 'MOST_RECENT_SNAPSHOT_STATS',
        self::PREVIOUS_IMPORT_FEATURES_STATS => 'PREVIOUS_IMPORT_FEATURES_STATS',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}


