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.v2.WebhookResponse
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
Static Fields
public static final int FOLLOWUP_EVENT_INPUT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
FULFILLMENT_MESSAGES_FIELD_NUMBER
public static final int FULFILLMENT_MESSAGES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
FULFILLMENT_TEXT_FIELD_NUMBER
public static final int FULFILLMENT_TEXT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
OUTPUT_CONTEXTS_FIELD_NUMBER
public static final int OUTPUT_CONTEXTS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PAYLOAD_FIELD_NUMBER
public static final int PAYLOAD_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SESSION_ENTITY_TYPES_FIELD_NUMBER
public static final int SESSION_ENTITY_TYPES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SOURCE_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static WebhookResponse getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static WebhookResponse.Builder newBuilder()
newBuilder(WebhookResponse prototype)
public static WebhookResponse.Builder newBuilder(WebhookResponse prototype)
public static WebhookResponse parseDelimitedFrom(InputStream input)
public static WebhookResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static WebhookResponse parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static WebhookResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static WebhookResponse parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static WebhookResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static WebhookResponse parseFrom(CodedInputStream input)
public static WebhookResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static WebhookResponse parseFrom(InputStream input)
public static WebhookResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static WebhookResponse parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static WebhookResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<WebhookResponse> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public WebhookResponse getDefaultInstanceForType()
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.
|
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;
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
|
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;
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
|
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
|
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;
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
|
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> |
|
getParserForType()
public Parser<WebhookResponse> getParserForType()
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;
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
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.v2.SessionEntityType session_entity_types = 10;
Parameter |
Name |
Description |
index |
int
|
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;
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
|
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.
|
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.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public WebhookResponse.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected WebhookResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public WebhookResponse.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides