Class ResponseMessage (0.14.0)

public final class ResponseMessage extends GeneratedMessageV3 implements ResponseMessageOrBuilder

Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows:

  • If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis.
  • If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design.
  • Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.

Protobuf type google.cloud.dialogflow.cx.v3.ResponseMessage

Static Fields

CONVERSATION_SUCCESS_FIELD_NUMBER

public static final int CONVERSATION_SUCCESS_FIELD_NUMBER
Field Value
TypeDescription
int

END_INTERACTION_FIELD_NUMBER

public static final int END_INTERACTION_FIELD_NUMBER
Field Value
TypeDescription
int

LIVE_AGENT_HANDOFF_FIELD_NUMBER

public static final int LIVE_AGENT_HANDOFF_FIELD_NUMBER
Field Value
TypeDescription
int

MIXED_AUDIO_FIELD_NUMBER

public static final int MIXED_AUDIO_FIELD_NUMBER
Field Value
TypeDescription
int

OUTPUT_AUDIO_TEXT_FIELD_NUMBER

public static final int OUTPUT_AUDIO_TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

PAYLOAD_FIELD_NUMBER

public static final int PAYLOAD_FIELD_NUMBER
Field Value
TypeDescription
int

PLAY_AUDIO_FIELD_NUMBER

public static final int PLAY_AUDIO_FIELD_NUMBER
Field Value
TypeDescription
int

TELEPHONY_TRANSFER_CALL_FIELD_NUMBER

public static final int TELEPHONY_TRANSFER_CALL_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ResponseMessage getDefaultInstance()
Returns
TypeDescription
ResponseMessage

getDescriptor()

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

newBuilder()

public static ResponseMessage.Builder newBuilder()
Returns
TypeDescription
ResponseMessage.Builder

newBuilder(ResponseMessage prototype)

public static ResponseMessage.Builder newBuilder(ResponseMessage prototype)
Parameter
NameDescription
prototypeResponseMessage
Returns
TypeDescription
ResponseMessage.Builder

parseDelimitedFrom(InputStream input)

public static ResponseMessage parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResponseMessage parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ResponseMessage parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ResponseMessage parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ResponseMessage parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ResponseMessage parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ResponseMessage parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ResponseMessage parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ResponseMessage parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResponseMessage parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ResponseMessage parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ResponseMessage parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResponseMessage
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ResponseMessage> parser()
Returns
TypeDescription
Parser<ResponseMessage>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getConversationSuccess()

public ResponseMessage.ConversationSuccess getConversationSuccess()

Indicates that the conversation succeeded.

.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;

Returns
TypeDescription
ResponseMessage.ConversationSuccess

The conversationSuccess.

getConversationSuccessOrBuilder()

public ResponseMessage.ConversationSuccessOrBuilder getConversationSuccessOrBuilder()

Indicates that the conversation succeeded.

.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;

Returns
TypeDescription
ResponseMessage.ConversationSuccessOrBuilder

getDefaultInstanceForType()

public ResponseMessage getDefaultInstanceForType()
Returns
TypeDescription
ResponseMessage

getEndInteraction()

public ResponseMessage.EndInteraction getEndInteraction()

Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches END_SESSION page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.

.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResponseMessage.EndInteraction

The endInteraction.

getEndInteractionOrBuilder()

public ResponseMessage.EndInteractionOrBuilder getEndInteractionOrBuilder()

Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches END_SESSION page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.

.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResponseMessage.EndInteractionOrBuilder

getLiveAgentHandoff()

public ResponseMessage.LiveAgentHandoff getLiveAgentHandoff()

Hands off conversation to a human agent.

.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;

Returns
TypeDescription
ResponseMessage.LiveAgentHandoff

The liveAgentHandoff.

getLiveAgentHandoffOrBuilder()

public ResponseMessage.LiveAgentHandoffOrBuilder getLiveAgentHandoffOrBuilder()

Hands off conversation to a human agent.

.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;

Returns
TypeDescription
ResponseMessage.LiveAgentHandoffOrBuilder

getMessageCase()

public ResponseMessage.MessageCase getMessageCase()
Returns
TypeDescription
ResponseMessage.MessageCase

getMixedAudio()

public ResponseMessage.MixedAudio getMixedAudio()

Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.

.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResponseMessage.MixedAudio

The mixedAudio.

getMixedAudioOrBuilder()

public ResponseMessage.MixedAudioOrBuilder getMixedAudioOrBuilder()

Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.

