# frozen_string_literal: true # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! module Google module Cloud module Dialogflow module V2 # The request message for a webhook call. # @!attribute [rw] session # @return [String] # The unique identifier of detectIntent request session. # Can be used to identify end-user inside webhook implementation. # Format: `projects//agent/sessions/`, or # `projects//agent/environments//users//sessions/`. # @!attribute [rw] response_id # @return [String] # The unique identifier of the response. Contains the same value as # `[Streaming]DetectIntentResponse.response_id`. # @!attribute [rw] query_result # @return [Google::Cloud::Dialogflow::V2::QueryResult] # The result of the conversational query or event processing. Contains the # same value as `[Streaming]DetectIntentResponse.query_result`. # @!attribute [rw] original_detect_intent_request # @return [Google::Cloud::Dialogflow::V2::OriginalDetectIntentRequest] # Optional. The contents of the original request that was passed to # `[Streaming]DetectIntent` call. class WebhookRequest include Google::Protobuf::MessageExts extend Google::Protobuf::MessageExts::ClassMethods end # 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 {Google::Cloud::Dialogflow::V2::QueryResult#diagnostic_info 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). # @!attribute [rw] fulfillment_text # @return [String] # Optional. The text to be shown on the screen. This value is passed directly # to `QueryResult.fulfillment_text`. # @!attribute [rw] fulfillment_messages # @return [Array] # Optional. The collection of rich messages to present to the user. This # value is passed directly to `QueryResult.fulfillment_messages`. # @!attribute [rw] source # @return [String] # Optional. This value is passed directly to `QueryResult.webhook_source`. # @!attribute [rw] payload # @return [Google::Protobuf::Struct] # Optional. This field can be used to pass custom data from your webhook to the API # caller. Arbitrary JSON objects are supported. # When provided, Dialogflow uses this field to populate # `QueryResult.webhook_payload` sent to the 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) # @!attribute [rw] output_contexts # @return [Array] # Optional. The collection of output contexts. This value is passed directly # to `QueryResult.output_contexts`. # @!attribute [rw] followup_event_input # @return [Google::Cloud::Dialogflow::V2::EventInput] # Optional. Makes the platform immediately invoke another `DetectIntent` call # internally with the specified event as input. # When this field is set, Dialogflow ignores the `fulfillment_text`, # `fulfillment_messages`, and `payload` fields. # @!attribute [rw] session_entity_types # @return [Array] # 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 of this query. Setting the session entity types inside # webhook overwrites the session entity types that have been set through # `DetectIntentRequest.query_params.session_entity_types`. class WebhookResponse include Google::Protobuf::MessageExts extend Google::Protobuf::MessageExts::ClassMethods end # Represents the contents of the original request that was passed to # the `[Streaming]DetectIntent` call. # @!attribute [rw] source # @return [String] # The source of this request, e.g., `google`, `facebook`, `slack`. It is set # by Dialogflow-owned servers. # @!attribute [rw] version # @return [String] # Optional. The version of the protocol used for this request. # This field is AoG-specific. # @!attribute [rw] payload # @return [Google::Protobuf::Struct] # Optional. This field is set to the value of the `QueryParameters.payload` # field passed in the request. Some integrations that query a Dialogflow # agent may provide additional information in the payload. # # In particular, for the Dialogflow Phone Gateway integration, this field has # the form: #
{
        #      "telephony": {
        #        "caller_id": "+18558363987"
        #      }
        #     }
# Note: The caller ID field (`caller_id`) will be redacted for Standard # Edition agents and populated with the caller ID in [E.164 # format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. class OriginalDetectIntentRequest include Google::Protobuf::MessageExts extend Google::Protobuf::MessageExts::ClassMethods end end end end end