<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/networkmanagement/v1/vpc_flow_logs_config.proto

namespace Google\Cloud\NetworkManagement\V1\VpcFlowLogsConfig;

use UnexpectedValueException;

/**
 * Determines whether to include cross project annotations in the logs.
 * Project configurations will always have CROSS_PROJECT_METADATA_DISABLED.
 *
 * Protobuf type <code>google.cloud.networkmanagement.v1.VpcFlowLogsConfig.CrossProjectMetadata</code>
 */
class CrossProjectMetadata
{
    /**
     * If not specified, the default is CROSS_PROJECT_METADATA_ENABLED.
     *
     * Generated from protobuf enum <code>CROSS_PROJECT_METADATA_UNSPECIFIED = 0;</code>
     */
    const CROSS_PROJECT_METADATA_UNSPECIFIED = 0;
    /**
     * When CROSS_PROJECT_METADATA_ENABLED, metadata from other projects will be
     * included in the logs.
     *
     * Generated from protobuf enum <code>CROSS_PROJECT_METADATA_ENABLED = 1;</code>
     */
    const CROSS_PROJECT_METADATA_ENABLED = 1;
    /**
     * When CROSS_PROJECT_METADATA_DISABLED, metadata from other projects will
     * not be included in the logs.
     *
     * Generated from protobuf enum <code>CROSS_PROJECT_METADATA_DISABLED = 2;</code>
     */
    const CROSS_PROJECT_METADATA_DISABLED = 2;

    private static $valueToName = [
        self::CROSS_PROJECT_METADATA_UNSPECIFIED => 'CROSS_PROJECT_METADATA_UNSPECIFIED',
        self::CROSS_PROJECT_METADATA_ENABLED => 'CROSS_PROJECT_METADATA_ENABLED',
        self::CROSS_PROJECT_METADATA_DISABLED => 'CROSS_PROJECT_METADATA_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);
    }
}


