Class WebhookResponse.Builder (4.3.1)

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.v2beta1.WebhookResponse

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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.dialogflow.v2beta1.Intent.Message>
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.dialogflow.v2beta1.Context>
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.dialogflow.v2beta1.SessionEntityType>
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameter
NameDescription
valueIntent.Message
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameter
NameDescription
builderForValueIntent.Message.Builder
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameters
NameDescription
indexint
valueIntent.Message
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameters
NameDescription
indexint
builderForValueIntent.Message.Builder
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameter
NameDescription
valueContext
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameter
NameDescription
builderForValueContext.Builder
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameters
NameDescription
indexint
valueContext
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameters
NameDescription
indexint
builderForValueContext.Builder
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
Context.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public WebhookResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameter
NameDescription
valueSessionEntityType
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameter
NameDescription
builderForValueSessionEntityType.Builder
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameters
NameDescription
indexint
valueSessionEntityType
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameters
NameDescription
indexint
builderForValueSessionEntityType.Builder
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
SessionEntityType.Builder

build()

public WebhookResponse build()
Returns
TypeDescription
WebhookResponse

buildPartial()

public WebhookResponse buildPartial()
Returns
TypeDescription
WebhookResponse

clear()

public WebhookResponse.Builder clear()
Returns
TypeDescription
WebhookResponse.Builder
Overrides

clearEndInteraction()

public WebhookResponse.Builder clearEndInteraction()

Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.

bool end_interaction = 8;

Returns
TypeDescription
WebhookResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public WebhookResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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.v2beta1.EventInput followup_event_input = 6;

Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

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

This builder for chaining.

clearLiveAgentHandoff()

public WebhookResponse.Builder clearLiveAgentHandoff()

Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.

bool live_agent_handoff = 7;

Returns
TypeDescription
WebhookResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public WebhookResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Returns
TypeDescription
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
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

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

This builder for chaining.

clone()

public WebhookResponse.Builder clone()
Returns
TypeDescription
WebhookResponse.Builder
Overrides

getDefaultInstanceForType()

public WebhookResponse getDefaultInstanceForType()
Returns
TypeDescription
WebhookResponse

getDescriptor()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEndInteraction()

public boolean getEndInteraction()

Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.

bool end_interaction = 8;

Returns
TypeDescription
boolean

The endInteraction.

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.v2beta1.EventInput followup_event_input = 6;

Returns
TypeDescription
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.v2beta1.EventInput followup_event_input = 6;

Returns
TypeDescription
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.v2beta1.EventInput followup_event_input = 6;

Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.v2beta1.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
TypeDescription
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
TypeDescription
ByteString

The bytes for fulfillmentText.

getLiveAgentHandoff()

public boolean getLiveAgentHandoff()

Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.

bool live_agent_handoff = 7;

Returns
TypeDescription
boolean

The liveAgentHandoff.

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.v2beta1.Context output_contexts = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.v2beta1.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
TypeDescription
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
TypeDescription
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
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Returns
TypeDescription
List<? extends com.google.cloud.dialogflow.v2beta1.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
TypeDescription
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
TypeDescription
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.v2beta1.EventInput followup_event_input = 6;

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

Whether the payload field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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.v2beta1.EventInput followup_event_input = 6;

Parameter
NameDescription
valueEventInput
Returns
TypeDescription
WebhookResponse.Builder

mergeFrom(WebhookResponse other)

public WebhookResponse.Builder mergeFrom(WebhookResponse other)
Parameter
NameDescription
otherWebhookResponse
Returns
TypeDescription
WebhookResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public WebhookResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WebhookResponse.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public WebhookResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueStruct
Returns
TypeDescription
WebhookResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final WebhookResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameter
NameDescription
indexint
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
WebhookResponse.Builder

setEndInteraction(boolean value)

public WebhookResponse.Builder setEndInteraction(boolean value)

Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.

bool end_interaction = 8;

Parameter
NameDescription
valueboolean

The endInteraction to set.

Returns
TypeDescription
WebhookResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public WebhookResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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.v2beta1.EventInput followup_event_input = 6;

Parameter
NameDescription
valueEventInput
Returns
TypeDescription
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.v2beta1.EventInput followup_event_input = 6;

Parameter
NameDescription
builderForValueEventInput.Builder
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameters
NameDescription
indexint
valueIntent.Message
Returns
TypeDescription
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.v2beta1.Intent.Message fulfillment_messages = 2;

Parameters
NameDescription
indexint
builderForValueIntent.Message.Builder
Returns
TypeDescription
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
NameDescription
valueString

The fulfillmentText to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for fulfillmentText to set.

Returns
TypeDescription
WebhookResponse.Builder

This builder for chaining.

setLiveAgentHandoff(boolean value)

public WebhookResponse.Builder setLiveAgentHandoff(boolean value)

Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.

bool live_agent_handoff = 7;

Parameter
NameDescription
valueboolean

The liveAgentHandoff to set.

Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameters
NameDescription
indexint
valueContext
Returns
TypeDescription
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.v2beta1.Context output_contexts = 5;

Parameters
NameDescription
indexint
builderForValueContext.Builder
Returns
TypeDescription
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
NameDescription
valueStruct
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
WebhookResponse.Builder

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

public WebhookResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameters
NameDescription
indexint
valueSessionEntityType
Returns
TypeDescription
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.v2beta1.SessionEntityType session_entity_types = 10;

Parameters
NameDescription
indexint
builderForValueSessionEntityType.Builder
Returns
TypeDescription
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
NameDescription
valueString

The source to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for source to set.

Returns
TypeDescription
WebhookResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final WebhookResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
WebhookResponse.Builder
Overrides