<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/capacityplanner/v1beta/usage_service.proto

namespace Google\Cloud\CapacityPlanner\V1beta\QueryReservationsRequest;

use UnexpectedValueException;

/**
 * The form in which data of reservations should be returned.
 * In case of AGGREGATED, timeseries for selected reservations is returned. If
 * unspecified, all levels are included.
 *
 * Protobuf type <code>google.cloud.capacityplanner.v1beta.QueryReservationsRequest.ReservationDataLevel</code>
 */
class ReservationDataLevel
{
    /**
     * No reservation data level specified.
     *
     * Generated from protobuf enum <code>RESERVATION_DATA_LEVEL_UNSPECIFIED = 0;</code>
     */
    const RESERVATION_DATA_LEVEL_UNSPECIFIED = 0;
    /**
     * aggregated reservations data in a timeseries or aggregation over
     * timeseries.
     *
     * Generated from protobuf enum <code>RESERVATION_DATA_LEVEL_AGGREGATED = 1;</code>
     */
    const RESERVATION_DATA_LEVEL_AGGREGATED = 1;
    /**
     * per reservation detail which is equivalent of Arcus Future Reservation or
     * Allocation with only limited fields which are useful for Capacity
     * Planning.
     *
     * Generated from protobuf enum <code>RESERVATION_DATA_LEVEL_PER_RESERVATION = 2;</code>
     */
    const RESERVATION_DATA_LEVEL_PER_RESERVATION = 2;

    private static $valueToName = [
        self::RESERVATION_DATA_LEVEL_UNSPECIFIED => 'RESERVATION_DATA_LEVEL_UNSPECIFIED',
        self::RESERVATION_DATA_LEVEL_AGGREGATED => 'RESERVATION_DATA_LEVEL_AGGREGATED',
        self::RESERVATION_DATA_LEVEL_PER_RESERVATION => 'RESERVATION_DATA_LEVEL_PER_RESERVATION',
    ];

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


