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

namespace Google\Cloud\AIPlatform\V1\SampleConfig;

use UnexpectedValueException;

/**
 * Sample strategy decides which subset of DataItems should be selected for
 * human labeling in every batch.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.SampleConfig.SampleStrategy</code>
 */
class SampleStrategy
{
    /**
     * Default will be treated as UNCERTAINTY.
     *
     * Generated from protobuf enum <code>SAMPLE_STRATEGY_UNSPECIFIED = 0;</code>
     */
    const SAMPLE_STRATEGY_UNSPECIFIED = 0;
    /**
     * Sample the most uncertain data to label.
     *
     * Generated from protobuf enum <code>UNCERTAINTY = 1;</code>
     */
    const UNCERTAINTY = 1;

    private static $valueToName = [
        self::SAMPLE_STRATEGY_UNSPECIFIED => 'SAMPLE_STRATEGY_UNSPECIFIED',
        self::UNCERTAINTY => 'UNCERTAINTY',
    ];

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


