<?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;

/**
 * The rich response message integration platform. See
 * [Integrations](https://cloud.google.com/dialogflow/docs/integrations).
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.Intent.Message.Platform</code>
 */
class Platform
{
    /**
     * Default platform.
     *
     * 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;
    /**
     * Google Assistant
     * See [Dialogflow webhook
     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
     *
     * 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);

