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

namespace Google\Ads\GoogleAds\V23\Enums\BusinessMessageCallToActionTypeEnum;

use UnexpectedValueException;

/**
 * Enum describing the type of call-to-action phrases in a business message.
 *
 * Protobuf type <code>google.ads.googleads.v23.enums.BusinessMessageCallToActionTypeEnum.BusinessMessageCallToActionType</code>
 */
class BusinessMessageCallToActionType
{
    /**
     * 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;
    /**
     * Apply now.
     *
     * Generated from protobuf enum <code>APPLY_NOW = 2;</code>
     */
    const APPLY_NOW = 2;
    /**
     * Book now.
     *
     * Generated from protobuf enum <code>BOOK_NOW = 3;</code>
     */
    const BOOK_NOW = 3;
    /**
     * Contact us.
     *
     * Generated from protobuf enum <code>CONTACT_US = 4;</code>
     */
    const CONTACT_US = 4;
    /**
     * Get info.
     *
     * Generated from protobuf enum <code>GET_INFO = 5;</code>
     */
    const GET_INFO = 5;
    /**
     * Get offer.
     *
     * Generated from protobuf enum <code>GET_OFFER = 6;</code>
     */
    const GET_OFFER = 6;
    /**
     * Get quote.
     *
     * Generated from protobuf enum <code>GET_QUOTE = 7;</code>
     */
    const GET_QUOTE = 7;
    /**
     * Get started.
     *
     * Generated from protobuf enum <code>GET_STARTED = 8;</code>
     */
    const GET_STARTED = 8;
    /**
     * Learn more.
     *
     * Generated from protobuf enum <code>LEARN_MORE = 9;</code>
     */
    const LEARN_MORE = 9;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::APPLY_NOW => 'APPLY_NOW',
        self::BOOK_NOW => 'BOOK_NOW',
        self::CONTACT_US => 'CONTACT_US',
        self::GET_INFO => 'GET_INFO',
        self::GET_OFFER => 'GET_OFFER',
        self::GET_QUOTE => 'GET_QUOTE',
        self::GET_STARTED => 'GET_STARTED',
        self::LEARN_MORE => 'LEARN_MORE',
    ];

    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(BusinessMessageCallToActionType::class, \Google\Ads\GoogleAds\V23\Enums\BusinessMessageCallToActionTypeEnum_BusinessMessageCallToActionType::class);

