<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/databasecenter/v1beta/signals.proto

namespace Google\Cloud\DatabaseCenter\V1beta;

use UnexpectedValueException;

/**
 * Represents the source system from where a signal comes from.
 * More enum values are expected to be added as needed.
 *
 * Protobuf type <code>google.cloud.databasecenter.v1beta.SignalSource</code>
 */
class SignalSource
{
    /**
     * Unspecified.
     *
     * Generated from protobuf enum <code>SIGNAL_SOURCE_UNSPECIFIED = 0;</code>
     */
    const SIGNAL_SOURCE_UNSPECIFIED = 0;
    /**
     * Signal comes from resource metadata.
     *
     * Generated from protobuf enum <code>SIGNAL_SOURCE_RESOURCE_METADATA = 1;</code>
     */
    const SIGNAL_SOURCE_RESOURCE_METADATA = 1;
    /**
     * Signal comes from SCC findings.
     *
     * Generated from protobuf enum <code>SIGNAL_SOURCE_SECURITY_FINDINGS = 2;</code>
     */
    const SIGNAL_SOURCE_SECURITY_FINDINGS = 2;
    /**
     * Signal comes from recommender hub.
     *
     * Generated from protobuf enum <code>SIGNAL_SOURCE_RECOMMENDER = 3;</code>
     */
    const SIGNAL_SOURCE_RECOMMENDER = 3;
    /**
     * Signal comes from modern observability platform.
     *
     * Generated from protobuf enum <code>SIGNAL_SOURCE_MODERN_OBSERVABILITY = 4;</code>
     */
    const SIGNAL_SOURCE_MODERN_OBSERVABILITY = 4;

    private static $valueToName = [
        self::SIGNAL_SOURCE_UNSPECIFIED => 'SIGNAL_SOURCE_UNSPECIFIED',
        self::SIGNAL_SOURCE_RESOURCE_METADATA => 'SIGNAL_SOURCE_RESOURCE_METADATA',
        self::SIGNAL_SOURCE_SECURITY_FINDINGS => 'SIGNAL_SOURCE_SECURITY_FINDINGS',
        self::SIGNAL_SOURCE_RECOMMENDER => 'SIGNAL_SOURCE_RECOMMENDER',
        self::SIGNAL_SOURCE_MODERN_OBSERVABILITY => 'SIGNAL_SOURCE_MODERN_OBSERVABILITY',
    ];

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

