Class: Google::Cloud::Dialogflow::V2::Intent
- Inherits:
-
Object
- Object
- Google::Cloud::Dialogflow::V2::Intent
- Defined in:
- lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb
Overview
Represents an intent. Intents convert a number of user expressions or patterns into an action. An action is an extraction of a user command or sentence semantics.
Defined Under Namespace
Modules: WebhookState Classes: FollowupIntentInfo, Message, Parameter, TrainingPhrase
Instance Attribute Summary collapse
-
#action ⇒ String
Optional.
-
#default_response_platforms ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::Message::Platform>
Optional.
-
#display_name ⇒ String
Required.
-
#events ⇒ Array<String>
Optional.
-
#followup_intent_info ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::FollowupIntentInfo>
Optional.
-
#input_context_names ⇒ Array<String>
Optional.
-
#is_fallback ⇒ true, false
Optional.
-
#messages ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::Message>
Optional.
-
#ml_disabled ⇒ true, false
Optional.
-
#name ⇒ String
Required for all methods except +create+ (+create+ populates the name automatically. The unique identifier of this intent. Format: +projects/
/agent/intents/ +.. -
#output_contexts ⇒ Array<Google::Cloud::Dialogflow::V2::Context>
Optional.
-
#parameters ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::Parameter>
Optional.
-
#parent_followup_intent_name ⇒ String
The unique identifier of the parent intent in the chain of followup intents.
-
#priority ⇒ Integer
Optional.
-
#reset_contexts ⇒ true, false
Optional.
-
#root_followup_intent_name ⇒ String
The unique identifier of the root intent in the chain of followup intents.
-
#training_phrases ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase>
Optional.
-
#webhook_state ⇒ Google::Cloud::Dialogflow::V2::Intent::WebhookState
Required.
Instance Attribute Details
#action ⇒ String
Returns Optional. The name of the action associated with the intent.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#default_response_platforms ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::Message::Platform>
Returns Optional. The list of platforms for which the first response will be taken from among the messages assigned to the DEFAULT_PLATFORM.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#display_name ⇒ String
Returns Required. The name of this intent.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#events ⇒ Array<String>
Returns Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#followup_intent_info ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::FollowupIntentInfo>
Returns Optional. Collection of information about all followup intents that have name of this intent as a root_name.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#input_context_names ⇒ Array<String>
Returns Optional. The list of context names required for this intent to be
triggered.
Format: +projects/
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#is_fallback ⇒ true, false
Returns Optional. Indicates whether this is a fallback intent.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#messages ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::Message>
Returns Optional. The collection of rich messages corresponding to the +Response+ field in the Dialogflow console.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#ml_disabled ⇒ true, false
Returns Optional. Indicates whether Machine Learning is disabled for the intent. Note: If +ml_diabled+ setting is set to true, then this intent is not taken into account during inference in +ML ONLY+ match mode. Also, auto-markup in the UI is turned off.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#name ⇒ String
Returns Required for all methods except +create+ (+create+ populates the name
automatically.
The unique identifier of this intent.
Format: +projects/
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#output_contexts ⇒ Array<Google::Cloud::Dialogflow::V2::Context>
Returns Optional. The collection of contexts that are activated when the intent
is matched. Context messages in this collection should not set the
parameters field. Setting the +lifespan_count+ to 0 will reset the context
when the intent is matched.
Format: +projects/
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#parameters ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::Parameter>
Returns Optional. The collection of parameters associated with the intent.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#parent_followup_intent_name ⇒ String
Returns The unique identifier of the parent intent in the chain of followup
intents.
It identifies the parent followup intent.
Format: +projects/
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#priority ⇒ Integer
Returns Optional. The priority of this intent. Higher numbers represent higher priorities. Zero or negative numbers mean that the intent is disabled.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#reset_contexts ⇒ true, false
Returns Optional. Indicates whether to delete all contexts in the current session when this intent is matched.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#root_followup_intent_name ⇒ String
Returns The unique identifier of the root intent in the chain of followup intents.
It identifies the correct followup intents chain for this intent.
Format: +projects/
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#training_phrases ⇒ Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase>
Returns Optional. The collection of examples/templates that the agent is trained on.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |
#webhook_state ⇒ Google::Cloud::Dialogflow::V2::Intent::WebhookState
Returns Required. Indicates whether webhooks are enabled for the intent.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 101 class Intent # Represents an example or template that the agent is trained on. # @!attribute [rw] name # @return [String] # Required. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] # Required. The collection of training phrase parts (can be annotated). # Fields: +entity_type+, +alias+ and +user_defined+ should be populated # only for the annotated parts of the training phrase. # @!attribute [rw] times_added_count # @return [Integer] # Optional. Indicates how many times this example or template was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] # Required. The text corresponding to the example or template, # if there are no annotations. For # annotated examples, it is the text for one of the example's parts. # @!attribute [rw] entity_type # @return [String] # Optional. The entity type name prefixed with +@+. This field is # required for the annotated part of the text and applies only to # examples. # @!attribute [rw] alias # @return [String] # Optional. The parameter name for the value extracted from the # annotated part of the example. # @!attribute [rw] user_defined # @return [true, false] # Optional. Indicates whether the text was manually annotated by the # developer. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. TYPE_UNSPECIFIED = 0 # Examples do not contain @-prefixed entity type names, but example parts # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. TEMPLATE = 2 end end # Represents intent parameters. # @!attribute [rw] name # @return [String] # The unique identifier of this parameter. # @!attribute [rw] display_name # @return [String] # Required. The name of the parameter. # @!attribute [rw] value # @return [String] # Optional. The definition of the parameter value. It can be: # * a constant string, # * a parameter value defined as +$parameter_name+, # * an original parameter value defined as +$parameter_name.original+, # * a parameter value from some context defined as # +#context_name.parameter_name+. # @!attribute [rw] default_value # @return [String] # Optional. The default value to use when the +value+ yields an empty # result. # Default values can be extracted from contexts by using the following # syntax: +#context_name.parameter_name+. # @!attribute [rw] entity_type_display_name # @return [String] # Optional. The name of the entity type, prefixed with +@+, that # describes values of the parameter. If the parameter is # required, this must be provided. # @!attribute [rw] mandatory # @return [true, false] # Optional. Indicates whether the parameter is required. That is, # whether the intent cannot be completed without collecting the parameter # value. # @!attribute [rw] prompts # @return [Array<String>] # Optional. The collection of prompts that the agent can present to the # user in order to collect value for the parameter. # @!attribute [rw] is_list # @return [true, false] # Optional. Indicates whether the parameter represents a list of values. class Parameter; end # Corresponds to the +Response+ field in the Dialogflow console. # @!attribute [rw] text # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text] # The text response. # @!attribute [rw] image # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image] # The image response. # @!attribute [rw] quick_replies # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies] # The quick replies response. # @!attribute [rw] card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card] # The card response. # @!attribute [rw] payload # @return [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. # @!attribute [rw] simple_responses # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses] # The voice and text-only responses for Actions on Google. # @!attribute [rw] basic_card # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard] # The basic card response for Actions on Google. # @!attribute [rw] suggestions # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions] # The suggestion chips for Actions on Google. # @!attribute [rw] link_out_suggestion # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion] # The link out suggestion chip for Actions on Google. # @!attribute [rw] list_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect] # The list card response for Actions on Google. # @!attribute [rw] carousel_select # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect] # The carousel card response for Actions on Google. # @!attribute [rw] platform # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform] # Optional. The platform that this message is intended for. 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 # Represents a single followup intent in the chain. # @!attribute [rw] followup_intent_name # @return [String] # The unique identifier of the followup intent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. # @!attribute [rw] parent_followup_intent_name # @return [String] # The unique identifier of the followup intent parent. # Format: +projects/<Project ID>/agent/intents/<Intent ID>+. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState # Webhook is disabled in the agent and in the intent. WEBHOOK_STATE_UNSPECIFIED = 0 # Webhook is enabled in the agent and in the intent. WEBHOOK_STATE_ENABLED = 1 # Webhook is enabled in the agent and in the intent. Also, each slot # filling prompt is forwarded to the webhook. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 end end |