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

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

use UnexpectedValueException;

/**
 * Enumerates Google Ads format types.
 * Note that this segmentation is available only for Video and Demand Gen
 * campaigns. For assets, only video assets are supported.
 *
 * Protobuf type <code>google.ads.googleads.v22.enums.AdFormatTypeEnum.AdFormatType</code>
 */
class AdFormatType
{
    /**
     * 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;
    /**
     * Value assigned to formats (such as experimental formats) which don't
     * support format segmentation in Video and Demand Gen campaigns.
     * Note that these formats may change categories in the future, for example
     * if an experimental format is exposed or a new format is added. We
     * strongly recommend to not rely on this field for long term decisions.
     *
     * Generated from protobuf enum <code>OTHER = 2;</code>
     */
    const OTHER = 2;
    /**
     * Value assigned for Video TrueView for Action campaigns statistics.
     * Note that statistics with this value may change categories in the future,
     * for example if format segmentation support is added for new campaign
     * types. We strongly recommend to not rely on this field for long term
     * decisions.
     *
     * Generated from protobuf enum <code>UNSEGMENTED = 3;</code>
     */
    const UNSEGMENTED = 3;
    /**
     * Skippable in-stream ads.
     *
     * Generated from protobuf enum <code>INSTREAM_SKIPPABLE = 4;</code>
     */
    const INSTREAM_SKIPPABLE = 4;
    /**
     * Non-skippable in-stream ads.
     *
     * Generated from protobuf enum <code>INSTREAM_NON_SKIPPABLE = 5;</code>
     */
    const INSTREAM_NON_SKIPPABLE = 5;
    /**
     * In-feed YouTube or image ads served on feed surfaces (e.g. Discover Feed,
     * YouTube Home, etc.).
     *
     * Generated from protobuf enum <code>INFEED = 6;</code>
     */
    const INFEED = 6;
    /**
     * Short (<7 secs) in-stream non-skippable YouTube ads.
     *
     * Generated from protobuf enum <code>BUMPER = 7;</code>
     */
    const BUMPER = 7;
    /**
     * Outstream ads.
     *
     * Generated from protobuf enum <code>OUTSTREAM = 8;</code>
     */
    const OUTSTREAM = 8;
    /**
     * Masthead ads.
     *
     * Generated from protobuf enum <code>MASTHEAD = 9;</code>
     */
    const MASTHEAD = 9;
    /**
     * Audio ads.
     *
     * Generated from protobuf enum <code>AUDIO = 10;</code>
     */
    const AUDIO = 10;
    /**
     * Vertical full-screen video or image ads served on YouTube Shorts or
     * BrandConnect ads served as organic YouTube Shorts.
     *
     * Generated from protobuf enum <code>SHORTS = 11;</code>
     */
    const SHORTS = 11;
    /**
     * Image ads served when a user pauses an organic YouTube video on a TV
     * screen. These ads are displayed directly next to the static video frame
     * on the pause screen itself. Note that this does not include Demand Gen
     * image ads served on the ad panel below or on top of a paused organic
     * video. Those are reported under INFEED.
     *
     * Generated from protobuf enum <code>PAUSE = 12;</code>
     */
    const PAUSE = 12;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::OTHER => 'OTHER',
        self::UNSEGMENTED => 'UNSEGMENTED',
        self::INSTREAM_SKIPPABLE => 'INSTREAM_SKIPPABLE',
        self::INSTREAM_NON_SKIPPABLE => 'INSTREAM_NON_SKIPPABLE',
        self::INFEED => 'INFEED',
        self::BUMPER => 'BUMPER',
        self::OUTSTREAM => 'OUTSTREAM',
        self::MASTHEAD => 'MASTHEAD',
        self::AUDIO => 'AUDIO',
        self::SHORTS => 'SHORTS',
        self::PAUSE => 'PAUSE',
    ];

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

