google-cloud-dialogflow-v2 0.11.1 → 0.11.5

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +2 -2
  4. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +39 -5
  5. data/lib/google/cloud/dialogflow/v2/agents/client.rb +252 -31
  6. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +115 -12
  7. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -2
  8. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
  9. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +46 -6
  10. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +3 -2
  11. data/lib/google/cloud/dialogflow/v2/context_pb.rb +2 -2
  12. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
  13. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +126 -18
  14. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +2 -2
  15. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +2 -2
  16. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +4 -2
  17. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
  18. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +106 -15
  19. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
  20. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
  21. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +112 -15
  22. data/lib/google/cloud/dialogflow/v2/document_pb.rb +2 -2
  23. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +27 -10
  24. data/lib/google/cloud/dialogflow/v2/documents/client.rb +180 -27
  25. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +115 -12
  26. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +2 -2
  27. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +45 -1
  28. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +284 -30
  29. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +115 -12
  30. data/lib/google/cloud/dialogflow/v2/environment_pb.rb +2 -2
  31. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +1 -1
  32. data/lib/google/cloud/dialogflow/v2/environments/client.rb +132 -18
  33. data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +2 -2
  34. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
  35. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +40 -6
  36. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +2 -2
  37. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +2 -2
  38. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -2
  39. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +16 -1
  40. data/lib/google/cloud/dialogflow/v2/intents/client.rb +175 -21
  41. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +115 -12
  42. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +2 -2
  43. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
  44. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +106 -15
  45. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +2 -2
  46. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
  47. data/lib/google/cloud/dialogflow/v2/participants/client.rb +146 -21
  48. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +2 -2
  49. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
  50. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +106 -15
  51. data/lib/google/cloud/dialogflow/v2/session_pb.rb +2 -2
  52. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +15 -1
  53. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +58 -3
  54. data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +1 -1
  55. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  56. data/lib/google/cloud/dialogflow/v2/version_pb.rb +2 -2
  57. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
  58. data/lib/google/cloud/dialogflow/v2/versions/client.rb +106 -15
  59. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +2 -2
  60. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +4 -3
  61. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +25 -8
  62. data/proto_docs/google/cloud/dialogflow/v2/session.rb +38 -33
  63. metadata +6 -5
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/answer_record.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -11,6 +9,8 @@ require 'google/cloud/dialogflow/v2/participant_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
13
11
  require 'google/protobuf/timestamp_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/cloud/dialogflow/v2/answer_record.proto", :syntax => :proto3) do
16
16
  add_message "google.cloud.dialogflow.v2.AnswerRecord" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord].
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -197,6 +197,27 @@ module Google
197
197
  #
198
198
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
199
199
  #
200
+ # @example Basic example
201
+ # require "google/cloud/dialogflow/v2"
202
+ #
203
+ # # Create a client object. The client can be reused for multiple calls.
204
+ # client = Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new
205
+ #
206
+ # # Create a request. To set request fields, pass in keyword arguments.
207
+ # request = Google::Cloud::Dialogflow::V2::ListAnswerRecordsRequest.new
208
+ #
209
+ # # Call the list_answer_records method.
210
+ # result = client.list_answer_records request
211
+ #
212
+ # # The returned object is of type Gapic::PagedEnumerable. You can
213
+ # # iterate over all elements by calling #each, and the enumerable
214
+ # # will lazily make API calls to fetch subsequent pages. Other
215
+ # # methods are also available for managing paging directly.
216
+ # result.each do |response|
217
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::AnswerRecord.
218
+ # p response
219
+ # end
220
+ #
200
221
  def list_answer_records request, options = nil
201
222
  raise ::ArgumentError, "request must be provided" if request.nil?
202
223
 
@@ -214,9 +235,11 @@ module Google
214
235
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
215
236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
216
237
 
217
- header_params = {
218
- "parent" => request.parent
219
- }
238
+ header_params = {}
239
+ if request.parent
240
+ header_params["parent"] = request.parent
241
+ end
242
+
220
243
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
221
244
  metadata[:"x-goog-request-params"] ||= request_params_header
222
245
 
@@ -268,6 +291,21 @@ module Google
268
291
  #
269
292
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
270
293
  #
294
+ # @example Basic example
295
+ # require "google/cloud/dialogflow/v2"
296
+ #
297
+ # # Create a client object. The client can be reused for multiple calls.
298
+ # client = Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new
299
+ #
300
+ # # Create a request. To set request fields, pass in keyword arguments.
301
+ # request = Google::Cloud::Dialogflow::V2::UpdateAnswerRecordRequest.new
302
+ #
303
+ # # Call the update_answer_record method.
304
+ # result = client.update_answer_record request
305
+ #
306
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::AnswerRecord.
307
+ # p result
308
+ #
271
309
  def update_answer_record request, options = nil
272
310
  raise ::ArgumentError, "request must be provided" if request.nil?
273
311
 
@@ -285,9 +323,11 @@ module Google
285
323
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
286
324
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
287
325
 
