Javascript.es6.partial_model_enum_class.mustache Maven / Gradle / Ivy
{{#emitJSDoc}}
/**
* Enum class {{classname}}.
* @enum {{=<% %>=}}{<%dataType%>}<%={{ }}=%>
* @readonly
*/
{{/emitJSDoc}}
const {{classname}} = {
{{#allowableValues}}
{{#enumVars}}
{{#emitJSDoc}}
/**
* value: {{{value}}}
* @const
*/
{{/emitJSDoc}}
{{name}}: {{{value}}},
{{/enumVars}}
{{/allowableValues}}
{{#emitJSDoc}}
/**
* Returns a {{classname}}
enum value from a JavaScript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {{=< >=}}{module:<#invokerPackage>/ <#modelPackage>/ }<={{ }}=> The enum {{classname}}
value.
*/
{{/emitJSDoc}}
constructFromObject: function(object) {
return object;
}
};
export {{=<% %>=}}{<%classname%>}<%={{ }}=%>;
© 2015 - 2024 Weber Informatics LLC | Privacy Policy