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

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

use UnexpectedValueException;

/**
 * Enum describing possible campaign lifecycle goal errors.
 *
 * Protobuf type <code>google.ads.googleads.v23.errors.CampaignLifecycleGoalErrorEnum.CampaignLifecycleGoalError</code>
 */
class CampaignLifecycleGoalError
{
    /**
     * 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;
    /**
     * Campaign is not specified.
     *
     * Generated from protobuf enum <code>CAMPAIGN_MISSING = 2;</code>
     */
    const CAMPAIGN_MISSING = 2;
    /**
     * Cannot find the specified campaign.
     *
     * Generated from protobuf enum <code>INVALID_CAMPAIGN = 3;</code>
     */
    const INVALID_CAMPAIGN = 3;
    /**
     * Optimization mode is unspecified or invalid.
     *
     * Generated from protobuf enum <code>CUSTOMER_ACQUISITION_INVALID_OPTIMIZATION_MODE = 4;</code>
     */
    const CUSTOMER_ACQUISITION_INVALID_OPTIMIZATION_MODE = 4;
    /**
     * The configured lifecycle goal setting is not compatible with the bidding
     * strategy the campaign is using. Specifically, BID_HIGHER_FOR_NEW_CUSTOMER
     * requires conversion-value based bidding strategy type such as
     * MAXIMIZE_CONVERSION_VALUE.
     *
     * Generated from protobuf enum <code>INCOMPATIBLE_BIDDING_STRATEGY = 5;</code>
     */
    const INCOMPATIBLE_BIDDING_STRATEGY = 5;
    /**
     * Lifecycle goals require the campaign to optimize towards purchase
     * conversion goal.
     *
     * Generated from protobuf enum <code>MISSING_PURCHASE_GOAL = 6;</code>
     */
    const MISSING_PURCHASE_GOAL = 6;
    /**
     * CampaignLifecycleGoal.customer_acquisition_goal_settings.value_settings.high_lifetime_value
     * is invalid or not allowed, such as when the specified value is smaller
     * than 0.01, when the optimization mode is not BID_HIGHER_FOR_NEW_CUSTOMER,
     * or when
     * CampaignLifecycleGoal.customer_acquisition_goal_settings.value_settings.high_lifetime_value
     * is specified smaller than/without
     * CampaignLifecycleGoal.customer_acquisition_goal_settings.value_settings.value.
     *
     * Generated from protobuf enum <code>CUSTOMER_ACQUISITION_INVALID_HIGH_LIFETIME_VALUE = 7;</code>
     */
    const CUSTOMER_ACQUISITION_INVALID_HIGH_LIFETIME_VALUE = 7;
    /**
     * Customer acquisition goal is not supported on this campaign type.
     *
     * Generated from protobuf enum <code>CUSTOMER_ACQUISITION_UNSUPPORTED_CAMPAIGN_TYPE = 8;</code>
     */
    const CUSTOMER_ACQUISITION_UNSUPPORTED_CAMPAIGN_TYPE = 8;
    /**
     * CampaignLifecycleGoal.customer_acquisition_goal_settings.value_settings.value
     * is invalid or not allowed, such as when the specified value is smaller
     * than 0.01, or when the optimization mode is not
     * BID_HIGHER_FOR_NEW_CUSTOMER.
     *
     * Generated from protobuf enum <code>CUSTOMER_ACQUISITION_INVALID_VALUE = 9;</code>
     */
    const CUSTOMER_ACQUISITION_INVALID_VALUE = 9;
    /**
     * To use BID_HIGHER_FOR_NEW_CUSTOMER mode, either
     * CampaignLifecycleGoal.customer_acquisition_goal_settings.value_settings.value
     * or CustomerLifecycleGoal.customer_acquisition_goal_value_settings.value
     * must have been specified. If a manager account is managing your account's
     * conversion tracking, then only the CustomerLifecycleGoal of that manager
     * account is used.
     *
     * Generated from protobuf enum <code>CUSTOMER_ACQUISITION_VALUE_MISSING = 10;</code>
     */
    const CUSTOMER_ACQUISITION_VALUE_MISSING = 10;
    /**
     * In order for a campaign to adopt the customer acquisition goal,
     * CustomerLifecycleGoal.lifecycle_goal_customer_definition_settings.existing_user_lists
     * must include active and accessible userlist with more than 1000 members
     * in the Search/Youtube network. If a manager account is managing your
     * account's conversion tracking, then only the CustomerLifecycleGoal of
     * that manager account is used. Also make sure that the manager account
     * shares audience segments with sub-accounts with continuous audience
     * sharing.
     *
     * Generated from protobuf enum <code>CUSTOMER_ACQUISITION_MISSING_EXISTING_CUSTOMER_DEFINITION = 11;</code>
     */
    const CUSTOMER_ACQUISITION_MISSING_EXISTING_CUSTOMER_DEFINITION = 11;
    /**
     * In order for a campaign to adopt the customer acquisition goal with high
     * lifetime value optimization,
     * CustomerLifecycleGoal.lifecycle_goal_customer_definition_settings.high_lifetime_value_user_lists
     * must include active and accessible userlist with more than 1000 members
     * in the Search/Youtube network. If a manager account is managing your
     * account's conversion tracking, then only the CustomerLifecycleGoal of
     * that manager account is used. Also make sure that the manager account
     * shares audience segments with sub-accounts using continuous audience
     * sharing.
     *
     * Generated from protobuf enum <code>CUSTOMER_ACQUISITION_MISSING_HIGH_VALUE_CUSTOMER_DEFINITION = 12;</code>
     */
    const CUSTOMER_ACQUISITION_MISSING_HIGH_VALUE_CUSTOMER_DEFINITION = 12;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::CAMPAIGN_MISSING => 'CAMPAIGN_MISSING',
        self::INVALID_CAMPAIGN => 'INVALID_CAMPAIGN',
        self::CUSTOMER_ACQUISITION_INVALID_OPTIMIZATION_MODE => 'CUSTOMER_ACQUISITION_INVALID_OPTIMIZATION_MODE',
        self::INCOMPATIBLE_BIDDING_STRATEGY => 'INCOMPATIBLE_BIDDING_STRATEGY',
        self::MISSING_PURCHASE_GOAL => 'MISSING_PURCHASE_GOAL',
        self::CUSTOMER_ACQUISITION_INVALID_HIGH_LIFETIME_VALUE => 'CUSTOMER_ACQUISITION_INVALID_HIGH_LIFETIME_VALUE',
        self::CUSTOMER_ACQUISITION_UNSUPPORTED_CAMPAIGN_TYPE => 'CUSTOMER_ACQUISITION_UNSUPPORTED_CAMPAIGN_TYPE',
        self::CUSTOMER_ACQUISITION_INVALID_VALUE => 'CUSTOMER_ACQUISITION_INVALID_VALUE',
        self::CUSTOMER_ACQUISITION_VALUE_MISSING => 'CUSTOMER_ACQUISITION_VALUE_MISSING',
        self::CUSTOMER_ACQUISITION_MISSING_EXISTING_CUSTOMER_DEFINITION => 'CUSTOMER_ACQUISITION_MISSING_EXISTING_CUSTOMER_DEFINITION',
        self::CUSTOMER_ACQUISITION_MISSING_HIGH_VALUE_CUSTOMER_DEFINITION => 'CUSTOMER_ACQUISITION_MISSING_HIGH_VALUE_CUSTOMER_DEFINITION',
    ];

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

