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

namespace Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig;

use UnexpectedValueException;

/**
 * The mode of inclusion when running Asset Discovery.
 * Asset discovery can be limited by explicitly identifying projects to be
 * included or excluded. If INCLUDE_ONLY is set, then only those projects
 * within the organization and their children are discovered during asset
 * discovery. If EXCLUDE is set, then projects that don't match those
 * projects are discovered during asset discovery. If neither are set, then
 * all projects within the organization are discovered during asset
 * discovery.
 *
 * Protobuf type <code>google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode</code>
 */
class InclusionMode
{
    /**
     * Unspecified. Setting the mode with this value will disable
     * inclusion/exclusion filtering for Asset Discovery.
     *
     * Generated from protobuf enum <code>INCLUSION_MODE_UNSPECIFIED = 0;</code>
     */
    const INCLUSION_MODE_UNSPECIFIED = 0;
    /**
     * Asset Discovery will capture only the resources within the projects
     * specified. All other resources will be ignored.
     *
     * Generated from protobuf enum <code>INCLUDE_ONLY = 1;</code>
     */
    const INCLUDE_ONLY = 1;
    /**
     * Asset Discovery will ignore all resources under the projects specified.
     * All other resources will be retrieved.
     *
     * Generated from protobuf enum <code>EXCLUDE = 2;</code>
     */
    const EXCLUDE = 2;

    private static $valueToName = [
        self::INCLUSION_MODE_UNSPECIFIED => 'INCLUSION_MODE_UNSPECIFIED',
        self::INCLUDE_ONLY => 'INCLUDE_ONLY',
        self::EXCLUDE => 'EXCLUDE',
    ];

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

