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

namespace Google\Cloud\AIPlatform\V1;

use UnexpectedValueException;

/**
 * Content Part modality
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.Modality</code>
 */
class Modality
{
    /**
     * Unspecified modality.
     *
     * Generated from protobuf enum <code>MODALITY_UNSPECIFIED = 0;</code>
     */
    const MODALITY_UNSPECIFIED = 0;
    /**
     * Plain text.
     *
     * Generated from protobuf enum <code>TEXT = 1;</code>
     */
    const TEXT = 1;
    /**
     * Image.
     *
     * Generated from protobuf enum <code>IMAGE = 2;</code>
     */
    const IMAGE = 2;
    /**
     * Video.
     *
     * Generated from protobuf enum <code>VIDEO = 3;</code>
     */
    const VIDEO = 3;
    /**
     * Audio.
     *
     * Generated from protobuf enum <code>AUDIO = 4;</code>
     */
    const AUDIO = 4;
    /**
     * Document, e.g. PDF.
     *
     * Generated from protobuf enum <code>DOCUMENT = 5;</code>
     */
    const DOCUMENT = 5;

    private static $valueToName = [
        self::MODALITY_UNSPECIFIED => 'MODALITY_UNSPECIFIED',
        self::TEXT => 'TEXT',
        self::IMAGE => 'IMAGE',
        self::VIDEO => 'VIDEO',
        self::AUDIO => 'AUDIO',
        self::DOCUMENT => 'DOCUMENT',
    ];

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

