All Downloads are FREE. Search and download functionalities are using the official Maven repository.

protobuf-schema.model.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
{{>partial_header}}
syntax = "proto3";

package {{#lambda.lowercase}}{{{packageName}}};{{/lambda.lowercase}}

{{#imports}}
{{#import}}
import public "{{{modelPackage}}}/{{{import}}}.proto";
{{/import}}
{{/imports}}

{{#models}}
{{#model}}
{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}message {{classname}} {

  {{#vars}}
  {{#description}}
  // {{{.}}}
  {{/description}}
  {{^isEnum}}
  {{#vendorExtensions.x-protobuf-type}}{{{.}}} {{/vendorExtensions.x-protobuf-type}}{{{vendorExtensions.x-protobuf-data-type}}} {{{name}}} = {{vendorExtensions.x-protobuf-index}}{{#vendorExtensions.x-protobuf-packed}} [packed=true]{{/vendorExtensions.x-protobuf-packed}};
  {{/isEnum}}
  {{#isEnum}}
  enum {{enumName}} {
    {{#allowableValues}}
    {{#enumVars}}
    {{{name}}} = {{{protobuf-enum-index}}};
    {{/enumVars}}
    {{/allowableValues}}
  }

  {{enumName}} {{name}} = {{vendorExtensions.x-protobuf-index}};
  {{/isEnum}}

  {{/vars}}
}
{{/isEnum}}
{{/model}}
{{/models}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy