Class WebhookRequest (0.54.0)

public final class WebhookRequest extends GeneratedMessageV3 implements WebhookRequestOrBuilder

The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.

You may see undocumented fields in an actual request. These fields are used internally by Dialogflow and should be ignored.

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

Static Fields

DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER

public static final int DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER
Field Value
Type Description
int

DTMF_DIGITS_FIELD_NUMBER

public static final int DTMF_DIGITS_FIELD_NUMBER
Field Value
Type Description
int

FULFILLMENT_INFO_FIELD_NUMBER

public static final int FULFILLMENT_INFO_FIELD_NUMBER
Field Value
Type Description
int

INTENT_INFO_FIELD_NUMBER

public static final int INTENT_INFO_FIELD_NUMBER
Field Value
Type Description
int

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
Type Description
int

MESSAGES_FIELD_NUMBER

public static final int MESSAGES_FIELD_NUMBER
Field Value
Type Description
int

PAGE_INFO_FIELD_NUMBER

public static final int PAGE_INFO_FIELD_NUMBER
Field Value
Type Description
int

PAYLOAD_FIELD_NUMBER

public static final int PAYLOAD_FIELD_NUMBER
Field Value
Type Description
int

SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER

public static final int SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER
Field Value
Type Description
int

SESSION_INFO_FIELD_NUMBER

public static final int SESSION_INFO_FIELD_NUMBER
Field Value
Type Description
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
Type Description
int

TRANSCRIPT_FIELD_NUMBER

public static final int TRANSCRIPT_FIELD_NUMBER
Field Value
Type Description
int

TRIGGER_EVENT_FIELD_NUMBER

public static final int TRIGGER_EVENT_FIELD_NUMBER
Field Value
Type Description
int

TRIGGER_INTENT_FIELD_NUMBER

public static final int TRIGGER_INTENT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static WebhookRequest getDefaultInstance()
Returns
Type Description
WebhookRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static WebhookRequest.Builder newBuilder()
Returns
Type Description
WebhookRequest.Builder

newBuilder(WebhookRequest prototype)

public static WebhookRequest.Builder newBuilder(WebhookRequest prototype)
Parameter
Name Description
prototype WebhookRequest
Returns
Type Description
WebhookRequest.Builder

parseDelimitedFrom(InputStream input)

public static WebhookRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
WebhookRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WebhookRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WebhookRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static WebhookRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
WebhookRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static WebhookRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WebhookRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static WebhookRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
WebhookRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static WebhookRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WebhookRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static WebhookRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
WebhookRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static WebhookRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WebhookRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static WebhookRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
WebhookRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WebhookRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WebhookRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static WebhookRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
WebhookRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static WebhookRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WebhookRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<WebhookRequest> parser()
Returns
Type Description
Parser<WebhookRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public WebhookRequest getDefaultInstanceForType()
Returns
Type Description
WebhookRequest

getDetectIntentResponseId()

public String getDetectIntentResponseId()

Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller.

string detect_intent_response_id = 1;

Returns
Type Description
String

The detectIntentResponseId.

getDetectIntentResponseIdBytes()

public ByteString getDetectIntentResponseIdBytes()

Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller.

string detect_intent_response_id = 1;

Returns
Type Description
ByteString

The bytes for detectIntentResponseId.

getDtmfDigits()

public String getDtmfDigits()

If DTMF was provided as input, this field will contain the DTMF digits.

string dtmf_digits = 17;

Returns
Type Description
String

The dtmfDigits.

getDtmfDigitsBytes()

public ByteString getDtmfDigitsBytes()

If DTMF was provided as input, this field will contain the DTMF digits.

string dtmf_digits = 17;

Returns
Type Description
ByteString

The bytes for dtmfDigits.

getFulfillmentInfo()

public WebhookRequest.FulfillmentInfo getFulfillmentInfo()

Always present. Information about the fulfillment that triggered this webhook call.

.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6;

Returns
Type Description
WebhookRequest.FulfillmentInfo

The fulfillmentInfo.

getFulfillmentInfoOrBuilder()