.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResponseMessage.MixedAudioOrBuilder

getOutputAudioText()

public ResponseMessage.OutputAudioText getOutputAudioText()

A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.

.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;

Returns
TypeDescription
ResponseMessage.OutputAudioText

The outputAudioText.

getOutputAudioTextOrBuilder()

public ResponseMessage.OutputAudioTextOrBuilder getOutputAudioTextOrBuilder()

A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.

.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;

Returns
TypeDescription
ResponseMessage.OutputAudioTextOrBuilder

getParserForType()

public Parser<ResponseMessage> getParserForType()
Returns
TypeDescription
Parser<ResponseMessage>
Overrides

getPayload()

public Struct getPayload()

Returns a response containing a custom, platform-specific payload.

.google.protobuf.Struct payload = 2;

Returns
TypeDescription
Struct

The payload.

getPayloadOrBuilder()

public StructOrBuilder getPayloadOrBuilder()

Returns a response containing a custom, platform-specific payload.

.google.protobuf.Struct payload = 2;

Returns
TypeDescription
StructOrBuilder

getPlayAudio()

public ResponseMessage.PlayAudio getPlayAudio()

Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to construct mixed_audio. However, Dialogflow itself does not try to read or process the URI in any way.

.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;

Returns
TypeDescription
ResponseMessage.PlayAudio

The playAudio.

getPlayAudioOrBuilder()

public ResponseMessage.PlayAudioOrBuilder getPlayAudioOrBuilder()

Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to construct mixed_audio. However, Dialogflow itself does not try to read or process the URI in any way.

.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;

Returns
TypeDescription
ResponseMessage.PlayAudioOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTelephonyTransferCall()

public ResponseMessage.TelephonyTransferCall getTelephonyTransferCall()

A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.

.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18;

Returns
TypeDescription
ResponseMessage.TelephonyTransferCall

The telephonyTransferCall.

getTelephonyTransferCallOrBuilder()

public ResponseMessage.TelephonyTransferCallOrBuilder getTelephonyTransferCallOrBuilder()

A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.

.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18;

Returns
TypeDescription
ResponseMessage.TelephonyTransferCallOrBuilder

getText()

public ResponseMessage.Text getText()

Returns a text response.

.google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;

Returns
TypeDescription
ResponseMessage.Text

The text.

getTextOrBuilder()

public ResponseMessage.TextOrBuilder getTextOrBuilder()

Returns a text response.

.google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;

Returns
TypeDescription
ResponseMessage.TextOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasConversationSuccess()

public boolean hasConversationSuccess()

Indicates that the conversation succeeded.

.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;

Returns
TypeDescription
boolean

Whether the conversationSuccess field is set.

hasEndInteraction()

public boolean hasEndInteraction()

Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches END_SESSION page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.

.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the endInteraction field is set.

hasLiveAgentHandoff()

public boolean hasLiveAgentHandoff()

Hands off conversation to a human agent.

.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;

Returns
TypeDescription
boolean

Whether the liveAgentHandoff field is set.

hasMixedAudio()

public boolean hasMixedAudio()

Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.

.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the mixedAudio field is set.

hasOutputAudioText()

public boolean hasOutputAudioText()

A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.

.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;

Returns
TypeDescription
boolean

Whether the outputAudioText field is set.

hasPayload()

public boolean hasPayload()

Returns a response containing a custom, platform-specific payload.

.google.protobuf.Struct payload = 2;

Returns
TypeDescription
boolean

Whether the payload field is set.

hasPlayAudio()

public boolean hasPlayAudio()

Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to construct mixed_audio. However, Dialogflow itself does not try to read or process the URI in any way.

.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;

Returns
TypeDescription
boolean

Whether the playAudio field is set.

hasTelephonyTransferCall()

public boolean hasTelephonyTransferCall()

A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.

.google.cloud.dialogflow.cx.v3.ResponseMessage.TelephonyTransferCall telephony_transfer_call = 18;

Returns
TypeDescription
boolean

Whether the telephonyTransferCall field is set.

hasText()

public boolean hasText()

Returns a text response.

.google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;

Returns
TypeDescription
boolean

Whether the text field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ResponseMessage.Builder newBuilderForType()
Returns
TypeDescription
ResponseMessage.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ResponseMessage.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ResponseMessage.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ResponseMessage.Builder toBuilder()
Returns
TypeDescription
ResponseMessage.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException