public final class WebhookResponse extends GeneratedMessageV3 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
Static Fields
END_INTERACTION_FIELD_NUMBER
public static final int END_INTERACTION_FIELD_NUMBER
Field Value
public static final int FOLLOWUP_EVENT_INPUT_FIELD_NUMBER
Field Value
FULFILLMENT_MESSAGES_FIELD_NUMBER
public static final int FULFILLMENT_MESSAGES_FIELD_NUMBER
Field Value
FULFILLMENT_TEXT_FIELD_NUMBER
public static final int FULFILLMENT_TEXT_FIELD_NUMBER
Field Value
LIVE_AGENT_HANDOFF_FIELD_NUMBER
public static final int LIVE_AGENT_HANDOFF_FIELD_NUMBER
Field Value
OUTPUT_CONTEXTS_FIELD_NUMBER
public static final int OUTPUT_CONTEXTS_FIELD_NUMBER
Field Value
PAYLOAD_FIELD_NUMBER
public static final int PAYLOAD_FIELD_NUMBER
Field Value
SESSION_ENTITY_TYPES_FIELD_NUMBER
public static final int SESSION_ENTITY_TYPES_FIELD_NUMBER
Field Value
SOURCE_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static WebhookResponse getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static WebhookResponse.Builder newBuilder()
Returns
newBuilder(WebhookResponse prototype)
public static WebhookResponse.Builder newBuilder(WebhookResponse prototype)
Parameter
Returns
public static WebhookResponse parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static WebhookResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static WebhookResponse parseFrom(byte[] data)
Parameter
Name |
Description |
data |
byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static WebhookResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static WebhookResponse parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static WebhookResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static WebhookResponse parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static WebhookResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static WebhookResponse parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static WebhookResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static WebhookResponse parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static WebhookResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<WebhookResponse> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public WebhookResponse getDefaultInstanceForType()
Returns
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
Type |
Description |
boolean |
The endInteraction.
|
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
Type |
Description |
EventInput |
The followupEventInput.
|
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
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
Name |
Description |
index |
int
|
Returns
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
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
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
Name |
Description |
index |
int
|
Returns
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
Type |
Description |
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
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.
|
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
Type |
Description |
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
Name |
Description |
index |
int
|
Returns
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
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
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
Name |
Description |
index |
int
|
Returns
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
Type |
Description |
List<? extends com.google.cloud.dialogflow.v2beta1.ContextOrBuilder> |
|
getParserForType()
public Parser<WebhookResponse> getParserForType()
Returns
Overrides
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.
|
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
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
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
Name |
Description |
index |
int
|
Returns
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
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
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
Name |
Description |
index |
int
|
Returns
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
Type |
Description |
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
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
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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
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.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public WebhookResponse.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected WebhookResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public WebhookResponse.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions