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

namespace Google\Cloud\Compute\V1\FutureReservation;

use UnexpectedValueException;

/**
 * Maintenance information for this reservation
 *
 * Protobuf type <code>google.cloud.compute.v1.FutureReservation.SchedulingType</code>
 */
class SchedulingType
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_SCHEDULING_TYPE = 0;</code>
     */
    const UNDEFINED_SCHEDULING_TYPE = 0;
    /**
     * Maintenance on all reserved instances in the reservation is synchronized.
     *
     * Generated from protobuf enum <code>GROUPED = 474540862;</code>
     */
    const GROUPED = 474540862;
    /**
     * Unknown maintenance type.
     *
     * Generated from protobuf enum <code>GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447183678;</code>
     */
    const GROUP_MAINTENANCE_TYPE_UNSPECIFIED = 447183678;
    /**
     * Maintenance is not synchronized for this reservation. Instead, each
     * instance has its own maintenance window.
     *
     * Generated from protobuf enum <code>INDEPENDENT = 127011674;</code>
     */
    const INDEPENDENT = 127011674;

    private static $valueToName = [
        self::UNDEFINED_SCHEDULING_TYPE => 'UNDEFINED_SCHEDULING_TYPE',
        self::GROUPED => 'GROUPED',
        self::GROUP_MAINTENANCE_TYPE_UNSPECIFIED => 'GROUP_MAINTENANCE_TYPE_UNSPECIFIED',
        self::INDEPENDENT => 'INDEPENDENT',
    ];

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


