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

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

use UnexpectedValueException;

/**
 * The possible asset field types.
 *
 * Protobuf type <code>google.ads.googleads.v22.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType</code>
 */
class ServedAssetFieldType
{
    /**
     * No value has 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 asset is used in headline 1.
     *
     * Generated from protobuf enum <code>HEADLINE_1 = 2;</code>
     */
    const HEADLINE_1 = 2;
    /**
     * The asset is used in headline 2.
     *
     * Generated from protobuf enum <code>HEADLINE_2 = 3;</code>
     */
    const HEADLINE_2 = 3;
    /**
     * The asset is used in headline 3.
     *
     * Generated from protobuf enum <code>HEADLINE_3 = 4;</code>
     */
    const HEADLINE_3 = 4;
    /**
     * The asset is used in description 1.
     *
     * Generated from protobuf enum <code>DESCRIPTION_1 = 5;</code>
     */
    const DESCRIPTION_1 = 5;
    /**
     * The asset is used in description 2.
     *
     * Generated from protobuf enum <code>DESCRIPTION_2 = 6;</code>
     */
    const DESCRIPTION_2 = 6;
    /**
     * The asset was used in a headline. Use this only if there is only one
     * headline in the ad. Otherwise, use the HEADLINE_1, HEADLINE_2 or
     * HEADLINE_3 enums
     *
     * Generated from protobuf enum <code>HEADLINE = 7;</code>
     */
    const HEADLINE = 7;
    /**
     * The asset was used as a headline in portrait image.
     *
     * Generated from protobuf enum <code>HEADLINE_IN_PORTRAIT = 8;</code>
     */
    const HEADLINE_IN_PORTRAIT = 8;
    /**
     * The asset was used in a long headline (used in MultiAssetResponsiveAd).
     *
     * Generated from protobuf enum <code>LONG_HEADLINE = 9;</code>
     */
    const LONG_HEADLINE = 9;
    /**
     * The asset was used in a description. Use this only if there is only one
     * description in the ad. Otherwise, use the DESCRIPTION_1 or DESCRIPTION_&#64;
     * enums
     *
     * Generated from protobuf enum <code>DESCRIPTION = 10;</code>
     */
    const DESCRIPTION = 10;
    /**
     * The asset was used as description in portrait image.
     *
     * Generated from protobuf enum <code>DESCRIPTION_IN_PORTRAIT = 11;</code>
     */
    const DESCRIPTION_IN_PORTRAIT = 11;
    /**
     * The asset was used as business name in portrait image.
     *
     * Generated from protobuf enum <code>BUSINESS_NAME_IN_PORTRAIT = 12;</code>
     */
    const BUSINESS_NAME_IN_PORTRAIT = 12;
    /**
     * The asset was used as business name.
     *
     * Generated from protobuf enum <code>BUSINESS_NAME = 13;</code>
     */
    const BUSINESS_NAME = 13;
    /**
     * The asset was used as a marketing image.
     *
     * Generated from protobuf enum <code>MARKETING_IMAGE = 14;</code>
     */
    const MARKETING_IMAGE = 14;
    /**
     * The asset was used as a marketing image in portrait image.
     *
     * Generated from protobuf enum <code>MARKETING_IMAGE_IN_PORTRAIT = 15;</code>
     */
    const MARKETING_IMAGE_IN_PORTRAIT = 15;
    /**
     * The asset was used as a square marketing image.
     *
     * Generated from protobuf enum <code>SQUARE_MARKETING_IMAGE = 16;</code>
     */
    const SQUARE_MARKETING_IMAGE = 16;
    /**
     * The asset was used as a portrait marketing image.
     *
     * Generated from protobuf enum <code>PORTRAIT_MARKETING_IMAGE = 17;</code>
     */
    const PORTRAIT_MARKETING_IMAGE = 17;
    /**
     * The asset was used as a logo.
     *
     * Generated from protobuf enum <code>LOGO = 18;</code>
     */
    const LOGO = 18;
    /**
     * The asset was used as a landscape logo.
     *
     * Generated from protobuf enum <code>LANDSCAPE_LOGO = 19;</code>
     */
    const LANDSCAPE_LOGO = 19;
    /**
     * The asset was used as a call-to-action.
     *
     * Generated from protobuf enum <code>CALL_TO_ACTION = 20;</code>
     */
    const CALL_TO_ACTION = 20;
    /**
     * The asset was used as a YouTube video.
     *
     * Generated from protobuf enum <code>YOU_TUBE_VIDEO = 21;</code>
     */
    const YOU_TUBE_VIDEO = 21;
    /**
     * This asset is used as a sitelink.
     *
     * Generated from protobuf enum <code>SITELINK = 22;</code>
     */
    const SITELINK = 22;
    /**
     * This asset is used as a call.
     *
     * Generated from protobuf enum <code>CALL = 23;</code>
     */
    const CALL = 23;
    /**
     * This asset is used as a mobile app.
     *
     * Generated from protobuf enum <code>MOBILE_APP = 24;</code>
     */
    const MOBILE_APP = 24;
    /**
     * This asset is used as a callout.
     *
     * Generated from protobuf enum <code>CALLOUT = 25;</code>
     */
    const CALLOUT = 25;
    /**
     * This asset is used as a structured snippet.
     *
     * Generated from protobuf enum <code>STRUCTURED_SNIPPET = 26;</code>
     */
    const STRUCTURED_SNIPPET = 26;
    /**
     * This asset is used as a price.
     *
     * Generated from protobuf enum <code>PRICE = 27;</code>
     */
    const PRICE = 27;
    /**
     * This asset is used as a promotion.
     *
     * Generated from protobuf enum <code>PROMOTION = 28;</code>
     */
    const PROMOTION = 28;
    /**
     * This asset is used as an image.
     *
     * Generated from protobuf enum <code>AD_IMAGE = 29;</code>
     */
    const AD_IMAGE = 29;
    /**
     * The asset is used as a lead form.
     *
     * Generated from protobuf enum <code>LEAD_FORM = 30;</code>
     */
    const LEAD_FORM = 30;
    /**
     * The asset is used as a business logo.
     *
     * Generated from protobuf enum <code>BUSINESS_LOGO = 31;</code>
     */
    const BUSINESS_LOGO = 31;
    /**
     * The asset is used as a description prefix.
     *
     * Generated from protobuf enum <code>DESCRIPTION_PREFIX = 32;</code>
     */
    const DESCRIPTION_PREFIX = 32;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::HEADLINE_1 => 'HEADLINE_1',
        self::HEADLINE_2 => 'HEADLINE_2',
        self::HEADLINE_3 => 'HEADLINE_3',
        self::DESCRIPTION_1 => 'DESCRIPTION_1',
        self::DESCRIPTION_2 => 'DESCRIPTION_2',
        self::HEADLINE => 'HEADLINE',
        self::HEADLINE_IN_PORTRAIT => 'HEADLINE_IN_PORTRAIT',
        self::LONG_HEADLINE => 'LONG_HEADLINE',
        self::DESCRIPTION => 'DESCRIPTION',
        self::DESCRIPTION_IN_PORTRAIT => 'DESCRIPTION_IN_PORTRAIT',
        self::BUSINESS_NAME_IN_PORTRAIT => 'BUSINESS_NAME_IN_PORTRAIT',
        self::BUSINESS_NAME => 'BUSINESS_NAME',
        self::MARKETING_IMAGE => 'MARKETING_IMAGE',
        self::MARKETING_IMAGE_IN_PORTRAIT => 'MARKETING_IMAGE_IN_PORTRAIT',
        self::SQUARE_MARKETING_IMAGE => 'SQUARE_MARKETING_IMAGE',
        self::PORTRAIT_MARKETING_IMAGE => 'PORTRAIT_MARKETING_IMAGE',
        self::LOGO => 'LOGO',
        self::LANDSCAPE_LOGO => 'LANDSCAPE_LOGO',
        self::CALL_TO_ACTION => 'CALL_TO_ACTION',
        self::YOU_TUBE_VIDEO => 'YOU_TUBE_VIDEO',
        self::SITELINK => 'SITELINK',
        self::CALL => 'CALL',
        self::MOBILE_APP => 'MOBILE_APP',
        self::CALLOUT => 'CALLOUT',
        self::STRUCTURED_SNIPPET => 'STRUCTURED_SNIPPET',
        self::PRICE => 'PRICE',
        self::PROMOTION => 'PROMOTION',
        self::AD_IMAGE => 'AD_IMAGE',
        self::LEAD_FORM => 'LEAD_FORM',
        self::BUSINESS_LOGO => 'BUSINESS_LOGO',
        self::DESCRIPTION_PREFIX => 'DESCRIPTION_PREFIX',
    ];

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

