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

namespace Google\Cloud\AIPlatform\V1\TensorboardTimeSeries;

use UnexpectedValueException;

/**
 * An enum representing the value type of a TensorboardTimeSeries.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.TensorboardTimeSeries.ValueType</code>
 */
class ValueType
{
    /**
     * The value type is unspecified.
     *
     * Generated from protobuf enum <code>VALUE_TYPE_UNSPECIFIED = 0;</code>
     */
    const VALUE_TYPE_UNSPECIFIED = 0;
    /**
     * Used for TensorboardTimeSeries that is a list of scalars.
     * E.g. accuracy of a model over epochs/time.
     *
     * Generated from protobuf enum <code>SCALAR = 1;</code>
     */
    const SCALAR = 1;
    /**
     * Used for TensorboardTimeSeries that is a list of tensors.
     * E.g. histograms of weights of layer in a model over epoch/time.
     *
     * Generated from protobuf enum <code>TENSOR = 2;</code>
     */
    const TENSOR = 2;
    /**
     * Used for TensorboardTimeSeries that is a list of blob sequences.
     * E.g. set of sample images with labels over epochs/time.
     *
     * Generated from protobuf enum <code>BLOB_SEQUENCE = 3;</code>
     */
    const BLOB_SEQUENCE = 3;

    private static $valueToName = [
        self::VALUE_TYPE_UNSPECIFIED => 'VALUE_TYPE_UNSPECIFIED',
        self::SCALAR => 'SCALAR',
        self::TENSOR => 'TENSOR',
        self::BLOB_SEQUENCE => 'BLOB_SEQUENCE',
    ];

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

