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

kotlin-client.data_class.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
/**
 * {{{description}}}
{{#vars}}
 * @param {{name}} {{{description}}}
{{/vars}}
 */
data class {{classname}} (
{{#vars}}
{{#required}}
{{>data_class_req_var}}{{^@last}},{{/@last}}
{{/required}}
{{^required}}
{{>data_class_opt_var}}{{^@last}},{{/@last}}
{{/required}}
{{/vars}}
) {
{{#hasEnums}}{{#vars}}

{{#isEnum}}
    /**
    * {{{description}}}
    * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
    */
    {{#items}}
    enum class {{{datatypeWithEnum}}}(val value: {{{datatype}}}{{#isNullable}}?{{/isNullable}}){
    {{/items}}
    {{^items}}
    enum class {{nameInCamelCase}}(val value: {{{datatype}}}){
    {{/items}}
    {{#allowableValues}}{{#enumVars}}
        {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
    {{/enumVars}}{{/allowableValues}}
    }

{{/isEnum}}
{{/vars}}{{/hasEnums}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy