gapic-generator/lib/gapic/presenters/method_rest_presenter.rb
##
# Performs a limited version of grpc transcoding to create a string that will interpolate
# the values from the request object to create a request body at runtime.
# Currently only supports either "*" for "the whole request object" or
# "value" for "request_object.value"
#
# @param [String] request_obj_name the name of the request object for the interpolation
#   defaults to "request_pb"
#
# @return [String] A string to interpolate values from the request object into body
#
Performs a limited version of grpc transcoding to create a string that will interpolate
the values from the request object to create a request body at runtime.
Performs a limited version of grpc transcoding to create a string that will interpolate the values from the request object to create a request body at runtime .
def body_interpolated request_obj_name = "request_pb"
        return "\"\"" unless body?
        return "#{request_obj_name}.to_json" if body_is_request_object?
        "#{request_obj_name}.#{body}.to_json"
      end
def body_interpolated request_obj_name = "request_pb" return "\"\"" unless body? return "#{request_obj_name}.to_json" if body_is_request_object? "#{request_obj_name}.#{body}.to_json" end
Performs a limited version of grpc transcoding to create a string that will interpolate
the values from the request object to create a request body at runtime.
Performs a limited version of grpc transcoding to create a string that will interpolate the values from the request object to create a request body at runtime .
A string to interpolate values from the request object into body
A string to interpolate values from the request object into body
String
request_obj_name
request_obj_name the name of the request object for the interpolation defaults to "request_pb"
request_obj_name the name of the request object for the interpolation defaults to " request_pb "
"request_pb"