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

namespace Google\Cloud\WebSecurityScanner\V1beta\ScanConfig;

use UnexpectedValueException;

/**
 * Controls export of scan configurations and results to Cloud Security
 * Command Center.
 *
 * Protobuf type <code>google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter</code>
 */
class ExportToSecurityCommandCenter
{
    /**
     * Use default, which is ENABLED.
     *
     * Generated from protobuf enum <code>EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0;</code>
     */
    const EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0;
    /**
     * Export results of this scan to Cloud Security Command Center.
     *
     * Generated from protobuf enum <code>ENABLED = 1;</code>
     */
    const ENABLED = 1;
    /**
     * Do not export results of this scan to Cloud Security Command Center.
     *
     * Generated from protobuf enum <code>DISABLED = 2;</code>
     */
    const DISABLED = 2;

    private static $valueToName = [
        self::EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED => 'EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED',
        self::ENABLED => 'ENABLED',
        self::DISABLED => 'DISABLED',
    ];

    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(ExportToSecurityCommandCenter::class, \Google\Cloud\WebSecurityScanner\V1beta\ScanConfig_ExportToSecurityCommandCenter::class);

