lib/google/iam/v2/policies/client.rb in google-iam-v2-0.1.2 vs lib/google/iam/v2/policies/client.rb in google-iam-v2-0.2.0
- old
+ new
@@ -239,17 +239,15 @@
# request = Google::Iam::V2::ListPoliciesRequest.new
#
# # Call the list_policies method.
# result = client.list_policies 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::Iam::V2::Policy.
- # p response
+ # p item
# end
#
def list_policies request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -442,18 +440,18 @@
# request = Google::Iam::V2::CreatePolicyRequest.new
#
# # Call the create_policy method.
# result = client.create_policy 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_policy request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -549,18 +547,18 @@
# request = Google::Iam::V2::UpdatePolicyRequest.new
#
# # Call the update_policy method.
# result = client.update_policy 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_policy request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
@@ -658,17 +656,17 @@
# request = Google::Iam::V2::DeletePolicyRequest.new
#
# # Call the delete_policy method.
# result = client.delete_policy 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_policy request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?