google-cloud-dialogflow 0.2.3 → 0.3.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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/AUTHENTICATION.md +199 -0
  4. data/README.md +2 -2
  5. data/lib/google/cloud/dialogflow.rb +21 -14
  6. data/lib/google/cloud/dialogflow/v2.rb +21 -14
  7. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +1 -0
  8. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +14 -14
  9. data/lib/google/cloud/dialogflow/v2/agents_client.rb +56 -36
  10. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +51 -0
  11. data/lib/google/cloud/dialogflow/v2/context_pb.rb +1 -0
  12. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +7 -3
  13. data/lib/google/cloud/dialogflow/v2/contexts_client.rb +48 -26
  14. data/lib/google/cloud/dialogflow/v2/credentials.rb +3 -2
  15. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/agent.rb +31 -26
  16. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/audio_config.rb +120 -0
  17. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/context.rb +8 -4
  18. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/entity_type.rb +74 -56
  19. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb +78 -44
  20. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session.rb +111 -37
  21. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session_entity_type.rb +11 -5
  22. data/lib/google/cloud/dialogflow/v2/doc/google/longrunning/operations.rb +2 -44
  23. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/any.rb +3 -2
  24. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/empty.rb +1 -1
  25. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/field_mask.rb +19 -27
  26. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/struct.rb +1 -1
  27. data/lib/google/cloud/dialogflow/v2/doc/google/rpc/status.rb +18 -15
  28. data/lib/google/cloud/dialogflow/v2/doc/google/type/latlng.rb +1 -35
  29. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +1 -0
  30. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +12 -14
  31. data/lib/google/cloud/dialogflow/v2/entity_types_client.rb +104 -69
  32. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
  33. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +6 -4
  34. data/lib/google/cloud/dialogflow/v2/intents_client.rb +73 -45
  35. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +1 -0
  36. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +7 -2
  37. data/lib/google/cloud/dialogflow/v2/session_entity_types_client.rb +28 -8
  38. data/lib/google/cloud/dialogflow/v2/session_pb.rb +23 -0
  39. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +2 -1
  40. data/lib/google/cloud/dialogflow/v2/sessions_client.rb +15 -3
  41. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +2 -1
  42. metadata +28 -6
@@ -5,8 +5,10 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/resource_pb'
8
9
  require 'google/cloud/dialogflow/v2/context_pb'
9
10
  require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/duration_pb'
10
12
  require 'google/protobuf/empty_pb'
11
13
  require 'google/protobuf/field_mask_pb'
12
14
  require 'google/protobuf/struct_pb'
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/dialogflow/v2/intent.proto for package 'google.cloud.dialogflow.v2'
3
3
  # Original file comments:
4
- # Copyright 2018 Google Inc.
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
+ #
18
19
 
19
20
 
20
21
  require 'grpc'
@@ -39,7 +40,7 @@ module Google
39
40
  # * **Contexts** - provide additional context for intent analysis. For
40
41
  # example, if an intent is related to an object in your application that
41
42
  # plays music, you can provide a context to determine when to match the
42
- # intent if the user input is turn it off”. You can include a context
43
+ # intent if the user input is "turn it off". You can include a context
43
44
  # that matches the intent when there is previous user input of
44
45
  # "play music", and not when there is previous user input of
45
46
  # "turn on the light".
@@ -55,7 +56,8 @@ module Google
55
56
  # Dialogflow API agent to better match intents.
56
57
  #
57
58
  # For more information about intents, see the
58
- # [Dialogflow documentation](https://dialogflow.com/docs/intents).
59
+ # [Dialogflow
60
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview).
59
61
  class Service
60
62
 
61
63
  include GRPC::GenericService
@@ -72,7 +74,7 @@ module Google
72
74
  rpc :CreateIntent, CreateIntentRequest, Intent
73
75
  # Updates the specified intent.
74
76
  rpc :UpdateIntent, UpdateIntentRequest, Intent
75
- # Deletes the specified intent.
77
+ # Deletes the specified intent and its direct or indirect followup intents.
76
78
  rpc :DeleteIntent, DeleteIntentRequest, Google::Protobuf::Empty
77
79
  # Updates/Creates multiple intents in the specified agent.
