public void createBackup(String name, boolean force) {
   int specialTimeout = 30 * 60 * 1000; // 30 minutes
   client.getConfig().withReadTimeout(specialTimeout);
   client.getConfig().withConnectionTimeout(specialTimeout);
   UriBuilder builder = client.uriBuilder(BACKUP_CREATE_URL);
   addQueryParam(builder, "tag", name);
   if (force) {
     addQueryParam(builder, "force", true);
   }
   client.postURI(String.class, builder.build());
 }
 public void restore(String name, String password, boolean isLocal, boolean isGeoFromScratch) {
   UriBuilder builder = client.uriBuilder(RESTORE_URL);
   addQueryParam(builder, "backupname", name);
   addQueryParam(builder, "password", password);
   if (isGeoFromScratch) {
     addQueryParam(builder, "isgeofromscratch", true);
   }
   if (isLocal) {
     addQueryParam(builder, "isLocal", true);
   }
   client.postURI(String.class, builder.build());
 }
 /**
  * Performs discovery operation on a vCenter.
  *
  * <p>API Call: POST /api/vcenters/{id}/discover
  *
  * @param id Identifier of the host to discover.
  */
 public void discover(String id) {
   client.postURI(String.class, client.uriBuilder(VCENTER_DISCOVER_URL).build(id));
 }
 public void pullBackup(String name) {
   UriBuilder builder = client.uriBuilder(BACKUP_PULL_URL);
   addQueryParam(builder, "file", name);
   client.postURI(String.class, builder.build());
 }
 public void uploadBackup(String name) {
   UriBuilder builder = client.uriBuilder(BACKUP_UPLOAD_URL);
   addQueryParam(builder, "tag", name);
   client.postURI(String.class, builder.build());
 }
 public void cancelPullBackup() {
   UriBuilder builder = client.uriBuilder(BACKUP_PULL_CANCEL_URL);
   client.postURI(String.class, builder.build());
 }