}
r.records = Lists.newArrayList();
for (DnsRecord dnsRecord : recordset.getRecords()) {
Record record = new Record();
DnsRecordData recordData = dnsRecord.getData();
record.value = recordData.getTarget();
if (recordData.hasWeight()) {
record.weight = recordData.getWeight();
}
if (recordData.hasPort()) {
record.port = recordData.getPort();
}
if (recordData.hasPriority()) {
record.priority = recordData.getPriority();
}
r.records.add(record);
}
recordsets.add(r);