public final class EventInput extends GeneratedMessageV3 implements EventInputOrBuilder
Events allow for matching intents by event name instead of the natural
language input. For instance, input <event: { name: "welcome_event",
parameters: { name: "Sam" } }>
can trigger a personalized welcome response.
The parameter name
may be used by the agent in the response:
"Hello #welcome_event.name! What can I do for you today?"
.
Protobuf type google.cloud.dialogflow.v2.EventInput
Static Fields
public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
public static final int NAME_FIELD_NUMBER
Field Value
public static final int PARAMETERS_FIELD_NUMBER
Field Value
Static Methods
public static EventInput getDefaultInstance()
Returns
public static final Descriptors.Descriptor getDescriptor()
Returns
public static EventInput.Builder newBuilder()
Returns
public static EventInput.Builder newBuilder(EventInput prototype)
Parameter
Returns
public static EventInput parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static EventInput parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EventInput parseFrom(byte[] data)
Parameter
Name |
Description |
data |
byte[]
|
Returns
Exceptions
public static EventInput parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EventInput parseFrom(ByteString data)
Parameter
Returns
Exceptions
public static EventInput parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EventInput parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static EventInput parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EventInput parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static EventInput parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EventInput parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
public static EventInput parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Parser<EventInput> parser()
Returns
Methods
public boolean equals(Object obj)
Parameter
Returns
Overrides
public EventInput getDefaultInstanceForType()
Returns
public String getLanguageCode()
Required. The language of this query. See Language
Support
for a list of the currently supported language codes. Note that queries in
the same session do not necessarily need to specify the same language.
This field is ignored when used in the context of a
WebhookResponse.followup_event_input field,
because the language was already defined in the originating detect
intent request.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
Type |
Description |
String |
The languageCode.
|
public ByteString getLanguageCodeBytes()
Required. The language of this query. See Language
Support
for a list of the currently supported language codes. Note that queries in
the same session do not necessarily need to specify the same language.
This field is ignored when used in the context of a
WebhookResponse.followup_event_input field,
because the language was already defined in the originating detect
intent request.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
Type |
Description |
ByteString |
The bytes for languageCode.
|
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
Type |
Description |
String |
The name.
|
public ByteString getNameBytes()
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
public Struct getParameters()
The collection of parameters associated with the event.
Depending on your protocol or client library language, this is a
map, associative array, symbol table, dictionary, or JSON object
composed of a collection of (MapKey, MapValue) pairs:
- MapKey type: string
- MapKey value: parameter name
- MapValue type:
- If parameter's entity type is a composite entity: map
- Else: depending on parameter value type, could be one of string,
number, boolean, null, list or map
- MapValue value:
- If parameter's entity type is a composite entity:
map from composite entity property names to property values
- Else: parameter value
.google.protobuf.Struct parameters = 2;
Returns
Type |
Description |
Struct |
The parameters.
|
public StructOrBuilder getParametersOrBuilder()
The collection of parameters associated with the event.
Depending on your protocol or client library language, this is a
map, associative array, symbol table, dictionary, or JSON object
composed of a collection of (MapKey, MapValue) pairs:
- MapKey type: string
- MapKey value: parameter name
- MapValue type:
- If parameter's entity type is a composite entity: map
- Else: depending on parameter value type, could be one of string,
number, boolean, null, list or map
- MapValue value:
- If parameter's entity type is a composite entity:
map from composite entity property names to property values
- Else: parameter value
.google.protobuf.Struct parameters = 2;
Returns
public Parser<EventInput> getParserForType()
Returns
Overrides
public int getSerializedSize()
Returns
Overrides
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
public boolean hasParameters()
The collection of parameters associated with the event.
Depending on your protocol or client library language, this is a
map, associative array, symbol table, dictionary, or JSON object
composed of a collection of (MapKey, MapValue) pairs:
- MapKey type: string
- MapKey value: parameter name
- MapValue type:
- If parameter's entity type is a composite entity: map
- Else: depending on parameter value type, could be one of string,
number, boolean, null, list or map
- MapValue value:
- If parameter's entity type is a composite entity:
map from composite entity property names to property values
- Else: parameter value
.google.protobuf.Struct parameters = 2;
Returns
Type |
Description |
boolean |
Whether the parameters field is set.
|
Returns
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public EventInput.Builder newBuilderForType()
Returns
protected EventInput.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public EventInput.Builder toBuilder()
Returns
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions