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

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

use UnexpectedValueException;

/**
 * Surfaces available to target in reach forecasts.
 *
 * Protobuf type <code>google.ads.googleads.v21.enums.ReachPlanSurfaceEnum.ReachPlanSurface</code>
 */
class ReachPlanSurface
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * The value is unknown in this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * Discover feed ad surface.
     *
     * Generated from protobuf enum <code>DISCOVER_FEED = 7;</code>
     */
    const DISCOVER_FEED = 7;
    /**
     * Gmail ad surface.
     *
     * Generated from protobuf enum <code>GMAIL = 8;</code>
     */
    const GMAIL = 8;
    /**
     * In-Feed ad surface.
     *
     * Generated from protobuf enum <code>IN_FEED = 2;</code>
     */
    const IN_FEED = 2;
    /**
     * In-Stream bumper ad surface.
     *
     * Generated from protobuf enum <code>IN_STREAM_BUMPER = 3;</code>
     */
    const IN_STREAM_BUMPER = 3;
    /**
     * In-Stream non-skippable ad surface.
     *
     * Generated from protobuf enum <code>IN_STREAM_NON_SKIPPABLE = 4;</code>
     */
    const IN_STREAM_NON_SKIPPABLE = 4;
    /**
     * In-Stream skippable ad surface.
     *
     * Generated from protobuf enum <code>IN_STREAM_SKIPPABLE = 5;</code>
     */
    const IN_STREAM_SKIPPABLE = 5;
    /**
     * Shorts ad surface.
     *
     * Generated from protobuf enum <code>SHORTS = 6;</code>
     */
    const SHORTS = 6;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::DISCOVER_FEED => 'DISCOVER_FEED',
        self::GMAIL => 'GMAIL',
        self::IN_FEED => 'IN_FEED',
        self::IN_STREAM_BUMPER => 'IN_STREAM_BUMPER',
        self::IN_STREAM_NON_SKIPPABLE => 'IN_STREAM_NON_SKIPPABLE',
        self::IN_STREAM_SKIPPABLE => 'IN_STREAM_SKIPPABLE',
        self::SHORTS => 'SHORTS',
    ];

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

