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

namespace Google\Cloud\AIPlatform\V1\MetadataSchema;

use UnexpectedValueException;

/**
 * Describes the type of the MetadataSchema.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType</code>
 */
class MetadataSchemaType
{
    /**
     * Unspecified type for the MetadataSchema.
     *
     * Generated from protobuf enum <code>METADATA_SCHEMA_TYPE_UNSPECIFIED = 0;</code>
     */
    const METADATA_SCHEMA_TYPE_UNSPECIFIED = 0;
    /**
     * A type indicating that the MetadataSchema will be used by Artifacts.
     *
     * Generated from protobuf enum <code>ARTIFACT_TYPE = 1;</code>
     */
    const ARTIFACT_TYPE = 1;
    /**
     * A typee indicating that the MetadataSchema will be used by Executions.
     *
     * Generated from protobuf enum <code>EXECUTION_TYPE = 2;</code>
     */
    const EXECUTION_TYPE = 2;
    /**
     * A state indicating that the MetadataSchema will be used by Contexts.
     *
     * Generated from protobuf enum <code>CONTEXT_TYPE = 3;</code>
     */
    const CONTEXT_TYPE = 3;

    private static $valueToName = [
        self::METADATA_SCHEMA_TYPE_UNSPECIFIED => 'METADATA_SCHEMA_TYPE_UNSPECIFIED',
        self::ARTIFACT_TYPE => 'ARTIFACT_TYPE',
        self::EXECUTION_TYPE => 'EXECUTION_TYPE',
        self::CONTEXT_TYPE => 'CONTEXT_TYPE',
    ];

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


