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

- old
+ new

@@ -182,13 +182,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::OperationsScopedList>] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::OperationsScopedList>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def aggregated_list request, options = nil @@ -216,13 +216,13 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @global_operations_stub.aggregated_list request, options do |result, response| + @global_operations_stub.aggregated_list request, options do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @global_operations_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 @@ -247,13 +247,13 @@ # # @param operation [::String] # Name of the Operations resource to delete. # @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::DeleteGlobalOperationResponse] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::DeleteGlobalOperationResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def delete request, options = nil @@ -281,12 +281,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @global_operations_stub.delete request, options do |result, response| - yield result, response if block_given? + @global_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 @@ -311,13 +311,13 @@ # # @param operation [::String] # Name of the Operations 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::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 @@ -345,12 +345,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @global_operations_stub.get request, options do |result, response| - yield result, response if block_given? + @global_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 @@ -383,13 +383,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::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 @@ -417,13 +417,13 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @global_operations_stub.list request, options do |result, response| + @global_operations_stub.list request, options do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @global_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 @@ -448,13 +448,13 @@ # # @param operation [::String] # Name of the Operations 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::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 @@ -482,11 +482,11 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @global_operations_stub.wait request, options do |result, response| - yield result, response if block_given? + @global_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