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

namespace Google\Ads\GoogleAds\V20\Enums\ChangeClientTypeEnum;

use UnexpectedValueException;

/**
 * The source that the change_event resource was made through.
 *
 * Protobuf type <code>google.ads.googleads.v20.enums.ChangeClientTypeEnum.ChangeClientType</code>
 */
class ChangeClientType
{
    /**
     * No value has been specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * Used for return value only. Represents an unclassified client type
     * unknown in this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * Changes made through the "ads.google.com".
     * For example, changes made through campaign management.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_WEB_CLIENT = 2;</code>
     */
    const GOOGLE_ADS_WEB_CLIENT = 2;
    /**
     * Changes made through Google Ads automated rules.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_AUTOMATED_RULE = 3;</code>
     */
    const GOOGLE_ADS_AUTOMATED_RULE = 3;
    /**
     * Changes made through Google Ads scripts.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_SCRIPTS = 4;</code>
     */
    const GOOGLE_ADS_SCRIPTS = 4;
    /**
     * Changes made by Google Ads bulk upload.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_BULK_UPLOAD = 5;</code>
     */
    const GOOGLE_ADS_BULK_UPLOAD = 5;
    /**
     * Changes made by Google Ads API.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_API = 6;</code>
     */
    const GOOGLE_ADS_API = 6;
    /**
     * Changes made by Google Ads Editor. This value is a placeholder.
     * The API does not return these changes.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_EDITOR = 7;</code>
     */
    const GOOGLE_ADS_EDITOR = 7;
    /**
     * Changes made by Google Ads mobile app.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_MOBILE_APP = 8;</code>
     */
    const GOOGLE_ADS_MOBILE_APP = 8;
    /**
     * Changes made through Google Ads recommendations.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_RECOMMENDATIONS = 9;</code>
     */
    const GOOGLE_ADS_RECOMMENDATIONS = 9;
    /**
     * Changes made through Search Ads 360 Sync.
     *
     * Generated from protobuf enum <code>SEARCH_ADS_360_SYNC = 10;</code>
     */
    const SEARCH_ADS_360_SYNC = 10;
    /**
     * Changes made through Search Ads 360 Post.
     *
     * Generated from protobuf enum <code>SEARCH_ADS_360_POST = 11;</code>
     */
    const SEARCH_ADS_360_POST = 11;
    /**
     * Changes made through internal tools.
     * For example, when a user sets a URL template on an entity like a
     * Campaign, it's automatically wrapped with the SA360 Clickserver URL.
     *
     * Generated from protobuf enum <code>INTERNAL_TOOL = 12;</code>
     */
    const INTERNAL_TOOL = 12;
    /**
     * Types of changes that are not categorized, for example,
     * changes made by coupon redemption through Google Ads.
     *
     * Generated from protobuf enum <code>OTHER = 13;</code>
     */
    const OTHER = 13;
    /**
     * Changes made by subscribing to Google Ads recommendations.
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_RECOMMENDATIONS_SUBSCRIPTION = 14;</code>
     */
    const GOOGLE_ADS_RECOMMENDATIONS_SUBSCRIPTION = 14;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::GOOGLE_ADS_WEB_CLIENT => 'GOOGLE_ADS_WEB_CLIENT',
        self::GOOGLE_ADS_AUTOMATED_RULE => 'GOOGLE_ADS_AUTOMATED_RULE',
        self::GOOGLE_ADS_SCRIPTS => 'GOOGLE_ADS_SCRIPTS',
        self::GOOGLE_ADS_BULK_UPLOAD => 'GOOGLE_ADS_BULK_UPLOAD',
        self::GOOGLE_ADS_API => 'GOOGLE_ADS_API',
        self::GOOGLE_ADS_EDITOR => 'GOOGLE_ADS_EDITOR',
        self::GOOGLE_ADS_MOBILE_APP => 'GOOGLE_ADS_MOBILE_APP',
        self::GOOGLE_ADS_RECOMMENDATIONS => 'GOOGLE_ADS_RECOMMENDATIONS',
        self::SEARCH_ADS_360_SYNC => 'SEARCH_ADS_360_SYNC',
        self::SEARCH_ADS_360_POST => 'SEARCH_ADS_360_POST',
        self::INTERNAL_TOOL => 'INTERNAL_TOOL',
        self::OTHER => 'OTHER',
        self::GOOGLE_ADS_RECOMMENDATIONS_SUBSCRIPTION => 'GOOGLE_ADS_RECOMMENDATIONS_SUBSCRIPTION',
    ];

    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(ChangeClientType::class, \Google\Ads\GoogleAds\V20\Enums\ChangeClientTypeEnum_ChangeClientType::class);

