code: public static Schema recordOf(String name, Iterable<Field> fields) {
      Preconditions.checkNotNull(name, "Record name cannot be null.");
      ImmutableMap.Builder<String, Field> fieldMapBuilder = ImmutableMap.builder();
      for (Field field : fields) {
        fieldMapBuilder.put(field.getName(), field);
      }
      Map<String, Field> fieldMap = fieldMapBuilder.build();
      Preconditions.checkArgument(fieldMap.size() > 0, "No record field provided for %s", name);
      return new Schema(Type.RECORD, null, null, null, null, name, fieldMap, null);
    }
docs: Creates a {@link Type#RECORD RECORD} {@link Schema} with the given name and {@link Field Fields}.
  The ordering of the fields inside the record would be the same as the {@link Iterable#iterator()} order.
  
  @param name Name of the record
  @param fields All the fields that the record contains.
  @return A {@link Schema} of {@link Type#RECORD RECORD} type.