lib/google/cloud/compute/v1/routers/rest/client.rb in google-cloud-compute-v1-1.10.0 vs lib/google/cloud/compute/v1/routers/rest/client.rb in google-cloud-compute-v1-2.0.0
- old
+ new
@@ -212,13 +212,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<::String, ::Google::Cloud::Compute::V1::RoutersScopedList>]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::RoutersScopedList>]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def aggregated_list request, options = nil
@@ -246,13 +246,13 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @routers_stub.aggregated_list request, options do |result, response|
+ @routers_stub.aggregated_list request, options do |result, operation|
result = ::Gapic::Rest::PagedEnumerable.new @routers_stub, :aggregated_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
@@ -281,13 +281,13 @@
# Name of the region 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).
# @param router [::String]
# Name of the Router resource to delete.
- # @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
@@ -356,13 +356,13 @@
# Project ID for this request.
# @param region [::String]
# Name of the region for this request.
# @param router [::String]
# Name of the Router 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::Router]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Router]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def get request, options = nil
@@ -390,12 +390,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @routers_stub.get request, options do |result, response|
- yield result, response if block_given?
+ @routers_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
@@ -432,13 +432,13 @@
# 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.
# @param router [::String]
# Name of the Router resource to query for Nat Mapping information of VM endpoints.
- # @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::VmEndpointNatMappings>]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::VmEndpointNatMappings>]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def get_nat_mapping_info request, options = nil
@@ -466,13 +466,13 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @routers_stub.get_nat_mapping_info request, options do |result, response|
+ @routers_stub.get_nat_mapping_info request, options do |result, operation|
result = ::Gapic::Rest::PagedEnumerable.new @routers_stub, :get_nat_mapping_info, "result", 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
@@ -499,13 +499,13 @@
# Project ID for this request.
# @param region [::String]
# Name of the region for this request.
# @param router [::String]
# Name of the Router resource to query.
- # @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::RouterStatusResponse]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::RouterStatusResponse]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def get_router_status request, options = nil
@@ -533,12 +533,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @routers_stub.get_router_status request, options do |result, response|
- yield result, response if block_given?
+ @routers_stub.get_router_status 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
@@ -567,13 +567,13 @@
# Name of the region 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).
# @param router_resource [::Google::Cloud::Compute::V1::Router, ::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 [::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
@@ -650,13 +650,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::Router>]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Router>]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def list request, options = nil
@@ -684,13 +684,13 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @routers_stub.list request, options do |result, response|
+ @routers_stub.list request, options do |result, operation|
result = ::Gapic::Rest::PagedEnumerable.new @routers_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
@@ -721,13 +721,13 @@
# 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).
# @param router [::String]
# Name of the Router resource to patch.
# @param router_resource [::Google::Cloud::Compute::V1::Router, ::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 [::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
@@ -798,13 +798,13 @@
# Name of the region for this request.
# @param router [::String]
# Name of the Router resource to query.
# @param router_resource [::Google::Cloud::Compute::V1::Router, ::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::RoutersPreviewResponse]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::RoutersPreviewResponse]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
def preview request, options = nil
@@ -832,12 +832,12 @@
options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy
- @routers_stub.preview request, options do |result, response|
- yield result, response if block_given?
+ @routers_stub.preview 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
@@ -868,12 +868,12 @@
# 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).
# @param router [::String]
# Name of the Router resource to update.
# @param router_resource [::Google::Cloud::Compute::V1::Router, ::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 [::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 update request, options = nil