public WebhookRequest.FulfillmentInfoOrBuilder getFulfillmentInfoOrBuilder()

Always present. Information about the fulfillment that triggered this webhook call.

.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6;

Returns
Type Description
WebhookRequest.FulfillmentInfoOrBuilder

getIntentInfo()

public WebhookRequest.IntentInfo getIntentInfo()

Information about the last matched intent.

.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3;

Returns
Type Description
WebhookRequest.IntentInfo

The intentInfo.

getIntentInfoOrBuilder()

public WebhookRequest.IntentInfoOrBuilder getIntentInfoOrBuilder()

Information about the last matched intent.

.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3;

Returns
Type Description
WebhookRequest.IntentInfoOrBuilder

getLanguageCode()

public String getLanguageCode()

The language code specified in the original request.

string language_code = 15;

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

The language code specified in the original request.

string language_code = 15;

Returns
Type Description
ByteString

The bytes for languageCode.

getMessages(int index)

public ResponseMessage getMessages(int index)

The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response;

repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;

Parameter
Name Description
index int
Returns
Type Description
ResponseMessage

getMessagesCount()

public int getMessagesCount()

The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response;

repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;

Returns
Type Description
int

getMessagesList()

public List<ResponseMessage> getMessagesList()

The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response;

repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;

Returns
Type Description
List<ResponseMessage>

getMessagesOrBuilder(int index)

public ResponseMessageOrBuilder getMessagesOrBuilder(int index)

The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response;

repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;

Parameter
Name Description
index int
Returns
Type Description
ResponseMessageOrBuilder

getMessagesOrBuilderList()

public List<? extends ResponseMessageOrBuilder> getMessagesOrBuilderList()

The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response;

repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>

getPageInfo()

public PageInfo getPageInfo()

Information about page status.

.google.cloud.dialogflow.cx.v3.PageInfo page_info = 4;

Returns
Type Description
PageInfo

The pageInfo.

getPageInfoOrBuilder()

public PageInfoOrBuilder getPageInfoOrBuilder()

Information about page status.

.google.cloud.dialogflow.cx.v3.PageInfo page_info = 4;

Returns
Type Description
PageInfoOrBuilder

getParserForType()

public Parser<WebhookRequest> getParserForType()
Returns
Type Description
Parser<WebhookRequest>
Overrides

getPayload()

public Struct getPayload()

Custom data set in QueryParameters.payload.

.google.protobuf.Struct payload = 8;

Returns
Type Description
Struct

The payload.

getPayloadOrBuilder()

public StructOrBuilder getPayloadOrBuilder()

Custom data set in QueryParameters.payload.

.google.protobuf.Struct payload = 8;

Returns
Type Description
StructOrBuilder

getQueryCase()

public WebhookRequest.QueryCase getQueryCase()
Returns
Type Description
WebhookRequest.QueryCase

getSentimentAnalysisResult()

public WebhookRequest.SentimentAnalysisResult getSentimentAnalysisResult()

The sentiment analysis result of the current user request. The field is filled when sentiment analysis is configured to be enabled for the request.

.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9;

Returns
Type Description
WebhookRequest.SentimentAnalysisResult

The sentimentAnalysisResult.

getSentimentAnalysisResultOrBuilder()

public WebhookRequest.SentimentAnalysisResultOrBuilder getSentimentAnalysisResultOrBuilder()

The sentiment analysis result of the current user request. The field is filled when sentiment analysis is configured to be enabled for the request.

.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9;

Returns
Type Description
WebhookRequest.SentimentAnalysisResultOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSessionInfo()

public SessionInfo getSessionInfo()

Information about session status.

.google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5;

Returns
Type Description
SessionInfo

The sessionInfo.

getSessionInfoOrBuilder()

public SessionInfoOrBuilder getSessionInfoOrBuilder()

Information about session status.

.google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5;

Returns
Type Description
SessionInfoOrBuilder

getText()

public String getText()

If natural language text was provided as input, this field will contain a copy of the text.

string text = 10;

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

If natural language text was provided as input, this field will contain a copy of the text.

