part '{{classFilename}}.jser.dart';

class {{classname}} {
  {{#vars}}{{#description}} /* {{{description}}} */{{/description}}
  @Alias('{{baseName}}')
  final {{{datatype}}} {{name}};
  {{#allowableValues}}{{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{{/allowableValues}}{{/vars}}

  {{classname}}(
      {{#vars}}{{^defaultValue}}{{#required}} this.{{name}}, {{/required}}{{/defaultValue}}{{/vars}}

{{#vendorExtensions}}{{#hasVars}}{
    {{#vars}}{{^required}} this.{{name}}{{#defaultValue}} = {{{defaultValue}}}{{#hasMore}}, {{/hasMore}} {{/defaultValue}}{{/required}}
    {{#required}} {{#defaultValue}}this.{{name}} = {{{defaultValue}}}{{#hasMore}}, {{/hasMore}} {{/defaultValue}}{{/required}}{{/vars}}
    }{{/hasVars}}{{/vendorExtensions}}
  );

  @override
  String toString() {
    return '{{classname}}[{{#vars}}{{name}}=${{name}}, {{/vars}}]';
  }
}

@GenSerializer(nullableFields: {{nullableFields}})
class {{classname}}Serializer extends Serializer<{{classname}}> with _${{classname}}Serializer {

}