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

namespace Google\Cloud\AIPlatform\V1\Feature\MonitoringStatsAnomaly;

use UnexpectedValueException;

/**
 * If the objective in the request is both
 * Import Feature Analysis and Snapshot Analysis, this objective could be
 * one of them. Otherwise, this objective should be the same as the
 * objective in the request.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.Feature.MonitoringStatsAnomaly.Objective</code>
 */
class Objective
{
    /**
     * If it's OBJECTIVE_UNSPECIFIED, monitoring_stats will be empty.
     *
     * Generated from protobuf enum <code>OBJECTIVE_UNSPECIFIED = 0;</code>
     */
    const OBJECTIVE_UNSPECIFIED = 0;
    /**
     * Stats are generated by Import Feature Analysis.
     *
     * Generated from protobuf enum <code>IMPORT_FEATURE_ANALYSIS = 1;</code>
     */
    const IMPORT_FEATURE_ANALYSIS = 1;
    /**
     * Stats are generated by Snapshot Analysis.
     *
     * Generated from protobuf enum <code>SNAPSHOT_ANALYSIS = 2;</code>
     */
    const SNAPSHOT_ANALYSIS = 2;

    private static $valueToName = [
        self::OBJECTIVE_UNSPECIFIED => 'OBJECTIVE_UNSPECIFIED',
        self::IMPORT_FEATURE_ANALYSIS => 'IMPORT_FEATURE_ANALYSIS',
        self::SNAPSHOT_ANALYSIS => 'SNAPSHOT_ANALYSIS',
    ];

    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);
    }
}


