lib/google/cloud/compute/v1/zones/rest/client.rb in google-cloud-compute-v1-1.10.0 vs lib/google/cloud/compute/v1/zones/rest/client.rb in google-cloud-compute-v1-2.0.0
- old
+ new
@@ -163,13 +163,13 @@
#
# @param project [::String]
# Project ID for this request.
# @param zone [::String]
# Name of the zone resource to return.
- # @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::Zone]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Zone]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def get request, options = nil
@@ -197,12 +197,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @zones_stub.get request, options do |result, response|
- yield result, response if block_given?
+ @zones_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
@@ -235,13 +235,13 @@
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
# @param project [::String]
# Project ID 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::Zone>]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Zone>]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def list request, options = nil
@@ -269,12 +269,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @zones_stub.list request, options do |result, response|
+ @zones_stub.list request, options do |result, operation|
result = ::Gapic::Rest::PagedEnumerable.new @zones_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