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

namespace Google\Ads\DataManager\V1\PseudonymousIdInfo;

use UnexpectedValueException;

/**
 * Sync status of the user list.
 *
 * Protobuf type <code>google.ads.datamanager.v1.PseudonymousIdInfo.SyncStatus</code>
 */
class SyncStatus
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>SYNC_STATUS_UNSPECIFIED = 0;</code>
     */
    const SYNC_STATUS_UNSPECIFIED = 0;
    /**
     * The user list has been created as a placeholder. List contents and/or
     * metadata are still being synced. The user list is not ready for use.
     *
     * Generated from protobuf enum <code>CREATED = 1;</code>
     */
    const CREATED = 1;
    /**
     * The user list is ready for use. Contents and cookies have been synced
     * correctly.
     *
     * Generated from protobuf enum <code>READY_FOR_USE = 2;</code>
     */
    const READY_FOR_USE = 2;
    /**
     * An error has occurred syncing user list contents and/or metadata. The
     * user list cannot be used.
     *
     * Generated from protobuf enum <code>FAILED = 3;</code>
     */
    const FAILED = 3;

    private static $valueToName = [
        self::SYNC_STATUS_UNSPECIFIED => 'SYNC_STATUS_UNSPECIFIED',
        self::CREATED => 'CREATED',
        self::READY_FOR_USE => 'READY_FOR_USE',
        self::FAILED => 'FAILED',
    ];

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

