Class EventInput (4.3.1)

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

Fields

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PARAMETERS_FIELD_NUMBER

public static final int PARAMETERS_FIELD_NUMBER
Field Value
TypeDescription
int

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstance()

public static EventInput getDefaultInstance()
Returns
TypeDescription
EventInput

getDefaultInstanceForType()

public EventInput getDefaultInstanceForType()
Returns
TypeDescription
EventInput

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

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.

string language_code = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
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.

string language_code = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
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
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The unique identifier of the event.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
StructOrBuilder

getParserForType()

public Parser<EventInput> getParserForType()
Returns
TypeDescription
Parser<EventInput>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
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
TypeDescription
boolean

Whether the parameters field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilder()

public static EventInput.Builder newBuilder()
Returns
TypeDescription
EventInput.Builder

newBuilder(EventInput prototype)

public static EventInput.Builder newBuilder(EventInput prototype)
Parameter
NameDescription
prototypeEventInput
Returns
TypeDescription
EventInput.Builder

newBuilderForType()

public EventInput.Builder newBuilderForType()
Returns
TypeDescription
EventInput.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected EventInput.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
EventInput.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

parseDelimitedFrom(InputStream input)

public static EventInput parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EventInput parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static EventInput parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EventInput parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EventInput parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static EventInput parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static EventInput parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EventInput parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EventInput
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<EventInput> parser()
Returns
TypeDescription
Parser<EventInput>

toBuilder()

public EventInput.Builder toBuilder()
Returns
TypeDescription
EventInput.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException