google-cloud-dialogflow 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +8 -0
  3. data/LICENSE +201 -0
  4. data/README.md +32 -0
  5. data/lib/google/cloud/dialogflow.rb +452 -0
  6. data/lib/google/cloud/dialogflow/credentials.rb +30 -0
  7. data/lib/google/cloud/dialogflow/v2.rb +454 -0
  8. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +87 -0
  9. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +104 -0
  10. data/lib/google/cloud/dialogflow/v2/agents_client.rb +639 -0
  11. data/lib/google/cloud/dialogflow/v2/agents_client_config.json +56 -0
  12. data/lib/google/cloud/dialogflow/v2/context_pb.rb +59 -0
  13. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +71 -0
  14. data/lib/google/cloud/dialogflow/v2/contexts_client.rb +445 -0
  15. data/lib/google/cloud/dialogflow/v2/contexts_client_config.json +56 -0
  16. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/agent.rb +223 -0
  17. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/context.rb +115 -0
  18. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/entity_type.rb +290 -0
  19. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb +714 -0
  20. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session.rb +451 -0
  21. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session_entity_type.rb +134 -0
  22. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/any.rb +124 -0
  23. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/field_mask.rb +223 -0
  24. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/struct.rb +73 -0
  25. data/lib/google/cloud/dialogflow/v2/doc/google/rpc/status.rb +83 -0
  26. data/lib/google/cloud/dialogflow/v2/doc/google/type/latlng.rb +64 -0
  27. data/lib/google/cloud/dialogflow/v2/doc/overview.rb +55 -0
  28. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +120 -0
  29. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +105 -0
  30. data/lib/google/cloud/dialogflow/v2/entity_types_client.rb +900 -0
  31. data/lib/google/cloud/dialogflow/v2/entity_types_client_config.json +76 -0
  32. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +274 -0
  33. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +91 -0
  34. data/lib/google/cloud/dialogflow/v2/intents_client.rb +684 -0
  35. data/lib/google/cloud/dialogflow/v2/intents_client_config.json +61 -0
  36. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +61 -0
  37. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +64 -0
  38. data/lib/google/cloud/dialogflow/v2/session_entity_types_client.rb +413 -0
  39. data/lib/google/cloud/dialogflow/v2/session_entity_types_client_config.json +51 -0
  40. data/lib/google/cloud/dialogflow/v2/session_pb.rb +127 -0
  41. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +55 -0
  42. data/lib/google/cloud/dialogflow/v2/sessions_client.rb +286 -0
  43. data/lib/google/cloud/dialogflow/v2/sessions_client_config.json +36 -0
  44. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +42 -0
  45. metadata +142 -0
