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

namespace Google\Cloud\AIPlatform\V1\ExplanationMetadata\InputMetadata\Visualization;

use UnexpectedValueException;

/**
 * How the original image is displayed in the visualization.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.Visualization.OverlayType</code>
 */
class OverlayType
{
    /**
     * Default value. This is the same as NONE.
     *
     * Generated from protobuf enum <code>OVERLAY_TYPE_UNSPECIFIED = 0;</code>
     */
    const OVERLAY_TYPE_UNSPECIFIED = 0;
    /**
     * No overlay.
     *
     * Generated from protobuf enum <code>NONE = 1;</code>
     */
    const NONE = 1;
    /**
     * The attributions are shown on top of the original image.
     *
     * Generated from protobuf enum <code>ORIGINAL = 2;</code>
     */
    const ORIGINAL = 2;
    /**
     * The attributions are shown on top of grayscaled version of the
     * original image.
     *
     * Generated from protobuf enum <code>GRAYSCALE = 3;</code>
     */
    const GRAYSCALE = 3;
    /**
     * The attributions are used as a mask to reveal predictive parts of
     * the image and hide the un-predictive parts.
     *
     * Generated from protobuf enum <code>MASK_BLACK = 4;</code>
     */
    const MASK_BLACK = 4;

    private static $valueToName = [
        self::OVERLAY_TYPE_UNSPECIFIED => 'OVERLAY_TYPE_UNSPECIFIED',
        self::NONE => 'NONE',
        self::ORIGINAL => 'ORIGINAL',
        self::GRAYSCALE => 'GRAYSCALE',
        self::MASK_BLACK => 'MASK_BLACK',
    ];

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


