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

namespace Google\Cloud\Compute\V1\ResourcePolicyWeeklyCycleDayOfWeek;

use UnexpectedValueException;

/**
 * Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
 *
 * Protobuf type <code>google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek.Day</code>
 */
class Day
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_DAY = 0;</code>
     */
    const UNDEFINED_DAY = 0;
    /**
     * Generated from protobuf enum <code>FRIDAY = 202963295;</code>
     */
    const FRIDAY = 202963295;
    /**
     * Generated from protobuf enum <code>INVALID = 261848535;</code>
     */
    const INVALID = 261848535;
    /**
     * Generated from protobuf enum <code>MONDAY = 132310288;</code>
     */
    const MONDAY = 132310288;
    /**
     * Generated from protobuf enum <code>SATURDAY = 10602425;</code>
     */
    const SATURDAY = 10602425;
    /**
     * Generated from protobuf enum <code>SUNDAY = 41190864;</code>
     */
    const SUNDAY = 41190864;
    /**
     * Generated from protobuf enum <code>THURSDAY = 207198682;</code>
     */
    const THURSDAY = 207198682;
    /**
     * Generated from protobuf enum <code>TUESDAY = 9074221;</code>
     */
    const TUESDAY = 9074221;
    /**
     * Generated from protobuf enum <code>WEDNESDAY = 153593654;</code>
     */
    const WEDNESDAY = 153593654;

    private static $valueToName = [
        self::UNDEFINED_DAY => 'UNDEFINED_DAY',
        self::FRIDAY => 'FRIDAY',
        self::INVALID => 'INVALID',
        self::MONDAY => 'MONDAY',
        self::SATURDAY => 'SATURDAY',
        self::SUNDAY => 'SUNDAY',
        self::THURSDAY => 'THURSDAY',
        self::TUESDAY => 'TUESDAY',
        self::WEDNESDAY => 'WEDNESDAY',
    ];

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


