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

namespace Google\Cloud\Compute\V1\ReservationsPerformMaintenanceRequest;

use UnexpectedValueException;

/**
 * Specifies if all, running or unused hosts are in scope for this request.
 *
 * Protobuf type <code>google.cloud.compute.v1.ReservationsPerformMaintenanceRequest.MaintenanceScope</code>
 */
class MaintenanceScope
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_MAINTENANCE_SCOPE = 0;</code>
     */
    const UNDEFINED_MAINTENANCE_SCOPE = 0;
    /**
     * Trigger maintenance for all hosts belonging to this reservation irrespective of whether VMs are running on them or not.
     *
     * Generated from protobuf enum <code>ALL = 64897;</code>
     */
    const ALL = 64897;
    /**
     * Internal only
     *
     * Generated from protobuf enum <code>MAINTENANCE_SCOPE_UNSPECIFIED = 78827328;</code>
     */
    const MAINTENANCE_SCOPE_UNSPECIFIED = 78827328;
    /**
     * Trigger maintenance only on the hosts belonging to this reservation which have VMs running on them.
     *
     * Generated from protobuf enum <code>RUNNING_VMS = 535770588;</code>
     */
    const RUNNING_VMS = 535770588;
    /**
     * Trigger maintenance only on the hosts belonging to this reservation which do not have any VMs running on them. This is not allowed for Standard ExR
     *
     * Generated from protobuf enum <code>UNUSED_CAPACITY = 212724995;</code>
     */
    const UNUSED_CAPACITY = 212724995;

    private static $valueToName = [
        self::UNDEFINED_MAINTENANCE_SCOPE => 'UNDEFINED_MAINTENANCE_SCOPE',
        self::ALL => 'ALL',
        self::MAINTENANCE_SCOPE_UNSPECIFIED => 'MAINTENANCE_SCOPE_UNSPECIFIED',
        self::RUNNING_VMS => 'RUNNING_VMS',
        self::UNUSED_CAPACITY => 'UNUSED_CAPACITY',
    ];

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