288
- header_params = {
289
- "answer_record.name" => request.answer_record.name
290
- }
326
+ header_params = {}
327
+ if request.answer_record&.name
328
+ header_params["answer_record.name"] = request.answer_record.name
329
+ end
330
+
291
331
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
292
332
  metadata[:"x-goog-request-params"] ||= request_params_header
293
333
 
@@ -1,12 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/audio_config.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/protobuf/duration_pb'
7
+ require 'google/protobuf/timestamp_pb'
9
8
  require 'google/api/annotations_pb'
9
+ require 'google/protobuf'
10
+
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
12
  add_file("google/cloud/dialogflow/v2/audio_config.proto", :syntax => :proto3) do
12
13
  add_message "google.cloud.dialogflow.v2.SpeechContext" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/context.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/protobuf/empty_pb'
11
9
  require 'google/protobuf/field_mask_pb'
12
10
  require 'google/protobuf/struct_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/dialogflow/v2/context.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.dialogflow.v2.Context" do
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing [Contexts][google.cloud.dialogflow.v2.Context].
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -188,6 +188,27 @@ module Google
188
188
  #
189
189
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
190
190
  #
191
+ # @example Basic example
192
+ # require "google/cloud/dialogflow/v2"
193
+ #
194
+ # # Create a client object. The client can be reused for multiple calls.
195
+ # client = Google::Cloud::Dialogflow::V2::Contexts::Client.new
196
+ #
197
+ # # Create a request. To set request fields, pass in keyword arguments.
198
+ # request = Google::Cloud::Dialogflow::V2::ListContextsRequest.new
199
+ #
200
+ # # Call the list_contexts method.
201
+ # result = client.list_contexts request
202
+ #
203
+ # # The returned object is of type Gapic::PagedEnumerable. You can
204
+ # # iterate over all elements by calling #each, and the enumerable
205
+ # # will lazily make API calls to fetch subsequent pages. Other
206
+ # # methods are also available for managing paging directly.
207
+ # result.each do |response|
208
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::Context.
209
+ # p response
210
+ # end
211
+ #
191
212
  def list_contexts request, options = nil
192
213
  raise ::ArgumentError, "request must be provided" if request.nil?
193
214
 
@@ -205,9 +226,11 @@ module Google
205
226
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
206
227
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
207
228
 
208
- header_params = {
209
- "parent" => request.parent
210
- }
229
+ header_params = {}
230
+ if request.parent
231
+ header_params["parent"] = request.parent
232
+ end
233
+
211
234
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
212
235
  metadata[:"x-goog-request-params"] ||= request_params_header
213
236
 
@@ -262,6 +285,21 @@ module Google
262
285
  #
263
286
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
264
287
  #
288
+ # @example Basic example
289
+ # require "google/cloud/dialogflow/v2"
290
+ #
291
+ # # Create a client object. The client can be reused for multiple calls.
292
+ # client = Google::Cloud::Dialogflow::V2::Contexts::Client.new
293
+ #
294
+ # # Create a request. To set request fields, pass in keyword arguments.
295
+ # request = Google::Cloud::Dialogflow::V2::GetContextRequest.new
296
+ #
297
+ # # Call the get_context method.
298
+ # result = client.get_context request
299
+ #
300
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Context.
301
+ # p result
302
+ #
265
303
  def get_context request, options = nil
266
304
  raise ::ArgumentError, "request must be provided" if request.nil?
267
305
 
@@ -279,9 +317,11 @@ module Google
279
317
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
280
318
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
281
319
 
282
- header_params = {
283
- "name" => request.name
284
- }
320
+ header_params = {}
321
+ if request.name
322
+ header_params["name"] = request.name
323
+ end
324
+
285
325
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
286
326
  metadata[:"x-goog-request-params"] ||= request_params_header
287
327
 
@@ -339,6 +379,21 @@ module Google
339
379
  #
340
380
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
341
381
  #
382
+ # @example Basic example
383
+ # require "google/cloud/dialogflow/v2"
384
+ #
385
+ # # Create a client object. The client can be reused for multiple calls.
386
+ # client = Google::Cloud::Dialogflow::V2::Contexts::Client.new
387
+ #
388
+ # # Create a request. To set request fields, pass in keyword arguments.
389
+ # request = Google::Cloud::Dialogflow::V2::CreateContextRequest.new
390
+ #
391
+ # # Call the create_context method.
392
+ # result = client.create_context request
393
+ #
394
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Context.
395
+ # p result
396
+ #
342
397
  def create_context request, options = nil
343
398
  raise ::ArgumentError, "request must be provided" if request.nil?
344
399
 
@@ -356,9 +411,11 @@ module Google
356
411
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
357
412
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
358
413
 
359
- header_params = {
360
- "parent" => request.parent
361
- }
414
+ header_params = {}
415
+ if request.parent
416
+ header_params["parent"] = request.parent
417
+ end
418
+
362
419
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
363
420
  metadata[:"x-goog-request-params"] ||= request_params_header
364
421
 
@@ -409,6 +466,21 @@ module Google
409
466
  #
410
467
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
411
468
  #
