com.databricks.sdk.service.sql.QueryVisualizationsImpl Maven / Gradle / Ivy
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package com.databricks.sdk.service.sql;
import com.databricks.sdk.core.ApiClient;
import com.databricks.sdk.support.Generated;
import java.util.HashMap;
import java.util.Map;
/** Package-local implementation of QueryVisualizations */
@Generated
class QueryVisualizationsImpl implements QueryVisualizationsService {
private final ApiClient apiClient;
public QueryVisualizationsImpl(ApiClient apiClient) {
this.apiClient = apiClient;
}
@Override
public Visualization create(CreateVisualizationRequest request) {
String path = "/api/2.0/sql/visualizations";
Map headers = new HashMap<>();
headers.put("Accept", "application/json");
headers.put("Content-Type", "application/json");
return apiClient.POST(path, request, Visualization.class, headers);
}
@Override
public void delete(DeleteVisualizationRequest request) {
String path = String.format("/api/2.0/sql/visualizations/%s", request.getId());
Map headers = new HashMap<>();
headers.put("Accept", "application/json");
apiClient.DELETE(path, request, Empty.class, headers);
}
@Override
public Visualization update(UpdateVisualizationRequest request) {
String path = String.format("/api/2.0/sql/visualizations/%s", request.getId());
Map headers = new HashMap<>();
headers.put("Accept", "application/json");
headers.put("Content-Type", "application/json");
return apiClient.PATCH(path, request, Visualization.class, headers);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy