<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/intent.proto

namespace Google\Cloud\Dialogflow\V2\Intent\Message;

use UnexpectedValueException;

/**
 * Represents different platforms that a rich message can be intended for.
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.Intent.Message.Platform</code>
 */
class Platform
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>PLATFORM_UNSPECIFIED = 0;</code>
     */
    const PLATFORM_UNSPECIFIED = 0;
    /**
     * Facebook.
     *
     * Generated from protobuf enum <code>FACEBOOK = 1;</code>
     */
    const FACEBOOK = 1;
    /**
     * Slack.
     *
     * Generated from protobuf enum <code>SLACK = 2;</code>
     */
    const SLACK = 2;
    /**
     * Telegram.
     *
     * Generated from protobuf enum <code>TELEGRAM = 3;</code>
     */
    const TELEGRAM = 3;
    /**
     * Kik.
     *
     * Generated from protobuf enum <code>KIK = 4;</code>
     */
    const KIK = 4;
    /**
     * Skype.
     *
     * Generated from protobuf enum <code>SKYPE = 5;</code>
     */
    const SKYPE = 5;
    /**
     * Line.
     *
     * Generated from protobuf enum <code>LINE = 6;</code>
     */
    const LINE = 6;
    /**
     * Viber.
     *
     * Generated from protobuf enum <code>VIBER = 7;</code>
     */
    const VIBER = 7;
    /**
     * Actions on Google.
     * When using Actions on Google, you can choose one of the specific
     * Intent.Message types that mention support for Actions on Google,
     * or you can use the advanced Intent.Message.payload field.
     * The payload field provides access to AoG features not available in the
     * specific message types.
     * If using the Intent.Message.payload field, it should have a structure
     * similar to the JSON message shown here. For more information, see
     * [Actions on Google Webhook
     * Format](https://developers.google.com/actions/dialogflow/webhook)
     * <pre>{
     *   "expectUserResponse": true,
     *   "isSsml": false,
     *   "noInputPrompts": [],
     *   "richResponse": {
     *     "items": [
     *       {
     *         "simpleResponse": {
     *           "displayText": "hi",
     *           "textToSpeech": "hello"
     *         }
     *       }
     *     ],
     *     "suggestions": [
     *       {
     *         "title": "Say this"
     *       },
     *       {
     *         "title": "or this"
     *       }
     *     ]
     *   },
     *   "systemIntent": {
     *     "data": {
     *       "&#64;type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
     *       "listSelect": {
     *         "items": [
     *           {
     *             "optionInfo": {
     *               "key": "key1",
     *               "synonyms": [
     *                 "key one"
     *               ]
     *             },
     *             "title": "must not be empty, but unique"
     *           },
     *           {
     *             "optionInfo": {
     *               "key": "key2",
     *               "synonyms": [
     *                 "key two"
     *               ]
     *             },
     *             "title": "must not be empty, but unique"
     *           }
     *         ]
     *       }
     *     },
     *     "intent": "actions.intent.OPTION"
     *   }
     * }</pre>
     *
     * Generated from protobuf enum <code>ACTIONS_ON_GOOGLE = 8;</code>
     */
    const ACTIONS_ON_GOOGLE = 8;
    /**
     * Google Hangouts.
     *
     * Generated from protobuf enum <code>GOOGLE_HANGOUTS = 11;</code>
     */
    const GOOGLE_HANGOUTS = 11;

    private static $valueToName = [
        self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED',
        self::FACEBOOK => 'FACEBOOK',
        self::SLACK => 'SLACK',
        self::TELEGRAM => 'TELEGRAM',
        self::KIK => 'KIK',
        self::SKYPE => 'SKYPE',
        self::LINE => 'LINE',
        self::VIBER => 'VIBER',
        self::ACTIONS_ON_GOOGLE => 'ACTIONS_ON_GOOGLE',
        self::GOOGLE_HANGOUTS => 'GOOGLE_HANGOUTS',
    ];

    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(Platform::class, \Google\Cloud\Dialogflow\V2\Intent_Message_Platform::class);