@@ -0,0 +1,714 @@
1
+ # Copyright 2018 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Cloud
17
+ module Dialogflow
18
+ ##
19
+ # # Dialogflow API Contents
20
+ #
21
+ # | Class | Description |
22
+ # | ----- | ----------- |
23
+ # | [IntentsClient][] | An intent represents a mapping between input from a user and an action to be taken by your application. |
24
+ # | [Data Types][] | Data types for Google::Cloud::Dialogflow::V2 |
25
+ #
26
+ # [IntentsClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-dialogflow/latest/google/cloud/dialogflow/v2/intentsclient
27
+ # [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-dialogflow/latest/google/cloud/dialogflow/v2/datatypes
28
+ #
29
+ module V2
30
+ # Represents an intent.
31
+ # Intents convert a number of user expressions or patterns into an action. An
32
+ # action is an extraction of a user command or sentence semantics.
33
+ # @!attribute [rw] name
34
+ # @return [String]
35
+ # Required for all methods except +create+ (+create+ populates the name
36
+ # automatically.
37
+ # The unique identifier of this intent.
38
+ # Format: +projects/<Project ID>/agent/intents/<Intent ID>+.
39
+ # @!attribute [rw] display_name
40
+ # @return [String]
41
+ # Required. The name of this intent.
42
+ # @!attribute [rw] webhook_state
43
+ # @return [Google::Cloud::Dialogflow::V2::Intent::WebhookState]
44
+ # Required. Indicates whether webhooks are enabled for the intent.
45
+ # @!attribute [rw] priority
46
+ # @return [Integer]
47
+ # Optional. The priority of this intent. Higher numbers represent higher
48
+ # priorities. Zero or negative numbers mean that the intent is disabled.
49
+ # @!attribute [rw] is_fallback
50
+ # @return [true, false]
51
+ # Optional. Indicates whether this is a fallback intent.
52
+ # @!attribute [rw] ml_disabled
53
+ # @return [true, false]
54
+ # Optional. Indicates whether Machine Learning is disabled for the intent.
55
+ # Note: If +ml_diabled+ setting is set to true, then this intent is not
56
+ # taken into account during inference in +ML ONLY+ match mode. Also,
57
+ # auto-markup in the UI is turned off.
58
+ # @!attribute [rw] input_context_names
59
+ # @return [Array<String>]
60
+ # Optional. The list of context names required for this intent to be
61
+ # triggered.
62
+ # Format: +projects/<Project ID>/agent/sessions/-/contexts/<Context ID>+.
63
+ # @!attribute [rw] events
64
+ # @return [Array<String>]
65
+ # Optional. The collection of event names that trigger the intent.
66
+ # If the collection of input contexts is not empty, all of the contexts must
67
+ # be present in the active user session for an event to trigger this intent.
68
+ # @!attribute [rw] training_phrases
69
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase>]
70
+ # Optional. The collection of examples/templates that the agent is
71
+ # trained on.
72
+ # @!attribute [rw] action
73
+ # @return [String]
74
+ # Optional. The name of the action associated with the intent.
75
+ # @!attribute [rw] output_contexts
76
+ # @return [Array<Google::Cloud::Dialogflow::V2::Context>]
77
+ # Optional. The collection of contexts that are activated when the intent
78
+ # is matched. Context messages in this collection should not set the
79
+ # parameters field. Setting the +lifespan_count+ to 0 will reset the context
80
+ # when the intent is matched.
81
+ # Format: +projects/<Project ID>/agent/sessions/-/contexts/<Context ID>+.
82
+ # @!attribute [rw] reset_contexts
83
+ # @return [true, false]
84
+ # Optional. Indicates whether to delete all contexts in the current
85
+ # session when this intent is matched.
86
+ # @!attribute [rw] parameters
87
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Parameter>]
88
+ # Optional. The collection of parameters associated with the intent.
89
+ # @!attribute [rw] messages
90
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message>]
91
+ # Optional. The collection of rich messages corresponding to the
92
+ # +Response+ field in the Dialogflow console.
93
+ # @!attribute [rw] default_response_platforms
94
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Platform>]
95
+ # Optional. The list of platforms for which the first response will be
96
+ # taken from among the messages assigned to the DEFAULT_PLATFORM.
97
+ # @!attribute [rw] root_followup_intent_name
98
+ # @return [String]
99
+ # The unique identifier of the root intent in the chain of followup intents.
100
+ # It identifies the correct followup intents chain for this intent.
101
+ # Format: +projects/<Project ID>/agent/intents/<Intent ID>+.
102
+ # @!attribute [rw] parent_followup_intent_name
103
+ # @return [String]
104
+ # The unique identifier of the parent intent in the chain of followup
105
+ # intents.
106
+ # It identifies the parent followup intent.
107
+ # Format: +projects/<Project ID>/agent/intents/<Intent ID>+.
108
+ # @!attribute [rw] followup_intent_info
109
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::FollowupIntentInfo>]
110
+ # Optional. Collection of information about all followup intents that have
111
+ # name of this intent as a root_name.
112
+ class Intent
113
+ # Represents an example or template that the agent is trained on.
114
+ # @!attribute [rw] name
115
+ # @return [String]
116
+ # Required. The unique identifier of this training phrase.
117
+ # @!attribute [rw] type
118
+ # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type]
119
+ # Required. The type of the training phrase.
120
+ # @!attribute [rw] parts
121
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>]
122
+ # Required. The collection of training phrase parts (can be annotated).
123
+ # Fields: +entity_type+, +alias+ and +user_defined+ should be populated
124
+ # only for the annotated parts of the training phrase.
125
+ # @!attribute [rw] times_added_count
126
+ # @return [Integer]
127
+ # Optional. Indicates how many times this example or template was added to
128
+ # the intent. Each time a developer adds an existing sample by editing an
129
+ # intent or training, this counter is increased.
130
+ class TrainingPhrase
131
+ # Represents a part of a training phrase.
132
+ # @!attribute [rw] text
133
+ # @return [String]
134
+ # Required. The text corresponding to the example or template,
135
+ # if there are no annotations. For
136
+ # annotated examples, it is the text for one of the example's parts.
137
+ # @!attribute [rw] entity_type
138
+ # @return [String]
139
+ # Optional. The entity type name prefixed with +@+. This field is
140
+ # required for the annotated part of the text and applies only to
141
+ # examples.
142
+ # @!attribute [rw] alias
143
+ # @return [String]
144
+ # Optional. The parameter name for the value extracted from the
145
+ # annotated part of the example.
146
+ # @!attribute [rw] user_defined
147
+ # @return [true, false]
148
+ # Optional. Indicates whether the text was manually annotated by the
149
+ # developer.
150
+ class Part; end
151
+
152
+ # Represents different types of training phrases.
153
+ module Type
154
+ # Not specified. This value should never be used.
155
+ TYPE_UNSPECIFIED = 0
156
+
157
+ # Examples do not contain @-prefixed entity type names, but example parts
158
+ # can be annotated with entity types.
159
+ EXAMPLE = 1
160
+
161
+ # Templates are not annotated with entity types, but they can contain
162
+ # @-prefixed entity type names as substrings.
163
+ TEMPLATE = 2
164
+ end
165
+ end
166
+
167
+ # Represents intent parameters.
168
+ # @!attribute [rw] name
169
+ # @return [String]
170
+ # The unique identifier of this parameter.
171
+ # @!attribute [rw] display_name
172
+ # @return [String]
173
+ # Required. The name of the parameter.
174
+ # @!attribute [rw] value
175
+ # @return [String]
176
+ # Optional. The definition of the parameter value. It can be:
177
+ # * a constant string,
178
+ # * a parameter value defined as +$parameter_name+,
179
+ # * an original parameter value defined as +$parameter_name.original+,
180
+ # * a parameter value from some context defined as
181
+ # +#context_name.parameter_name+.
182
+ # @!attribute [rw] default_value
183
+ # @return [String]
184
+ # Optional. The default value to use when the +value+ yields an empty
185
+ # result.
186
+ # Default values can be extracted from contexts by using the following
187
+ # syntax: +#context_name.parameter_name+.
188
+ # @!attribute [rw] entity_type_display_name
189
+ # @return [String]
190
+ # Optional. The name of the entity type, prefixed with +@+, that
191
+ # describes values of the parameter. If the parameter is
192
+ # required, this must be provided.
193
+ # @!attribute [rw] mandatory
194
+ # @return [true, false]
195
+ # Optional. Indicates whether the parameter is required. That is,
196
+ # whether the intent cannot be completed without collecting the parameter
197
+ # value.
198
+ # @!attribute [rw] prompts
199
+ # @return [Array<String>]
200
+ # Optional. The collection of prompts that the agent can present to the
201
+ # user in order to collect value for the parameter.
202
+ # @!attribute [rw] is_list
203
+ # @return [true, false]
204
+ # Optional. Indicates whether the parameter represents a list of values.
205
+ class Parameter; end
206
+
207
+ # Corresponds to the +Response+ field in the Dialogflow console.
208
+ # @!attribute [rw] text
209
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text]
210
+ # The text response.
211
+ # @!attribute [rw] image
212
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
213
+ # The image response.
214
+ # @!attribute [rw] quick_replies
215
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies]
216
+ # The quick replies response.
217
+ # @!attribute [rw] card
218
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card]
219
+ # The card response.
220
+ # @!attribute [rw] payload
221
+ # @return [Google::Protobuf::Struct]
222
+ # Returns a response containing a custom, platform-specific payload.
223
+ # See the Intent.Message.Platform type for a description of the
224
+ # structure that may be required for your platform.
225
+ # @!attribute [rw] simple_responses
226
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses]
227
+ # The voice and text-only responses for Actions on Google.
228
+ # @!attribute [rw] basic_card
229
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard]
230
+ # The basic card response for Actions on Google.
231
+ # @!attribute [rw] suggestions
232
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions]
233
+ # The suggestion chips for Actions on Google.
234
+ # @!attribute [rw] link_out_suggestion
235
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion]
236
+ # The link out suggestion chip for Actions on Google.
237
+ # @!attribute [rw] list_select
238
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect]
239
+ # The list card response for Actions on Google.
240
+ # @!attribute [rw] carousel_select
241
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect]
242
+ # The carousel card response for Actions on Google.
243
+ # @!attribute [rw] platform
244
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform]
245
+ # Optional. The platform that this message is intended for.
246
+ class Message
247
+ # The text response message.
248
+ # @!attribute [rw] text
249
+ # @return [Array<String>]
250
+ # Optional. The collection of the agent's responses.
251
+ class Text; end
252
+
253
+ # The image response message.
254
+ # @!attribute [rw] image_uri
255
+ # @return [String]
256
+ # Optional. The public URI to an image file.
257
+ # @!attribute [rw] accessibility_text
258
+ # @return [String]
259
+ # Optional. A text description of the image to be used for accessibility,
260
+ # e.g., screen readers.
261
+ class Image; end
262
+
263
+ # The quick replies response message.
264
+ # @!attribute [rw] title
265
+ # @return [String]
266
+ # Optional. The title of the collection of quick replies.
267
+ # @!attribute [rw] quick_replies
268
+ # @return [Array<String>]
269
+ # Optional. The collection of quick replies.
270
+ class QuickReplies; end
271
+
272
+ # The card response message.
273
+ # @!attribute [rw] title
274
+ # @return [String]
275
+ # Optional. The title of the card.
276
+ # @!attribute [rw] subtitle
277
+ # @return [String]
278
+ # Optional. The subtitle of the card.
279
+ # @!attribute [rw] image_uri
280
+ # @return [String]
281
+ # Optional. The public URI to an image file for the card.
282
+ # @!attribute [rw] buttons
283
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>]
284
+ # Optional. The collection of card buttons.
285
+ class Card
286
+ # Optional. Contains information about a button.
287
+ # @!attribute [rw] text
288
+ # @return [String]
289
+ # Optional. The text to show on the button.
290
+ # @!attribute [rw] postback
291
+ # @return [String]
292
+ # Optional. The text to send back to the Dialogflow API or a URI to
293
+ # open.
294
+ class Button; end
295
+ end
296
+
297
+ # The simple response message containing speech or text.
298
+ # @!attribute [rw] text_to_speech
299
+ # @return [String]
300
+ # One of text_to_speech or ssml must be provided. The plain text of the
301
+ # speech output. Mutually exclusive with ssml.
302
+ # @!attribute [rw] ssml
303
+ # @return [String]
304
+ # One of text_to_speech or ssml must be provided. Structured spoken
305
+ # response to the user in the SSML format. Mutually exclusive with
306
+ # text_to_speech.
307
+ # @!attribute [rw] display_text
308
+ # @return [String]
309
+ # Optional. The text to display.
310
+ class SimpleResponse; end
311
+
312
+ # The collection of simple response candidates.
313
+ # This message in +QueryResult.fulfillment_messages+ and
314
+ # +WebhookResponse.fulfillment_messages+ should contain only one
315
+ # +SimpleResponse+.
316
+ # @!attribute [rw] simple_responses
317
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>]
318
+ # Required. The list of simple responses.
319
+ class SimpleResponses; end
320
+
321
+ # The basic card message. Useful for displaying information.
322
+ # @!attribute [rw] title
323
+ # @return [String]
324
+ # Optional. The title of the card.
325
+ # @!attribute [rw] subtitle
326
+ # @return [String]
327
+ # Optional. The subtitle of the card.
328
+ # @!attribute [rw] formatted_text
329
+ # @return [String]
330
+ # Required, unless image is present. The body text of the card.
331
+ # @!attribute [rw] image
332
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
333
+ # Optional. The image for the card.
334
+ # @!attribute [rw] buttons
335
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>]
336
+ # Optional. The collection of card buttons.
337
+ class BasicCard
338
+ # The button object that appears at the bottom of a card.
339
+ # @!attribute [rw] title
340
+ # @return [String]
341
+ # Required. The title of the button.
342
+ # @!attribute [rw] open_uri_action
343
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction]
344
+ # Required. Action to take when a user taps on the button.
345
+ class Button
346
+ # Opens the given URI.
347
+ # @!attribute [rw] uri
348
+ # @return [String]
349
+ # Required. The HTTP or HTTPS scheme URI.
350
+ class OpenUriAction; end
351
+ end
352
+ end
353
+
354
+ # The suggestion chip message that the user can tap to quickly post a reply
355
+ # to the conversation.
356
+ # @!attribute [rw] title
357
+ # @return [String]
358
+ # Required. The text shown the in the suggestion chip.
359
+ class Suggestion; end
360
+
361
+ # The collection of suggestions.
362
+ # @!attribute [rw] suggestions
363
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>]
364
+ # Required. The list of suggested replies.
365
+ class Suggestions; end
366
+
367
+ # The suggestion chip message that allows the user to jump out to the app
368
+ # or website associated with this agent.
369
+ # @!attribute [rw] destination_name
370
+ # @return [String]
371
+ # Required. The name of the app or site this chip is linking to.
372
+ # @!attribute [rw] uri
373
+ # @return [String]
374
+ # Required. The URI of the app or site to open when the user taps the
375
+ # suggestion chip.
376
+ class LinkOutSuggestion; end
377
+
378
+ # The card for presenting a list of options to select from.
379
+ # @!attribute [rw] title
380
+ # @return [String]
381
+ # Optional. The overall title of the list.
382
+ # @!attribute [rw] items
383
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>]
384
+ # Required. List items.
385
+ class ListSelect
386
+ # An item in the list.
387
+ # @!attribute [rw] info
388
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo]
389
+ # Required. Additional information about this option.
390
+ # @!attribute [rw] title
391
+ # @return [String]
392
+ # Required. The title of the list item.
393
+ # @!attribute [rw] description
394
+ # @return [String]
395
+ # Optional. The main text describing the item.
396
+ # @!attribute [rw] image
397
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
398
+ # Optional. The image to display.
399
+ class Item; end
400
+ end
401
+
402
+ # The card for presenting a carousel of options to select from.
403
+ # @!attribute [rw] items
404
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>]
405
+ # Required. Carousel items.
406
+ class CarouselSelect
407
+ # An item in the carousel.
408
+ # @!attribute [rw] info
409
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo]
410
+ # Required. Additional info about the option item.
411
+ # @!attribute [rw] title
412
+ # @return [String]
413
+ # Required. Title of the carousel item.
414
+ # @!attribute [rw] description
415
+ # @return [String]
416
+ # Optional. The body text of the card.
417
+ # @!attribute [rw] image
418
+ # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
419
+ # Optional. The image to display.
420
+ class Item; end
421
+ end
422
+
423
+ # Additional info about the select item for when it is triggered in a
424
+ # dialog.
425
+ # @!attribute [rw] key
426
+ # @return [String]
427
+ # Required. A unique key that will be sent back to the agent if this
428
+ # response is given.
429
+ # @!attribute [rw] synonyms
430
+ # @return [Array<String>]
431
+ # Optional. A list of synonyms that can also be used to trigger this
432
+ # item in dialog.
433
+ class SelectItemInfo; end
434
+
435
+ # Represents different platforms that a rich message can be intended for.
436
+ module Platform
437
+ # Not specified.
438
+ PLATFORM_UNSPECIFIED = 0
439
+
440
+ # Facebook.
441
+ FACEBOOK = 1
442
+
443
+ # Slack.
444
+ SLACK = 2
445
+
446
+ # Telegram.
447
+ TELEGRAM = 3
448
+
449
+ # Kik.
450
+ KIK = 4
451
+
452
+ # Skype.
453
+ SKYPE = 5
454
+
455
+ # Line.
456
+ LINE = 6
457
+
458
+ # Viber.
459
+ VIBER = 7
460
+
461
+ # Actions on Google.
462
+ # When using Actions on Google, you can choose one of the specific
463
+ # Intent.Message types that mention support for Actions on Google,
464
+ # or you can use the advanced Intent.Message.payload field.
465
+ # The payload field provides access to AoG features not available in the
466
+ # specific message types.
467
+ # If using the Intent.Message.payload field, it should have a structure
468
+ # similar to the JSON message shown here. For more information, see
469
+ # [Actions on Google Webhook
470
+ # Format](https://developers.google.com/actions/dialogflow/webhook)
471
+ # <pre>{
472
+ # "expectUserResponse": true,
473
+ # "isSsml": false,
474
+ # "noInputPrompts": [],
475
+ # "richResponse": {
476
+ # "items": [
477
+ # {
478
+ # "simpleResponse": {
479
+ # "displayText": "hi",
480
+ # "textToSpeech": "hello"
481
+ # }
482
+ # }
483
+ # ],
484
+ # "suggestions": [
485
+ # {
486
+ # "title": "Say this"
487
+ # },
488
+ # {
489
+ # "title": "or this"
490
+ # }
491
+ # ]
492
+ # },
493
+ # "systemIntent": {
494
+ # "data": {
495
+ # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
496
+ # "listSelect": {
497
+ # "items": [
498
+ # {
499
+ # "optionInfo": {
500
+ # "key": "key1",
501
+ # "synonyms": [
502
+ # "key one"
503
+ # ]
504
+ # },
505
+ # "title": "must not be empty, but unique"
506
+ # },
507
+ # {
508
+ # "optionInfo": {
509
+ # "key": "key2",
510
+ # "synonyms": [
511
+ # "key two"
512
+ # ]
513
+ # },
514
+ # "title": "must not be empty, but unique"
515
+ # }
516
+ # ]
517
+ # }
518
+ # },
519
+ # "intent": "actions.intent.OPTION"
520
+ # }
521
+ # }</pre>
522
+ ACTIONS_ON_GOOGLE = 8
523
+ end
524
+ end
525
+
526
+ # Represents a single followup intent in the chain.
527
+ # @!attribute [rw] followup_intent_name
528
+ # @return [String]
529
+ # The unique identifier of the followup intent.
530
+ # Format: +projects/<Project ID>/agent/intents/<Intent ID>+.
531
+ # @!attribute [rw] parent_followup_intent_name
532
+ # @return [String]
533
+ # The unique identifier of the followup intent parent.
534
+ # Format: +projects/<Project ID>/agent/intents/<Intent ID>+.
535
+ class FollowupIntentInfo; end
536
+
537
+ # Represents the different states that webhooks can be in.
538
+ module WebhookState
539
+ # Webhook is disabled in the agent and in the intent.
540
+ WEBHOOK_STATE_UNSPECIFIED = 0
541
+
542
+ # Webhook is enabled in the agent and in the intent.
543
+ WEBHOOK_STATE_ENABLED = 1
544
+
545
+ # Webhook is enabled in the agent and in the intent. Also, each slot
546
+ # filling prompt is forwarded to the webhook.
547
+ WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2
548
+ end
549
+ end
550
+
551
+ # The request message for {Google::Cloud::Dialogflow::V2::Intents::ListIntents Intents::ListIntents}.
552
+ # @!attribute [rw] parent
553
+ # @return [String]
554
+ # Required. The agent to list all intents from.
555
+ # Format: +projects/<Project ID>/agent+.
556
+ # @!attribute [rw] language_code
557
+ # @return [String]
558
+ # Optional. The language to list training phrases, parameters and rich
559
+ # messages for. If not specified, the agent's default language is used.
560
+ # [More than a dozen
561
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
562
+ # Note: languages must be enabled in the agent before they can be used.
563
+ # @!attribute [rw] intent_view
564
+ # @return [Google::Cloud::Dialogflow::V2::IntentView]
565
+ # Optional. The resource view to apply to the returned intent.
566
+ # @!attribute [rw] page_size
567
+ # @return [Integer]
568
+ # Optional. The maximum number of items to return in a single page. By
569
+ # default 100 and at most 1000.
570
+ # @!attribute [rw] page_token
571
+ # @return [String]
572
+ # Optional. The next_page_token value returned from a previous list request.
573
+ class ListIntentsRequest; end
574
+
575
+ # The response message for {Google::Cloud::Dialogflow::V2::Intents::ListIntents Intents::ListIntents}.
576
+ # @!attribute [rw] intents
577
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent>]
578
+ # The list of agent intents. There will be a maximum number of items
579
+ # returned based on the page_size field in the request.
580
+ # @!attribute [rw] next_page_token
581
+ # @return [String]
582
+ # Token to retrieve the next page of results, or empty if there are no
583
+ # more results in the list.
584
+ class ListIntentsResponse; end
585
+
586
+ # The request message for {Google::Cloud::Dialogflow::V2::Intents::GetIntent Intents::GetIntent}.
587
+ # @!attribute [rw] name
588
+ # @return [String]
589
+ # Required. The name of the intent.
590
+ # Format: +projects/<Project ID>/agent/intents/<Intent ID>+.
591
+ # @!attribute [rw] language_code
592
+ # @return [String]
593
+ # Optional. The language to retrieve training phrases, parameters and rich
594
+ # messages for. If not specified, the agent's default language is used.
595
+ # [More than a dozen
596
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
597
+ # Note: languages must be enabled in the agent, before they can be used.
598
+ # @!attribute [rw] intent_view
599
+ # @return [Google::Cloud::Dialogflow::V2::IntentView]
600
+ # Optional. The resource view to apply to the returned intent.
601
+ class GetIntentRequest; end
602
+
603
+ # The request message for {Google::Cloud::Dialogflow::V2::Intents::CreateIntent Intents::CreateIntent}.
604
+ # @!attribute [rw] parent
605
+ # @return [String]
606
+ # Required. The agent to create a intent for.
607
+ # Format: +projects/<Project ID>/agent+.
608
+ # @!attribute [rw] intent
609
+ # @return [Google::Cloud::Dialogflow::V2::Intent]
610
+ # Required. The intent to create.
611
+ # @!attribute [rw] language_code
612
+ # @return [String]
613
+ # Optional. The language of training phrases, parameters and rich messages
614
+ # defined in +intent+. If not specified, the agent's default language is
615
+ # used. [More than a dozen
616
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
617
+ # Note: languages must be enabled in the agent, before they can be used.
618
+ # @!attribute [rw] intent_view
619
+ # @return [Google::Cloud::Dialogflow::V2::IntentView]
620
+ # Optional. The resource view to apply to the returned intent.
621
+ class CreateIntentRequest; end
622
+
623
+ # The request message for {Google::Cloud::Dialogflow::V2::Intents::UpdateIntent Intents::UpdateIntent}.
624
+ # @!attribute [rw] intent
625
+ # @return [Google::Cloud::Dialogflow::V2::Intent]
626
+ # Required. The intent to update.
627
+ # Format: +projects/<Project ID>/agent/intents/<Intent ID>+.
628
+ # @!attribute [rw] language_code
629
+ # @return [String]
630
+ # Optional. The language of training phrases, parameters and rich messages
631
+ # defined in +intent+. If not specified, the agent's default language is
632
+ # used. [More than a dozen
633
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
634
+ # Note: languages must be enabled in the agent, before they can be used.
635
+ # @!attribute [rw] update_mask
636
+ # @return [Google::Protobuf::FieldMask]
637
+ # Optional. The mask to control which fields get updated.
638
+ # @!attribute [rw] intent_view
639
+ # @return [Google::Cloud::Dialogflow::V2::IntentView]
640
+ # Optional. The resource view to apply to the returned intent.
641
+ class UpdateIntentRequest; end
642
+
643
+ # The request message for {Google::Cloud::Dialogflow::V2::Intents::DeleteIntent Intents::DeleteIntent}.
644
+ # @!attribute [rw] name
645
+ # @return [String]
646
+ # Required. The name of the intent to delete.
647
+ # Format: +projects/<Project ID>/agent/intents/<Intent ID>+.
648
+ class DeleteIntentRequest; end
649
+
650
+ # The request message for {Google::Cloud::Dialogflow::V2::Intents::BatchUpdateIntents Intents::BatchUpdateIntents}.
651
+ # @!attribute [rw] parent
652
+ # @return [String]
653
+ # Required. The name of the agent to update or create intents in.
654
+ # Format: +projects/<Project ID>/agent+.
655
+ # @!attribute [rw] intent_batch_uri
656
+ # @return [String]
657
+ # The URI to a Google Cloud Storage file containing intents to update or
658
+ # create. The file format can either be a serialized proto (of IntentBatch
659
+ # type) or JSON object. Note: The URI must start with "gs://".
660
+ # @!attribute [rw] intent_batch_inline
661
+ # @return [Google::Cloud::Dialogflow::V2::IntentBatch]
662
+ # The collection of intents to update or create.
663
+ # @!attribute [rw] language_code
664
+ # @return [String]
665
+ # Optional. The language of training phrases, parameters and rich messages
666
+ # defined in +intents+. If not specified, the agent's default language is
667
+ # used. [More than a dozen
668
+ # languages](https://dialogflow.com/docs/reference/language) are supported.
669
+ # Note: languages must be enabled in the agent, before they can be used.
670
+ # @!attribute [rw] update_mask
671
+ # @return [Google::Protobuf::FieldMask]
672
+ # Optional. The mask to control which fields get updated.
673
+ # @!attribute [rw] intent_view
674
+ # @return [Google::Cloud::Dialogflow::V2::IntentView]
675
+ # Optional. The resource view to apply to the returned intent.
676
+ class BatchUpdateIntentsRequest; end
677
+
678
+ # The response message for {Google::Cloud::Dialogflow::V2::Intents::BatchUpdateIntents Intents::BatchUpdateIntents}.
679
+ # @!attribute [rw] intents
680
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent>]
681
+ # The collection of updated or created intents.
682
+ class BatchUpdateIntentsResponse; end
683
+
684
+ # The request message for {Google::Cloud::Dialogflow::V2::Intents::BatchDeleteIntents Intents::BatchDeleteIntents}.
685
+ # @!attribute [rw] parent
686
+ # @return [String]
687
+ # Required. The name of the agent to delete all entities types for. Format:
688
+ # +projects/<Project ID>/agent+.
689
+ # @!attribute [rw] intents
690
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent>]
691
+ # Required. The collection of intents to delete. Only intent +name+ must be
692
+ # filled in.
693
+ class BatchDeleteIntentsRequest; end
694
+
695
+ # This message is a wrapper around a collection of intents.
696
+ # @!attribute [rw] intents
697
+ # @return [Array<Google::Cloud::Dialogflow::V2::Intent>]
698
+ # A collection of intents.
699
+ class IntentBatch; end
700
+
701
+ # Represents the options for views of an intent.
702
+ # An intent can be a sizable object. Therefore, we provide a resource view that
703
+ # does not return training phrases in the response by default.
704
+ module IntentView
705
+ # Training phrases field is not populated in the response.
706
+ INTENT_VIEW_UNSPECIFIED = 0
707
+
708
+ # All fields are populated.
709
+ INTENT_VIEW_FULL = 1
710
+ end
711
+ end
712
+ end
713
+ end
714
+ end