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

namespace Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig;

use UnexpectedValueException;

/**
 * The type of events.
 *
 * Protobuf type <code>google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType</code>
 */
class EventType
{
    /**
     * Unspecified event type.
     *
     * Generated from protobuf enum <code>EVENT_TYPE_UNSPECIFIED = 0;</code>
     */
    const EVENT_TYPE_UNSPECIFIED = 0;
    /**
     * Events for findings.
     *
     * Generated from protobuf enum <code>FINDING = 1;</code>
     */
    const FINDING = 1;

    private static $valueToName = [
        self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED',
        self::FINDING => 'FINDING',
    ];

    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(EventType::class, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig_EventType::class);

