static List<UpdateRecord> toUpdateRecordList(Map<String, Record> idsToRecords) {
List<UpdateRecord> updateRecords = Lists.newArrayList();
for (Map.Entry<String, Record> entry : idsToRecords.entrySet()) {
String recordId = entry.getKey();
Record record = entry.getValue();
UpdateRecord updateRecord = new UpdateRecord();
updateRecord.id = recordId;
updateRecord.name = record.getName();
updateRecord.ttl = record.getTTL().isPresent() ? record.getTTL().get() : null;
updateRecord.data = record.getData();
updateRecord.priority = record.getPriority();
updateRecord.comment = record.getComment();
updateRecords.add(updateRecord);
}
return updateRecords;