public static final class EventInput.Builder extends GeneratedMessageV3.Builder<EventInput.Builder> 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
public static final Descriptors.Descriptor getDescriptor()
Methods
public EventInput.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
public EventInput build()
public EventInput buildPartial()
public EventInput.Builder clear()
Overrides
public EventInput.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
public EventInput.Builder clearLanguageCode()
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];
public EventInput.Builder clearName()
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
public EventInput.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
public EventInput.Builder clearParameters()
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;
public EventInput.Builder clone()
Overrides
public EventInput getDefaultInstanceForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
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 |
Type |
Description |
ByteString |
The bytes for name.
|
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 Struct.Builder getParametersBuilder()
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;
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;
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.
|
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public EventInput.Builder mergeFrom(EventInput other)
public EventInput.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
public EventInput.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
public EventInput.Builder mergeParameters(Struct value)
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;
Parameter |
Name |
Description |
value |
Struct
|
public final EventInput.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
public EventInput.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
public EventInput.Builder setLanguageCode(String value)
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];
Parameter |
Name |
Description |
value |
String
The languageCode to set.
|
public EventInput.Builder setLanguageCodeBytes(ByteString value)
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];
Parameter |
Name |
Description |
value |
ByteString
The bytes for languageCode to set.
|
public EventInput.Builder setName(String value)
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Parameter |
Name |
Description |
value |
String
The name to set.
|
public EventInput.Builder setNameBytes(ByteString value)
Required. The unique identifier of the event.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Parameter |
Name |
Description |
value |
ByteString
The bytes for name to set.
|
public EventInput.Builder setParameters(Struct value)
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;
Parameter |
Name |
Description |
value |
Struct
|
public EventInput.Builder setParameters(Struct.Builder builderForValue)
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;
Parameter |
Name |
Description |
builderForValue |
Builder
|
public EventInput.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
public final EventInput.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides