Class DialogflowEvent

  • All Implemented Interfaces:
    java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>

    public final class DialogflowEvent
    extends com.google.api.client.json.GenericJson
    Dialogflow event triggered by the RBM Platform. With events, an agent can match an intent without using language as an input. Parameters enable personalized responses. For example, with the input `{ "eventName": "welcome_event", "parameters": { "name": "Sam" } }`, a Dialogflow agent can create the response `"Hello Sam! What can I do for you today?"`.

    This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the RCS Business Messaging API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json

    Author:
    Google, Inc.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.api.client.util.GenericData

        com.google.api.client.util.GenericData.Flags
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      DialogflowEvent()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DialogflowEvent clone()  
      java.lang.String getEventName()
      The unique identifier of the event.
      java.lang.String getLanguageCode()
      The language of this query.
      java.lang.String getName()
      This field is set by the RBM platform.
      java.util.Map<java.lang.String,​java.lang.Object> getParameters()
      (Optional) Parameters associated with the event.
      DialogflowEvent set​(java.lang.String fieldName, java.lang.Object value)  
      DialogflowEvent setEventName​(java.lang.String eventName)
      The unique identifier of the event.
      DialogflowEvent setLanguageCode​(java.lang.String languageCode)
      The language of this query.
      DialogflowEvent setName​(java.lang.String name)
      This field is set by the RBM platform.
      DialogflowEvent setParameters​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
      (Optional) Parameters associated with the event.
      • Methods inherited from class com.google.api.client.json.GenericJson

        getFactory, setFactory, toPrettyString, toString
      • Methods inherited from class com.google.api.client.util.GenericData

        entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
      • Methods inherited from class java.util.AbstractMap

        clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • DialogflowEvent

        public DialogflowEvent()
    • Method Detail

      • getEventName

        public java.lang.String getEventName()
        The unique identifier of the event. For example, `RBM_WELCOME_EVENT`.
        Returns:
        value or null for none
      • setEventName

        public DialogflowEvent setEventName​(java.lang.String eventName)
        The unique identifier of the event. For example, `RBM_WELCOME_EVENT`.
        Parameters:
        eventName - eventName or null for none
      • getLanguageCode

        public java.lang.String getLanguageCode()
        The language of this query. For a list of language codes, see Language Support. Before a Dialogflow agent can use a language, the language must be enabled in the Dialogflow console. Queries in the same session can specify different languages. If a language isn't specified, Dialogflow uses the agent's default language. do not necessarily need to specify the same language.
        Returns:
        value or null for none
      • setLanguageCode

        public DialogflowEvent setLanguageCode​(java.lang.String languageCode)
        The language of this query. For a list of language codes, see Language Support. Before a Dialogflow agent can use a language, the language must be enabled in the Dialogflow console. Queries in the same session can specify different languages. If a language isn't specified, Dialogflow uses the agent's default language. do not necessarily need to specify the same language.
        Parameters:
        languageCode - languageCode or null for none
      • getName

        public java.lang.String getName()
        This field is set by the RBM platform. Don't include it when creating an agent message. The field resolves "phones/{E.164}/dialogflowMessages/{messageId}", where {E.164} is the user's phone number in E.164 format and {messageId} is the agent-assigned ID of the RBM agent message.
        Returns:
        value or null for none
      • setName

        public DialogflowEvent setName​(java.lang.String name)
        This field is set by the RBM platform. Don't include it when creating an agent message. The field resolves "phones/{E.164}/dialogflowMessages/{messageId}", where {E.164} is the user's phone number in E.164 format and {messageId} is the agent-assigned ID of the RBM agent message.
        Parameters:
        name - name or null for none
      • getParameters

        public java.util.Map<java.lang.String,​java.lang.Object> getParameters()
        (Optional) Parameters associated with the event.
        Returns:
        value or null for none
      • setParameters

        public DialogflowEvent setParameters​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
        (Optional) Parameters associated with the event.
        Parameters:
        parameters - parameters or null for none
      • set

        public DialogflowEvent set​(java.lang.String fieldName,
                                   java.lang.Object value)
        Overrides:
        set in class com.google.api.client.json.GenericJson
      • clone

        public DialogflowEvent clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson