<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v23/errors/user_list_customer_type_error.proto

namespace Google\Ads\GoogleAds\V23\Errors\UserListCustomerTypeErrorEnum;

use UnexpectedValueException;

/**
 * Enum describing possible user list customer type errors.
 *
 * Protobuf type <code>google.ads.googleads.v23.errors.UserListCustomerTypeErrorEnum.UserListCustomerTypeError</code>
 */
class UserListCustomerTypeError
{
    /**
     * Enum unspecified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * The received error code is not known in this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * Cannot add the conflicting customer types to the same user list.
     * Conflicting labels:
     * 1. Purchasers - Converted Leads
     * 2. Purchasers - Qualified Leads
     * 3. Purchasers - Cart Abandoners
     * 4. Qualified Leads - Converted Leads
     * 5. Disengaged customers - Converted Leads
     * 6. Disengaged customers - Qualified Leads
     * 7. Disengaged customers- Cart Abandoners
     *
     * Generated from protobuf enum <code>CONFLICTING_CUSTOMER_TYPES = 2;</code>
     */
    const CONFLICTING_CUSTOMER_TYPES = 2;
    /**
     * The account does not have access to the user list.
     *
     * Generated from protobuf enum <code>NO_ACCESS_TO_USER_LIST = 3;</code>
     */
    const NO_ACCESS_TO_USER_LIST = 3;
    /**
     * The given user list is not eligible for applying customer types.
     * The user list must belong to one of the following types: CRM_BASED,
     * RULE_BASED, ADVERTISER_DATA_MODEL_BASED, GCN.
     *
     * Generated from protobuf enum <code>USERLIST_NOT_ELIGIBLE = 4;</code>
     */
    const USERLIST_NOT_ELIGIBLE = 4;
    /**
     * To edit the user list customer type, conversion tracking must be
     * enabled in your account. If cross-tracking is enabled, your account must
     * be a MCC manager account to modify user list customer types. More info at
     * https://support.google.com/google-ads/answer/3030657
     *
     * Generated from protobuf enum <code>CONVERSION_TRACKING_NOT_ENABLED_OR_NOT_MCC_MANAGER_ACCOUNT = 5;</code>
     */
    const CONVERSION_TRACKING_NOT_ENABLED_OR_NOT_MCC_MANAGER_ACCOUNT = 5;
    /**
     * Too many user lists for the customer type.
     *
     * Generated from protobuf enum <code>TOO_MANY_USER_LISTS_FOR_THE_CUSTOMER_TYPE = 6;</code>
     */
    const TOO_MANY_USER_LISTS_FOR_THE_CUSTOMER_TYPE = 6;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::CONFLICTING_CUSTOMER_TYPES => 'CONFLICTING_CUSTOMER_TYPES',
        self::NO_ACCESS_TO_USER_LIST => 'NO_ACCESS_TO_USER_LIST',
        self::USERLIST_NOT_ELIGIBLE => 'USERLIST_NOT_ELIGIBLE',
        self::CONVERSION_TRACKING_NOT_ENABLED_OR_NOT_MCC_MANAGER_ACCOUNT => 'CONVERSION_TRACKING_NOT_ENABLED_OR_NOT_MCC_MANAGER_ACCOUNT',
        self::TOO_MANY_USER_LISTS_FOR_THE_CUSTOMER_TYPE => 'TOO_MANY_USER_LISTS_FOR_THE_CUSTOMER_TYPE',
    ];

    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(UserListCustomerTypeError::class, \Google\Ads\GoogleAds\V23\Errors\UserListCustomerTypeErrorEnum_UserListCustomerTypeError::class);