78
80
  #
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ module Google
48
48
  # * **Contexts** - provide additional context for intent analysis. For
49
49
  # example, if an intent is related to an object in your application that
50
50
  # plays music, you can provide a context to determine when to match the
51
- # intent if the user input is turn it off”. You can include a context
51
+ # intent if the user input is "turn it off". You can include a context
52
52
  # that matches the intent when there is previous user input of
53
53
  # "play music", and not when there is previous user input of
54
54
  # "turn on the light".
@@ -64,7 +64,8 @@ module Google
64
64
  # Dialogflow API agent to better match intents.
65
65
  #
66
66
  # For more information about intents, see the
67
- # [Dialogflow documentation](https://dialogflow.com/docs/intents).
67
+ # [Dialogflow
68
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview).
68
69
  #
69
70
  # @!attribute [r] intents_stub
70
71
  # @return [Google::Cloud::Dialogflow::V2::Intents::Stub]
@@ -95,7 +96,8 @@ module Google
95
96
  # The scopes needed to make gRPC calls to all of the methods defined in
96
97
  # this service.
97
98
  ALL_SCOPES = [
98
- "https://www.googleapis.com/auth/cloud-platform"
99
+ "https://www.googleapis.com/auth/cloud-platform",
100
+ "https://www.googleapis.com/auth/dialogflow"
99
101
  ].freeze
100
102
 
101
103
  # @private
@@ -104,11 +106,11 @@ module Google
104
106
  self::GRPC_INTERCEPTORS = IntentsClient::GRPC_INTERCEPTORS
105
107
  end
106
108
 
107
- PROJECT_AGENT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
108
- "projects/{project}/agent"
109
+ AGENT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
110
+ "projects/{project}/agents/{agent}"
109
111
  )
110
112
 
111
- private_constant :PROJECT_AGENT_PATH_TEMPLATE
113
+ private_constant :AGENT_PATH_TEMPLATE
112
114
 
113
115
  INTENT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
114
116
  "projects/{project}/agent/intents/{intent}"
@@ -116,18 +118,20 @@ module Google
116
118
 
117
119
  private_constant :INTENT_PATH_TEMPLATE
118
120
 
119
- AGENT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
120
- "projects/{project}/agents/{agent}"
121
+ PROJECT_AGENT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
122
+ "projects/{project}/agent"
121
123
  )
122
124
 
123
- private_constant :AGENT_PATH_TEMPLATE
125
+ private_constant :PROJECT_AGENT_PATH_TEMPLATE
124
126
 
125
- # Returns a fully-qualified project_agent resource name string.
127
+ # Returns a fully-qualified agent resource name string.
126
128
  # @param project [String]
129
+ # @param agent [String]
127
130
  # @return [String]
128
- def self.project_agent_path project
129
- PROJECT_AGENT_PATH_TEMPLATE.render(
130
- :"project" => project
131
+ def self.agent_path project, agent
132
+ AGENT_PATH_TEMPLATE.render(
133
+ :"project" => project,
134
+ :"agent" => agent
131
135
  )
132
136
  end
133
137
 
@@ -142,14 +146,12 @@ module Google
142
146
  )
143
147
  end
144
148
 
145
- # Returns a fully-qualified agent resource name string.
149
+ # Returns a fully-qualified project_agent resource name string.
146
150
  # @param project [String]
147
- # @param agent [String]
148
151
  # @return [String]
