lib/google/cloud/location/locations/rest/service_stub.rb in google-cloud-location-0.3.0 vs lib/google/cloud/location/locations/rest/service_stub.rb in google-cloud-location-0.4.0
- old
+ new
@@ -47,13 +47,13 @@
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
# @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
# Binding overrides for the transcoding. Only used internally.
#
- # @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::Location::ListLocationsResponse]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Location::ListLocationsResponse]
# A result object deserialized from the server's reply
def list_locations request_pb, options = nil, bindings_override: nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -70,13 +70,14 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Location::ListLocationsResponse.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_location REST call
@@ -86,13 +87,13 @@
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
# @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
# Binding overrides for the transcoding. Only used internally.
#
- # @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::Location::Location]
- # @yieldparam response [::Faraday::Response]
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Location::Location]
# A result object deserialized from the server's reply
def get_location request_pb, options = nil, bindings_override: nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?
@@ -109,12 +110,13 @@
uri: uri,
body: body || "",
params: query_string_params,
options: options
)
+ operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Cloud::Location::Location.decode_json response.body, ignore_unknown_fields: true
- yield result, response if block_given?
+ yield result, operation if block_given?
result
end
##
# @private