lib/google/cloud/compute/v1/region_operations/rest/client.rb in google-cloud-compute-v1-1.10.0 vs lib/google/cloud/compute/v1/region_operations/rest/client.rb in google-cloud-compute-v1-2.0.0

- old
+ new

@@ -169,13 +169,13 @@ # Name of the Operations resource to delete. # @param project [::String] # Project ID for this request. # @param region [::String] # Name of the region for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::DeleteRegionOperationResponse] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::DeleteRegionOperationResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def delete request, options = nil @@ -203,12 +203,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @region_operations_stub.delete request, options do |result, response| - yield result, response if block_given? + @region_operations_stub.delete request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -235,13 +235,13 @@ # Name of the Operations resource to return. # @param project [::String] # Project ID for this request. # @param region [::String] # Name of the region for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def get request, options = nil @@ -269,12 +269,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @region_operations_stub.get request, options do |result, response| - yield result, response if block_given? + @region_operations_stub.get request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -309,13 +309,13 @@ # Project ID for this request. # @param region [::String] # Name of the region for this request. # @param return_partial_success [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Operation>] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Operation>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def list request, options = nil @@ -343,13 +343,13 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @region_operations_stub.list request, options do |result, response| + @region_operations_stub.list request, options do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @region_operations_stub, :list, "items", request, result, options - yield result, response if block_given? + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -376,13 +376,13 @@ # Name of the Operations resource to return. # @param project [::String] # Project ID for this request. # @param region [::String] # Name of the region for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def wait request, options = nil @@ -410,11 +410,11 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @region_operations_stub.wait request, options do |result, response| - yield result, response if block_given? + @region_operations_stub.wait request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end