<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v21/enums/ad_group_criterion_primary_status_reason.proto

namespace Google\Ads\GoogleAds\V21\Enums\AdGroupCriterionPrimaryStatusReasonEnum;

use UnexpectedValueException;

/**
 * Enum describing the possible Ad Group Criterion primary status reasons.
 * Provides insight into why an Ad Group Criterion is not serving or not
 * serving optimally. These reasons are aggregated to determine an overall
 * Ad Group Criterion primary status.
 *
 * Protobuf type <code>google.ads.googleads.v21.enums.AdGroupCriterionPrimaryStatusReasonEnum.AdGroupCriterionPrimaryStatusReason</code>
 */
class AdGroupCriterionPrimaryStatusReason
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * Used for return value only. Represents unknown value in this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * The user-specified time for this campaign to start is in the future.
     * Contributes to AdGroupCriterionPrimaryStatus.PENDING.
     *
     * Generated from protobuf enum <code>CAMPAIGN_PENDING = 2;</code>
     */
    const CAMPAIGN_PENDING = 2;
    /**
     * The ad group criterion is overridden by negative campaign criterion.
     * Contributes to AdGroupCriterionPrimaryStatus.NOT_ELIGIBLE.
     *
     * Generated from protobuf enum <code>CAMPAIGN_CRITERION_NEGATIVE = 3;</code>
     */
    const CAMPAIGN_CRITERION_NEGATIVE = 3;
    /**
     * The user-specified campaign status is paused. Contributes to
     * AdGroupCriterionPrimaryStatus.PAUSED.
     *
     * Generated from protobuf enum <code>CAMPAIGN_PAUSED = 4;</code>
     */
    const CAMPAIGN_PAUSED = 4;
    /**
     * The user-specified campaign status is removed. Contributes to
     * AdGroupCriterionPrimaryStatus.REMOVED.
     *
     * Generated from protobuf enum <code>CAMPAIGN_REMOVED = 5;</code>
     */
    const CAMPAIGN_REMOVED = 5;
    /**
     * The user-specified time for this campaign to end has passed. Contributes
     * to AdGroupCriterionPrimaryStatus.ENDED.
     *
     * Generated from protobuf enum <code>CAMPAIGN_ENDED = 6;</code>
     */
    const CAMPAIGN_ENDED = 6;
    /**
     * The user-specified ad group status is paused. Contributes to
     * AdGroupCriterionPrimaryStatus.PAUSED.
     *
     * Generated from protobuf enum <code>AD_GROUP_PAUSED = 7;</code>
     */
    const AD_GROUP_PAUSED = 7;
    /**
     * The user-specified ad group status is removed. Contributes to
     * AdGroupCriterionPrimaryStatus.REMOVED.
     *
     * Generated from protobuf enum <code>AD_GROUP_REMOVED = 8;</code>
     */
    const AD_GROUP_REMOVED = 8;
    /**
     * The ad group criterion is disapproved by the ads approval system.
     * Contributes to AdGroupCriterionPrimaryStatus.NOT_ELIGIBLE.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_DISAPPROVED = 9;</code>
     */
    const AD_GROUP_CRITERION_DISAPPROVED = 9;
    /**
     * The ad group criterion is rarely served. Contributes to
     * AdGroupCriterionPrimaryStatus.NOT_ELIGIBLE.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_RARELY_SERVED = 10;</code>
     */
    const AD_GROUP_CRITERION_RARELY_SERVED = 10;
    /**
     * The ad group criterion has a low quality score. Contributes to
     * AdGroupCriterionPrimaryStatus.LIMITED.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_LOW_QUALITY = 11;</code>
     */
    const AD_GROUP_CRITERION_LOW_QUALITY = 11;
    /**
     * The ad group criterion is under review. Contributes to
     * AdGroupCriterionPrimaryStatus.PENDING.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_UNDER_REVIEW = 12;</code>
     */
    const AD_GROUP_CRITERION_UNDER_REVIEW = 12;
    /**
     * The ad group criterion is pending review. Contributes to
     * AdGroupCriterionPrimaryStatus.NOT_ELIGIBLE.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_PENDING_REVIEW = 13;</code>
     */
    const AD_GROUP_CRITERION_PENDING_REVIEW = 13;
    /**
     * The ad group criterion's bid is below the value necessary to serve on the
     * first page. Contributes to AdGroupCriterionPrimaryStatus.LIMITED.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_BELOW_FIRST_PAGE_BID = 14;</code>
     */
    const AD_GROUP_CRITERION_BELOW_FIRST_PAGE_BID = 14;
    /**
     * The ad group criterion is negative. Contributes to
     * AdGroupCriterionPrimaryStatus.NOT_ELIGIBLE.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_NEGATIVE = 15;</code>
     */
    const AD_GROUP_CRITERION_NEGATIVE = 15;
    /**
     * The ad group criterion is restricted. Contributes to
     * AdGroupCriterionPrimaryStatus.NOT_ELIGIBLE.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_RESTRICTED = 16;</code>
     */
    const AD_GROUP_CRITERION_RESTRICTED = 16;
    /**
     * The user-specified ad group criterion status is paused. Contributes to
     * AdGroupCriterionPrimaryStatus.PAUSED.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_PAUSED = 17;</code>
     */
    const AD_GROUP_CRITERION_PAUSED = 17;
    /**
     * The ad group criterion has been paused due to prolonged low activity in
     * serving. Contributes to AdGroupCriterionPrimaryStatus.PAUSED.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_PAUSED_DUE_TO_LOW_ACTIVITY = 18;</code>
     */
    const AD_GROUP_CRITERION_PAUSED_DUE_TO_LOW_ACTIVITY = 18;
    /**
     * The user-specified ad group criterion status is removed. Contributes to
     * AdGroupCriterionPrimaryStatus.REMOVED.
     *
     * Generated from protobuf enum <code>AD_GROUP_CRITERION_REMOVED = 19;</code>
     */
    const AD_GROUP_CRITERION_REMOVED = 19;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::CAMPAIGN_PENDING => 'CAMPAIGN_PENDING',
        self::CAMPAIGN_CRITERION_NEGATIVE => 'CAMPAIGN_CRITERION_NEGATIVE',
        self::CAMPAIGN_PAUSED => 'CAMPAIGN_PAUSED',
        self::CAMPAIGN_REMOVED => 'CAMPAIGN_REMOVED',
        self::CAMPAIGN_ENDED => 'CAMPAIGN_ENDED',
        self::AD_GROUP_PAUSED => 'AD_GROUP_PAUSED',
        self::AD_GROUP_REMOVED => 'AD_GROUP_REMOVED',
        self::AD_GROUP_CRITERION_DISAPPROVED => 'AD_GROUP_CRITERION_DISAPPROVED',
        self::AD_GROUP_CRITERION_RARELY_SERVED => 'AD_GROUP_CRITERION_RARELY_SERVED',
        self::AD_GROUP_CRITERION_LOW_QUALITY => 'AD_GROUP_CRITERION_LOW_QUALITY',
        self::AD_GROUP_CRITERION_UNDER_REVIEW => 'AD_GROUP_CRITERION_UNDER_REVIEW',
        self::AD_GROUP_CRITERION_PENDING_REVIEW => 'AD_GROUP_CRITERION_PENDING_REVIEW',
        self::AD_GROUP_CRITERION_BELOW_FIRST_PAGE_BID => 'AD_GROUP_CRITERION_BELOW_FIRST_PAGE_BID',
        self::AD_GROUP_CRITERION_NEGATIVE => 'AD_GROUP_CRITERION_NEGATIVE',
        self::AD_GROUP_CRITERION_RESTRICTED => 'AD_GROUP_CRITERION_RESTRICTED',
        self::AD_GROUP_CRITERION_PAUSED => 'AD_GROUP_CRITERION_PAUSED',
        self::AD_GROUP_CRITERION_PAUSED_DUE_TO_LOW_ACTIVITY => 'AD_GROUP_CRITERION_PAUSED_DUE_TO_LOW_ACTIVITY',
        self::AD_GROUP_CRITERION_REMOVED => 'AD_GROUP_CRITERION_REMOVED',
    ];

    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(AdGroupCriterionPrimaryStatusReason::class, \Google\Ads\GoogleAds\V21\Enums\AdGroupCriterionPrimaryStatusReasonEnum_AdGroupCriterionPrimaryStatusReason::class);

