scrooge-generator/src/main/resources/androidgen/struct_inner.mustache [457:523]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  {{/is_result}}
  {{/consolidate_newlines}}

  @java.lang.Override
  public String toString() {
    {{#consolidate_newlines}}
    StringBuilder sb = new StringBuilder("{{name}}(");
    boolean first = true;

    {{#fields}}
    {{#field.optional}}
    if ({{>generate_isset_check}}) {
    {{/field.optional}}
    {{#field.i_if_optional}}
    {{^first}}
    if (!first) sb.append(", ");
    {{/first}}
    sb.append("{{name}}:");
    {{#field_type.nullable}}
    if (this.{{name}} == null) {
      sb.append("null");
    } else {
    {{/field_type.nullable}}

    {{#field.i_if_nullable}}
    {{#field_type.is_binary}}
    TBaseHelper.toString(this.{{name}}, sb);
    {{/field_type.is_binary}}
    {{^field_type.is_binary}}
    sb.append(this.{{name}});
    {{/field_type.is_binary}}
    {{/field.i_if_nullable}}

    {{#field_type.nullable}}
    }
    {{/field_type.nullable}}
    first = false;
    {{#field.optional}}
    }
    {{/field.optional}}
    {{/field.i_if_optional}}
    {{/fields}}
    sb.append(")");
    return sb.toString();
    {{/consolidate_newlines}}
  }

  public void validate() throws TException {
    {{#consolidate_newlines}}
    // check for required fields
    {{#fields}}
    {{#field.required}}
    {{#field_type.nullable}}
    if ({{name}} == null) {
      throw new TProtocolException("Required field '{{name}}' was not present! Struct: " + toString());
    }
    {{/field_type.nullable}}
    {{^field_type.nullable}}
    // alas, we cannot check '{{name}}' because it's a primitive and you chose the non-beans generator.
    {{/field_type.nullable}}
    {{/field.required}}
    {{/fields}}
    {{/consolidate_newlines}}
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scrooge-generator/src/main/resources/apachejavagen/struct_inner.mustache [587:653]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  {{/is_result}}
  {{/consolidate_newlines}}

  @java.lang.Override
  public String toString() {
    {{#consolidate_newlines}}
    StringBuilder sb = new StringBuilder("{{name}}(");
    boolean first = true;

    {{#fields}}
    {{#field.optional}}
    if ({{>generate_isset_check}}) {
    {{/field.optional}}
    {{#field.i_if_optional}}
    {{^first}}
    if (!first) sb.append(", ");
    {{/first}}
    sb.append("{{name}}:");
    {{#field_type.nullable}}
    if (this.{{name}} == null) {
      sb.append("null");
    } else {
    {{/field_type.nullable}}

    {{#field.i_if_nullable}}
    {{#field_type.is_binary}}
    TBaseHelper.toString(this.{{name}}, sb);
    {{/field_type.is_binary}}
    {{^field_type.is_binary}}
    sb.append(this.{{name}});
    {{/field_type.is_binary}}
    {{/field.i_if_nullable}}

    {{#field_type.nullable}}
    }
    {{/field_type.nullable}}
    first = false;
    {{#field.optional}}
    }
    {{/field.optional}}
    {{/field.i_if_optional}}
    {{/fields}}
    sb.append(")");
    return sb.toString();
    {{/consolidate_newlines}}
  }

  public void validate() throws TException {
    {{#consolidate_newlines}}
    // check for required fields
    {{#fields}}
    {{#field.required}}
    {{#field_type.nullable}}
    if ({{name}} == null) {
      throw new TProtocolException("Required field '{{name}}' was not present! Struct: " + toString());
    }
    {{/field_type.nullable}}
    {{^field_type.nullable}}
    // alas, we cannot check '{{name}}' because it's a primitive and you chose the non-beans generator.
    {{/field_type.nullable}}
    {{/field.required}}
    {{/fields}}
    {{/consolidate_newlines}}
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



