Class WebhookResponse.Builder (4.39.0)

public static final class WebhookResponse.Builder extends GeneratedMessageV3.Builder<WebhookResponse.Builder> implements WebhookResponseOrBuilder

The response message for a webhook call.

This response is validated by the Dialogflow server. If validation fails, an error will be returned in the QueryResult.diagnostic_info field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error:

Protobuf type google.cloud.dialogflow.v2.WebhookResponse

Static Methods

getDescriptor()

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

Methods

addAllFulfillmentMessages(Iterable<? extends Intent.Message> values)

public WebhookResponse.Builder addAllFulfillmentMessages(Iterable<? extends Intent.Message> values)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.v2.Intent.Message>
Returns
Type Description
WebhookResponse.Builder

addAllOutputContexts(Iterable<? extends Context> values)

public WebhookResponse.Builder addAllOutputContexts(Iterable<? extends Context> values)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.v2.Context>
Returns
Type Description
WebhookResponse.Builder

addAllSessionEntityTypes(Iterable<? extends SessionEntityType> values)

public WebhookResponse.Builder addAllSessionEntityTypes(Iterable<? extends SessionEntityType> values)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.v2.SessionEntityType>
Returns
Type Description
WebhookResponse.Builder

addFulfillmentMessages(Intent.Message value)

public WebhookResponse.Builder addFulfillmentMessages(Intent.Message value)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameter
Name Description
value Intent.Message
Returns
Type Description
WebhookResponse.Builder

addFulfillmentMessages(Intent.Message.Builder builderForValue)

public WebhookResponse.Builder addFulfillmentMessages(Intent.Message.Builder builderForValue)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameter
Name Description
builderForValue Intent.Message.Builder
Returns
Type Description
WebhookResponse.Builder

addFulfillmentMessages(int index, Intent.Message value)

public WebhookResponse.Builder addFulfillmentMessages(int index, Intent.Message value)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameters
Name Description
index int
value Intent.Message
Returns
Type Description
WebhookResponse.Builder

addFulfillmentMessages(int index, Intent.Message.Builder builderForValue)

public WebhookResponse.Builder addFulfillmentMessages(int index, Intent.Message.Builder builderForValue)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameters
Name Description
index int
builderForValue Intent.Message.Builder
Returns
Type Description
WebhookResponse.Builder

addFulfillmentMessagesBuilder()

public Intent.Message.Builder addFulfillmentMessagesBuilder()

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Returns
Type Description
Intent.Message.Builder

addFulfillmentMessagesBuilder(int index)

public Intent.Message.Builder addFulfillmentMessagesBuilder(int index)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameter
Name Description
index int
Returns
Type Description
Intent.Message.Builder

addOutputContexts(Context value)

public WebhookResponse.Builder addOutputContexts(Context value)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameter
Name Description
value Context
Returns
Type Description
WebhookResponse.Builder

addOutputContexts(Context.Builder builderForValue)

public WebhookResponse.Builder addOutputContexts(Context.Builder builderForValue)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameter
Name Description
builderForValue Context.Builder
Returns
Type Description
WebhookResponse.Builder

addOutputContexts(int index, Context value)

public WebhookResponse.Builder addOutputContexts(int index, Context value)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameters
Name Description
index int
value Context
Returns
Type Description
WebhookResponse.Builder

addOutputContexts(int index, Context.Builder builderForValue)

public WebhookResponse.Builder addOutputContexts(int index, Context.Builder builderForValue)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameters
Name Description
index int
builderForValue Context.Builder
Returns
Type Description
WebhookResponse.Builder

addOutputContextsBuilder()

public Context.Builder addOutputContextsBuilder()

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Returns
Type Description
Context.Builder

addOutputContextsBuilder(int index)

public Context.Builder addOutputContextsBuilder(int index)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameter
Name Description
index int
Returns
Type Description
Context.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public WebhookResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
WebhookResponse.Builder
Overrides

addSessionEntityTypes(SessionEntityType value)

public WebhookResponse.Builder addSessionEntityTypes(SessionEntityType value)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameter
Name Description
value SessionEntityType
Returns
Type Description
WebhookResponse.Builder

addSessionEntityTypes(SessionEntityType.Builder builderForValue)

public WebhookResponse.Builder addSessionEntityTypes(SessionEntityType.Builder builderForValue)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameter
Name Description
builderForValue SessionEntityType.Builder
Returns
Type Description
WebhookResponse.Builder

addSessionEntityTypes(int index, SessionEntityType value)

public WebhookResponse.Builder addSessionEntityTypes(int index, SessionEntityType value)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameters
Name Description
index int
value SessionEntityType
Returns
Type Description
WebhookResponse.Builder

