2829303132333435363738
@Inject DnsService dnsService; @GET public ZoneList listZones() throws CloudException { ZoneList zones = new ZoneList(); zones.zones = Lists.newArrayList(); for (DnsService.Zone domain : dnsService.listZones(getProject())) { zones.zones.add(toModel((DnsZone) domain)); }
2829303132333435
super(httpClient, uri, tokenProvider); } public List<Zone> listZones() throws RestClientException { HttpRequest request = buildGet("v2/zones"); ZoneList zones = doRequest(request, ZoneList.class); return zones.zones; }