Class DialogflowEvent
- java.lang.Object
-
- java.util.AbstractMap<java.lang.String,java.lang.Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.rcsbusinessmessaging.v1.model.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.GenericJsonDialogflow 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
-
-
Constructor Summary
Constructors Constructor Description DialogflowEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DialogflowEventclone()java.lang.StringgetEventName()The unique identifier of the event.java.lang.StringgetLanguageCode()The language of this query.java.lang.StringgetName()This field is set by the RBM platform.java.util.Map<java.lang.String,java.lang.Object>getParameters()(Optional) Parameters associated with the event.DialogflowEventset(java.lang.String fieldName, java.lang.Object value)DialogflowEventsetEventName(java.lang.String eventName)The unique identifier of the event.DialogflowEventsetLanguageCode(java.lang.String languageCode)The language of this query.DialogflowEventsetName(java.lang.String name)This field is set by the RBM platform.DialogflowEventsetParameters(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
-
-
-
-
Method Detail
-
getEventName
public java.lang.String getEventName()
The unique identifier of the event. For example, `RBM_WELCOME_EVENT`.- Returns:
- value or
nullfor none
-
setEventName
public DialogflowEvent setEventName(java.lang.String eventName)
The unique identifier of the event. For example, `RBM_WELCOME_EVENT`.- Parameters:
eventName- eventName ornullfor 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
nullfor 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 ornullfor 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
nullfor 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 ornullfor none
-
getParameters
public java.util.Map<java.lang.String,java.lang.Object> getParameters()
(Optional) Parameters associated with the event.- Returns:
- value or
nullfor none
-
setParameters
public DialogflowEvent setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
(Optional) Parameters associated with the event.- Parameters:
parameters- parameters ornullfor none
-
set
public DialogflowEvent set(java.lang.String fieldName, java.lang.Object value)
- Overrides:
setin classcom.google.api.client.json.GenericJson
-
clone
public DialogflowEvent clone()
- Overrides:
clonein classcom.google.api.client.json.GenericJson
-
-