<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/resources.proto

namespace Google\Analytics\Admin\V1alpha;

use UnexpectedValueException;

/**
 * Types of resources whose changes may be returned from change history.
 *
 * Protobuf type <code>google.analytics.admin.v1alpha.ChangeHistoryResourceType</code>
 */
class ChangeHistoryResourceType
{
    /**
     * Resource type unknown or not specified.
     *
     * Generated from protobuf enum <code>CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0;</code>
     */
    const CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0;
    /**
     * Account resource
     *
     * Generated from protobuf enum <code>ACCOUNT = 1;</code>
     */
    const ACCOUNT = 1;
    /**
     * Property resource
     *
     * Generated from protobuf enum <code>PROPERTY = 2;</code>
     */
    const PROPERTY = 2;
    /**
     * WebDataStream resource
     *
     * Generated from protobuf enum <code>WEB_DATA_STREAM = 3;</code>
     */
    const WEB_DATA_STREAM = 3;
    /**
     * AndroidAppDataStream resource
     *
     * Generated from protobuf enum <code>ANDROID_APP_DATA_STREAM = 4;</code>
     */
    const ANDROID_APP_DATA_STREAM = 4;
    /**
     * IosAppDataStream resource
     *
     * Generated from protobuf enum <code>IOS_APP_DATA_STREAM = 5;</code>
     */
    const IOS_APP_DATA_STREAM = 5;
    /**
     * FirebaseLink resource
     *
     * Generated from protobuf enum <code>FIREBASE_LINK = 6;</code>
     */
    const FIREBASE_LINK = 6;
    /**
     * GoogleAdsLink resource
     *
     * Generated from protobuf enum <code>GOOGLE_ADS_LINK = 7;</code>
     */
    const GOOGLE_ADS_LINK = 7;
    /**
     * GoogleSignalsSettings resource
     *
     * Generated from protobuf enum <code>GOOGLE_SIGNALS_SETTINGS = 8;</code>
     */
    const GOOGLE_SIGNALS_SETTINGS = 8;
    /**
     * ConversionEvent resource
     *
     * Generated from protobuf enum <code>CONVERSION_EVENT = 9;</code>
     */
    const CONVERSION_EVENT = 9;
    /**
     * MeasurementProtocolSecret resource
     *
     * Generated from protobuf enum <code>MEASUREMENT_PROTOCOL_SECRET = 10;</code>
     */
    const MEASUREMENT_PROTOCOL_SECRET = 10;
    /**
     * CustomDimension resource
     *
     * Generated from protobuf enum <code>CUSTOM_DIMENSION = 11;</code>
     */
    const CUSTOM_DIMENSION = 11;
    /**
     * CustomMetric resource
     *
     * Generated from protobuf enum <code>CUSTOM_METRIC = 12;</code>
     */
    const CUSTOM_METRIC = 12;

    private static $valueToName = [
        self::CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED => 'CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED',
        self::ACCOUNT => 'ACCOUNT',
        self::PROPERTY => 'PROPERTY',
        self::WEB_DATA_STREAM => 'WEB_DATA_STREAM',
        self::ANDROID_APP_DATA_STREAM => 'ANDROID_APP_DATA_STREAM',
        self::IOS_APP_DATA_STREAM => 'IOS_APP_DATA_STREAM',
        self::FIREBASE_LINK => 'FIREBASE_LINK',
        self::GOOGLE_ADS_LINK => 'GOOGLE_ADS_LINK',
        self::GOOGLE_SIGNALS_SETTINGS => 'GOOGLE_SIGNALS_SETTINGS',
        self::CONVERSION_EVENT => 'CONVERSION_EVENT',
        self::MEASUREMENT_PROTOCOL_SECRET => 'MEASUREMENT_PROTOCOL_SECRET',
        self::CUSTOM_DIMENSION => 'CUSTOM_DIMENSION',
        self::CUSTOM_METRIC => 'CUSTOM_METRIC',
    ];

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

