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

namespace Google\Cloud\AIPlatform\V1;

use UnexpectedValueException;

/**
 * View enumeration of PublisherModel.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.PublisherModelView</code>
 */
class PublisherModelView
{
    /**
     * The default / unset value. The API will default to the BASIC view.
     *
     * Generated from protobuf enum <code>PUBLISHER_MODEL_VIEW_UNSPECIFIED = 0;</code>
     */
    const PUBLISHER_MODEL_VIEW_UNSPECIFIED = 0;
    /**
     * Include basic metadata about the publisher model, but not the full
     * contents.
     *
     * Generated from protobuf enum <code>PUBLISHER_MODEL_VIEW_BASIC = 1;</code>
     */
    const PUBLISHER_MODEL_VIEW_BASIC = 1;
    /**
     * Include everything.
     *
     * Generated from protobuf enum <code>PUBLISHER_MODEL_VIEW_FULL = 2;</code>
     */
    const PUBLISHER_MODEL_VIEW_FULL = 2;
    /**
     * Include: VersionId, ModelVersionExternalName, and SupportedActions.
     *
     * Generated from protobuf enum <code>PUBLISHER_MODEL_VERSION_VIEW_BASIC = 3;</code>
     */
    const PUBLISHER_MODEL_VERSION_VIEW_BASIC = 3;

    private static $valueToName = [
        self::PUBLISHER_MODEL_VIEW_UNSPECIFIED => 'PUBLISHER_MODEL_VIEW_UNSPECIFIED',
        self::PUBLISHER_MODEL_VIEW_BASIC => 'PUBLISHER_MODEL_VIEW_BASIC',
        self::PUBLISHER_MODEL_VIEW_FULL => 'PUBLISHER_MODEL_VIEW_FULL',
        self::PUBLISHER_MODEL_VERSION_VIEW_BASIC => 'PUBLISHER_MODEL_VERSION_VIEW_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);
    }
}