addSessionEntityTypes(int index, SessionEntityType.Builder builderForValue)

public WebhookResponse.Builder addSessionEntityTypes(int index, SessionEntityType.Builder builderForValue)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameters
Name Description
index int
builderForValue SessionEntityType.Builder
Returns
Type Description
WebhookResponse.Builder

addSessionEntityTypesBuilder()

public SessionEntityType.Builder addSessionEntityTypesBuilder()

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Returns
Type Description
SessionEntityType.Builder

addSessionEntityTypesBuilder(int index)

public SessionEntityType.Builder addSessionEntityTypesBuilder(int index)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameter
Name Description
index int
Returns
Type Description
SessionEntityType.Builder

build()

public WebhookResponse build()
Returns
Type Description
WebhookResponse

buildPartial()

public WebhookResponse buildPartial()
Returns
Type Description
WebhookResponse

clear()

public WebhookResponse.Builder clear()
Returns
Type Description
WebhookResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public WebhookResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
WebhookResponse.Builder
Overrides

clearFollowupEventInput()

public WebhookResponse.Builder clearFollowupEventInput()

Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.

.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;

Returns
Type Description
WebhookResponse.Builder

clearFulfillmentMessages()

public WebhookResponse.Builder clearFulfillmentMessages()

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Returns
Type Description
WebhookResponse.Builder

clearFulfillmentText()

public WebhookResponse.Builder clearFulfillmentText()

Optional. The text response message intended for the end-user. It is recommended to use fulfillment_messages.text.text[0] instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.

string fulfillment_text = 1;

Returns
Type Description
WebhookResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public WebhookResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
WebhookResponse.Builder
Overrides

clearOutputContexts()

public WebhookResponse.Builder clearOutputContexts()

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Returns
Type Description
WebhookResponse.Builder

clearPayload()

public WebhookResponse.Builder clearPayload()

Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format

.google.protobuf.Struct payload = 4;

Returns
Type Description
WebhookResponse.Builder

clearSessionEntityTypes()

public WebhookResponse.Builder clearSessionEntityTypes()

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Returns
Type Description
WebhookResponse.Builder

clearSource()

public WebhookResponse.Builder clearSource()

Optional. A custom field used to identify the webhook source. Arbitrary strings are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_source sent to the integration or API caller.

string source = 3;

Returns
Type Description
WebhookResponse.Builder

This builder for chaining.

clone()

public WebhookResponse.Builder clone()
Returns
Type Description
WebhookResponse.Builder
Overrides

getDefaultInstanceForType()

public WebhookResponse getDefaultInstanceForType()
Returns
Type Description
WebhookResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFollowupEventInput()

public EventInput getFollowupEventInput()

Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.

.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;

Returns
Type Description
EventInput

The followupEventInput.

getFollowupEventInputBuilder()

public EventInput.Builder getFollowupEventInputBuilder()

Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.

.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;

Returns
Type Description
EventInput.Builder

getFollowupEventInputOrBuilder()

public EventInputOrBuilder getFollowupEventInputOrBuilder()

Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.

.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;

Returns
Type Description
EventInputOrBuilder

getFulfillmentMessages(int index)

public Intent.Message getFulfillmentMessages(int index)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameter
Name Description
index int
Returns
Type Description
Intent.Message

getFulfillmentMessagesBuilder(int index)

public Intent.Message.Builder getFulfillmentMessagesBuilder(int index)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameter
Name Description
index int
Returns
Type Description
Intent.Message.Builder

getFulfillmentMessagesBuilderList()

public List<Intent.Message.Builder> getFulfillmentMessagesBuilderList()

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Returns
Type Description
List<Builder>

getFulfillmentMessagesCount()

public int getFulfillmentMessagesCount()

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Returns
Type Description
int

getFulfillmentMessagesList()

public List<Intent.Message> getFulfillmentMessagesList()

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Returns
Type Description
List<Message>

getFulfillmentMessagesOrBuilder(int index)

public Intent.MessageOrBuilder getFulfillmentMessagesOrBuilder(int index)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameter
Name Description
index int
Returns
Type Description
Intent.MessageOrBuilder

getFulfillmentMessagesOrBuilderList()

public List<? extends Intent.MessageOrBuilder> getFulfillmentMessagesOrBuilderList()

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder>

getFulfillmentText()

public String getFulfillmentText()

Optional. The text response message intended for the end-user. It is recommended to use fulfillment_messages.text.text[0] instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.

string fulfillment_text = 1;

Returns
Type Description
String

The fulfillmentText.

getFulfillmentTextBytes()

public ByteString getFulfillmentTextBytes()

Optional. The text response message intended for the end-user. It is recommended to use fulfillment_messages.text.text[0] instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.

