return schema;
}
public <T> T get(String fieldName) {
return (T) fields.get(fieldName);
}
<BUG>public static Builder builder(Schema schema) {
return new Builder(schema);</BUG>
}
public static class Builder {
private final Schema schema;

return schema;
}
public <T> T get(String fieldName) {
return (T) fields.get(fieldName);
}
public static Builder builder(Schema schema) throws UnexpectedFormatException {
if (schema == null || schema.getType() != Schema.Type.RECORD || schema.getFields().size() < 1) {
throw new UnexpectedFormatException("Schema must be a record with at least one field.");
}
return new Builder(schema);
}
public static class Builder {
private final Schema schema;
