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

namespace Google\Cloud\Dataplex\V1;

use UnexpectedValueException;

/**
 * View for controlling which parts of an entry are to be returned.
 *
 * Protobuf type <code>google.cloud.dataplex.v1.EntryView</code>
 */
class EntryView
{
    /**
     * Unspecified EntryView. Defaults to FULL.
     *
     * Generated from protobuf enum <code>ENTRY_VIEW_UNSPECIFIED = 0;</code>
     */
    const ENTRY_VIEW_UNSPECIFIED = 0;
    /**
     * Returns entry only, without aspects.
     *
     * Generated from protobuf enum <code>BASIC = 1;</code>
     */
    const BASIC = 1;
    /**
     * Returns all required aspects as well as the keys of all non-required
     * aspects.
     *
     * Generated from protobuf enum <code>FULL = 2;</code>
     */
    const FULL = 2;
    /**
     * Returns aspects matching custom fields in GetEntryRequest. If the number of
     * aspects would exceed 100, the first 100 will be returned.
     *
     * Generated from protobuf enum <code>CUSTOM = 3;</code>
     */
    const CUSTOM = 3;
    /**
     * Returns all aspects. If the number of aspects would exceed 100, the first
     * 100 will be returned.
     *
     * Generated from protobuf enum <code>ALL = 4;</code>
     */
    const ALL = 4;

    private static $valueToName = [
        self::ENTRY_VIEW_UNSPECIFIED => 'ENTRY_VIEW_UNSPECIFIED',
        self::BASIC => 'BASIC',
        self::FULL => 'FULL',
        self::CUSTOM => 'CUSTOM',
        self::ALL => 'ALL',
    ];

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

