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

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

use UnexpectedValueException;

/**
 * Enum describing GenAI asset generation errors.
 *
 * Protobuf type <code>google.ads.googleads.v23.errors.AssetGenerationErrorEnum.AssetGenerationError</code>
 */
class AssetGenerationError
{
    /**
     * 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;
    /**
     * No assets were generated for the given request.
     *
     * Generated from protobuf enum <code>NO_ASSETS_GENERATED = 2;</code>
     */
    const NO_ASSETS_GENERATED = 2;
    /**
     * A final URL is required but was not provided, and could not be sourced
     * from the existing generation context because no existing generation
     * context was provided.
     *
     * Generated from protobuf enum <code>FINAL_URL_REQUIRED = 3;</code>
     */
    const FINAL_URL_REQUIRED = 3;
    /**
     * A final URL is required but was not provided, and could not be sourced
     * from the provided existing generation context.
     *
     * Generated from protobuf enum <code>GENERATION_CONTEXT_MISSING_FINAL_URL = 4;</code>
     */
    const GENERATION_CONTEXT_MISSING_FINAL_URL = 4;
    /**
     * The provided final URL is considered sensitive, and assets cannot be
     * generated.
     *
     * Generated from protobuf enum <code>FINAL_URL_SENSITIVE = 5;</code>
     */
    const FINAL_URL_SENSITIVE = 5;
    /**
     * The language of the provided final URL is not supported.
     *
     * Generated from protobuf enum <code>FINAL_URL_UNSUPPORTED_LANGUAGE = 6;</code>
     */
    const FINAL_URL_UNSUPPORTED_LANGUAGE = 6;
    /**
     * The provided final URL was not indexed or could otherwise not be
     * processed.
     *
     * Generated from protobuf enum <code>FINAL_URL_UNAVAILABLE = 7;</code>
     */
    const FINAL_URL_UNAVAILABLE = 7;
    /**
     * Campaign type is required but was not provided, and could not be sourced
     * from the existing generation context because no existing generation
     * context was provided.
     *
     * Generated from protobuf enum <code>CAMPAIGN_TYPE_REQUIRED = 8;</code>
     */
    const CAMPAIGN_TYPE_REQUIRED = 8;
    /**
     * The provided campaign type is not supported for this asset generation
     * operation.
     *
     * Generated from protobuf enum <code>UNSUPPORTED_CAMPAIGN_TYPE = 9;</code>
     */
    const UNSUPPORTED_CAMPAIGN_TYPE = 9;
    /**
     * The provided field type is not supported for this asset generation
     * operation.
     *
     * Generated from protobuf enum <code>UNSUPPORTED_FIELD_TYPE = 10;</code>
     */
    const UNSUPPORTED_FIELD_TYPE = 10;
    /**
     * The provided field type is not supported for the given campaign type.
     *
     * Generated from protobuf enum <code>UNSUPPORTED_FIELD_TYPE_FOR_CAMPAIGN_TYPE = 11;</code>
     */
    const UNSUPPORTED_FIELD_TYPE_FOR_CAMPAIGN_TYPE = 11;
    /**
     * The language of the provided freeform prompt is not supported.
     *
     * Generated from protobuf enum <code>FREEFORM_PROMPT_UNSUPPORTED_LANGUAGE = 12;</code>
     */
    const FREEFORM_PROMPT_UNSUPPORTED_LANGUAGE = 12;
    /**
     * The provided freeform prompt is considered sensitive, and assets cannot
     * be generated.
     *
     * Generated from protobuf enum <code>FREEFORM_PROMPT_SENSITIVE = 13;</code>
     */
    const FREEFORM_PROMPT_SENSITIVE = 13;
    /**
     * The provided image file size exceeds the limit.
     *
     * Generated from protobuf enum <code>INPUT_IMAGE_FILE_SIZE_TOO_LARGE = 14;</code>
     */
    const INPUT_IMAGE_FILE_SIZE_TOO_LARGE = 14;
    /**
     * The provided image is empty.
     *
     * Generated from protobuf enum <code>INPUT_IMAGE_EMPTY = 15;</code>
     */
    const INPUT_IMAGE_EMPTY = 15;
    /**
     * Exactly one generation type must be provided.
     *
     * Generated from protobuf enum <code>GENERATION_TYPE_REQUIRED = 16;</code>
     */
    const GENERATION_TYPE_REQUIRED = 16;
    /**
     * Too many keywords provided in request.
     *
     * Generated from protobuf enum <code>TOO_MANY_KEYWORDS = 17;</code>
     */
    const TOO_MANY_KEYWORDS = 17;
    /**
     * A provided keyword does not have a valid length.
     *
     * Generated from protobuf enum <code>KEYWORD_INVALID_LENGTH = 18;</code>
     */
    const KEYWORD_INVALID_LENGTH = 18;
    /**
     * All keywords were filtered out.
     *
     * Generated from protobuf enum <code>NO_VALID_KEYWORDS = 19;</code>
     */
    const NO_VALID_KEYWORDS = 19;
    /**
     * The provided freeform prompt does not have a valid length.
     *
     * Generated from protobuf enum <code>FREEFORM_PROMPT_INVALID_LENGTH = 20;</code>
     */
    const FREEFORM_PROMPT_INVALID_LENGTH = 20;
    /**
     * The provided freeform prompt references children.
     *
     * Generated from protobuf enum <code>FREEFORM_PROMPT_REFERENCES_CHILDREN = 21;</code>
     */
    const FREEFORM_PROMPT_REFERENCES_CHILDREN = 21;
    /**
     * The provided freeform prompt references specific people.
     *
     * Generated from protobuf enum <code>FREEFORM_PROMPT_REFERENCES_SPECIFIC_PEOPLE = 22;</code>
     */
    const FREEFORM_PROMPT_REFERENCES_SPECIFIC_PEOPLE = 22;
    /**
     * The provided freeform prompt violates Ads Policy.
     *
     * Generated from protobuf enum <code>FREEFORM_PROMPT_VIOLATES_ADS_POLICY = 23;</code>
     */
    const FREEFORM_PROMPT_VIOLATES_ADS_POLICY = 23;
    /**
     * The provided freeform prompt contains brand content.
     *
     * Generated from protobuf enum <code>FREEFORM_PROMPT_BRAND_CONTENT = 24;</code>
     */
    const FREEFORM_PROMPT_BRAND_CONTENT = 24;
    /**
     * The provided image depicts children.
     *
     * Generated from protobuf enum <code>INPUT_IMAGE_DEPICTS_CHILDREN = 25;</code>
     */
    const INPUT_IMAGE_DEPICTS_CHILDREN = 25;
    /**
     * The provided image contains brand content.
     *
     * Generated from protobuf enum <code>INPUT_IMAGE_CONTAINS_BRAND_CONTENT = 26;</code>
     */
    const INPUT_IMAGE_CONTAINS_BRAND_CONTENT = 26;
    /**
     * The provided image contains sensitive subject matter.
     *
     * Generated from protobuf enum <code>INPUT_IMAGE_SENSITIVE = 27;</code>
     */
    const INPUT_IMAGE_SENSITIVE = 27;
    /**
     * The provided image may violate Google Ads policies.
     *
     * Generated from protobuf enum <code>INPUT_IMAGE_VIOLATES_POLICY = 28;</code>
     */
    const INPUT_IMAGE_VIOLATES_POLICY = 28;
    /**
     * All output images were filtered out because they included depictions of
     * children.
     *
     * Generated from protobuf enum <code>ALL_OUTPUT_IMAGES_FILTERED_OUT_CHILDREN_DEPICTION = 29;</code>
     */
    const ALL_OUTPUT_IMAGES_FILTERED_OUT_CHILDREN_DEPICTION = 29;
    /**
     * All output images were filtered out because they included depictions of
     * specific people.
     *
     * Generated from protobuf enum <code>ALL_OUTPUT_IMAGES_FILTERED_OUT_SPECIFIC_PEOPLE = 30;</code>
     */
    const ALL_OUTPUT_IMAGES_FILTERED_OUT_SPECIFIC_PEOPLE = 30;
    /**
     * All output images were filtered out for a reason not covered by a more
     * specific error code.
     *
     * Generated from protobuf enum <code>ALL_OUTPUT_IMAGES_FILTERED_OUT = 31;</code>
     */
    const ALL_OUTPUT_IMAGES_FILTERED_OUT = 31;
    /**
     * At least one input image is required for certain requests.
     *
     * Generated from protobuf enum <code>INPUT_IMAGE_REQUIRED = 32;</code>
     */
    const INPUT_IMAGE_REQUIRED = 32;
    /**
     * The provided image is of an unsupported type.
     *
     * Generated from protobuf enum <code>INPUT_IMAGE_UNSUPPORTED_IMAGE_TYPE = 33;</code>
     */
    const INPUT_IMAGE_UNSUPPORTED_IMAGE_TYPE = 33;
    /**
     * Asset Group could not be found with the provided ID.
     *
     * Generated from protobuf enum <code>CONTEXT_ASSET_GROUP_NOT_FOUND = 34;</code>
     */
    const CONTEXT_ASSET_GROUP_NOT_FOUND = 34;
    /**
     * Ad Group Ad could not be found with the provided ID combination.
     *
     * Generated from protobuf enum <code>CONTEXT_AD_GROUP_AD_NOT_FOUND = 35;</code>
     */
    const CONTEXT_AD_GROUP_AD_NOT_FOUND = 35;
    /**
     * Could not find Campaign associated with the provided generation context.
     *
     * Generated from protobuf enum <code>CONTEXT_CAMPAIGN_NOT_FOUND = 36;</code>
     */
    const CONTEXT_CAMPAIGN_NOT_FOUND = 36;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::NO_ASSETS_GENERATED => 'NO_ASSETS_GENERATED',
        self::FINAL_URL_REQUIRED => 'FINAL_URL_REQUIRED',
        self::GENERATION_CONTEXT_MISSING_FINAL_URL => 'GENERATION_CONTEXT_MISSING_FINAL_URL',
        self::FINAL_URL_SENSITIVE => 'FINAL_URL_SENSITIVE',
        self::FINAL_URL_UNSUPPORTED_LANGUAGE => 'FINAL_URL_UNSUPPORTED_LANGUAGE',
        self::FINAL_URL_UNAVAILABLE => 'FINAL_URL_UNAVAILABLE',
        self::CAMPAIGN_TYPE_REQUIRED => 'CAMPAIGN_TYPE_REQUIRED',
        self::UNSUPPORTED_CAMPAIGN_TYPE => 'UNSUPPORTED_CAMPAIGN_TYPE',
        self::UNSUPPORTED_FIELD_TYPE => 'UNSUPPORTED_FIELD_TYPE',
        self::UNSUPPORTED_FIELD_TYPE_FOR_CAMPAIGN_TYPE => 'UNSUPPORTED_FIELD_TYPE_FOR_CAMPAIGN_TYPE',
        self::FREEFORM_PROMPT_UNSUPPORTED_LANGUAGE => 'FREEFORM_PROMPT_UNSUPPORTED_LANGUAGE',
        self::FREEFORM_PROMPT_SENSITIVE => 'FREEFORM_PROMPT_SENSITIVE',
        self::INPUT_IMAGE_FILE_SIZE_TOO_LARGE => 'INPUT_IMAGE_FILE_SIZE_TOO_LARGE',
        self::INPUT_IMAGE_EMPTY => 'INPUT_IMAGE_EMPTY',
        self::GENERATION_TYPE_REQUIRED => 'GENERATION_TYPE_REQUIRED',
        self::TOO_MANY_KEYWORDS => 'TOO_MANY_KEYWORDS',
        self::KEYWORD_INVALID_LENGTH => 'KEYWORD_INVALID_LENGTH',
        self::NO_VALID_KEYWORDS => 'NO_VALID_KEYWORDS',
        self::FREEFORM_PROMPT_INVALID_LENGTH => 'FREEFORM_PROMPT_INVALID_LENGTH',
        self::FREEFORM_PROMPT_REFERENCES_CHILDREN => 'FREEFORM_PROMPT_REFERENCES_CHILDREN',
        self::FREEFORM_PROMPT_REFERENCES_SPECIFIC_PEOPLE => 'FREEFORM_PROMPT_REFERENCES_SPECIFIC_PEOPLE',
        self::FREEFORM_PROMPT_VIOLATES_ADS_POLICY => 'FREEFORM_PROMPT_VIOLATES_ADS_POLICY',
        self::FREEFORM_PROMPT_BRAND_CONTENT => 'FREEFORM_PROMPT_BRAND_CONTENT',
        self::INPUT_IMAGE_DEPICTS_CHILDREN => 'INPUT_IMAGE_DEPICTS_CHILDREN',
        self::INPUT_IMAGE_CONTAINS_BRAND_CONTENT => 'INPUT_IMAGE_CONTAINS_BRAND_CONTENT',
        self::INPUT_IMAGE_SENSITIVE => 'INPUT_IMAGE_SENSITIVE',
        self::INPUT_IMAGE_VIOLATES_POLICY => 'INPUT_IMAGE_VIOLATES_POLICY',
        self::ALL_OUTPUT_IMAGES_FILTERED_OUT_CHILDREN_DEPICTION => 'ALL_OUTPUT_IMAGES_FILTERED_OUT_CHILDREN_DEPICTION',
        self::ALL_OUTPUT_IMAGES_FILTERED_OUT_SPECIFIC_PEOPLE => 'ALL_OUTPUT_IMAGES_FILTERED_OUT_SPECIFIC_PEOPLE',
        self::ALL_OUTPUT_IMAGES_FILTERED_OUT => 'ALL_OUTPUT_IMAGES_FILTERED_OUT',
        self::INPUT_IMAGE_REQUIRED => 'INPUT_IMAGE_REQUIRED',
        self::INPUT_IMAGE_UNSUPPORTED_IMAGE_TYPE => 'INPUT_IMAGE_UNSUPPORTED_IMAGE_TYPE',
        self::CONTEXT_ASSET_GROUP_NOT_FOUND => 'CONTEXT_ASSET_GROUP_NOT_FOUND',
        self::CONTEXT_AD_GROUP_AD_NOT_FOUND => 'CONTEXT_AD_GROUP_AD_NOT_FOUND',
        self::CONTEXT_CAMPAIGN_NOT_FOUND => 'CONTEXT_CAMPAIGN_NOT_FOUND',
    ];

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

