<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/privatecatalog/v1beta1/private_catalog.proto

namespace Google\Cloud\PrivateCatalog\V1beta1\AssetReference;

use UnexpectedValueException;

/**
 * Possible validation steates of an asset reference.
 *
 * Protobuf type <code>google.cloud.privatecatalog.v1beta1.AssetReference.AssetValidationState</code>
 */
class AssetValidationState
{
    /**
     * Unknown state.
     *
     * Generated from protobuf enum <code>ASSET_VALIDATION_STATE_UNSPECIFIED = 0;</code>
     */
    const ASSET_VALIDATION_STATE_UNSPECIFIED = 0;
    /**
     * The validation is still in process.
     *
     * Generated from protobuf enum <code>PENDING = 1;</code>
     */
    const PENDING = 1;
    /**
     * The validation is done and the asset reference is valid.
     *
     * Generated from protobuf enum <code>VALID = 2;</code>
     */
    const VALID = 2;
    /**
     * The validation is done and the asset reference is invalid.
     *
     * Generated from protobuf enum <code>INVALID = 3;</code>
     */
    const INVALID = 3;

    private static $valueToName = [
        self::ASSET_VALIDATION_STATE_UNSPECIFIED => 'ASSET_VALIDATION_STATE_UNSPECIFIED',
        self::PENDING => 'PENDING',
        self::VALID => 'VALID',
        self::INVALID => 'INVALID',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AssetValidationState::class, \Google\Cloud\PrivateCatalog\V1beta1\AssetReference_AssetValidationState::class);

