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

- old
+ new

@@ -46,13 +46,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionOperationRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @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] # A result object deserialized from the server's reply def delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -69,13 +69,14 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Compute::V1::DeleteRegionOperationResponse.decode_json response.body, ignore_unknown_fields: true - yield result, response if block_given? + yield result, operation if block_given? result end ## # Baseline implementation for the get REST call @@ -83,13 +84,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::GetRegionOperationRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @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] # A result object deserialized from the server's reply def get request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -106,13 +107,14 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true - yield result, response if block_given? + yield result, operation if block_given? result end ## # Baseline implementation for the list REST call @@ -120,13 +122,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::ListRegionOperationsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @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::OperationList] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::OperationList] # A result object deserialized from the server's reply def list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -143,13 +145,14 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Compute::V1::OperationList.decode_json response.body, ignore_unknown_fields: true - yield result, response if block_given? + yield result, operation if block_given? result end ## # Baseline implementation for the wait REST call @@ -157,13 +160,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::WaitRegionOperationRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @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] # A result object deserialized from the server's reply def wait request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -180,12 +183,13 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true - yield result, response if block_given? + yield result, operation if block_given? result end ## # @private