string fulfillment_text = 1;

Returns
Type Description
ByteString

The bytes for fulfillmentText.

getOutputContexts(int index)

public Context getOutputContexts(int index)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameter
Name Description
index int
Returns
Type Description
Context

getOutputContextsBuilder(int index)

public Context.Builder getOutputContextsBuilder(int index)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameter
Name Description
index int
Returns
Type Description
Context.Builder

getOutputContextsBuilderList()

public List<Context.Builder> getOutputContextsBuilderList()

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Returns
Type Description
List<Builder>

getOutputContextsCount()

public int getOutputContextsCount()

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Returns
Type Description
int

getOutputContextsList()

public List<Context> getOutputContextsList()

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Returns
Type Description
List<Context>

getOutputContextsOrBuilder(int index)

public ContextOrBuilder getOutputContextsOrBuilder(int index)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameter
Name Description
index int
Returns
Type Description
ContextOrBuilder

getOutputContextsOrBuilderList()

public List<? extends ContextOrBuilder> getOutputContextsOrBuilderList()

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.v2.ContextOrBuilder>

getPayload()

public Struct getPayload()

Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format

.google.protobuf.Struct payload = 4;

Returns
Type Description
Struct

The payload.

getPayloadBuilder()

public Struct.Builder getPayloadBuilder()

Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format

.google.protobuf.Struct payload = 4;

Returns
Type Description
Builder

getPayloadOrBuilder()

public StructOrBuilder getPayloadOrBuilder()

Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format

.google.protobuf.Struct payload = 4;

Returns
Type Description
StructOrBuilder

getSessionEntityTypes(int index)

public SessionEntityType getSessionEntityTypes(int index)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameter
Name Description
index int
Returns
Type Description
SessionEntityType

getSessionEntityTypesBuilder(int index)

public SessionEntityType.Builder getSessionEntityTypesBuilder(int index)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameter
Name Description
index int
Returns
Type Description
SessionEntityType.Builder

getSessionEntityTypesBuilderList()

public List<SessionEntityType.Builder> getSessionEntityTypesBuilderList()

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Returns
Type Description
List<Builder>

getSessionEntityTypesCount()

public int getSessionEntityTypesCount()

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Returns
Type Description
int

getSessionEntityTypesList()

public List<SessionEntityType> getSessionEntityTypesList()

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Returns
Type Description
List<SessionEntityType>

getSessionEntityTypesOrBuilder(int index)

public SessionEntityTypeOrBuilder getSessionEntityTypesOrBuilder(int index)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameter
Name Description
index int
Returns
Type Description
SessionEntityTypeOrBuilder

getSessionEntityTypesOrBuilderList()

public List<? extends SessionEntityTypeOrBuilder> getSessionEntityTypesOrBuilderList()

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder>

getSource()

public String getSource()

Optional. A custom field used to identify the webhook source. Arbitrary strings are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_source sent to the integration or API caller.

string source = 3;

Returns
Type Description
String

The source.

getSourceBytes()

public ByteString getSourceBytes()

Optional. A custom field used to identify the webhook source. Arbitrary strings are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_source sent to the integration or API caller.

string source = 3;

Returns
Type Description
ByteString

The bytes for source.

hasFollowupEventInput()

public boolean hasFollowupEventInput()

Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.

.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;

Returns
Type Description
boolean

Whether the followupEventInput field is set.

hasPayload()

public boolean hasPayload()

Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format

.google.protobuf.Struct payload = 4;

Returns
Type Description
boolean

Whether the payload field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFollowupEventInput(EventInput value)

public WebhookResponse.Builder mergeFollowupEventInput(EventInput value)

Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.

.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;

Parameter
Name Description
value EventInput
Returns
Type Description
WebhookResponse.Builder

mergeFrom(WebhookResponse other)

public WebhookResponse.Builder mergeFrom(WebhookResponse other)
Parameter
Name Description
other WebhookResponse
Returns
Type Description
WebhookResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public WebhookResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WebhookResponse.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public WebhookResponse.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
WebhookResponse.Builder
Overrides

mergePayload(Struct value)

public WebhookResponse.Builder mergePayload(Struct value)

Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format

.google.protobuf.Struct payload = 4;

Parameter
Name Description
value Struct
Returns
Type Description
WebhookResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final WebhookResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
WebhookResponse.Builder
Overrides

removeFulfillmentMessages(int index)

public WebhookResponse.Builder removeFulfillmentMessages(int index)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameter
Name Description
index int
Returns
Type Description
WebhookResponse.Builder

removeOutputContexts(int index)

public WebhookResponse.Builder removeOutputContexts(int index)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameter
Name Description
index int
Returns
Type Description
WebhookResponse.Builder

