class RowType implements Serializable {

  public static RowType fromNamesAndCoders(
      List<String> fieldNames,
      List<Coder> fieldCoders) {

    if (fieldNames.size() != fieldCoders.size()) {
      throw new IllegalStateException(
          "the size of fieldNames and fieldCoders need to be the same.");
    }

    return new AutoValue_RowType(fieldNames, fieldCoders);
  }

}