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

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

There is a newer version: 7.9.0
Show newest version
{{#parcelizeModels}}
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

{{/parcelizeModels}}
{{#serializableModel}}
import java.io.Serializable
{{/serializableModel}}
/**
 * {{{description}}}
{{#vars}}
 * @param {{{name}}} {{{description}}}
{{/vars}}
 */
{{#parcelizeModels}}
@Parcelize
{{/parcelizeModels}}
{{#hasVars}}data {{/hasVars}}class {{classname}}(
{{#requiredVars}}
{{>data_class_req_var}}{{^-last}},
{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>data_class_opt_var}}{{^-last}},
{{/-last}}{{/optionalVars}}
) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}}{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}}
{{#vendorExtensions.x-has-data-class-body}}
{
{{/vendorExtensions.x-has-data-class-body}}
{{#serializableModel}}
    companion object {
        private const val serialVersionUID: Long = 123
    }
{{/serializableModel}}
{{#hasEnums}}
    {{#vars}}
    {{#isEnum}}
    /**
    * {{{description}}}
    * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
    */
    enum class {{{nameInPascalCase}}}(val value: {{{dataType}}}){
    {{#allowableValues}}
    {{#enumVars}}
        {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
    {{/enumVars}}
    {{/allowableValues}}
    }
{{/isEnum}}
{{/vars}}
{{/hasEnums}}
{{#vendorExtensions.x-has-data-class-body}}
}
{{/vendorExtensions.x-has-data-class-body}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy