<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/datamanager/v1/user_list.proto

namespace Google\Ads\DataManager\V1\PartnerAudienceInfo;

use UnexpectedValueException;

/**
 * Partner audience source.
 *
 * Protobuf type <code>google.ads.datamanager.v1.PartnerAudienceInfo.PartnerAudienceSource</code>
 */
class PartnerAudienceSource
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>PARTNER_AUDIENCE_SOURCE_UNSPECIFIED = 0;</code>
     */
    const PARTNER_AUDIENCE_SOURCE_UNSPECIFIED = 0;
    /**
     * Partner Audience source is commerce audience.
     *
     * Generated from protobuf enum <code>COMMERCE_AUDIENCE = 1;</code>
     */
    const COMMERCE_AUDIENCE = 1;
    /**
     * Partner Audience source is linear TV audience.
     *
     * Generated from protobuf enum <code>LINEAR_TV_AUDIENCE = 2;</code>
     */
    const LINEAR_TV_AUDIENCE = 2;
    /**
     * Partner Audience source is agency/provider audience.
     *
     * Generated from protobuf enum <code>AGENCY_PROVIDER_AUDIENCE = 3;</code>
     */
    const AGENCY_PROVIDER_AUDIENCE = 3;

    private static $valueToName = [
        self::PARTNER_AUDIENCE_SOURCE_UNSPECIFIED => 'PARTNER_AUDIENCE_SOURCE_UNSPECIFIED',
        self::COMMERCE_AUDIENCE => 'COMMERCE_AUDIENCE',
        self::LINEAR_TV_AUDIENCE => 'LINEAR_TV_AUDIENCE',
        self::AGENCY_PROVIDER_AUDIENCE => 'AGENCY_PROVIDER_AUDIENCE',
    ];

    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);
    }
}

