google-api-ruby-client/lib/google/apis/generator/templates/_representation_stub.tmpl

18 lines
670 B
Cheetah

<% if cls.type == 'object' -%>
class <%= cls.generated_class_name %>
class Representation < Google::Apis::Core::JsonRepresentation; end
<% for child_class in cls.properties.values -%>
<% if child_class._ref.nil? -%>
<%= indent(include('representation_stub', :cls => child_class), 2) -%>
<% end -%>
<% end -%>
include Google::Apis::Core::JsonObjectSupport
end
<% elsif cls.items && cls.items._ref.nil? -%>
<%= include('representation_stub', :cls => cls.items, :api => api) -%>
<% elsif cls.additional_properties && cls.additional_properties._ref.nil? -%>
<%= include('representation_stub', :cls => cls.additional_properties, :api => api) -%>
<% end -%>