Sha256: 34438cca360625ee0049bab0da9fbc41f57dd535fd3bfa397c53d7ec2764fdaa

Contents?: true

Size: 784 Bytes

Versions: 5

Compression:

Stored size: 784 Bytes

Contents

<%- assert_locals method -%>
# @param request_pb [<%= method.request_type %>]
#   A request object representing the call parameters. Required.
# @return [Array(String, [String, nil], Hash{String => String})] 
#   Uri, Body, Query string parameters
def <%= method.rest.transcoding_helper_name %> request_pb
  uri = "<%= method.rest.uri_interpolated %>"
  <%- if method.rest.body? -%>
  body = <%= method.rest.body_interpolated %>
  <%- else -%>
  body = nil
  <%- end -%>
  query_string_params = {}
  <%- if method.rest.query_string_params? -%>
  <%- method.rest.query_string_params.each do |field| -%>
  <%= render partial: "service/rest/grpc_transcoding/method/def/query_string_param", locals: { field: field } -%>
  <%- end -%>
  <%- end -%>

  [uri, body, query_string_params]
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gapic-generator-0.9.1 templates/default/service/rest/grpc_transcoding/method/_def.erb
gapic-generator-0.9.0 templates/default/service/rest/grpc_transcoding/method/_def.erb
gapic-generator-0.8.0 templates/default/service/rest/grpc_transcoding/method/_def.erb
gapic-generator-0.7.5 templates/default/service/rest/grpc_transcoding/method/_def.erb
gapic-generator-0.7.4 templates/default/service/rest/grpc_transcoding/method/_def.erb