lib/google/iam/v1/iam_policy/rest/service_stub.rb in google-iam-v1-0.3.0 vs lib/google/iam/v1/iam_policy/rest/service_stub.rb in google-iam-v1-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::Iam::V1::Policy] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Iam::V1::Policy] # A result object deserialized from the server's reply def set_iam_policy 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::Iam::V1::Policy.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_iam_policy 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::Iam::V1::Policy] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Iam::V1::Policy] # A result object deserialized from the server's reply def get_iam_policy request_pb, options = nil, bindings_override: nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -109,13 +110,14 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Iam::V1::Policy.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 test_iam_permissions REST call @@ -125,13 +127,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::Iam::V1::TestIamPermissionsResponse] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Iam::V1::TestIamPermissionsResponse] # A result object deserialized from the server's reply def test_iam_permissions request_pb, options = nil, bindings_override: nil raise ::ArgumentError, "request must be provided" if request_pb.nil? @@ -148,12 +150,13 @@ uri: uri, body: body || "", params: query_string_params, options: options ) + operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - yield result, response if block_given? + yield result, operation if block_given? result end ## # @private