v2.kotlin-client.data_class.mustache Maven / Gradle / Ivy
The newest version!
/**
* {{{description}}}
{{~#vars}}
* @param {{name}} {{{description}}}
{{~/vars~}}
*/
data class {{classname}} (
{{~#requiredVars~}}
{{>data_class_req_var}}{{^@last}},{{/@last}}
{{~/requiredVars~}}
{{#has this 'required'}}{{#has this 'optional'}},{{/has}}{{/has}}
{{~#optionalVars}}{{>data_class_opt_var}}{{^@last}},{{/@last}}{{/optionalVars}}
) {
{{#has this 'enums'}}{{#vars}}{{#is this 'enum'}}
/**
* {{{description}}}
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^@last}},{{/@last}}{{/enumVars}}{{/allowableValues}}
*/
enum class {{nameInCamelCase}}(val value: {{datatype}}){
{{#allowableValues}}{{#enumVars}}
{{&name}}({{{value}}}){{^@last}},{{/@last}}{{#@last}};{{/@last}}
{{/enumVars}}{{/allowableValues}}
}
{{/is}}{{/vars}}{{/has}}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy