use of com.google.api.services.compute.model.OperationList in project google-cloud-java by GoogleCloudPlatform.
the class HttpComputeRpc method listGlobalOperations.
@Override
public Tuple<String, Iterable<Operation>> listGlobalOperations(Map<Option, ?> options) {
try {
OperationList operationsList = compute.globalOperations().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<Operation> operations = operationsList.getItems();
return Tuple.of(operationsList.getNextPageToken(), operations);
} catch (IOException ex) {
throw translate(ex);
}
}
use of com.google.api.services.compute.model.OperationList in project google-cloud-java by GoogleCloudPlatform.
the class HttpComputeRpc method listRegionOperations.
@Override
public Tuple<String, Iterable<Operation>> listRegionOperations(String region, Map<Option, ?> options) {
try {
OperationList operationsList = compute.regionOperations().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<Operation> operations = operationsList.getItems();
return Tuple.of(operationsList.getNextPageToken(), operations);
} catch (IOException ex) {
throw translate(ex);
}
}
use of com.google.api.services.compute.model.OperationList in project google-cloud-java by GoogleCloudPlatform.
the class HttpComputeRpc method listZoneOperations.
@Override
public Tuple<String, Iterable<Operation>> listZoneOperations(String zone, Map<Option, ?> options) {
try {
OperationList operationsList = compute.zoneOperations().list(this.options.getProjectId(), zone).setFilter(Option.FILTER.getString(options)).setMaxResults(Option.MAX_RESULTS.getLong(options)).setPageToken(Option.PAGE_TOKEN.getString(options)).setFields(Option.FIELDS.getString(options)).execute();
Iterable<Operation> operations = operationsList.getItems();
return Tuple.of(operationsList.getNextPageToken(), operations);
} catch (IOException ex) {
throw translate(ex);
}
}
Aggregations