removeSessionEntityTypes(int index)

public WebhookResponse.Builder removeSessionEntityTypes(int index)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameter
Name Description
index int
Returns
Type Description
WebhookResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public WebhookResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
WebhookResponse.Builder
Overrides

setFollowupEventInput(EventInput value)

public WebhookResponse.Builder setFollowupEventInput(EventInput value)

Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.

.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;

Parameter
Name Description
value EventInput
Returns
Type Description
WebhookResponse.Builder

setFollowupEventInput(EventInput.Builder builderForValue)

public WebhookResponse.Builder setFollowupEventInput(EventInput.Builder builderForValue)

Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the fulfillment_text, fulfillment_messages, and payload fields.

.google.cloud.dialogflow.v2.EventInput followup_event_input = 6;

Parameter
Name Description
builderForValue EventInput.Builder
Returns
Type Description
WebhookResponse.Builder

setFulfillmentMessages(int index, Intent.Message value)

public WebhookResponse.Builder setFulfillmentMessages(int index, Intent.Message value)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameters
Name Description
index int
value Intent.Message
Returns
Type Description
WebhookResponse.Builder

setFulfillmentMessages(int index, Intent.Message.Builder builderForValue)

public WebhookResponse.Builder setFulfillmentMessages(int index, Intent.Message.Builder builderForValue)

Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2;

Parameters
Name Description
index int
builderForValue Intent.Message.Builder
Returns
Type Description
WebhookResponse.Builder

setFulfillmentText(String value)

public WebhookResponse.Builder setFulfillmentText(String value)

Optional. The text response message intended for the end-user. It is recommended to use fulfillment_messages.text.text[0] instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.

string fulfillment_text = 1;

Parameter
Name Description
value String

The fulfillmentText to set.

Returns
Type Description
WebhookResponse.Builder

This builder for chaining.

setFulfillmentTextBytes(ByteString value)

public WebhookResponse.Builder setFulfillmentTextBytes(ByteString value)

Optional. The text response message intended for the end-user. It is recommended to use fulfillment_messages.text.text[0] instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.

string fulfillment_text = 1;

Parameter
Name Description
value ByteString

The bytes for fulfillmentText to set.

Returns
Type Description
WebhookResponse.Builder

This builder for chaining.

setOutputContexts(int index, Context value)

public WebhookResponse.Builder setOutputContexts(int index, Context value)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameters
Name Description
index int
value Context
Returns
Type Description
WebhookResponse.Builder

setOutputContexts(int index, Context.Builder builderForValue)

public WebhookResponse.Builder setOutputContexts(int index, Context.Builder builderForValue)

Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.

repeated .google.cloud.dialogflow.v2.Context output_contexts = 5;

Parameters
Name Description
index int
builderForValue Context.Builder
Returns
Type Description
WebhookResponse.Builder

setPayload(Struct value)

public WebhookResponse.Builder setPayload(Struct value)

Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format

.google.protobuf.Struct payload = 4;

Parameter
Name Description
value Struct
Returns
Type Description
WebhookResponse.Builder

setPayload(Struct.Builder builderForValue)

public WebhookResponse.Builder setPayload(Struct.Builder builderForValue)

Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format

.google.protobuf.Struct payload = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
WebhookResponse.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public WebhookResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
WebhookResponse.Builder
Overrides

setSessionEntityTypes(int index, SessionEntityType value)

public WebhookResponse.Builder setSessionEntityTypes(int index, SessionEntityType value)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameters
Name Description
index int
value SessionEntityType
Returns
Type Description
WebhookResponse.Builder

setSessionEntityTypes(int index, SessionEntityType.Builder builderForValue)

public WebhookResponse.Builder setSessionEntityTypes(int index, SessionEntityType.Builder builderForValue)

Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using detectIntent, streamingDetectIntent or SessionEntityType management methods.

repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10;

Parameters
Name Description
index int
builderForValue SessionEntityType.Builder
Returns
Type Description
WebhookResponse.Builder

setSource(String value)

public WebhookResponse.Builder setSource(String value)

Optional. A custom field used to identify the webhook source. Arbitrary strings are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_source sent to the integration or API caller.

string source = 3;

Parameter
Name Description
value String

The source to set.

Returns
Type Description
WebhookResponse.Builder

This builder for chaining.

setSourceBytes(ByteString value)

public WebhookResponse.Builder setSourceBytes(ByteString value)

Optional. A custom field used to identify the webhook source. Arbitrary strings are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_source sent to the integration or API caller.

string source = 3;

Parameter
Name Description
value ByteString

The bytes for source to set.

Returns
Type Description
WebhookResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final WebhookResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
WebhookResponse.Builder
Overrides