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

namespace Google\Cloud\DataCatalog\V1\ReconcileTagsMetadata;

use UnexpectedValueException;

/**
 * Enum holding possible states of the reconciliation operation.
 *
 * Protobuf type <code>google.cloud.datacatalog.v1.ReconcileTagsMetadata.ReconciliationState</code>
 */
class ReconciliationState
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>RECONCILIATION_STATE_UNSPECIFIED = 0;</code>
     */
    const RECONCILIATION_STATE_UNSPECIFIED = 0;
    /**
     * The reconciliation has been queued and awaits for execution.
     *
     * Generated from protobuf enum <code>RECONCILIATION_QUEUED = 1;</code>
     */
    const RECONCILIATION_QUEUED = 1;
    /**
     * The reconciliation is in progress.
     *
     * Generated from protobuf enum <code>RECONCILIATION_IN_PROGRESS = 2;</code>
     */
    const RECONCILIATION_IN_PROGRESS = 2;
    /**
     * The reconciliation has been finished.
     *
     * Generated from protobuf enum <code>RECONCILIATION_DONE = 3;</code>
     */
    const RECONCILIATION_DONE = 3;

    private static $valueToName = [
        self::RECONCILIATION_STATE_UNSPECIFIED => 'RECONCILIATION_STATE_UNSPECIFIED',
        self::RECONCILIATION_QUEUED => 'RECONCILIATION_QUEUED',
        self::RECONCILIATION_IN_PROGRESS => 'RECONCILIATION_IN_PROGRESS',
        self::RECONCILIATION_DONE => 'RECONCILIATION_DONE',
    ];

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

