*/
RemoteApiOptions useComputeEngineCredential() {
try {
HttpTransport transport = getOrCreateHttpTransportForOAuth();
ComputeCredential credential = new ComputeCredential(transport, new JacksonFactory());
credential.refreshToken();
setOAuthCredential(credential);
} catch (IOException|GeneralSecurityException e) {
throw new RuntimeException("Failed to acquire Google Compute Engine credential.", e);
}
return this;