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

namespace Google\Cloud\GkeHub\V1beta1\Membership;

use UnexpectedValueException;

/**
 * Specifies the infrastructure type of a Membership. Infrastructure type is
 * used by Hub to control infrastructure-specific behavior, including pricing.
 * Each GKE distribution (on-GCP, on-Prem, on-X,...) will set this field
 * automatically, but Attached Clusters customers should specify a type
 * during registration.
 *
 * Protobuf type <code>google.cloud.gkehub.v1beta1.Membership.InfrastructureType</code>
 */
class InfrastructureType
{
    /**
     * No type was specified. Some Hub functionality may require a type be
     * specified, and will not support Memberships with this value.
     *
     * Generated from protobuf enum <code>INFRASTRUCTURE_TYPE_UNSPECIFIED = 0;</code>
     */
    const INFRASTRUCTURE_TYPE_UNSPECIFIED = 0;
    /**
     * Private infrastructure that is owned or operated by customer. This
     * includes GKE distributions such as GKE-OnPrem and GKE-OnBareMetal.
     *
     * Generated from protobuf enum <code>ON_PREM = 1;</code>
     */
    const ON_PREM = 1;
    /**
     * Public cloud infrastructure.
     *
     * Generated from protobuf enum <code>MULTI_CLOUD = 2;</code>
     */
    const MULTI_CLOUD = 2;

    private static $valueToName = [
        self::INFRASTRUCTURE_TYPE_UNSPECIFIED => 'INFRASTRUCTURE_TYPE_UNSPECIFIED',
        self::ON_PREM => 'ON_PREM',
        self::MULTI_CLOUD => 'MULTI_CLOUD',
    ];

    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(InfrastructureType::class, \Google\Cloud\GkeHub\V1beta1\Membership_InfrastructureType::class);

