All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.databricks.sdk.service.compute.LibrariesImpl Maven / Gradle / Ivy

There is a newer version: 0.38.0
Show newest version
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package com.databricks.sdk.service.compute;

import com.databricks.sdk.core.ApiClient;
import com.databricks.sdk.support.Generated;
import java.util.HashMap;
import java.util.Map;

/** Package-local implementation of Libraries */
@Generated
class LibrariesImpl implements LibrariesService {
  private final ApiClient apiClient;

  public LibrariesImpl(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  @Override
  public ListAllClusterLibraryStatusesResponse allClusterStatuses() {
    String path = "/api/2.0/libraries/all-cluster-statuses";
    Map headers = new HashMap<>();
    headers.put("Accept", "application/json");
    return apiClient.GET(path, ListAllClusterLibraryStatusesResponse.class, headers);
  }

  @Override
  public ClusterLibraryStatuses clusterStatus(ClusterStatus request) {
    String path = "/api/2.0/libraries/cluster-status";
    Map headers = new HashMap<>();
    headers.put("Accept", "application/json");
    return apiClient.GET(path, request, ClusterLibraryStatuses.class, headers);
  }

  @Override
  public void install(InstallLibraries request) {
    String path = "/api/2.0/libraries/install";
    Map headers = new HashMap<>();
    headers.put("Accept", "application/json");
    headers.put("Content-Type", "application/json");
    apiClient.POST(path, request, InstallLibrariesResponse.class, headers);
  }

  @Override
  public void uninstall(UninstallLibraries request) {
    String path = "/api/2.0/libraries/uninstall";
    Map headers = new HashMap<>();
    headers.put("Accept", "application/json");
    headers.put("Content-Type", "application/json");
    apiClient.POST(path, request, UninstallLibrariesResponse.class, headers);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy