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

namespace Google\Ads\GoogleAds\V21\Enums\VideoAdSequenceInteractionTypeEnum;

use UnexpectedValueException;

/**
 * Enum describing an interaction between a viewer and a video in a video ad
 * sequence.
 *
 * Protobuf type <code>google.ads.googleads.v21.enums.VideoAdSequenceInteractionTypeEnum.VideoAdSequenceInteractionType</code>
 */
class VideoAdSequenceInteractionType
{
    /**
     * Not 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;
    /**
     * The viewer engaged with or watched at least 30 seconds of the ad (or the
     * entire ad, if it was less than 30 seconds). Only available for campaigns
     * using Target CPM as the bidding strategy and skippable in-stream ads as
     * the ad format.
     *
     * Generated from protobuf enum <code>PAID_VIEW = 2;</code>
     */
    const PAID_VIEW = 2;
    /**
     * The viewer skipped the ad. Only available for campaigns using Target CPM
     * as the bidding strategy and skippable in-stream ads as the ad format.
     *
     * Generated from protobuf enum <code>SKIP = 3;</code>
     */
    const SKIP = 3;
    /**
     * The ad was shown to the viewer.
     *
     * Generated from protobuf enum <code>IMPRESSION = 4;</code>
     */
    const IMPRESSION = 4;
    /**
     * An ad impression that was not immediately skipped, but didn't reach the
     * billable event either.
     *
     * Generated from protobuf enum <code>ENGAGED_IMPRESSION = 5;</code>
     */
    const ENGAGED_IMPRESSION = 5;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::PAID_VIEW => 'PAID_VIEW',
        self::SKIP => 'SKIP',
        self::IMPRESSION => 'IMPRESSION',
        self::ENGAGED_IMPRESSION => 'ENGAGED_IMPRESSION',
    ];

    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(VideoAdSequenceInteractionType::class, \Google\Ads\GoogleAds\V21\Enums\VideoAdSequenceInteractionTypeEnum_VideoAdSequenceInteractionType::class);

