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

namespace Google\Cloud\Channel\V1\CloudIdentityInfo;

use UnexpectedValueException;

/**
 * CustomerType of the customer
 *
 * Protobuf type <code>google.cloud.channel.v1.CloudIdentityInfo.CustomerType</code>
 */
class CustomerType
{
    /**
     * Default value. This state doesn't show unless an error occurs.
     *
     * Generated from protobuf enum <code>CUSTOMER_TYPE_UNSPECIFIED = 0;</code>
     */
    const CUSTOMER_TYPE_UNSPECIFIED = 0;
    /**
     * Domain-owning customer which needs domain verification to use services.
     *
     * Generated from protobuf enum <code>DOMAIN = 1;</code>
     */
    const DOMAIN = 1;
    /**
     * Team customer which needs email verification to use services.
     *
     * Generated from protobuf enum <code>TEAM = 2;</code>
     */
    const TEAM = 2;

    private static $valueToName = [
        self::CUSTOMER_TYPE_UNSPECIFIED => 'CUSTOMER_TYPE_UNSPECIFIED',
        self::DOMAIN => 'DOMAIN',
        self::TEAM => 'TEAM',
    ];

    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(CustomerType::class, \Google\Cloud\Channel\V1\CloudIdentityInfo_CustomerType::class);

