lib/google/cloud/compute/v1/images/rest/client.rb in google-cloud-compute-v1-1.10.0 vs lib/google/cloud/compute/v1/images/rest/client.rb in google-cloud-compute-v1-2.0.0
- old
+ new
@@ -203,13 +203,13 @@
# Name of the image resource to delete.
# @param project [::String]
# Project ID for this request.
# @param request_id [::String]
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
- # @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::GenericLRO::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::GenericLRO::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def delete request, options = nil
@@ -279,13 +279,13 @@
# Image name.
# @param project [::String]
# Project ID for this request.
# @param request_id [::String]
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
- # @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::GenericLRO::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::GenericLRO::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def deprecate request, options = nil
@@ -351,13 +351,13 @@
#
# @param image [::String]
# Name of the image resource to return.
# @param project [::String]
# Project ID 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::Image]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Image]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def get request, options = nil
@@ -385,12 +385,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @images_stub.get request, options do |result, response|
- yield result, response if block_given?
+ @images_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
@@ -415,13 +415,13 @@
#
# @param family [::String]
# Name of the image family to search for.
# @param project [::String]
# Project ID 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::Image]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Image]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def get_from_family request, options = nil
@@ -449,12 +449,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @images_stub.get_from_family request, options do |result, response|
- yield result, response if block_given?
+ @images_stub.get_from_family 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
@@ -481,13 +481,13 @@
# Requested IAM Policy version.
# @param project [::String]
# Project ID for this request.
# @param resource [::String]
# Name or id of the resource 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::Policy]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Policy]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def get_iam_policy request, options = nil
@@ -515,12 +515,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @images_stub.get_iam_policy request, options do |result, response|
- yield result, response if block_given?
+ @images_stub.get_iam_policy 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
@@ -549,13 +549,13 @@
# The body resource for this request
# @param project [::String]
# Project ID for this request.
# @param request_id [::String]
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
- # @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::GenericLRO::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::GenericLRO::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def insert request, options = nil
@@ -629,13 +629,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::Image>]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Image>]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def list request, options = nil
@@ -663,13 +663,13 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @images_stub.list request, options do |result, response|
+ @images_stub.list request, options do |result, operation|
result = ::Gapic::Rest::PagedEnumerable.new @images_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
@@ -698,13 +698,13 @@
# The body resource for this request
# @param project [::String]
# Project ID for this request.
# @param request_id [::String]
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
- # @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::GenericLRO::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::GenericLRO::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def patch request, options = nil
@@ -772,13 +772,13 @@
# The body resource for this request
# @param project [::String]
# Project ID for this request.
# @param resource [::String]
# Name or id of the resource 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::Policy]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Policy]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def set_iam_policy request, options = nil
@@ -806,12 +806,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @images_stub.set_iam_policy request, options do |result, response|
- yield result, response if block_given?
+ @images_stub.set_iam_policy 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
@@ -838,13 +838,13 @@
# The body resource for this request
# @param project [::String]
# Project ID for this request.
# @param resource [::String]
# Name or id of the resource 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 [::Gapic::GenericLRO::Operation]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::GenericLRO::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def set_labels request, options = nil
@@ -912,13 +912,13 @@
# Project ID for this request.
# @param resource [::String]
# Name or id of the resource for this request.
# @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
# The body resource 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::TestPermissionsResponse]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def test_iam_permissions request, options = nil
@@ -946,11 +946,11 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @images_stub.test_iam_permissions request, options do |result, response|
- yield result, response if block_given?
+ @images_stub.test_iam_permissions 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