package {{package}};

{{#imports}}import {{import}};
{{/imports}}

import com.wordnik.swagger.annotations.*;
{{#models}}

{{#model}}{{#description}}
/**
 * {{description}}
 **/{{/description}}
@ApiModel(description = "{{{description}}}")
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { {{#vars}}
  /**{{#description}}
   * {{{description}}}{{/description}}{{#minimum}}
   * minimum: {{minimum}}{{/minimum}}{{#maximum}}
   * maximum: {{maximum}}{{/maximum}}
   **/
  private {{{datatype}}} {{name}} = {{{defaultValue}}};{{#isEnum}}
  
  public enum {{datatype}} { {{#_enum}}{{.}}{{^-last}}, {{/-last}}{{/_enum}} };
  {{/isEnum}}{{/vars}}
  
  {{#vars}}
  @ApiModelProperty(required = {{required}}, value = "{{{description}}}")
  public {{{datatype}}} {{getter}}() {
    return {{name}};
  }
  public void {{setter}}({{{datatype}}} {{name}}) {
    this.{{name}} = {{name}};
  }

  {{/vars}}

  @Override
  public String toString()  {
    StringBuilder sb = new StringBuilder();
    sb.append("class {{classname}} {\n");
    {{#parent}}sb.append("  " + super.toString()).append("\n");{{/parent}}
    {{#vars}}sb.append("  {{name}}: ").append({{name}}).append("\n");
    {{/vars}}sb.append("}\n");
    return sb.toString();
  }
}
{{/model}}
{{/models}}