Class WebhookRequest

  • All Implemented Interfaces:
    WebhookRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class WebhookRequest
    extends com.google.protobuf.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
    See Also:
    Serialized Form
    • Field Detail

      • DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER

        public static final int DETECT_INTENT_RESPONSE_ID_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRIGGER_INTENT_FIELD_NUMBER

        public static final int TRIGGER_INTENT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRANSCRIPT_FIELD_NUMBER

        public static final int TRANSCRIPT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRIGGER_EVENT_FIELD_NUMBER

        public static final int TRIGGER_EVENT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DTMF_DIGITS_FIELD_NUMBER

        public static final int DTMF_DIGITS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LANGUAGE_CODE_FIELD_NUMBER

        public static final int LANGUAGE_CODE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FULFILLMENT_INFO_FIELD_NUMBER

        public static final int FULFILLMENT_INFO_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INTENT_INFO_FIELD_NUMBER

        public static final int INTENT_INFO_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SESSION_INFO_FIELD_NUMBER

        public static final int SESSION_INFO_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER

        public static final int SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getDetectIntentResponseId

        public String getDetectIntentResponseId()
         Always present. The unique identifier of the
         [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse]
         that will be returned to the API caller.
         
        string detect_intent_response_id = 1;
        Specified by:
        getDetectIntentResponseId in interface WebhookRequestOrBuilder
        Returns:
        The detectIntentResponseId.
      • getDetectIntentResponseIdBytes

        public com.google.protobuf.ByteString getDetectIntentResponseIdBytes()
         Always present. The unique identifier of the
         [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse]
         that will be returned to the API caller.
         
        string detect_intent_response_id = 1;
        Specified by:
        getDetectIntentResponseIdBytes in interface WebhookRequestOrBuilder
        Returns:
        The bytes for detectIntentResponseId.
      • hasText

        public boolean hasText()
         If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
         provided as input, this field will contain a copy of the text.
         
        string text = 10;
        Specified by:
        hasText in interface WebhookRequestOrBuilder
        Returns:
        Whether the text field is set.
      • getText

        public String getText()
         If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
         provided as input, this field will contain a copy of the text.
         
        string text = 10;
        Specified by:
        getText in interface WebhookRequestOrBuilder
        Returns:
        The text.
      • getTextBytes

        public com.google.protobuf.ByteString getTextBytes()
         If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was
         provided as input, this field will contain a copy of the text.
         
        string text = 10;
        Specified by:
        getTextBytes in interface WebhookRequestOrBuilder
        Returns:
        The bytes for text.
      • hasTriggerIntent

        public boolean hasTriggerIntent()
         If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] 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) = { ... }
        Specified by:
        hasTriggerIntent in interface WebhookRequestOrBuilder
        Returns:
        Whether the triggerIntent field is set.
      • getTriggerIntent

        public String getTriggerIntent()
         If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] 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) = { ... }
        Specified by:
        getTriggerIntent in interface WebhookRequestOrBuilder
        Returns:
        The triggerIntent.
      • getTriggerIntentBytes

        public com.google.protobuf.ByteString getTriggerIntentBytes()
         If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] 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) = { ... }
        Specified by:
        getTriggerIntentBytes in interface WebhookRequestOrBuilder
        Returns:
        The bytes for triggerIntent.
      • hasTranscript

        public boolean hasTranscript()
         If [natural language speech
         audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
         this field will contain the transcript for the audio.
         
        string transcript = 12;
        Specified by:
        hasTranscript in interface WebhookRequestOrBuilder
        Returns:
        Whether the transcript field is set.
      • getTranscript

        public String getTranscript()
         If [natural language speech
         audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
         this field will contain the transcript for the audio.
         
        string transcript = 12;
        Specified by:
        getTranscript in interface WebhookRequestOrBuilder
        Returns:
        The transcript.
      • getTranscriptBytes

        public com.google.protobuf.ByteString getTranscriptBytes()
         If [natural language speech
         audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
         this field will contain the transcript for the audio.
         
        string transcript = 12;
        Specified by:
        getTranscriptBytes in interface WebhookRequestOrBuilder
        Returns:
        The bytes for transcript.
      • hasTriggerEvent

        public boolean hasTriggerEvent()
         If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
         input, this field will contain the name of the event.
         
        string trigger_event = 14;
        Specified by:
        hasTriggerEvent in interface WebhookRequestOrBuilder
        Returns:
        Whether the triggerEvent field is set.
      • getTriggerEvent

        public String getTriggerEvent()
         If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
         input, this field will contain the name of the event.
         
        string trigger_event = 14;
        Specified by:
        getTriggerEvent in interface WebhookRequestOrBuilder
        Returns:
        The triggerEvent.
      • getTriggerEventBytes

        public com.google.protobuf.ByteString getTriggerEventBytes()
         If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as
         input, this field will contain the name of the event.
         
        string trigger_event = 14;
        Specified by:
        getTriggerEventBytes in interface WebhookRequestOrBuilder
        Returns:
        The bytes for triggerEvent.
      • hasDtmfDigits

        public boolean hasDtmfDigits()
         If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input,
         this field will contain the DTMF digits.
         
        string dtmf_digits = 17;
        Specified by:
        hasDtmfDigits in interface WebhookRequestOrBuilder
        Returns:
        Whether the dtmfDigits field is set.
      • getDtmfDigits

        public String getDtmfDigits()
         If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input,
         this field will contain the DTMF digits.
         
        string dtmf_digits = 17;
        Specified by:
        getDtmfDigits in interface WebhookRequestOrBuilder
        Returns:
        The dtmfDigits.
      • getDtmfDigitsBytes

        public com.google.protobuf.ByteString getDtmfDigitsBytes()
         If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input,
         this field will contain the DTMF digits.
         
        string dtmf_digits = 17;
        Specified by:
        getDtmfDigitsBytes in interface WebhookRequestOrBuilder
        Returns:
        The bytes for dtmfDigits.
      • getLanguageCode

        public String getLanguageCode()
         The language code specified in the [original
         request][QueryInput.language_code].
         
        string language_code = 15;
        Specified by:
        getLanguageCode in interface WebhookRequestOrBuilder
        Returns:
        The languageCode.
      • getLanguageCodeBytes

        public com.google.protobuf.ByteString getLanguageCodeBytes()
         The language code specified in the [original
         request][QueryInput.language_code].
         
        string language_code = 15;
        Specified by:
        getLanguageCodeBytes in interface WebhookRequestOrBuilder
        Returns:
        The bytes for languageCode.
      • 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;
        Specified by:
        hasFulfillmentInfo in interface WebhookRequestOrBuilder
        Returns:
        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;
        Specified by:
        hasIntentInfo in interface WebhookRequestOrBuilder
        Returns:
        Whether the intentInfo field is set.
      • hasPageInfo

        public boolean hasPageInfo()
         Information about page status.
         
        .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4;
        Specified by:
        hasPageInfo in interface WebhookRequestOrBuilder
        Returns:
        Whether the pageInfo field is set.
      • getPageInfo

        public PageInfo getPageInfo()
         Information about page status.
         
        .google.cloud.dialogflow.cx.v3.PageInfo page_info = 4;
        Specified by:
        getPageInfo in interface WebhookRequestOrBuilder
        Returns:
        The pageInfo.
      • hasSessionInfo

        public boolean hasSessionInfo()
         Information about session status.
         
        .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5;
        Specified by:
        hasSessionInfo in interface WebhookRequestOrBuilder
        Returns:
        Whether the sessionInfo field is set.
      • getSessionInfo

        public SessionInfo getSessionInfo()
         Information about session status.
         
        .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 5;
        Specified by:
        getSessionInfo in interface WebhookRequestOrBuilder
        Returns:
        The sessionInfo.
      • 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][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response];
         
        repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;
        Specified by:
        getMessagesList in interface WebhookRequestOrBuilder
      • 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][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response];
         
        repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;
        Specified by:
        getMessagesOrBuilderList in interface WebhookRequestOrBuilder
      • 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][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response];
         
        repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;
        Specified by:
        getMessagesCount in interface WebhookRequestOrBuilder
      • getMessages

        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][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response];
         
        repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;
        Specified by:
        getMessages in interface WebhookRequestOrBuilder
      • getMessagesOrBuilder

        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][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response];
         
        repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 7;
        Specified by:
        getMessagesOrBuilder in interface WebhookRequestOrBuilder
      • hasPayload

        public boolean hasPayload()
         Custom data set in
         [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload].
         
        .google.protobuf.Struct payload = 8;
        Specified by:
        hasPayload in interface WebhookRequestOrBuilder
        Returns:
        Whether the payload field is set.
      • getPayload

        public com.google.protobuf.Struct getPayload()
         Custom data set in
         [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload].
         
        .google.protobuf.Struct payload = 8;
        Specified by:
        getPayload in interface WebhookRequestOrBuilder
        Returns:
        The payload.
      • getPayloadOrBuilder

        public com.google.protobuf.StructOrBuilder getPayloadOrBuilder()
         Custom data set in
         [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload].
         
        .google.protobuf.Struct payload = 8;
        Specified by:
        getPayloadOrBuilder in interface WebhookRequestOrBuilder
      • 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;
        Specified by:
        hasSentimentAnalysisResult in interface WebhookRequestOrBuilder
        Returns:
        Whether the sentimentAnalysisResult field is set.
      • 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;
        Specified by:
        getSentimentAnalysisResult in interface WebhookRequestOrBuilder
        Returns:
        The sentimentAnalysisResult.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static WebhookRequest parseFrom​(ByteBuffer data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static WebhookRequest parseFrom​(ByteBuffer data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static WebhookRequest parseFrom​(com.google.protobuf.ByteString data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static WebhookRequest parseFrom​(com.google.protobuf.ByteString data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static WebhookRequest parseFrom​(byte[] data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static WebhookRequest parseFrom​(byte[] data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static WebhookRequest parseFrom​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws IOException
        Throws:
        IOException
      • newBuilderForType

        public WebhookRequest.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public WebhookRequest.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected WebhookRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static WebhookRequest getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<WebhookRequest> parser()
      • getParserForType

        public com.google.protobuf.Parser<WebhookRequest> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public WebhookRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder