Class: Google::Cloud::Dialogflow::V2::WebhookResponse

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/dialogflow/v2/webhook.rb

Overview

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 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.

Instance Attribute Summary collapse

Instance Attribute Details

#followup_event_inputGoogle::Cloud::Dialogflow::V2::EventInput

Returns 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.

Returns:

  • (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.



116
117
118
119
# File 'proto_docs/google/cloud/dialogflow/v2/webhook.rb', line 116

class WebhookResponse
  include Google::Protobuf::MessageExts
  extend Google::Protobuf::MessageExts::ClassMethods
end

#fulfillment_messagesArray<Google::Cloud::Dialogflow::V2::Intent::Message>

Returns Optional. The collection of rich messages to present to the user. This value is passed directly to QueryResult.fulfillment_messages.

Returns:



116
117
118
119
# File 'proto_docs/google/cloud/dialogflow/v2/webhook.rb', line 116

class WebhookResponse
  include Google::Protobuf::MessageExts
  extend Google::Protobuf::MessageExts::ClassMethods
end

#fulfillment_textString

Returns Optional. The text to be shown on the screen. This value is passed directly to QueryResult.fulfillment_text.

Returns:

  • (String)

    Optional. The text to be shown on the screen. This value is passed directly to QueryResult.fulfillment_text.



116
117
118
119
# File 'proto_docs/google/cloud/dialogflow/v2/webhook.rb', line 116

class WebhookResponse
  include Google::Protobuf::MessageExts
  extend Google::Protobuf::MessageExts::ClassMethods
end

#output_contextsArray<Google::Cloud::Dialogflow::V2::Context>

Returns Optional. The collection of output contexts. This value is passed directly to QueryResult.output_contexts.

Returns:



116
117
118
119
# File 'proto_docs/google/cloud/dialogflow/v2/webhook.rb', line 116

class WebhookResponse
  include Google::Protobuf::MessageExts
  extend Google::Protobuf::MessageExts::ClassMethods
end

#payloadGoogle::Protobuf::Struct

Returns Optional. This value is passed directly to QueryResult.webhook_payload. See the related fulfillment_messages[i].payload field, which may be used as an alternative to this field.

This field can be used for Actions on Google responses. It should have a structure similar to the JSON message shown here. For more information, see Actions on Google Webhook Format

{
  "google": {
    "expectUserResponse": true,
    "richResponse": {
      "items": [
        {
          "simpleResponse": {
            "textToSpeech": "this is a simple response"
          }
        }
      ]
    }
  }
}
.

Returns:

  • (Google::Protobuf::Struct)

    Optional. This value is passed directly to QueryResult.webhook_payload. See the related fulfillment_messages[i].payload field, which may be used as an alternative to this field.

    This field can be used for Actions on Google responses. It should have a structure similar to the JSON message shown here. For more information, see Actions on Google Webhook Format

    {
      "google": {
        "expectUserResponse": true,
        "richResponse": {
          "items": [
            {
              "simpleResponse": {
                "textToSpeech": "this is a simple response"
              }
            }
          ]
        }
      }
    }
    


116
117
118
119
# File 'proto_docs/google/cloud/dialogflow/v2/webhook.rb', line 116

class WebhookResponse
  include Google::Protobuf::MessageExts
  extend Google::Protobuf::MessageExts::ClassMethods
end

#session_entity_typesArray<Google::Cloud::Dialogflow::V2::SessionEntityType>

Returns 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.

Returns:

  • (Array<Google::Cloud::Dialogflow::V2::SessionEntityType>)

    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.



116
117
118
119
# File 'proto_docs/google/cloud/dialogflow/v2/webhook.rb', line 116

class WebhookResponse
  include Google::Protobuf::MessageExts
  extend Google::Protobuf::MessageExts::ClassMethods
end

#sourceString

Returns Optional. This value is passed directly to QueryResult.webhook_source.

Returns:

  • (String)

    Optional. This value is passed directly to QueryResult.webhook_source.



116
117
118
119
# File 'proto_docs/google/cloud/dialogflow/v2/webhook.rb', line 116

class WebhookResponse
  include Google::Protobuf::MessageExts
  extend Google::Protobuf::MessageExts::ClassMethods
end