149
- def self.agent_path project, agent
150
- AGENT_PATH_TEMPLATE.render(
151
- :"project" => project,
152
- :"agent" => agent
152
+ def self.project_agent_path project
153
+ PROJECT_AGENT_PATH_TEMPLATE.render(
154
+ :"project" => project
153
155
  )
154
156
  end
155
157
 
@@ -268,37 +270,58 @@ module Google
268
270
  @list_intents = Google::Gax.create_api_call(
269
271
  @intents_stub.method(:list_intents),
270
272
  defaults["list_intents"],
271
- exception_transformer: exception_transformer
273
+ exception_transformer: exception_transformer,
274
+ params_extractor: proc do |request|
275
+ {'parent' => request.parent}
276
+ end
272
277
  )
273
278
  @get_intent = Google::Gax.create_api_call(
274
279
  @intents_stub.method(:get_intent),
275
280
  defaults["get_intent"],
276
- exception_transformer: exception_transformer
281
+ exception_transformer: exception_transformer,
282
+ params_extractor: proc do |request|
283
+ {'name' => request.name}
284
+ end
277
285
  )
278
286
  @create_intent = Google::Gax.create_api_call(
279
287
  @intents_stub.method(:create_intent),
280
288
  defaults["create_intent"],
281
- exception_transformer: exception_transformer
289
+ exception_transformer: exception_transformer,
290
+ params_extractor: proc do |request|
291
+ {'parent' => request.parent}
292
+ end
282
293
  )
283
294
  @update_intent = Google::Gax.create_api_call(
284
295
  @intents_stub.method(:update_intent),
285
296
  defaults["update_intent"],
286
- exception_transformer: exception_transformer
297
+ exception_transformer: exception_transformer,
298
+ params_extractor: proc do |request|
299
+ {'intent.name' => request.intent.name}
300
+ end
287
301
  )
288
302
  @delete_intent = Google::Gax.create_api_call(
289
303
  @intents_stub.method(:delete_intent),
290
304
  defaults["delete_intent"],
291
- exception_transformer: exception_transformer
305
+ exception_transformer: exception_transformer,
306
+ params_extractor: proc do |request|
307
+ {'name' => request.name}
308
+ end
292
309
  )
293
310
  @batch_update_intents = Google::Gax.create_api_call(
294
311
  @intents_stub.method(:batch_update_intents),
295
312
  defaults["batch_update_intents"],
296
- exception_transformer: exception_transformer
313
+ exception_transformer: exception_transformer,
314
+ params_extractor: proc do |request|
315
+ {'parent' => request.parent}
316
+ end
297
317
  )
298
318
  @batch_delete_intents = Google::Gax.create_api_call(
299
319
  @intents_stub.method(:batch_delete_intents),
300
320
  defaults["batch_delete_intents"],
301
- exception_transformer: exception_transformer
321
+ exception_transformer: exception_transformer,
322
+ params_extractor: proc do |request|
323
+ {'parent' => request.parent}
324
+ end
302
325
  )
303
326
  end
304
327
 
@@ -312,9 +335,10 @@ module Google
312
335
  # @param language_code [String]
313
336
  # Optional. The language to list training phrases, parameters and rich
314
337
  # messages for. If not specified, the agent's default language is used.
315
- # [More than a dozen
316
- # languages](https://dialogflow.com/docs/reference/language) are supported.
317
- # Note: languages must be enabled in the agent before they can be used.
338
+ # [Many
339
+ # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
340
+ # are supported. Note: languages must be enabled in the agent before they can
341
+ # be used.
318
342
  # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
319
343
  # Optional. The resource view to apply to the returned intent.
320
344
  # @param page_size [Integer]
@@ -379,9 +403,10 @@ module Google
379
403
  # @param language_code [String]
380
404
  # Optional. The language to retrieve training phrases, parameters and rich
381
405
  # messages for. If not specified, the agent's default language is used.
382
- # [More than a dozen
383
- # languages](https://dialogflow.com/docs/reference/language) are supported.
384
- # Note: languages must be enabled in the agent, before they can be used.
406
+ # [Many
407
+ # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
408
+ # are supported. Note: languages must be enabled in the agent before they can
409
+ # be used.
385
410
  # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
386
411
  # Optional. The resource view to apply to the returned intent.
387
412
  # @param options [Google::Gax::CallOptions]
@@ -426,9 +451,10 @@ module Google
426
451
  # @param language_code [String]
427
452
  # Optional. The language of training phrases, parameters and rich messages
428
453
  # defined in `intent`. If not specified, the agent's default language is
429
- # used. [More than a dozen
430
- # languages](https://dialogflow.com/docs/reference/language) are supported.
431
- # Note: languages must be enabled in the agent, before they can be used.
454
+ # used. [Many
455
+ # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
456
+ # are supported. Note: languages must be enabled in the agent before they can
457
+ # be used.
432
458
  # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
433
459
  # Optional. The resource view to apply to the returned intent.
434
460
  # @param options [Google::Gax::CallOptions]
@@ -470,15 +496,15 @@ module Google
470
496
  #
471
497
  # @param intent [Google::Cloud::Dialogflow::V2::Intent | Hash]
472
498
  # Required. The intent to update.
473
- # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
474
499
  # A hash of the same form as `Google::Cloud::Dialogflow::V2::Intent`
475
500
  # can also be provided.
476
501
  # @param language_code [String]
477
502
  # Optional. The language of training phrases, parameters and rich messages
478
503
  # defined in `intent`. If not specified, the agent's default language is
479
- # used. [More than a dozen
480
- # languages](https://dialogflow.com/docs/reference/language) are supported.
481
- # Note: languages must be enabled in the agent, before they can be used.
504
+ # used. [Many
505
+ # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
506
+ # are supported. Note: languages must be enabled in the agent before they can
507
+ # be used.
482
508
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
483
509
  # Optional. The mask to control which fields get updated.
484
510
  # A hash of the same form as `Google::Protobuf::FieldMask`
@@ -522,10 +548,11 @@ module Google
522
548
  @update_intent.call(req, options, &block)
523
549
  end
524
550
 
525
- # Deletes the specified intent.
551
+ # Deletes the specified intent and its direct or indirect followup intents.
526
552
  #
527
553
  # @param name [String]
528
- # Required. The name of the intent to delete.
554
+ # Required. The name of the intent to delete. If this intent has direct or
555
+ # indirect followup intents, we also delete them.
529
556
  # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
530
557
  # @param options [Google::Gax::CallOptions]
531
558
  # Overrides the default settings for this call, e.g, timeout,
@@ -563,9 +590,10 @@ module Google
563
590
  # @param language_code [String]
564
591
  # Optional. The language of training phrases, parameters and rich messages
565
592
  # defined in `intents`. If not specified, the agent's default language is
566
- # used. [More than a dozen
567
- # languages](https://dialogflow.com/docs/reference/language) are supported.
568
- # Note: languages must be enabled in the agent, before they can be used.
593
+ # used. [Many
594
+ # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
595
+ # are supported. Note: languages must be enabled in the agent before they can
596
+ # be used.
569
597
  # @param intent_batch_uri [String]
570
598
  # The URI to a Google Cloud Storage file containing intents to update or
571
599
  # create. The file format can either be a serialized proto (of IntentBatch
@@ -5,6 +5,7 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/resource_pb'
8
9
  require 'google/cloud/dialogflow/v2/entity_type_pb'
9
10
  require 'google/protobuf/empty_pb'
10
11
  require 'google/protobuf/field_mask_pb'
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/dialogflow/v2/session_entity_type.proto for package 'google.cloud.dialogflow.v2'
3
3
  # Original file comments:
4
- # Copyright 2018 Google Inc.
4
+ # Copyright 2019 Google LLC.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
+ #
18
19
 
19
20
 
20
21
  require 'grpc'
@@ -36,7 +37,8 @@ module Google
36
37
  # entity type at the session level.
37
38
  #
38
39
  # For more information about entity types, see the
39
- # [Dialogflow documentation](https://dialogflow.com/docs/entities).
40
+ # [Dialogflow
41
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
40
42
  class Service
41
43
 
42
44
  include GRPC::GenericService
@@ -50,6 +52,9 @@ module Google
50
52
  # Retrieves the specified session entity type.
51
53
  rpc :GetSessionEntityType, GetSessionEntityTypeRequest, SessionEntityType
52
54
  # Creates a session entity type.
55
+ #
56
+ # If the specified session entity type already exists, overrides the session
57
+ # entity type.
53
58
  rpc :CreateSessionEntityType, CreateSessionEntityTypeRequest, SessionEntityType
54
59
  # Updates the specified session entity type.
55
60
  rpc :UpdateSessionEntityType, UpdateSessionEntityTypeRequest, SessionEntityType
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -43,7 +43,8 @@ module Google
43
43
  # entity type at the session level.
44
44
  #
45
45
  # For more information about entity types, see the
46
- # [Dialogflow documentation](https://dialogflow.com/docs/entities).
46
+ # [Dialogflow
47
+ # documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
47
48
  #
48
49
  # @!attribute [r] session_entity_types_stub
49
50
  # @return [Google::Cloud::Dialogflow::V2::SessionEntityTypes::Stub]
@@ -74,7 +75,8 @@ module Google
74
75
  # The scopes needed to make gRPC calls to all of the methods defined in
75
76
  # this service.
76
77
  ALL_SCOPES = [
77
- "https://www.googleapis.com/auth/cloud-platform"
78
+ "https://www.googleapis.com/auth/cloud-platform",
79
+ "https://www.googleapis.com/auth/dialogflow"
78
80
  ].freeze
79
81
 
80
82
 
@@ -220,27 +222,42 @@ module Google
220
222
  @list_session_entity_types = Google::Gax.create_api_call(
221
223
  @session_entity_types_stub.method(:list_session_entity_types),
222
224
  defaults["list_session_entity_types"],
223
- exception_transformer: exception_transformer
225
+ exception_transformer: exception_transformer,
226
+ params_extractor: proc do |request|
227
+ {'parent' => request.parent}
228
+ end
224
229
  )
225
230
  @get_session_entity_type = Google::Gax.create_api_call(
226
231
  @session_entity_types_stub.method(:get_session_entity_type),
227
232
  defaults["get_session_entity_type"],
228
- exception_transformer: exception_transformer
233
+ exception_transformer: exception_transformer,
234
+ params_extractor: proc do |request|
235
+ {'name' => request.name}
236
+ end
229
237
  )
230
238
  @create_session_entity_type = Google::Gax.create_api_call(
231
239
  @session_entity_types_stub.method(:create_session_entity_type),
232
240
  defaults["create_session_entity_type"],
233
- exception_transformer: exception_transformer
241
+ exception_transformer: exception_transformer,
242
+ params_extractor: proc do |request|
243
+ {'parent' => request.parent}
244
+ end
234
245
  )
235
246
  @update_session_entity_type = Google::Gax.create_api_call(
236
247
  @session_entity_types_stub.method(:update_session_entity_type),
237
248
  defaults["update_session_entity_type"],
238
- exception_transformer: exception_transformer
249
+ exception_transformer: exception_transformer,
250
+ params_extractor: proc do |request|
251
+ {'session_entity_type.name' => request.session_entity_type.name}
252
+ end
239
253
  )
240
254
  @delete_session_entity_type = Google::Gax.create_api_call(
241
255
  @session_entity_types_stub.method(:delete_session_entity_type),
242
256
  defaults["delete_session_entity_type"],
243
- exception_transformer: exception_transformer
257
+ exception_transformer: exception_transformer,
258
+ params_extractor: proc do |request|
259
+ {'name' => request.name}
260
+ end
244
261
  )
245
262
  end
246
263
 
@@ -335,6 +352,9 @@ module Google
335
352
 
336
353
  # Creates a session entity type.
337
354
  #
355
+ # If the specified session entity type already exists, overrides the session
356
+ # entity type.
357
+ #
338
358
  # @param parent [String]
339
359
  # Required. The session to create a session entity type for.
340
360
  # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
@@ -5,6 +5,8 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/annotations_pb'
8
+ require 'google/api/resource_pb'
9
+ require 'google/cloud/dialogflow/v2/audio_config_pb'
8
10
  require 'google/cloud/dialogflow/v2/context_pb'
9
11
  require 'google/cloud/dialogflow/v2/intent_pb'
10
12
  require 'google/cloud/dialogflow/v2/session_entity_type_pb'
@@ -16,12 +18,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
16
18
  optional :session, :string, 1
17
19
  optional :query_params, :message, 2, "google.cloud.dialogflow.v2.QueryParameters"
18
20
  optional :query_input, :message, 3, "google.cloud.dialogflow.v2.QueryInput"
21
+ optional :output_audio_config, :message, 4, "google.cloud.dialogflow.v2.OutputAudioConfig"
19
22
  optional :input_audio, :bytes, 5
20
23
  end
21
24
  add_message "google.cloud.dialogflow.v2.DetectIntentResponse" do
22
25
  optional :response_id, :string, 1
23
26
  optional :query_result, :message, 2, "google.cloud.dialogflow.v2.QueryResult"
24
27
  optional :webhook_status, :message, 3, "google.rpc.Status"
28
+ optional :output_audio, :bytes, 4
29
+ optional :output_audio_config, :message, 6, "google.cloud.dialogflow.v2.OutputAudioConfig"
25
30
  end
26
31
  add_message "google.cloud.dialogflow.v2.QueryParameters" do
27
32
  optional :time_zone, :string, 1
@@ -30,6 +35,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
30
35
  optional :reset_contexts, :bool, 4
31
36
  repeated :session_entity_types, :message, 5, "google.cloud.dialogflow.v2.SessionEntityType"
32
37
  optional :payload, :message, 6, "google.protobuf.Struct"
38
+ optional :sentiment_analysis_request_config, :message, 10, "google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig"
33
39
  end
34
40
  add_message "google.cloud.dialogflow.v2.QueryInput" do
35
41
  oneof :input do
@@ -53,12 +59,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
53
59
  optional :intent, :message, 11, "google.cloud.dialogflow.v2.Intent"
54
60
  optional :intent_detection_confidence, :float, 12
55
61
  optional :diagnostic_info, :message, 14, "google.protobuf.Struct"
62
+ optional :sentiment_analysis_result, :message, 17, "google.cloud.dialogflow.v2.SentimentAnalysisResult"
56
63
  end
57
64
  add_message "google.cloud.dialogflow.v2.StreamingDetectIntentRequest" do
58
65
  optional :session, :string, 1
59
66
  optional :query_params, :message, 2, "google.cloud.dialogflow.v2.QueryParameters"
60
67
  optional :query_input, :message, 3, "google.cloud.dialogflow.v2.QueryInput"
61
68
  optional :single_utterance, :bool, 4
69
+ optional :output_audio_config, :message, 5, "google.cloud.dialogflow.v2.OutputAudioConfig"
62
70
  optional :input_audio, :bytes, 6
63
71
  end
64
72
  add_message "google.cloud.dialogflow.v2.StreamingDetectIntentResponse" do
@@ -66,6 +74,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
66
74
  optional :recognition_result, :message, 2, "google.cloud.dialogflow.v2.StreamingRecognitionResult"
67
75
  optional :query_result, :message, 3, "google.cloud.dialogflow.v2.QueryResult"
68
76
  optional :webhook_status, :message, 4, "google.rpc.Status"
77
+ optional :output_audio, :bytes, 5
78
+ optional :output_audio_config, :message, 6, "google.cloud.dialogflow.v2.OutputAudioConfig"
69
79
  end
70
80
  add_message "google.cloud.dialogflow.v2.StreamingRecognitionResult" do
71
81
  optional :message_type, :enum, 1, "google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType"
@@ -93,6 +103,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
93
103
  optional :parameters, :message, 2, "google.protobuf.Struct"
94
104
  optional :language_code, :string, 3
95
105
  end
106
+ add_message "google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig" do
107
+ optional :analyze_query_text_sentiment, :bool, 1
108
+ end
109
+ add_message "google.cloud.dialogflow.v2.SentimentAnalysisResult" do
110
+ optional :query_text_sentiment, :message, 1, "google.cloud.dialogflow.v2.Sentiment"
111
+ end
112
+ add_message "google.cloud.dialogflow.v2.Sentiment" do
113
+ optional :score, :float, 1
114
+ optional :magnitude, :float, 2
115
+ end
96
116
  add_enum "google.cloud.dialogflow.v2.AudioEncoding" do
97
117
  value :AUDIO_ENCODING_UNSPECIFIED, 0
98
118
  value :AUDIO_ENCODING_LINEAR_16, 1
@@ -121,6 +141,9 @@ module Google
121
141
  InputAudioConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.InputAudioConfig").msgclass
122
142
  TextInput = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.TextInput").msgclass
123
143
  EventInput = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.EventInput").msgclass
144
+ SentimentAnalysisRequestConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig").msgclass
145
+ SentimentAnalysisResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SentimentAnalysisResult").msgclass
146
+ Sentiment = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Sentiment").msgclass
124
147
  AudioEncoding = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.AudioEncoding").enummodule
125
148
  end
126
149
  end