<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/gkeconnect/gateway/v1beta1/control.proto

namespace Google\Cloud\GkeConnect\Gateway\V1beta1\GenerateCredentialsRequest;

use UnexpectedValueException;

/**
 * Operating systems requiring specialized kubeconfigs.
 *
 * Protobuf type <code>google.cloud.gkeconnect.gateway.v1beta1.GenerateCredentialsRequest.OperatingSystem</code>
 */
class OperatingSystem
{
    /**
     * Generates a kubeconfig that works for all operating systems not defined
     * below.
     *
     * Generated from protobuf enum <code>OPERATING_SYSTEM_UNSPECIFIED = 0;</code>
     */
    const OPERATING_SYSTEM_UNSPECIFIED = 0;
    /**
     * Generates a kubeconfig that is specifically designed to work with
     * Windows.
     *
     * Generated from protobuf enum <code>OPERATING_SYSTEM_WINDOWS = 1;</code>
     */
    const OPERATING_SYSTEM_WINDOWS = 1;

    private static $valueToName = [
        self::OPERATING_SYSTEM_UNSPECIFIED => 'OPERATING_SYSTEM_UNSPECIFIED',
        self::OPERATING_SYSTEM_WINDOWS => 'OPERATING_SYSTEM_WINDOWS',
    ];

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


