use of com.google.api.services.compute.model.SubnetworkList in project google-cloud-java by GoogleCloudPlatform.
the class HttpComputeRpc method listSubnetworks.
@Override
public Tuple<String, Iterable<Subnetwork>> listSubnetworks(String region, Map<Option, ?> options) {
try {
SubnetworkList subnetworkList = compute.subnetworks().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<Subnetwork> subnetworks = subnetworkList.getItems();
return Tuple.of(subnetworkList.getNextPageToken(), subnetworks);
} catch (IOException ex) {
throw translate(ex);
}
}
Aggregations