{%- for attribute in entity.attributes %}

{%- if attribute.realm_read_only.size == 0 %}
    {%- comment %} ******* CONVERT TYPE CAPTURE ******* {% endcomment -%}

    {%- capture visibility %}
      {%- if attribute.enum_type.size > 0 and params.hide_members_with_enum.size > 0 -%}
        protected
      {%- else -%}
         public
      {%- endif %}
    {%- endcapture %}

    {%- capture convert_type %}
      {%- if attribute.realm_read_only.size == 0 and attribute.enum_type.size > 0 -%}
        String
      {%- else -%}
        {%- if params.use_wrappers.size > 0 and attribute.optional == true -%}
          {%- include 'inc/wrapper_type_converter' -%}
        {%- else -%}
          {%- include 'inc/type_converter' -%}
        {%- endif %}
      {%- endif %}
    {%- endcapture %}

    {%- capture isPrimitives %}
      {%- include 'inc/primitives' %}
    {%- endcapture %}

    {%- capture annotation %}
      {%- if params.support_annotations.size > 0 %}
        {%- if isPrimitives == "false" -%}
          {%- if params.use_wrappers.size > 0 or attribute.enum_type.size > 0 or isPrimitives == "false" -%}
@android.support.annotation.{% if attribute.optional == true %}Nullable{% else %}NonNull{%- endif -%}
          {%- if attribute.support_annotation.size > 0 %}|{%- endif -%}
          {%- endif -%}
        {%- endif -%}
        {%- if attribute.support_annotation.size > 0 -%}
@android.support.annotation.{{ attribute.support_annotation }}
        {%- endif %}
      {%- endif %}
    {%- endcapture %}
{%- assign name = attribute.name %}
{{ empty_line }}

{%- if annotation.size > 0 %}
{{ annotation | replace: "|","
" }}
{%- endif %}
{{ visibility }} {{ convert_type }} get{{ name | titleize }}() {
    return {{ name }};
}

{{ visibility }} void set{{ name | titleize }}({%- if annotation.size > 0 %}{{ annotation | replace: "|"," " }} {% endif %}final {{ convert_type }} {{ name }}) {
    this.{{ name }} = {{ name }};
}
{%- endif %}

{%- endfor %}