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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/dialogflow/v2/agent_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +39 -5
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +252 -31
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +46 -6
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +3 -2
- data/lib/google/cloud/dialogflow/v2/context_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +126 -18
- data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +4 -2
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +112 -15
- data/lib/google/cloud/dialogflow/v2/document_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +27 -10
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +180 -27
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +45 -1
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +284 -30
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/environment_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +132 -18
- data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +40 -6
- data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +16 -1
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +175 -21
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +146 -21
- data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +15 -1
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +58 -3
- data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +2 -2
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +4 -3
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +25 -8
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +38 -33
- metadata +6 -5
@@ -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::Documents::Client.new
|
205
|
+
#
|
206
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
207
|
+
# request = Google::Cloud::Dialogflow::V2::ListDocumentsRequest.new
|
208
|
+
#
|
209
|
+
# # Call the list_documents method.
|
210
|
+
# result = client.list_documents 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::Document.
|
218
|
+
# p response
|
219
|
+
# end
|
220
|
+
#
|
200
221
|
def list_documents 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
|
-
|
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::Documents::Client.new
|
299
|
+
#
|
300
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
301
|
+
# request = Google::Cloud::Dialogflow::V2::GetDocumentRequest.new
|
302
|
+
#
|
303
|
+
# # Call the get_document method.
|
304
|
+
# result = client.get_document request
|
305
|
+
#
|
306
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Document.
|
307
|
+
# p result
|
308
|
+
#
|
271
309
|
def get_document 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
|
-
|
290
|
-
|
326
|
+
header_params = {}
|
327
|
+
if request.name
|
328
|
+
header_params["name"] = request.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
|
|
@@ -310,8 +350,12 @@ module Google
|
|
310
350
|
##
|
311
351
|
# Creates a new document.
|
312
352
|
#
|
313
|
-
#
|
314
|
-
#
|
353
|
+
# This method is a [long-running
|
354
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
355
|
+
# The returned `Operation` type has the following method-specific fields:
|
356
|
+
#
|
357
|
+
# - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
|
358
|
+
# - `response`: {::Google::Cloud::Dialogflow::V2::Document Document}
|
315
359
|
#
|
316
360
|
# @overload create_document(request, options = nil)
|
317
361
|
# Pass arguments to `create_document` via a request object, either of type
|
@@ -343,6 +387,28 @@ module Google
|
|
343
387
|
#
|
344
388
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
345
389
|
#
|
390
|
+
# @example Basic example
|
391
|
+
# require "google/cloud/dialogflow/v2"
|
392
|
+
#
|
393
|
+
# # Create a client object. The client can be reused for multiple calls.
|
394
|
+
# client = Google::Cloud::Dialogflow::V2::Documents::Client.new
|
395
|
+
#
|
396
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
397
|
+
# request = Google::Cloud::Dialogflow::V2::CreateDocumentRequest.new
|
398
|
+
#
|
399
|
+
# # Call the create_document method.
|
400
|
+
# result = client.create_document request
|
401
|
+
#
|
402
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
403
|
+
# # object to check the status of an operation, cancel it, or wait
|
404
|
+
# # for results. Here is how to block until completion:
|
405
|
+
# result.wait_until_done! timeout: 60
|
406
|
+
# if result.response?
|
407
|
+
# p result.response
|
408
|
+
# else
|
409
|
+
# puts "Error!"
|
410
|
+
# end
|
411
|
+
#
|
346
412
|
def create_document request, options = nil
|
347
413
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
348
414
|
|
@@ -360,9 +426,11 @@ module Google
|
|
360
426
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
361
427
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
362
428
|
|
363
|
-
header_params = {
|
364
|
-
|
365
|
-
|
429
|
+
header_params = {}
|
430
|
+
if request.parent
|
431
|
+
header_params["parent"] = request.parent
|
432
|
+
end
|
433
|
+
|
366
434
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
367
435
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
368
436
|
|
@@ -386,8 +454,13 @@ module Google
|
|
386
454
|
##
|
387
455
|
# Deletes the specified document.
|
388
456
|
#
|
389
|
-
#
|
390
|
-
#
|
457
|
+
# This method is a [long-running
|
458
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
459
|
+
# The returned `Operation` type has the following method-specific fields:
|
460
|
+
#
|
461
|
+
# - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
|
462
|
+
# - `response`: An [Empty
|
463
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
|
391
464
|
#
|
392
465
|
# @overload delete_document(request, options = nil)
|
393
466
|
# Pass arguments to `delete_document` via a request object, either of type
|
@@ -417,6 +490,28 @@ module Google
|
|
417
490
|
#
|
418
491
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
419
492
|
#
|
493
|
+
# @example Basic example
|
494
|
+
# require "google/cloud/dialogflow/v2"
|
495
|
+
#
|
496
|
+
# # Create a client object. The client can be reused for multiple calls.
|
497
|
+
# client = Google::Cloud::Dialogflow::V2::Documents::Client.new
|
498
|
+
#
|
499
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
500
|
+
# request = Google::Cloud::Dialogflow::V2::DeleteDocumentRequest.new
|
501
|
+
#
|
502
|
+
# # Call the delete_document method.
|
503
|
+
# result = client.delete_document request
|
504
|
+
#
|
505
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
506
|
+
# # object to check the status of an operation, cancel it, or wait
|
507
|
+
# # for results. Here is how to block until completion:
|
508
|
+
# result.wait_until_done! timeout: 60
|
509
|
+
# if result.response?
|
510
|
+
# p result.response
|
511
|
+
# else
|
512
|
+
# puts "Error!"
|
513
|
+
# end
|
514
|
+
#
|
420
515
|
def delete_document request, options = nil
|
421
516
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
422
517
|
|
@@ -434,9 +529,11 @@ module Google
|
|
434
529
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
435
530
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
436
531
|
|
437
|
-
header_params = {
|
438
|
-
|
439
|
-
|
532
|
+
header_params = {}
|
533
|
+
if request.name
|
534
|
+
header_params["name"] = request.name
|
535
|
+
end
|
536
|
+
|
440
537
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
441
538
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
442
539
|
|
@@ -460,8 +557,12 @@ module Google
|
|
460
557
|
##
|
461
558
|
# Updates the specified document.
|
462
559
|
#
|
463
|
-
#
|
464
|
-
#
|
560
|
+
# This method is a [long-running
|
561
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
562
|
+
# The returned `Operation` type has the following method-specific fields:
|
563
|
+
#
|
564
|
+
# - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
|
565
|
+
# - `response`: {::Google::Cloud::Dialogflow::V2::Document Document}
|
465
566
|
#
|
466
567
|
# @overload update_document(request, options = nil)
|
467
568
|
# Pass arguments to `update_document` via a request object, either of type
|
@@ -493,6 +594,28 @@ module Google
|
|
493
594
|
#
|
494
595
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
495
596
|
#
|
597
|
+
# @example Basic example
|
598
|
+
# require "google/cloud/dialogflow/v2"
|
599
|
+
#
|
600
|
+
# # Create a client object. The client can be reused for multiple calls.
|
601
|
+
# client = Google::Cloud::Dialogflow::V2::Documents::Client.new
|
602
|
+
#
|
603
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
604
|
+
# request = Google::Cloud::Dialogflow::V2::UpdateDocumentRequest.new
|
605
|
+
#
|
606
|
+
# # Call the update_document method.
|
607
|
+
# result = client.update_document request
|
608
|
+
#
|
609
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
610
|
+
# # object to check the status of an operation, cancel it, or wait
|
611
|
+
# # for results. Here is how to block until completion:
|
612
|
+
# result.wait_until_done! timeout: 60
|
613
|
+
# if result.response?
|
614
|
+
# p result.response
|
615
|
+
# else
|
616
|
+
# puts "Error!"
|
617
|
+
# end
|
618
|
+
#
|
496
619
|
def update_document request, options = nil
|
497
620
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
498
621
|
|
@@ -510,9 +633,11 @@ module Google
|
|
510
633
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
511
634
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
512
635
|
|
513
|
-
header_params = {
|
514
|
-
|
515
|
-
|
636
|
+
header_params = {}
|
637
|
+
if request.document&.name
|
638
|
+
header_params["document.name"] = request.document.name
|
639
|
+
end
|
640
|
+
|
516
641
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
517
642
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
518
643
|
|
@@ -539,12 +664,16 @@ module Google
|
|
539
664
|
# Note: Even when the content of the document has not changed, there still
|
540
665
|
# may be side effects because of internal implementation changes.
|
541
666
|
#
|
667
|
+
# This method is a [long-running
|
668
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
669
|
+
# The returned `Operation` type has the following method-specific fields:
|
670
|
+
#
|
671
|
+
# - `metadata`: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}
|
672
|
+
# - `response`: {::Google::Cloud::Dialogflow::V2::Document Document}
|
673
|
+
#
|
542
674
|
# Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
|
543
675
|
# only use `projects.knowledgeBases.documents`.
|
544
676
|
#
|
545
|
-
# Operation <response: {::Google::Cloud::Dialogflow::V2::Document Document},
|
546
|
-
# metadata: {::Google::Cloud::Dialogflow::V2::KnowledgeOperationMetadata KnowledgeOperationMetadata}>
|
547
|
-
#
|
548
677
|
# @overload reload_document(request, options = nil)
|
549
678
|
# Pass arguments to `reload_document` via a request object, either of type
|
550
679
|
# {::Google::Cloud::Dialogflow::V2::ReloadDocumentRequest} or an equivalent Hash.
|
@@ -579,6 +708,28 @@ module Google
|
|
579
708
|
#
|
580
709
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
581
710
|
#
|
711
|
+
# @example Basic example
|
712
|
+
# require "google/cloud/dialogflow/v2"
|
713
|
+
#
|
714
|
+
# # Create a client object. The client can be reused for multiple calls.
|
715
|
+
# client = Google::Cloud::Dialogflow::V2::Documents::Client.new
|
716
|
+
#
|
717
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
718
|
+
# request = Google::Cloud::Dialogflow::V2::ReloadDocumentRequest.new
|
719
|
+
#
|
720
|
+
# # Call the reload_document method.
|
721
|
+
# result = client.reload_document request
|
722
|
+
#
|
723
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
724
|
+
# # object to check the status of an operation, cancel it, or wait
|
725
|
+
# # for results. Here is how to block until completion:
|
726
|
+
# result.wait_until_done! timeout: 60
|
727
|
+
# if result.response?
|
728
|
+
# p result.response
|
729
|
+
# else
|
730
|
+
# puts "Error!"
|
731
|
+
# end
|
732
|
+
#
|
582
733
|
def reload_document request, options = nil
|
583
734
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
584
735
|
|
@@ -596,9 +747,11 @@ module Google
|
|
596
747
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
597
748
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
598
749
|
|
599
|
-
header_params = {
|
600
|
-
|
601
|
-
|
750
|
+
header_params = {}
|
751
|
+
if request.name
|
752
|
+
header_params["name"] = request.name
|
753
|
+
end
|
754
|
+
|
602
755
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
603
756
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
604
757
|
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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/entity_type.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/longrunning/operations_pb'
|
11
9
|
require 'google/protobuf/empty_pb'
|
12
10
|
require 'google/protobuf/field_mask_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/cloud/dialogflow/v2/entity_type.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.cloud.dialogflow.v2.EntityType" do
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType].
|
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
|
@@ -57,6 +57,13 @@ module Google
|
|
57
57
|
rpc :DeleteEntityType, ::Google::Cloud::Dialogflow::V2::DeleteEntityTypeRequest, ::Google::Protobuf::Empty
|
58
58
|
# Updates/Creates multiple entity types in the specified agent.
|
59
59
|
#
|
60
|
+
# This method is a [long-running
|
61
|
+
# operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
|
62
|
+
# The returned `Operation` type has the following method-specific fields:
|
63
|
+
#
|
64
|
+
# - `metadata`: An empty [Struct
|
65
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
|
66
|
+
# - `response`: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]
|
60
67
|
#
|
61
68
|
# Note: You should always train an agent prior to sending it queries. See the
|
62
69
|
# [training
|
@@ -64,12 +71,30 @@ module Google
|
|
64
71
|
rpc :BatchUpdateEntityTypes, ::Google::Cloud::Dialogflow::V2::BatchUpdateEntityTypesRequest, ::Google::Longrunning::Operation
|
65
72
|
# Deletes entity types in the specified agent.
|
66
73
|
#
|
74
|
+
# This method is a [long-running
|
75
|
+
# operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
|
76
|
+
# The returned `Operation` type has the following method-specific fields:
|
77
|
+
#
|
78
|
+
# - `metadata`: An empty [Struct
|
79
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
|
80
|
+
# - `response`: An [Empty
|
81
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
|
82
|
+
#
|
67
83
|
# Note: You should always train an agent prior to sending it queries. See the
|
68
84
|
# [training
|
69
85
|
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
70
86
|
rpc :BatchDeleteEntityTypes, ::Google::Cloud::Dialogflow::V2::BatchDeleteEntityTypesRequest, ::Google::Longrunning::Operation
|
71
87
|
# Creates multiple new entities in the specified entity type.
|
72
88
|
#
|
89
|
+
# This method is a [long-running
|
90
|
+
# operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
|
91
|
+
# The returned `Operation` type has the following method-specific fields:
|
92
|
+
#
|
93
|
+
# - `metadata`: An empty [Struct
|
94
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
|
95
|
+
# - `response`: An [Empty
|
96
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
|
97
|
+
#
|
73
98
|
# Note: You should always train an agent prior to sending it queries. See the
|
74
99
|
# [training
|
75
100
|
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
@@ -78,12 +103,31 @@ module Google
|
|
78
103
|
# method does not affect entities in the entity type that aren't explicitly
|
79
104
|
# specified in the request.
|
80
105
|
#
|
106
|
+
# This method is a [long-running
|
107
|
+
# operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
|
108
|
+
# The returned `Operation` type has the following method-specific fields:
|
109
|
+
#
|
110
|
+
# - `metadata`: An empty [Struct
|
111
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
|
112
|
+
# - `response`: An [Empty
|
113
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
|
114
|
+
#
|
81
115
|
# Note: You should always train an agent prior to sending it queries. See the
|
82
116
|
# [training
|
83
117
|
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
118
|
+
#
|
84
119
|
rpc :BatchUpdateEntities, ::Google::Cloud::Dialogflow::V2::BatchUpdateEntitiesRequest, ::Google::Longrunning::Operation
|
85
120
|
# Deletes entities in the specified entity type.
|
86
121
|
#
|
122
|
+
# This method is a [long-running
|
123
|
+
# operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
|
124
|
+
# The returned `Operation` type has the following method-specific fields:
|
125
|
+
#
|
126
|
+
# - `metadata`: An empty [Struct
|
127
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
|
128
|
+
# - `response`: An [Empty
|
129
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
|
130
|
+
#
|
87
131
|
# Note: You should always train an agent prior to sending it queries. See the
|
88
132
|
# [training
|
89
133
|
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|