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][google.cloud.dialogflow.v2beta1.QueryResult.diagnostic_info] field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error: - Use `""` for empty strings - Use `{}` or `null` for empty objects - Use `[]` or `null` for empty arrays For more information, see the [Protocol Buffers Language Guide](https://developers.google.com/protocol-buffers/docs/proto3#json).Protobuf type
google.cloud.dialogflow.v2beta1.WebhookResponse
Modifier and Type | Class and Description |
---|---|
static class |
WebhookResponse.Builder
The response message for a webhook call.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
Modifier and Type | Field and Description |
---|---|
static int |
END_INTERACTION_FIELD_NUMBER |
static int |
FOLLOWUP_EVENT_INPUT_FIELD_NUMBER |
static int |
FULFILLMENT_MESSAGES_FIELD_NUMBER |
static int |
FULFILLMENT_TEXT_FIELD_NUMBER |
static int |
LIVE_AGENT_HANDOFF_FIELD_NUMBER |
static int |
OUTPUT_CONTEXTS_FIELD_NUMBER |
static int |
PAYLOAD_FIELD_NUMBER |
static int |
SESSION_ENTITY_TYPES_FIELD_NUMBER |
static int |
SOURCE_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int FULFILLMENT_TEXT_FIELD_NUMBER
public static final int FULFILLMENT_MESSAGES_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER
public static final int PAYLOAD_FIELD_NUMBER
public static final int OUTPUT_CONTEXTS_FIELD_NUMBER
public static final int FOLLOWUP_EVENT_INPUT_FIELD_NUMBER
public static final int LIVE_AGENT_HANDOFF_FIELD_NUMBER
public static final int END_INTERACTION_FIELD_NUMBER
public static final int SESSION_ENTITY_TYPES_FIELD_NUMBER
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
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][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
string fulfillment_text = 1;
getFulfillmentText
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
string fulfillment_text = 1;
getFulfillmentTextBytes
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2;
getFulfillmentMessagesList
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2;
getFulfillmentMessagesOrBuilderList
in interface WebhookResponseOrBuilder
public int getFulfillmentMessagesCount()
Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2;
getFulfillmentMessagesCount
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2;
getFulfillmentMessages
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2;
getFulfillmentMessagesOrBuilder
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
string source = 3;
getSource
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
string source = 3;
getSourceBytes
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller. This field is also used by the [Google Assistant integration](https://cloud.google.com/dialogflow/docs/integrations/aog) for rich response messages. See the format definition at [Google Assistant Dialogflow webhook format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
.google.protobuf.Struct payload = 4;
hasPayload
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller. This field is also used by the [Google Assistant integration](https://cloud.google.com/dialogflow/docs/integrations/aog) for rich response messages. See the format definition at [Google Assistant Dialogflow webhook format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
.google.protobuf.Struct payload = 4;
getPayload
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller. This field is also used by the [Google Assistant integration](https://cloud.google.com/dialogflow/docs/integrations/aog) for rich response messages. See the format definition at [Google Assistant Dialogflow webhook format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
.google.protobuf.Struct payload = 4;
getPayloadOrBuilder
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5;
getOutputContextsList
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5;
getOutputContextsOrBuilderList
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5;
getOutputContextsCount
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5;
getOutputContexts
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5;
getOutputContextsOrBuilder
in interface WebhookResponseOrBuilder
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;
hasFollowupEventInput
in interface WebhookResponseOrBuilder
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;
getFollowupEventInput
in interface WebhookResponseOrBuilder
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;
getFollowupEventInputOrBuilder
in interface WebhookResponseOrBuilder
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;
getLiveAgentHandoff
in interface WebhookResponseOrBuilder
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;
getEndInteraction
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10;
getSessionEntityTypesList
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10;
getSessionEntityTypesOrBuilderList
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10;
getSessionEntityTypesCount
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10;
getSessionEntityTypes
in interface WebhookResponseOrBuilder
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][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10;
getSessionEntityTypesOrBuilder
in interface WebhookResponseOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static WebhookResponse parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static WebhookResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static WebhookResponse parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static WebhookResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static WebhookResponse parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static WebhookResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static WebhookResponse parseFrom(InputStream input) throws IOException
IOException
public static WebhookResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static WebhookResponse parseDelimitedFrom(InputStream input) throws IOException
IOException
public static WebhookResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static WebhookResponse parseFrom(CodedInputStream input) throws IOException
IOException
public static WebhookResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public WebhookResponse.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static WebhookResponse.Builder newBuilder()
public static WebhookResponse.Builder newBuilder(WebhookResponse prototype)
public WebhookResponse.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected WebhookResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static WebhookResponse getDefaultInstance()
public static Parser<WebhookResponse> parser()
public Parser<WebhookResponse> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public WebhookResponse getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.