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

namespace Google\Cloud\AIPlatform\V1\ExamplesOverride;

use UnexpectedValueException;

/**
 * Data format enum.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.ExamplesOverride.DataFormat</code>
 */
class DataFormat
{
    /**
     * Unspecified format. Must not be used.
     *
     * Generated from protobuf enum <code>DATA_FORMAT_UNSPECIFIED = 0;</code>
     */
    const DATA_FORMAT_UNSPECIFIED = 0;
    /**
     * Provided data is a set of model inputs.
     *
     * Generated from protobuf enum <code>INSTANCES = 1;</code>
     */
    const INSTANCES = 1;
    /**
     * Provided data is a set of embeddings.
     *
     * Generated from protobuf enum <code>EMBEDDINGS = 2;</code>
     */
    const EMBEDDINGS = 2;

    private static $valueToName = [
        self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED',
        self::INSTANCES => 'INSTANCES',
        self::EMBEDDINGS => 'EMBEDDINGS',
    ];

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


