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

namespace Google\Cloud\Container\V1\UsableSubnetworkSecondaryRange;

use UnexpectedValueException;

/**
 * Status shows the current usage of a secondary IP range.
 *
 * Protobuf type <code>google.container.v1.UsableSubnetworkSecondaryRange.Status</code>
 */
class Status
{
    /**
     * UNKNOWN is the zero value of the Status enum. It's not a valid status.
     *
     * Generated from protobuf enum <code>UNKNOWN = 0;</code>
     */
    const UNKNOWN = 0;
    /**
     * UNUSED denotes that this range is unclaimed by any cluster.
     *
     * Generated from protobuf enum <code>UNUSED = 1;</code>
     */
    const UNUSED = 1;
    /**
     * IN_USE_SERVICE denotes that this range is claimed by a cluster for
     * services. It cannot be used for other clusters.
     *
     * Generated from protobuf enum <code>IN_USE_SERVICE = 2;</code>
     */
    const IN_USE_SERVICE = 2;
    /**
     * IN_USE_SHAREABLE_POD denotes this range was created by the network admin
     * and is currently claimed by a cluster for pods. It can only be used by
     * other clusters as a pod range.
     *
     * Generated from protobuf enum <code>IN_USE_SHAREABLE_POD = 3;</code>
     */
    const IN_USE_SHAREABLE_POD = 3;
    /**
     * IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed
     * for pods. It cannot be used for other clusters.
     *
     * Generated from protobuf enum <code>IN_USE_MANAGED_POD = 4;</code>
     */
    const IN_USE_MANAGED_POD = 4;

    private static $valueToName = [
        self::UNKNOWN => 'UNKNOWN',
        self::UNUSED => 'UNUSED',
        self::IN_USE_SERVICE => 'IN_USE_SERVICE',
        self::IN_USE_SHAREABLE_POD => 'IN_USE_SHAREABLE_POD',
        self::IN_USE_MANAGED_POD => 'IN_USE_MANAGED_POD',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Status::class, \Google\Cloud\Container\V1\UsableSubnetworkSecondaryRange_Status::class);

