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

namespace Google\Ads\GoogleAds\V24\Enums\AdGroupAdPrimaryStatusReasonEnum;

use UnexpectedValueException;

/**
 * Possible ad group ad status reasons.
 *
 * Protobuf type <code>google.ads.googleads.v24.enums.AdGroupAdPrimaryStatusReasonEnum.AdGroupAdPrimaryStatusReason</code>
 */
class AdGroupAdPrimaryStatusReason
{
    /**
     * No value has been specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * Used for return value only. Represents value unknown in this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * The user-specified campaign status is removed. Contributes to
     * AdGroupAdPrimaryStatus.REMOVED.
     *
     * Generated from protobuf enum <code>CAMPAIGN_REMOVED = 2;</code>
     */
    const CAMPAIGN_REMOVED = 2;
    /**
     * The user-specified campaign status is paused. Contributes to
     * AdGroupAdPrimaryStatus.PAUSED.
     *
     * Generated from protobuf enum <code>CAMPAIGN_PAUSED = 3;</code>
     */
    const CAMPAIGN_PAUSED = 3;
    /**
     * The user-specified time for this campaign to start is in the future.
     * Contributes to AdGroupAdPrimaryStatus.PENDING.
     *
     * Generated from protobuf enum <code>CAMPAIGN_PENDING = 4;</code>
     */
    const CAMPAIGN_PENDING = 4;
    /**
     * The user-specified time for this campaign to end has passed. Contributes
     * to AdGroupAdPrimaryStatus.ENDED.
     *
     * Generated from protobuf enum <code>CAMPAIGN_ENDED = 5;</code>
     */
    const CAMPAIGN_ENDED = 5;
    /**
     * The user-specified ad group status is paused. Contributes to
     * AdGroupAdPrimaryStatus.PAUSED.
     *
     * Generated from protobuf enum <code>AD_GROUP_PAUSED = 6;</code>
     */
    const AD_GROUP_PAUSED = 6;
    /**
     * The user-specified ad group status is removed. Contributes to
     * AdGroupAdPrimaryStatus.REMOVED.
     *
     * Generated from protobuf enum <code>AD_GROUP_REMOVED = 7;</code>
     */
    const AD_GROUP_REMOVED = 7;
    /**
     * The user-specified ad status is paused. Contributes to
     * AdGroupAdPrimaryStatus.PAUSED.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_PAUSED = 8;</code>
     */
    const AD_GROUP_AD_PAUSED = 8;
    /**
     * The user-specified ad status is removed. Contributes to
     * AdGroupAdPrimaryStatus.REMOVED.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_REMOVED = 9;</code>
     */
    const AD_GROUP_AD_REMOVED = 9;
    /**
     * The ad is disapproved. Contributes to
     * AdGroupAdPrimaryStatus.NOT_ELIGIBLE.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_DISAPPROVED = 10;</code>
     */
    const AD_GROUP_AD_DISAPPROVED = 10;
    /**
     * The ad is under review. Contributes to AdGroupAdPrimaryStatus.PENDING.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_UNDER_REVIEW = 11;</code>
     */
    const AD_GROUP_AD_UNDER_REVIEW = 11;
    /**
     * The ad is poor quality. This is determined by the serving stack that
     * served the Ad. Contributes to AdGroupAdPrimaryStatus.LIMITED.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_POOR_QUALITY = 12;</code>
     */
    const AD_GROUP_AD_POOR_QUALITY = 12;
    /**
     * No eligible ads instances could be generated. Contributes to
     * AdGroupAdPrimaryStatus.PENDING.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_NO_ADS = 13;</code>
     */
    const AD_GROUP_AD_NO_ADS = 13;
    /**
     * The ad is internally labeled with a limiting label. Contributes to
     * AdGroupAdPrimaryStatus.LIMITED.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_APPROVED_LABELED = 14;</code>
     */
    const AD_GROUP_AD_APPROVED_LABELED = 14;
    /**
     * The ad is only serving in the user-specified area of interest.
     * Contributes to AdGroupAdPrimaryStatus.LIMITED.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_AREA_OF_INTEREST_ONLY = 15;</code>
     */
    const AD_GROUP_AD_AREA_OF_INTEREST_ONLY = 15;
    /**
     * The ad is part of an ongoing appeal. This reason does not impact
     * AdGroupAdPrimaryStatus.
     *
     * Generated from protobuf enum <code>AD_GROUP_AD_UNDER_APPEAL = 16;</code>
     */
    const AD_GROUP_AD_UNDER_APPEAL = 16;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::CAMPAIGN_REMOVED => 'CAMPAIGN_REMOVED',
        self::CAMPAIGN_PAUSED => 'CAMPAIGN_PAUSED',
        self::CAMPAIGN_PENDING => 'CAMPAIGN_PENDING',
        self::CAMPAIGN_ENDED => 'CAMPAIGN_ENDED',
        self::AD_GROUP_PAUSED => 'AD_GROUP_PAUSED',
        self::AD_GROUP_REMOVED => 'AD_GROUP_REMOVED',
        self::AD_GROUP_AD_PAUSED => 'AD_GROUP_AD_PAUSED',
        self::AD_GROUP_AD_REMOVED => 'AD_GROUP_AD_REMOVED',
        self::AD_GROUP_AD_DISAPPROVED => 'AD_GROUP_AD_DISAPPROVED',
        self::AD_GROUP_AD_UNDER_REVIEW => 'AD_GROUP_AD_UNDER_REVIEW',
        self::AD_GROUP_AD_POOR_QUALITY => 'AD_GROUP_AD_POOR_QUALITY',
        self::AD_GROUP_AD_NO_ADS => 'AD_GROUP_AD_NO_ADS',
        self::AD_GROUP_AD_APPROVED_LABELED => 'AD_GROUP_AD_APPROVED_LABELED',
        self::AD_GROUP_AD_AREA_OF_INTEREST_ONLY => 'AD_GROUP_AD_AREA_OF_INTEREST_ONLY',
        self::AD_GROUP_AD_UNDER_APPEAL => 'AD_GROUP_AD_UNDER_APPEAL',
    ];

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

