Class WebhookRequest (0.22.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
TypeDescription
int

FULFILLMENT_INFO_FIELD_NUMBER

public static final int FULFILLMENT_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

INTENT_INFO_FIELD_NUMBER

public static final int INTENT_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

MESSAGES_FIELD_NUMBER

public static final int MESSAGES_FIELD_NUMBER
Field Value
TypeDescription
int

PAGE_INFO_FIELD_NUMBER

public static final int PAGE_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

PAYLOAD_FIELD_NUMBER

public static final int PAYLOAD_FIELD_NUMBER
Field Value
TypeDescription
int

SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER

public static final int SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER
Field Value
TypeDescription
int

SESSION_INFO_FIELD_NUMBER

public static final int SESSION_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSCRIPT_FIELD_NUMBER

public static final int TRANSCRIPT_FIELD_NUMBER
Field Value
TypeDescription
int

TRIGGER_EVENT_FIELD_NUMBER

public static final int TRIGGER_EVENT_FIELD_NUMBER
Field Value
TypeDescription
int

TRIGGER_INTENT_FIELD_NUMBER

public static final int TRIGGER_INTENT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static WebhookRequest getDefaultInstance()
Returns
TypeDescription
WebhookRequest

getDescriptor()

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

newBuilder()

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

newBuilder(WebhookRequest prototype)

public static WebhookRequest.Builder newBuilder(WebhookRequest prototype)
Parameter
NameDescription
prototypeWebhookRequest
Returns
TypeDescription
WebhookRequest.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public WebhookRequest getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for detectIntentResponseId.

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
TypeDescription
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
TypeDescription
WebhookRequest.FulfillmentInfoOrBuilder

getIntentInfo()

public WebhookRequest.IntentInfo getIntentInfo()

Information about the last matched intent.

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

Returns
TypeDescription
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
TypeDescription
WebhookRequest.IntentInfoOrBuilder

getLanguageCode()

public String getLanguageCode()

The language code specified in the original request.

string language_code = 15;

Returns
TypeDescription
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

The language code specified in the original request.

string language_code = 15;

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
PageInfo

The pageInfo.

getPageInfoOrBuilder()

public PageInfoOrBuilder getPageInfoOrBuilder()

Information about page status.

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

Returns
TypeDescription
PageInfoOrBuilder

getParserForType()

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

getPayload()

public Struct getPayload()

Custom data set in QueryParameters.payload.

.google.protobuf.Struct payload = 8;

Returns
TypeDescription
Struct

The payload.

getPayloadOrBuilder()

public StructOrBuilder getPayloadOrBuilder()

Custom data set in QueryParameters.payload.

.google.protobuf.Struct payload = 8;

Returns
TypeDescription
StructOrBuilder

getQueryCase()

public WebhookRequest.QueryCase getQueryCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
WebhookRequest.SentimentAnalysisResultOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSessionInfo()

public SessionInfo getSessionInfo()

Information about session status.

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

Returns
TypeDescription
SessionInfo

The sessionInfo.

getSessionInfoOrBuilder()

public SessionInfoOrBuilder getSessionInfoOrBuilder()

Information about session status.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for triggerIntent.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the pageInfo field is set.

hasPayload()

public boolean hasPayload()

Custom data set in QueryParameters.payload.

.google.protobuf.Struct payload = 8;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the triggerIntent 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 WebhookRequest.Builder newBuilderForType()
Returns
TypeDescription
WebhookRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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