469
+ # @example Basic example
470
+ # require "google/cloud/dialogflow/v2"
471
+ #
472
+ # # Create a client object. The client can be reused for multiple calls.
473
+ # client = Google::Cloud::Dialogflow::V2::Contexts::Client.new
474
+ #
475
+ # # Create a request. To set request fields, pass in keyword arguments.
476
+ # request = Google::Cloud::Dialogflow::V2::UpdateContextRequest.new
477
+ #
478
+ # # Call the update_context method.
479
+ # result = client.update_context request
480
+ #
481
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Context.
482
+ # p result
483
+ #
412
484
  def update_context request, options = nil
413
485
  raise ::ArgumentError, "request must be provided" if request.nil?
414
486
 
@@ -426,9 +498,11 @@ module Google
426
498
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
427
499
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
428
500
 
429
- header_params = {
430
- "context.name" => request.context.name
431
- }
501
+ header_params = {}
502
+ if request.context&.name
503
+ header_params["context.name"] = request.context.name
504
+ end
505
+
432
506
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
433
507
  metadata[:"x-goog-request-params"] ||= request_params_header
434
508
 
@@ -482,6 +556,21 @@ module Google
482
556
  #
483
557
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
484
558
  #
559
+ # @example Basic example
560
+ # require "google/cloud/dialogflow/v2"
561
+ #
562
+ # # Create a client object. The client can be reused for multiple calls.
563
+ # client = Google::Cloud::Dialogflow::V2::Contexts::Client.new
564
+ #
565
+ # # Create a request. To set request fields, pass in keyword arguments.
566
+ # request = Google::Cloud::Dialogflow::V2::DeleteContextRequest.new
567
+ #
568
+ # # Call the delete_context method.
569
+ # result = client.delete_context request
570
+ #
571
+ # # The returned object is of type Google::Protobuf::Empty.
572
+ # p result
573
+ #
485
574
  def delete_context request, options = nil
486
575
  raise ::ArgumentError, "request must be provided" if request.nil?
487
576
 
@@ -499,9 +588,11 @@ module Google
499
588
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
500
589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
501
590
 
502
- header_params = {
503
- "name" => request.name
504
- }
591
+ header_params = {}
592
+ if request.name
593
+ header_params["name"] = request.name
594
+ end
595
+
505
596
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
506
597
  metadata[:"x-goog-request-params"] ||= request_params_header
507
598
 
@@ -555,6 +646,21 @@ module Google
555
646
  #
556
647
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
557
648
  #
649
+ # @example Basic example
650
+ # require "google/cloud/dialogflow/v2"
651
+ #
652
+ # # Create a client object. The client can be reused for multiple calls.
653
+ # client = Google::Cloud::Dialogflow::V2::Contexts::Client.new
654
+ #
655
+ # # Create a request. To set request fields, pass in keyword arguments.
656
+ # request = Google::Cloud::Dialogflow::V2::DeleteAllContextsRequest.new
657
+ #
658
+ # # Call the delete_all_contexts method.
659
+ # result = client.delete_all_contexts request
660
+ #
661
+ # # The returned object is of type Google::Protobuf::Empty.
662
+ # p result
663
+ #
558
664
  def delete_all_contexts request, options = nil
559
665
  raise ::ArgumentError, "request must be provided" if request.nil?
560
666
 
@@ -572,9 +678,11 @@ module Google
572
678
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
573
679
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
574
680
 
575
- header_params = {
576
- "parent" => request.parent
577
- }
681
+ header_params = {}
682
+ if request.parent
683
+ header_params["parent"] = request.parent
684
+ end
685
+
578
686
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
579
687
  metadata[:"x-goog-request-params"] ||= request_params_header
580
688
 
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/conversation_event.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/cloud/dialogflow/v2/participant_pb'
7
5
  require 'google/rpc/status_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/dialogflow/v2/conversation_event.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.dialogflow.v2.ConversationEvent" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/conversation.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/cloud/dialogflow/v2/participant_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/timestamp_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/dialogflow/v2/conversation.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.dialogflow.v2.Conversation" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/v2/conversation_profile.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -13,6 +11,8 @@ require 'google/longrunning/operations_pb'
13
11
  require 'google/protobuf/empty_pb'
14
12
  require 'google/protobuf/field_mask_pb'
15
13
  require 'google/protobuf/timestamp_pb'
14
+ require 'google/protobuf'
15
+
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  add_file("google/cloud/dialogflow/v2/conversation_profile.proto", :syntax => :proto3) do
18
18
  add_message "google.cloud.dialogflow.v2.ConversationProfile" do
@@ -28,6 +28,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
28
28
  optional :new_message_event_notification_config, :message, 8, "google.cloud.dialogflow.v2.NotificationConfig"
29
29
  optional :stt_config, :message, 9, "google.cloud.dialogflow.v2.SpeechToTextConfig"
30
30
  optional :language_code, :string, 10
31
+ optional :time_zone, :string, 14
32
+ optional :security_settings, :string, 13
31
33
  end
32
34
  add_message "google.cloud.dialogflow.v2.ListConversationProfilesRequest" do
33
35
  optional :parent, :string, 1
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for managing [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile].
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode