Class EventInput (4.19.0)

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

Implements

EventInputOrBuilder

Static Fields

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PARAMETERS_FIELD_NUMBER

public static final int PARAMETERS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static EventInput getDefaultInstance()
Returns
Type Description
EventInput

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static EventInput.Builder newBuilder()
Returns
Type Description
EventInput.Builder

newBuilder(EventInput prototype)

public static EventInput.Builder newBuilder(EventInput prototype)
Parameter
Name Description
prototype EventInput
Returns
Type Description
EventInput.Builder

parseDelimitedFrom(InputStream input)

public static EventInput parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EventInput
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EventInput parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EventInput
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static EventInput parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
EventInput
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EventInput
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EventInput parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
EventInput
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EventInput
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EventInput parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
EventInput
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EventInput
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static EventInput parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EventInput
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EventInput
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static EventInput parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
EventInput
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EventInput
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<EventInput> parser()
Returns
Type Description
Parser<EventInput>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public EventInput getDefaultInstanceForType()
Returns
Type Description
EventInput

getLanguageCode()

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.

getLanguageCodeBytes()

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.

getName()

public String getName()

Required. The unique identifier of the event.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The unique identifier of the event.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

getParameters()

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.

getParametersOrBuilder()

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
Type Description
StructOrBuilder

getParserForType()

public Parser<EventInput> getParserForType()
Returns
Type Description
Parser<EventInput>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

hasParameters()

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public EventInput.Builder newBuilderForType()
Returns
Type Description
EventInput.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected EventInput.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
EventInput.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public EventInput.Builder toBuilder()
Returns
Type Description
EventInput.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException