package {{package}};

import {{invokerPackage}}.StringUtil;
{{#imports}}import {{import}};
{{/imports}}

{{#serializableModel}}
import java.io.Serializable;{{/serializableModel}}

import io.swagger.annotations.*;
import com.fasterxml.jackson.annotation.JsonProperty;
{{#models}}

{{#model}}{{#description}}
/**
 * {{description}}
 **/{{/description}}
@ApiModel(description = "{{{description}}}")
{{>generatedAnnotation}}
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
  {{#vars}}{{#isEnum}}

{{>enumClass}}{{/isEnum}}{{#items.isEnum}}{{#items}}

{{>enumClass}}{{/items}}{{/items.isEnum}}
  private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/vars}}

  {{#vars}}
  /**{{#description}}
   * {{{description}}}{{/description}}{{#minimum}}
   * minimum: {{minimum}}{{/minimum}}{{#maximum}}
   * maximum: {{maximum}}{{/maximum}}
   **/
  @ApiModelProperty({{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
  @JsonProperty("{{baseName}}")
  public {{{datatypeWithEnum}}} {{getter}}() {
    return {{name}};
  }
  public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
    this.{{name}} = {{name}};
  }

  {{/vars}}

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