<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/securitycenter/v2/group_membership.proto

namespace Google\Cloud\SecurityCenter\V2\GroupMembership;

use UnexpectedValueException;

/**
 * Possible types of groups.
 *
 * Protobuf type <code>google.cloud.securitycenter.v2.GroupMembership.GroupType</code>
 */
class GroupType
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>GROUP_TYPE_UNSPECIFIED = 0;</code>
     */
    const GROUP_TYPE_UNSPECIFIED = 0;
    /**
     * Group represents a toxic combination.
     *
     * Generated from protobuf enum <code>GROUP_TYPE_TOXIC_COMBINATION = 1;</code>
     */
    const GROUP_TYPE_TOXIC_COMBINATION = 1;

    private static $valueToName = [
        self::GROUP_TYPE_UNSPECIFIED => 'GROUP_TYPE_UNSPECIFIED',
        self::GROUP_TYPE_TOXIC_COMBINATION => 'GROUP_TYPE_TOXIC_COMBINATION',
    ];

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


