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

namespace Google\Ads\GoogleAds\V22\Enums\SmartCampaignNotEligibleReasonEnum;

use UnexpectedValueException;

/**
 * Reasons for why a Smart campaign is not eligible to serve.
 *
 * Protobuf type <code>google.ads.googleads.v22.enums.SmartCampaignNotEligibleReasonEnum.SmartCampaignNotEligibleReason</code>
 */
class SmartCampaignNotEligibleReason
{
    /**
     * The status has not been specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * The received value is not known in this version.
     * This is a response-only value.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * The campaign is not eligible to serve because of an issue with the
     * account.
     *
     * Generated from protobuf enum <code>ACCOUNT_ISSUE = 2;</code>
     */
    const ACCOUNT_ISSUE = 2;
    /**
     * The campaign is not eligible to serve because of a payment issue.
     *
     * Generated from protobuf enum <code>BILLING_ISSUE = 3;</code>
     */
    const BILLING_ISSUE = 3;
    /**
     * The business profile location associated with the campaign has been
     * removed.
     *
     * Generated from protobuf enum <code>BUSINESS_PROFILE_LOCATION_REMOVED = 4;</code>
     */
    const BUSINESS_PROFILE_LOCATION_REMOVED = 4;
    /**
     * All system-generated ads have been disapproved. Consult the
     * policy_summary field in the AdGroupAd resource for more details.
     *
     * Generated from protobuf enum <code>ALL_ADS_DISAPPROVED = 5;</code>
     */
    const ALL_ADS_DISAPPROVED = 5;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::ACCOUNT_ISSUE => 'ACCOUNT_ISSUE',
        self::BILLING_ISSUE => 'BILLING_ISSUE',
        self::BUSINESS_PROFILE_LOCATION_REMOVED => 'BUSINESS_PROFILE_LOCATION_REMOVED',
        self::ALL_ADS_DISAPPROVED => 'ALL_ADS_DISAPPROVED',
    ];

    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(SmartCampaignNotEligibleReason::class, \Google\Ads\GoogleAds\V22\Enums\SmartCampaignNotEligibleReasonEnum_SmartCampaignNotEligibleReason::class);

