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

namespace Google\Cloud\Container\V1\AutopilotCompatibilityIssue;

use UnexpectedValueException;

/**
 * The type of the reported issue.
 *
 * Protobuf type <code>google.container.v1.AutopilotCompatibilityIssue.IssueType</code>
 */
class IssueType
{
    /**
     * Default value, should not be used.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * Indicates that the issue is a known incompatibility between the
     * cluster and Autopilot mode.
     *
     * Generated from protobuf enum <code>INCOMPATIBILITY = 1;</code>
     */
    const INCOMPATIBILITY = 1;
    /**
     * Indicates the issue is an incompatibility if customers take no further
     * action to resolve.
     *
     * Generated from protobuf enum <code>ADDITIONAL_CONFIG_REQUIRED = 2;</code>
     */
    const ADDITIONAL_CONFIG_REQUIRED = 2;
    /**
     * Indicates the issue is not an incompatibility, but depending on the
     * workloads business logic, there is a potential that they won't work on
     * Autopilot.
     *
     * Generated from protobuf enum <code>PASSED_WITH_OPTIONAL_CONFIG = 3;</code>
     */
    const PASSED_WITH_OPTIONAL_CONFIG = 3;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::INCOMPATIBILITY => 'INCOMPATIBILITY',
        self::ADDITIONAL_CONFIG_REQUIRED => 'ADDITIONAL_CONFIG_REQUIRED',
        self::PASSED_WITH_OPTIONAL_CONFIG => 'PASSED_WITH_OPTIONAL_CONFIG',
    ];

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


