Class: Google::Cloud::Dialogflow::V2::Intent::Message
- Inherits:
-
Object
- Object
- Google::Cloud::Dialogflow::V2::Intent::Message
- Defined in:
- lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb
Overview
Corresponds to the +Response+ field in the Dialogflow console.
Defined Under Namespace
Modules: Platform Classes: BasicCard, Card, CarouselSelect, Image, LinkOutSuggestion, ListSelect, QuickReplies, SelectItemInfo, SimpleResponse, SimpleResponses, Suggestion, Suggestions, Text
Instance Attribute Summary collapse
-
#basic_card ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard
The basic card response for Actions on Google.
-
#card ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Card
The card response.
-
#carousel_select ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect
The carousel card response for Actions on Google.
-
#image ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Image
The image response.
-
#link_out_suggestion ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion
The link out suggestion chip for Actions on Google.
-
#list_select ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect
The list card response for Actions on Google.
-
#payload ⇒ Google::Protobuf::Struct
Returns a response containing a custom, platform-specific payload.
-
#platform ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Platform
Optional.
-
#quick_replies ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies
The quick replies response.
-
#simple_responses ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses
The voice and text-only responses for Actions on Google.
-
#suggestions ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions
The suggestion chips for Actions on Google.
-
#text ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Text
The text response.
Instance Attribute Details
#basic_card ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard
Returns The basic card response for Actions on Google.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#card ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Card
Returns The card response.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#carousel_select ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect
Returns The carousel card response for Actions on Google.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#image ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Image
Returns The image response.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#link_out_suggestion ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion
Returns The link out suggestion chip for Actions on Google.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#list_select ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect
Returns The list card response for Actions on Google.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#payload ⇒ Google::Protobuf::Struct
Returns a response containing a custom, platform-specific payload. See the Intent.Message.Platform type for a description of the structure that may be required for your platform.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#platform ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Platform
Returns Optional. The platform that this message is intended for.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#quick_replies ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies
Returns The quick replies response.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#simple_responses ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses
Returns The voice and text-only responses for Actions on Google.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#suggestions ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions
Returns The suggestion chips for Actions on Google.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |
#text ⇒ Google::Cloud::Dialogflow::V2::Intent::Message::Text
Returns The text response.
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 246 class Message # The text response message. # @!attribute [rw] text # @return [Array<String>] # Optional. The collection of the agent's responses. class Text; end # The image response message. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file. # @!attribute [rw] accessibility_text # @return [String] # Optional. A text description of the image to be used for accessibility, # e.g., screen readers. class Image; end # The quick replies response message. # @!attribute [rw] title # @return [String] # Optional. The title of the collection of quick replies. # @!attribute [rw] quick_replies # @return [Array<String>] # Optional. The collection of quick replies. class QuickReplies; end # The card response message. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] image_uri # @return [String] # Optional. The public URI to an image file for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>] # Optional. The collection of card buttons. class Card # Optional. Contains information about a button. # @!attribute [rw] text # @return [String] # Optional. The text to show on the button. # @!attribute [rw] postback # @return [String] # Optional. The text to send back to the Dialogflow API or a URI to # open. class Button; end end # The simple response message containing speech or text. # @!attribute [rw] text_to_speech # @return [String] # One of text_to_speech or ssml must be provided. The plain text of the # speech output. Mutually exclusive with ssml. # @!attribute [rw] ssml # @return [String] # One of text_to_speech or ssml must be provided. Structured spoken # response to the user in the SSML format. Mutually exclusive with # text_to_speech. # @!attribute [rw] display_text # @return [String] # Optional. The text to display. class SimpleResponse; end # The collection of simple response candidates. # This message in +QueryResult.fulfillment_messages+ and # +WebhookResponse.fulfillment_messages+ should contain only one # +SimpleResponse+. # @!attribute [rw] simple_responses # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>] # Required. The list of simple responses. class SimpleResponses; end # The basic card message. Useful for displaying information. # @!attribute [rw] title # @return [String] # Optional. The title of the card. # @!attribute [rw] subtitle # @return [String] # Optional. The subtitle of the card. # @!attribute [rw] formatted_text # @return [String] # Required, unless image is present. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image for the card. # @!attribute [rw] buttons # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>] # Optional. The collection of card buttons. class BasicCard # The button object that appears at the bottom of a card. # @!attribute [rw] title # @return [String] # Required. The title of the button. # @!attribute [rw] open_uri_action # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction] # Required. Action to take when a user taps on the button. class Button # Opens the given URI. # @!attribute [rw] uri # @return [String] # Required. The HTTP or HTTPS scheme URI. class OpenUriAction; end end end # The suggestion chip message that the user can tap to quickly post a reply # to the conversation. # @!attribute [rw] title # @return [String] # Required. The text shown the in the suggestion chip. class Suggestion; end # The collection of suggestions. # @!attribute [rw] suggestions # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>] # Required. The list of suggested replies. class Suggestions; end # The suggestion chip message that allows the user to jump out to the app # or website associated with this agent. # @!attribute [rw] destination_name # @return [String] # Required. The name of the app or site this chip is linking to. # @!attribute [rw] uri # @return [String] # Required. The URI of the app or site to open when the user taps the # suggestion chip. class LinkOutSuggestion; end # The card for presenting a list of options to select from. # @!attribute [rw] title # @return [String] # Optional. The overall title of the list. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>] # Required. List items. class ListSelect # An item in the list. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional information about this option. # @!attribute [rw] title # @return [String] # Required. The title of the list item. # @!attribute [rw] description # @return [String] # Optional. The main text describing the item. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # The card for presenting a carousel of options to select from. # @!attribute [rw] items # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>] # Required. Carousel items. class CarouselSelect # An item in the carousel. # @!attribute [rw] info # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo] # Required. Additional info about the option item. # @!attribute [rw] title # @return [String] # Required. Title of the carousel item. # @!attribute [rw] description # @return [String] # Optional. The body text of the card. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # Optional. The image to display. class Item; end end # Additional info about the select item for when it is triggered in a # dialog. # @!attribute [rw] key # @return [String] # Required. A unique key that will be sent back to the agent if this # response is given. # @!attribute [rw] synonyms # @return [Array<String>] # Optional. A list of synonyms that can also be used to trigger this # item in dialog. class SelectItemInfo; end # Represents different platforms that a rich message can be intended for. module Platform # Not specified. PLATFORM_UNSPECIFIED = 0 # Facebook. FACEBOOK = 1 # Slack. SLACK = 2 # Telegram. TELEGRAM = 3 # Kik. KIK = 4 # Skype. SKYPE = 5 # Line. LINE = 6 # Viber. VIBER = 7 # Actions on Google. # When using Actions on Google, you can choose one of the specific # Intent.Message types that mention support for Actions on Google, # or you can use the advanced Intent.Message.payload field. # The payload field provides access to AoG features not available in the # specific message types. # If using the Intent.Message.payload field, it should have a structure # similar to the JSON message shown here. For more information, see # [Actions on Google Webhook # Format](https://developers.google.com/actions/dialogflow/webhook) # <pre>{ # "expectUserResponse": true, # "isSsml": false, # "noInputPrompts": [], # "richResponse": { # "items": [ # { # "simpleResponse": { # "displayText": "hi", # "textToSpeech": "hello" # } # } # ], # "suggestions": [ # { # "title": "Say this" # }, # { # "title": "or this" # } # ] # }, # "systemIntent": { # "data": { # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", # "listSelect": { # "items": [ # { # "optionInfo": { # "key": "key1", # "synonyms": [ # "key one" # ] # }, # "title": "must not be empty, but unique" # }, # { # "optionInfo": { # "key": "key2", # "synonyms": [ # "key two" # ] # }, # "title": "must not be empty, but unique" # } # ] # } # }, # "intent": "actions.intent.OPTION" # } # }</pre> ACTIONS_ON_GOOGLE = 8 end end |