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

namespace Google\Cloud\Dataplex\V1\DataScanEvent;

use UnexpectedValueException;

/**
 * The scope of job for the data scan.
 *
 * Protobuf type <code>google.cloud.dataplex.v1.DataScanEvent.Scope</code>
 */
class Scope
{
    /**
     * An unspecified scope type.
     *
     * Generated from protobuf enum <code>SCOPE_UNSPECIFIED = 0;</code>
     */
    const SCOPE_UNSPECIFIED = 0;
    /**
     * Data scan runs on all of the data.
     *
     * Generated from protobuf enum <code>FULL = 1;</code>
     */
    const FULL = 1;
    /**
     * Data scan runs on incremental data.
     *
     * Generated from protobuf enum <code>INCREMENTAL = 2;</code>
     */
    const INCREMENTAL = 2;

    private static $valueToName = [
        self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED',
        self::FULL => 'FULL',
        self::INCREMENTAL => 'INCREMENTAL',
    ];

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


