lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb in google-cloud-compute-v1-1.10.0 vs lib/google/cloud/compute/v1/target_pools/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::AddHealthCheckTargetPoolRequest] # 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 add_health_check 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::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 add_instance REST call @@ -83,13 +84,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::AddInstanceTargetPoolRequest] # 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 add_instance 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 aggregated_list REST call @@ -120,13 +122,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListTargetPoolsRequest] # 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::TargetPoolAggregatedList] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::TargetPoolAggregatedList] # A result object deserialized from the server's reply def aggregated_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::TargetPoolAggregatedList.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 delete REST call @@ -157,13 +160,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::DeleteTargetPoolRequest] # 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 delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -180,13 +183,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 get REST call @@ -194,13 +198,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::GetTargetPoolRequest] # 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::TargetPool] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::TargetPool] # 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? @@ -217,13 +221,14 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Compute::V1::TargetPool.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_health REST call @@ -231,13 +236,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::GetHealthTargetPoolRequest] # 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::TargetPoolInstanceHealth] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::TargetPoolInstanceHealth] # A result object deserialized from the server's reply def get_health request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -254,13 +259,14 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Compute::V1::TargetPoolInstanceHealth.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 insert REST call @@ -268,13 +274,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::InsertTargetPoolRequest] # 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 insert request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -291,13 +297,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 @@ -305,13 +312,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::ListTargetPoolsRequest] # 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::TargetPoolList] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::TargetPoolList] # 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? @@ -328,13 +335,14 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Compute::V1::TargetPoolList.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 remove_health_check REST call @@ -342,13 +350,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::RemoveHealthCheckTargetPoolRequest] # 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 remove_health_check request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -365,13 +373,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 remove_instance REST call @@ -379,13 +388,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::RemoveInstanceTargetPoolRequest] # 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 remove_instance request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -402,13 +411,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 set_backup REST call @@ -416,13 +426,13 @@ # @param request_pb [::Google::Cloud::Compute::V1::SetBackupTargetPoolRequest] # 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 set_backup request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -439,12 +449,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