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

namespace Google\Cloud\Asset\V1\AnalyzeMoveRequest;

use UnexpectedValueException;

/**
 * View enum for supporting partial analysis responses.
 *
 * Protobuf type <code>google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView</code>
 */
class AnalysisView
{
    /**
     * The default/unset value.
     * The API will default to the FULL view.
     *
     * Generated from protobuf enum <code>ANALYSIS_VIEW_UNSPECIFIED = 0;</code>
     */
    const ANALYSIS_VIEW_UNSPECIFIED = 0;
    /**
     * Full analysis including all level of impacts of the specified resource
     * move.
     *
     * Generated from protobuf enum <code>FULL = 1;</code>
     */
    const FULL = 1;
    /**
     * Basic analysis only including blockers which will prevent the specified
     * resource move at runtime.
     *
     * Generated from protobuf enum <code>BASIC = 2;</code>
     */
    const BASIC = 2;

    private static $valueToName = [
        self::ANALYSIS_VIEW_UNSPECIFIED => 'ANALYSIS_VIEW_UNSPECIFIED',
        self::FULL => 'FULL',
        self::BASIC => 'BASIC',
    ];

    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(AnalysisView::class, \Google\Cloud\Asset\V1\AnalyzeMoveRequest_AnalysisView::class);

