}
}
}
}
DnsBackend backend = getBackend(backendKey);
String backendId = backend.createZone(project, zoneName, zone, suffixData);
DnsZoneData.Builder data = DnsZoneData.newBuilder();
data.setProjectId(project.getId());
data.setName(zoneName);
if (backendKey != null) {
data.setBackend(backendKey);
}
if (backendId != null) {
data.setBackendId(backendId);
}
DnsZoneData created = repository.getDnsZones(project.getId()).create(data);
DnsZone dnsDomain = new DnsZone(created);
backend.updateDomain(project, dnsDomain);
return dnsDomain;
}