string text = 10;

Returns
Type Description
ByteString

The bytes for text.

getTranscript()

public String getTranscript()

If natural language speech audio was provided as input, this field will contain the transcript for the audio.

string transcript = 12;

Returns
Type Description
String

The transcript.

getTranscriptBytes()

public ByteString getTranscriptBytes()

If natural language speech audio was provided as input, this field will contain the transcript for the audio.

string transcript = 12;

Returns
Type Description
ByteString

The bytes for transcript.

getTriggerEvent()

public String getTriggerEvent()

If an event was provided as input, this field will contain the name of the event.

string trigger_event = 14;

Returns
Type Description
String

The triggerEvent.

getTriggerEventBytes()

public ByteString getTriggerEventBytes()

If an event was provided as input, this field will contain the name of the event.

string trigger_event = 14;

Returns
Type Description
ByteString

The bytes for triggerEvent.

getTriggerIntent()

public String getTriggerIntent()

If an intent was provided as input, this field will contain a copy of the intent identifier. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>.

string trigger_intent = 11 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The triggerIntent.

getTriggerIntentBytes()

public ByteString getTriggerIntentBytes()

If an intent was provided as input, this field will contain a copy of the intent identifier. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>.

string trigger_intent = 11 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for triggerIntent.

hasDtmfDigits()

public boolean hasDtmfDigits()

If DTMF was provided as input, this field will contain the DTMF digits.

string dtmf_digits = 17;

Returns
Type Description
boolean

Whether the dtmfDigits field is set.

hasFulfillmentInfo()

public boolean hasFulfillmentInfo()

Always present. Information about the fulfillment that triggered this webhook call.

.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo fulfillment_info = 6;

Returns
Type Description
boolean

Whether the fulfillmentInfo field is set.

hasIntentInfo()

public boolean hasIntentInfo()

Information about the last matched intent.

.google.cloud.dialogflow.cx.v3.WebhookRequest.IntentInfo intent_info = 3;

Returns
Type Description
boolean

Whether the intentInfo field is set.

hasPageInfo()

public boolean hasPageInfo()

Information about page status.

.google.cloud.dialogflow.cx.v3.PageInfo page_info = 4;

Returns
Type Description
boolean

Whether the pageInfo field is set.

hasPayload()

public boolean hasPayload()

Custom data set in QueryParameters.payload.

.google.protobuf.Struct payload = 8;

Returns
Type Description
boolean

Whether the payload field is set.

hasSentimentAnalysisResult()

public boolean hasSentimentAnalysisResult()

The sentiment analysis result of the current user request. The field is filled when sentiment analysis is configured to be enabled for the request.

.google.cloud.dialogflow.cx.v3.WebhookRequest.SentimentAnalysisResult sentiment_analysis_result = 9;

Returns
Type Description
boolean

Whether the sentimentAnalysisResult field is set.

hasSessionInfo()

public boolean hasSessionInfo()

Information about session status.

.google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5;

Returns
Type Description
boolean

Whether the sessionInfo field is set.

hasText()

public boolean hasText()

If natural language text was provided as input, this field will contain a copy of the text.

string text = 10;

Returns
Type Description
boolean

Whether the text field is set.

hasTranscript()

public boolean hasTranscript()

If natural language speech audio was provided as input, this field will contain the transcript for the audio.

string transcript = 12;

Returns
Type Description
boolean

Whether the transcript field is set.

hasTriggerEvent()

public boolean hasTriggerEvent()

If an event was provided as input, this field will contain the name of the event.

string trigger_event = 14;

Returns
Type Description
boolean

Whether the triggerEvent field is set.

hasTriggerIntent()

public boolean hasTriggerIntent()

If an intent was provided as input, this field will contain a copy of the intent identifier. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>.

string trigger_intent = 11 [(.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the triggerIntent field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public WebhookRequest.Builder newBuilderForType()
Returns
Type Description
WebhookRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected WebhookRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
WebhookRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public WebhookRequest.Builder toBuilder()
Returns
Type Description
WebhookRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException