<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/v2/bigtable.proto

namespace Google\Cloud\Bigtable\V2\ReadRowsRequest;

use UnexpectedValueException;

/**
 * The desired view into RequestStats that should be returned in the response.
 * See also: RequestStats message.
 *
 * Protobuf type <code>google.bigtable.v2.ReadRowsRequest.RequestStatsView</code>
 */
class RequestStatsView
{
    /**
     * The default / unset value. The API will default to the NONE option below.
     *
     * Generated from protobuf enum <code>REQUEST_STATS_VIEW_UNSPECIFIED = 0;</code>
     */
    const REQUEST_STATS_VIEW_UNSPECIFIED = 0;
    /**
     * Do not include any RequestStats in the response. This will leave the
     * RequestStats embedded message unset in the response.
     *
     * Generated from protobuf enum <code>REQUEST_STATS_NONE = 1;</code>
     */
    const REQUEST_STATS_NONE = 1;
    /**
     * Include the full set of available RequestStats in the response,
     * applicable to this read.
     *
     * Generated from protobuf enum <code>REQUEST_STATS_FULL = 2;</code>
     */
    const REQUEST_STATS_FULL = 2;

    private static $valueToName = [
        self::REQUEST_STATS_VIEW_UNSPECIFIED => 'REQUEST_STATS_VIEW_UNSPECIFIED',
        self::REQUEST_STATS_NONE => 'REQUEST_STATS_NONE',
        self::REQUEST_STATS_FULL => 'REQUEST_STATS_FULL',
    ];

    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(RequestStatsView::class, \Google\Cloud\Bigtable\V2\ReadRowsRequest_RequestStatsView::class);

