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

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

use UnexpectedValueException;

/**
 * Describes the possible link types for a link between a Google
 * Ads customer and another product.
 *
 * Protobuf type <code>google.ads.googleads.v21.enums.LinkedProductTypeEnum.LinkedProductType</code>
 */
class LinkedProductType
{
    /**
     * 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;
    /**
     * A link to Data partner.
     *
     * Generated from protobuf enum <code>DATA_PARTNER = 2;</code>
     */
    const DATA_PARTNER = 2;
    /**
     * A link to Google Ads.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS = 3;</code>
     */
    const GOOGLE_ADS = 3;
    /**
     * A link to Hotel Center.
     *
     * Generated from protobuf enum <code>HOTEL_CENTER = 7;</code>
     */
    const HOTEL_CENTER = 7;
    /**
     * A link to Google Merchant Center.
     *
     * Generated from protobuf enum <code>MERCHANT_CENTER = 8;</code>
     */
    const MERCHANT_CENTER = 8;
    /**
     * A link to the Google Ads account of the advertising partner.
     *
     * Generated from protobuf enum <code>ADVERTISING_PARTNER = 9;</code>
     */
    const ADVERTISING_PARTNER = 9;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::DATA_PARTNER => 'DATA_PARTNER',
        self::GOOGLE_ADS => 'GOOGLE_ADS',
        self::HOTEL_CENTER => 'HOTEL_CENTER',
        self::MERCHANT_CENTER => 'MERCHANT_CENTER',
        self::ADVERTISING_PARTNER => 'ADVERTISING_PARTNER',
    ];

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

