lib/google/cloud/dialogflow/v2/documents/client.rb in google-cloud-dialogflow-v2-0.21.0 vs lib/google/cloud/dialogflow/v2/documents/client.rb in google-cloud-dialogflow-v2-0.22.0
- old
+ new
@@ -245,17 +245,15 @@
# request = Google::Cloud::Dialogflow::V2::ListDocumentsRequest.new
#
# # Call the list_documents method.
# result = client.list_documents request
#
- # # The returned object is of type Gapic::PagedEnumerable. You can
- # # iterate over all elements by calling #each, and the enumerable
- # # will lazily make API calls to fetch subsequent pages. Other
- # # methods are also available for managing paging directly.
- # result.each do |response|
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
+ # # over elements, and API calls will be issued to fetch pages as needed.
+ # result.each do |item|
# # Each element is of type ::Google::Cloud::Dialogflow::V2::Document.
- # p response
+ # p item
# end
#
def list_documents request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -436,18 +434,18 @@
# request = Google::Cloud::Dialogflow::V2::CreateDocumentRequest.new
#
# # Call the create_document method.
# result = client.create_document request
#
- # # The returned object is of type Gapic::Operation. You can use this
- # # object to check the status of an operation, cancel it, or wait
- # # for results. Here is how to block until completion:
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
# result.wait_until_done! timeout: 60
# if result.response?
# p result.response
# else
- # puts "Error!"
+ # puts "No response received."
# end
#
def create_document request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -554,18 +552,18 @@
# request = Google::Cloud::Dialogflow::V2::ImportDocumentsRequest.new
#
# # Call the import_documents method.
# result = client.import_documents request
#
- # # The returned object is of type Gapic::Operation. You can use this
- # # object to check the status of an operation, cancel it, or wait
- # # for results. Here is how to block until completion:
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
# result.wait_until_done! timeout: 60
# if result.response?
# p result.response
# else
- # puts "Error!"
+ # puts "No response received."
# end
#
def import_documents request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -658,18 +656,18 @@
# request = Google::Cloud::Dialogflow::V2::DeleteDocumentRequest.new
#
# # Call the delete_document method.
# result = client.delete_document request
#
- # # The returned object is of type Gapic::Operation. You can use this
- # # object to check the status of an operation, cancel it, or wait
- # # for results. Here is how to block until completion:
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
# result.wait_until_done! timeout: 60
# if result.response?
# p result.response
# else
- # puts "Error!"
+ # puts "No response received."
# end
#
def delete_document request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -763,18 +761,18 @@
# request = Google::Cloud::Dialogflow::V2::UpdateDocumentRequest.new
#
# # Call the update_document method.
# result = client.update_document request
#
- # # The returned object is of type Gapic::Operation. You can use this
- # # object to check the status of an operation, cancel it, or wait
- # # for results. Here is how to block until completion:
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
# result.wait_until_done! timeout: 60
# if result.response?
# p result.response
# else
- # puts "Error!"
+ # puts "No response received."
# end
#
def update_document request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -884,18 +882,18 @@
# request = Google::Cloud::Dialogflow::V2::ReloadDocumentRequest.new
#
# # Call the reload_document method.
# result = client.reload_document request
#
- # # The returned object is of type Gapic::Operation. You can use this
- # # object to check the status of an operation, cancel it, or wait
- # # for results. Here is how to block until completion:
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
# result.wait_until_done! timeout: 60
# if result.response?
# p result.response
# else
- # puts "Error!"
+ # puts "No response received."
# end
#
def reload_document request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -996,17 +994,17 @@
# request = Google::Cloud::Dialogflow::V2::ExportDocumentRequest.new
#
# # Call the export_document method.
# result = client.export_document request
#
- # # The returned object is of type Gapic::Operation. You can use this
- # # object to check the status of an operation, cancel it, or wait
- # # for results. Here is how to block until completion:
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
# result.wait_until_done! timeout: 60
# if result.response?
# p result.response
# else
- # puts "Error!"
+ # puts "No response received."
# end
#
def export_document request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?