/** Return's a nullable field with the give name and type. */ public static Field nullable(String name, FieldType fieldType) { return new AutoValue_Schema_Field.Builder() .setName(name) .setDescription("") .setType(fieldType) .setNullable(true) .build(); }
/** Return's a field with the give name and type. */ public static Field of(String name, FieldType fieldType) { return new AutoValue_Schema_Field.Builder() .setName(name) .setDescription("") .setType(fieldType) .setNullable(false) // By default fields are not nullable. .build(); }