use of com.google.api.services.compute.model.AddressList in project google-cloud-java by GoogleCloudPlatform.
the class HttpComputeRpc method listGlobalAddresses.
@Override
public Tuple<String, Iterable<Address>> listGlobalAddresses(Map<Option, ?> options) {
try {
AddressList addressList = compute.globalAddresses().list(this.options.getProjectId()).setFilter(Option.FILTER.getString(options)).setMaxResults(Option.MAX_RESULTS.getLong(options)).setPageToken(Option.PAGE_TOKEN.getString(options)).setFields(Option.FIELDS.getString(options)).execute();
Iterable<Address> operations = addressList.getItems();
return Tuple.of(addressList.getNextPageToken(), operations);
} catch (IOException ex) {
throw translate(ex);
}
}
use of com.google.api.services.compute.model.AddressList in project google-cloud-java by GoogleCloudPlatform.
the class HttpComputeRpc method listRegionAddresses.
@Override
public Tuple<String, Iterable<Address>> listRegionAddresses(String region, Map<Option, ?> options) {
try {
AddressList addressList = compute.addresses().list(this.options.getProjectId(), region).setFilter(Option.FILTER.getString(options)).setMaxResults(Option.MAX_RESULTS.getLong(options)).setPageToken(Option.PAGE_TOKEN.getString(options)).setFields(Option.FIELDS.getString(options)).execute();
Iterable<Address> operations = addressList.getItems();
return Tuple.of(addressList.getNextPageToken(), operations);
} catch (IOException ex) {
throw translate(ex);
}
}
Aggregations