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

namespace Google\Ads\GoogleAds\V21\Errors\BrandGuidelinesMigrationErrorEnum;

use UnexpectedValueException;

/**
 * Enum describing brand guidelines migration errors.
 *
 * Protobuf type <code>google.ads.googleads.v21.errors.BrandGuidelinesMigrationErrorEnum.BrandGuidelinesMigrationError</code>
 */
class BrandGuidelinesMigrationError
{
    /**
     * 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;
    /**
     * This campaign is already enabled for Brand Guidelines.
     *
     * Generated from protobuf enum <code>BRAND_GUIDELINES_ALREADY_ENABLED = 2;</code>
     */
    const BRAND_GUIDELINES_ALREADY_ENABLED = 2;
    /**
     * Brand Guidelines can only be enabled for active or suspended campaigns.
     *
     * Generated from protobuf enum <code>CANNOT_ENABLE_BRAND_GUIDELINES_FOR_REMOVED_CAMPAIGN = 3;</code>
     */
    const CANNOT_ENABLE_BRAND_GUIDELINES_FOR_REMOVED_CAMPAIGN = 3;
    /**
     * Maximum of 5 square and landscape logos can be specified for Brand
     * Guidelines.
     *
     * Generated from protobuf enum <code>BRAND_GUIDELINES_LOGO_LIMIT_EXCEEDED = 4;</code>
     */
    const BRAND_GUIDELINES_LOGO_LIMIT_EXCEEDED = 4;
    /**
     * Either auto_populate_brand_assets must be true or brand_assets must be
     * provided, but not both.
     *
     * Generated from protobuf enum <code>CANNOT_AUTO_POPULATE_BRAND_ASSETS_WHEN_BRAND_ASSETS_PROVIDED = 5;</code>
     */
    const CANNOT_AUTO_POPULATE_BRAND_ASSETS_WHEN_BRAND_ASSETS_PROVIDED = 5;
    /**
     * Either auto_populate_brand_assets can be false or brand_assets can be
     * omitted, but not both.
     *
     * Generated from protobuf enum <code>AUTO_POPULATE_BRAND_ASSETS_REQUIRED_WHEN_BRAND_ASSETS_OMITTED = 6;</code>
     */
    const AUTO_POPULATE_BRAND_ASSETS_REQUIRED_WHEN_BRAND_ASSETS_OMITTED = 6;
    /**
     * A maximum of 10 enable operations can be executed in a request.
     *
     * Generated from protobuf enum <code>TOO_MANY_ENABLE_OPERATIONS = 7;</code>
     */
    const TOO_MANY_ENABLE_OPERATIONS = 7;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::BRAND_GUIDELINES_ALREADY_ENABLED => 'BRAND_GUIDELINES_ALREADY_ENABLED',
        self::CANNOT_ENABLE_BRAND_GUIDELINES_FOR_REMOVED_CAMPAIGN => 'CANNOT_ENABLE_BRAND_GUIDELINES_FOR_REMOVED_CAMPAIGN',
        self::BRAND_GUIDELINES_LOGO_LIMIT_EXCEEDED => 'BRAND_GUIDELINES_LOGO_LIMIT_EXCEEDED',
        self::CANNOT_AUTO_POPULATE_BRAND_ASSETS_WHEN_BRAND_ASSETS_PROVIDED => 'CANNOT_AUTO_POPULATE_BRAND_ASSETS_WHEN_BRAND_ASSETS_PROVIDED',
        self::AUTO_POPULATE_BRAND_ASSETS_REQUIRED_WHEN_BRAND_ASSETS_OMITTED => 'AUTO_POPULATE_BRAND_ASSETS_REQUIRED_WHEN_BRAND_ASSETS_OMITTED',
        self::TOO_MANY_ENABLE_OPERATIONS => 'TOO_MANY_ENABLE_OPERATIONS',
    ];

    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(BrandGuidelinesMigrationError::class, \Google\Ads\GoogleAds\V21\Errors\BrandGuidelinesMigrationErrorEnum_BrandGuidelinesMigrationError::class);

