From f019a94b8de974a50eca2179325c810be8301e2b Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Mon, 14 Aug 2023 20:07:17 +0200 Subject: [PATCH 1/9] Propagate headers through API Client --- .codegen/impl.java.tmpl | 21 +- .../com/databricks/sdk/core/ApiClient.java | 70 +++--- .../sdk/core/HeaderParamsSerializer.java | 74 +++++++ .../service/billing/BillableUsageImpl.java | 6 +- .../sdk/service/billing/BudgetsImpl.java | 29 ++- .../sdk/service/billing/LogDeliveryImpl.java | 24 ++- .../AccountMetastoreAssignmentsImpl.java | 29 ++- .../catalog/AccountMetastoresImpl.java | 29 ++- .../AccountStorageCredentialsImpl.java | 29 ++- .../sdk/service/catalog/CatalogsImpl.java | 29 ++- .../sdk/service/catalog/ConnectionsImpl.java | 29 ++- .../catalog/ExternalLocationsImpl.java | 29 ++- .../sdk/service/catalog/FunctionsImpl.java | 29 ++- .../sdk/service/catalog/GrantsImpl.java | 18 +- .../sdk/service/catalog/MetastoresImpl.java | 62 +++++- .../sdk/service/catalog/SchemasImpl.java | 29 ++- .../catalog/StorageCredentialsImpl.java | 35 ++- .../service/catalog/SystemSchemasImpl.java | 17 +- .../service/catalog/TableConstraintsImpl.java | 13 +- .../sdk/service/catalog/TablesImpl.java | 28 ++- .../sdk/service/catalog/VolumesImpl.java | 28 ++- .../catalog/WorkspaceBindingsImpl.java | 13 +- .../service/compute/ClusterPoliciesImpl.java | 52 ++++- .../sdk/service/compute/ClustersImpl.java | 115 ++++++++-- .../service/compute/CommandExecutionImpl.java | 36 +++- .../compute/GlobalInitScriptsImpl.java | 27 ++- .../service/compute/InstancePoolsImpl.java | 52 ++++- .../service/compute/InstanceProfilesImpl.java | 25 ++- .../sdk/service/compute/LibrariesImpl.java | 24 ++- .../service/compute/PolicyFamiliesImpl.java | 12 +- .../sdk/service/files/DbfsImpl.java | 59 ++++- .../service/iam/AccountAccessControlImpl.java | 18 +- .../iam/AccountAccessControlProxyImpl.java | 18 +- .../sdk/service/iam/AccountGroupsImpl.java | 34 ++- .../iam/AccountServicePrincipalsImpl.java | 34 ++- .../sdk/service/iam/AccountUsersImpl.java | 34 ++- .../sdk/service/iam/CurrentUserImpl.java | 7 +- .../sdk/service/iam/GroupsImpl.java | 34 ++- .../sdk/service/iam/PermissionsImpl.java | 24 ++- .../service/iam/ServicePrincipalsImpl.java | 34 ++- .../databricks/sdk/service/iam/UsersImpl.java | 56 ++++- .../service/iam/WorkspaceAssignmentImpl.java | 23 +- .../databricks/sdk/service/jobs/JobsImpl.java | 114 ++++++++-- .../sdk/service/ml/ExperimentsImpl.java | 162 +++++++++++--- .../sdk/service/ml/ModelRegistryImpl.java | 201 ++++++++++++++---- .../oauth2/CustomAppIntegrationImpl.java | 29 ++- .../service/oauth2/OAuthEnrollmentImpl.java | 12 +- .../oauth2/PublishedAppIntegrationImpl.java | 29 ++- .../oauth2/ServicePrincipalSecretsImpl.java | 16 +- .../sdk/service/pipelines/PipelinesImpl.java | 82 +++++-- .../service/provisioning/CredentialsImpl.java | 23 +- .../provisioning/EncryptionKeysImpl.java | 23 +- .../service/provisioning/NetworksImpl.java | 23 +- .../provisioning/PrivateAccessImpl.java | 29 ++- .../sdk/service/provisioning/StorageImpl.java | 23 +- .../provisioning/VpcEndpointsImpl.java | 23 +- .../service/provisioning/WorkspacesImpl.java | 29 ++- .../service/serving/ServingEndpointsImpl.java | 70 ++++-- .../settings/AccountIpAccessListsImpl.java | 34 ++- .../settings/AccountNetworkPolicyImpl.java | 18 +- .../service/settings/AccountSettingsImpl.java | 18 +- .../service/settings/IpAccessListsImpl.java | 34 ++- .../service/settings/TokenManagementImpl.java | 44 +++- .../sdk/service/settings/TokensImpl.java | 19 +- .../service/settings/WorkspaceConfImpl.java | 11 +- .../sdk/service/sharing/CleanRoomsImpl.java | 29 ++- .../sdk/service/sharing/ProvidersImpl.java | 34 ++- .../sharing/RecipientActivationImpl.java | 12 +- .../sdk/service/sharing/RecipientsImpl.java | 40 +++- .../sdk/service/sharing/SharesImpl.java | 41 +++- .../sdk/service/sql/AlertsImpl.java | 29 ++- .../sdk/service/sql/DashboardsImpl.java | 28 ++- .../sdk/service/sql/DataSourcesImpl.java | 7 +- .../sdk/service/sql/DbsqlPermissionsImpl.java | 19 +- .../sdk/service/sql/QueriesImpl.java | 34 ++- .../sdk/service/sql/QueryHistoryImpl.java | 7 +- .../service/sql/StatementExecutionImpl.java | 22 +- .../sdk/service/sql/WarehousesImpl.java | 72 +++++-- .../service/workspace/GitCredentialsImpl.java | 28 ++- .../sdk/service/workspace/ReposImpl.java | 50 ++++- .../sdk/service/workspace/SecretsImpl.java | 58 ++++- .../sdk/service/workspace/WorkspaceImpl.java | 57 ++++- .../databricks/sdk/support/HeaderParam.java | 12 ++ .../databricks/sdk/core/ApiClientTest.java | 5 +- 84 files changed, 2509 insertions(+), 529 deletions(-) create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/core/HeaderParamsSerializer.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/support/HeaderParam.java diff --git a/.codegen/impl.java.tmpl b/.codegen/impl.java.tmpl index 9cf5b1354..bcfc9c62b 100644 --- a/.codegen/impl.java.tmpl +++ b/.codegen/impl.java.tmpl @@ -4,6 +4,7 @@ package com.databricks.sdk.service.{{.Package.Name}}; import java.io.IOException; import java.util.Collection; import java.util.Map; +import java.util.HashMap; import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.core.DatabricksException; @@ -26,18 +27,28 @@ class {{.PascalName}}Impl implements {{.PascalName}}Service { String path = {{if .PathParts -}} String.format("{{range .PathParts}}{{.Prefix}}{{if or .Field .IsAccountId}}%s{{end}}{{ end }}"{{ range .PathParts }}{{if .Field}}, request.get{{.Field.PascalName}}(){{ else if .IsAccountId }}, apiClient.configuredAccountID(){{end}}{{ end }}) {{- else}}"{{.Path}}"{{end}}; + {{ template "headers" . }} {{if .Response -}} - {{- if .Response.ArrayValue -}} return apiClient.getCollection(path, null, {{template "type" .Response.ArrayValue}}.class); - {{- else if .Response.MapValue -}} return apiClient.getStringMap(path, request); + {{- if .Response.ArrayValue -}} return apiClient.getCollection(path, null, {{template "type" .Response.ArrayValue}}.class, headers); + {{- else if .Response.MapValue -}} return apiClient.getStringMap(path, request, headers); {{- else -}} return apiClient.{{.Verb}}(path{{if .Request}}, request{{end}}{{if .Response -}}, {{if .Response.ArrayValue }}Collection {{- else if .Response.MapValue }}Map {{- else}}{{template "type" .Response}} - {{- end -}}{{else}}, Void{{end}}.class);{{end}} + {{- end -}}{{else}}, Void{{end}}.class, headers);{{end}} {{- else -}}apiClient.{{.Verb}}(path{{if .Request}}, request{{end}}{{if .Response -}}, {{if .Response.ArrayValue }}Collection {{- else if .Response.MapValue }}Map {{- else}}{{template "type" .Response}} - {{- end -}}{{else}}, Void{{end}}.class); + {{- end -}}{{else}}, Void{{end}}.class, headers); {{end}} } {{end}} -} \ No newline at end of file +} + +{{ define "headers" -}} + Map headers = new HashMap<>(); + {{ if .HasRequestHeaders -}} + {{- range $key, $value := .FixedRequestHeaders -}} + headers.put("{{$key}}", "{{$value}}"); + {{ end -}} + {{- end }} +{{- end }} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java index 5bd02d015..e9d0dba85 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java @@ -13,9 +13,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import java.io.IOException; -import java.util.Collection; -import java.util.Map; -import java.util.Random; +import java.util.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -85,30 +83,46 @@ private ObjectMapper makeObjectMapper() { return mapper; } - private Request withQuery(Request in, I entity) { + private void setQuery(Request in, I entity) { if (entity == null) { - return in; + return; } for (GrpcTranscodingQueryParamsSerializer.HeaderEntry e : GrpcTranscodingQueryParamsSerializer.serialize(entity)) { in.withQueryParam(e.getKey(), e.getValue()); } - return in; } - public Collection getCollection(String path, I in, Class element) { + private void setHeaders(Request in, Map headers) { + if (headers == null) { + return; + } + for (Map.Entry e : headers.entrySet()) { + in.withHeader(e.getKey(), e.getValue()); + } + } + + public Collection getCollection( + String path, I in, Class element, Map headers) { return withJavaType( - path, in, mapper.getTypeFactory().constructCollectionType(Collection.class, element)); + path, + in, + mapper.getTypeFactory().constructCollectionType(Collection.class, element), + headers); } - public Map getStringMap(String path, I in) { + public Map getStringMap(String path, I in, Map headers) { return withJavaType( - path, in, mapper.getTypeFactory().constructMapType(Map.class, String.class, String.class)); + path, + in, + mapper.getTypeFactory().constructMapType(Map.class, String.class, String.class), + headers); } - protected O withJavaType(String path, I in, JavaType javaType) { + protected O withJavaType( + String path, I in, JavaType javaType, Map headers) { try { - Request request = withQuery(new Request("GET", path), in); + Request request = prepareRequest("GET", path, in, headers); Response response = getResponse(request); return deserialize(response.getBody(), javaType); } catch (IOException e) { @@ -116,50 +130,58 @@ protected O withJavaType(String path, I in, JavaType javaType) { } } - public O GET(String path, Class target) { - return GET(path, null, target); + public O GET(String path, Class target, Map headers) { + return GET(path, null, target, headers); } - public O GET(String path, I in, Class target) { + public O GET(String path, I in, Class target, Map headers) { try { - return execute(withQuery(new Request("GET", path), in), target); + return execute(prepareRequest("GET", path, in, headers), target); } catch (IOException e) { throw new DatabricksException("IO error: " + e.getMessage(), e); } } - public O POST(String path, I in, Class target) { + public O POST(String path, I in, Class target, Map headers) { try { - return execute(new Request("POST", path, serialize(in)), target); + return execute(prepareRequest("POST", path, in, headers), target); } catch (IOException e) { throw new DatabricksException("IO error: " + e.getMessage(), e); } } - public O PUT(String path, I in, Class target) { + public O PUT(String path, I in, Class target, Map headers) { try { - return execute(new Request("PUT", path, serialize(in)), target); + return execute(prepareRequest("PUT", path, in, headers), target); } catch (IOException e) { throw new DatabricksException("IO error: " + e.getMessage(), e); } } - public O PATCH(String path, I in, Class target) { + public O PATCH(String path, I in, Class target, Map headers) { try { - return execute(new Request("PATCH", path, serialize(in)), target); + return execute(prepareRequest("PATCH", path, in, headers), target); } catch (IOException e) { throw new DatabricksException("IO error: " + e.getMessage(), e); } } - public O DELETE(String path, I in, Class target) { + public O DELETE(String path, I in, Class target, Map headers) { try { - return execute(withQuery(new Request("DELETE", path), in), target); + return execute(prepareRequest("DELETE", path, in, headers), target); } catch (IOException e) { throw new DatabricksException("IO error: " + e.getMessage(), e); } } + private Request prepareRequest( + String method, String path, I in, Map headers) { + Request req = new Request(method, path); + setQuery(req, in); + setHeaders(req, headers); + return req; + } + /** * Executes HTTP request with retries and converts it to proper POJO * diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/HeaderParamsSerializer.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/HeaderParamsSerializer.java new file mode 100644 index 000000000..cd191ac03 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/HeaderParamsSerializer.java @@ -0,0 +1,74 @@ +package com.databricks.sdk.core; + +import com.databricks.sdk.support.HeaderParam; +import java.lang.reflect.Field; +import java.util.*; + +public class HeaderParamsSerializer { + + public static class HeaderEntry { + private final String key; + private final String value; + + public HeaderEntry(String key, String value) { + this.key = key; + this.value = value; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } + } + /** + * Serializes an object into a map of query parameter values compatible with gRPC-transcoding. + * + *

This method respects the QueryParam and JsonProperty annotations on the object's fields when + * serializing the field name. If both annotations are present, the value of the QueryParam + * annotation is used. + * + *

The returned object does not contain any top-level fields that are not annotated with + * QueryParam. All nested fields are included, even if they are not annotated with QueryParam. + * + * @param o The object to serialize. + * @return A list of query parameter entries compatible with gRPC-transcoding. + */ + public static List serialize(Object o) { + List result = new ArrayList<>(); + for (Field f : o.getClass().getDeclaredFields()) { + HeaderParam headerParam = f.getAnnotation(HeaderParam.class); + if (headerParam == null) { + continue; + } + // Only support single string headers for now. + if (!f.getType().isAssignableFrom(String.class)) { + throw new IllegalArgumentException( + String.format( + "Field %s is annotated with @HeaderParam, but is not of type String.", + getFieldName(f))); + } + f.setAccessible(true); + try { + result.add(new HeaderParamsSerializer.HeaderEntry(headerParam.value(), (String) f.get(o))); + } catch (IllegalAccessException e) { + throw new DatabricksException("Failed to read header entries", e); + } finally { + f.setAccessible(false); + } + } + + return result; + } + + private static String getFieldName(Field f) { + HeaderParam headerParam = f.getAnnotation(HeaderParam.class); + if (headerParam != null) { + return headerParam.value(); + } else { + return f.getName(); + } + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BillableUsageImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BillableUsageImpl.java index 1b7836d98..f1513814d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BillableUsageImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BillableUsageImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of BillableUsage */ @Generated @@ -17,6 +19,8 @@ public BillableUsageImpl(ApiClient apiClient) { public void download(DownloadRequest request) { String path = String.format("/api/2.0/accounts/%s/usage/download", apiClient.configuredAccountID()); - apiClient.GET(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.GET(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsImpl.java index 082da2f4e..7c10fa0a1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Budgets */ @Generated @@ -16,7 +18,11 @@ public BudgetsImpl(ApiClient apiClient) { @Override public WrappedBudgetWithStatus create(WrappedBudget request) { String path = String.format("/api/2.0/accounts/%s/budget", apiClient.configuredAccountID()); - return apiClient.POST(path, request, WrappedBudgetWithStatus.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, WrappedBudgetWithStatus.class, headers); } @Override @@ -25,7 +31,10 @@ public void delete(DeleteBudgetRequest request) { String.format( "/api/2.0/accounts/%s/budget/%s", apiClient.configuredAccountID(), request.getBudgetId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -34,13 +43,19 @@ public WrappedBudgetWithStatus get(GetBudgetRequest request) { String.format( "/api/2.0/accounts/%s/budget/%s", apiClient.configuredAccountID(), request.getBudgetId()); - return apiClient.GET(path, request, WrappedBudgetWithStatus.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, WrappedBudgetWithStatus.class, headers); } @Override public BudgetList list() { String path = String.format("/api/2.0/accounts/%s/budget", apiClient.configuredAccountID()); - return apiClient.GET(path, BudgetList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, BudgetList.class, headers); } @Override @@ -49,6 +64,10 @@ public void update(WrappedBudget request) { String.format( "/api/2.0/accounts/%s/budget/%s", apiClient.configuredAccountID(), request.getBudgetId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryImpl.java index 7a674333d..701378bb0 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of LogDelivery */ @Generated @@ -17,7 +19,11 @@ public LogDeliveryImpl(ApiClient apiClient) { public WrappedLogDeliveryConfiguration create(WrappedCreateLogDeliveryConfiguration request) { String path = String.format("/api/2.0/accounts/%s/log-delivery", apiClient.configuredAccountID()); - return apiClient.POST(path, request, WrappedLogDeliveryConfiguration.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, WrappedLogDeliveryConfiguration.class, headers); } @Override @@ -26,14 +32,20 @@ public WrappedLogDeliveryConfiguration get(GetLogDeliveryRequest request) { String.format( "/api/2.0/accounts/%s/log-delivery/%s", apiClient.configuredAccountID(), request.getLogDeliveryConfigurationId()); - return apiClient.GET(path, request, WrappedLogDeliveryConfiguration.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, WrappedLogDeliveryConfiguration.class, headers); } @Override public WrappedLogDeliveryConfigurations list(ListLogDeliveryRequest request) { String path = String.format("/api/2.0/accounts/%s/log-delivery", apiClient.configuredAccountID()); - return apiClient.GET(path, request, WrappedLogDeliveryConfigurations.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, WrappedLogDeliveryConfigurations.class, headers); } @Override @@ -42,6 +54,10 @@ public void patchStatus(UpdateLogDeliveryConfigurationStatusRequest request) { String.format( "/api/2.0/accounts/%s/log-delivery/%s", apiClient.configuredAccountID(), request.getLogDeliveryConfigurationId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java index 4ce89f57d..9c4a47e94 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountMetastoreAssignments */ @Generated @@ -20,7 +22,11 @@ public void create(AccountsCreateMetastoreAssignment request) { String.format( "/api/2.0/accounts/%s/workspaces/%s/metastores/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getMetastoreId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override @@ -29,7 +35,10 @@ public void delete(DeleteAccountMetastoreAssignmentRequest request) { String.format( "/api/2.0/accounts/%s/workspaces/%s/metastores/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getMetastoreId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -38,7 +47,10 @@ public AccountsMetastoreAssignment get(GetAccountMetastoreAssignmentRequest requ String.format( "/api/2.0/accounts/%s/workspaces/%s/metastore", apiClient.configuredAccountID(), request.getWorkspaceId()); - return apiClient.GET(path, request, AccountsMetastoreAssignment.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, AccountsMetastoreAssignment.class, headers); } @Override @@ -47,7 +59,10 @@ public Collection list(ListAccountMetastoreAssignmentsReque String.format( "/api/2.0/accounts/%s/metastores/%s/workspaces", apiClient.configuredAccountID(), request.getMetastoreId()); - return apiClient.getCollection(path, null, MetastoreAssignment.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, MetastoreAssignment.class, headers); } @Override @@ -56,6 +71,10 @@ public void update(AccountsUpdateMetastoreAssignment request) { String.format( "/api/2.0/accounts/%s/workspaces/%s/metastores/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getMetastoreId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresImpl.java index f2b0961f7..eae2d42c8 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountMetastores */ @Generated @@ -16,7 +18,11 @@ public AccountMetastoresImpl(ApiClient apiClient) { @Override public AccountsMetastoreInfo create(AccountsCreateMetastore request) { String path = String.format("/api/2.0/accounts/%s/metastores", apiClient.configuredAccountID()); - return apiClient.POST(path, request, AccountsMetastoreInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, AccountsMetastoreInfo.class, headers); } @Override @@ -25,7 +31,10 @@ public void delete(DeleteAccountMetastoreRequest request) { String.format( "/api/2.0/accounts/%s/metastores/%s", apiClient.configuredAccountID(), request.getMetastoreId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -34,13 +43,19 @@ public AccountsMetastoreInfo get(GetAccountMetastoreRequest request) { String.format( "/api/2.0/accounts/%s/metastores/%s", apiClient.configuredAccountID(), request.getMetastoreId()); - return apiClient.GET(path, request, AccountsMetastoreInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, AccountsMetastoreInfo.class, headers); } @Override public ListMetastoresResponse list() { String path = String.format("/api/2.0/accounts/%s/metastores", apiClient.configuredAccountID()); - return apiClient.GET(path, ListMetastoresResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListMetastoresResponse.class, headers); } @Override @@ -49,6 +64,10 @@ public AccountsMetastoreInfo update(AccountsUpdateMetastore request) { String.format( "/api/2.0/accounts/%s/metastores/%s", apiClient.configuredAccountID(), request.getMetastoreId()); - return apiClient.PUT(path, request, AccountsMetastoreInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, AccountsMetastoreInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsImpl.java index 11271c6b5..3192f89aa 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountStorageCredentials */ @Generated @@ -19,7 +21,11 @@ public AccountsStorageCredentialInfo create(AccountsCreateStorageCredential requ String.format( "/api/2.0/accounts/%s/metastores/%s/storage-credentials", apiClient.configuredAccountID(), request.getMetastoreId()); - return apiClient.POST(path, request, AccountsStorageCredentialInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, AccountsStorageCredentialInfo.class, headers); } @Override @@ -28,7 +34,10 @@ public void delete(DeleteAccountStorageCredentialRequest request) { String.format( "/api/2.0/accounts/%s/metastores/%s/storage-credentials/", apiClient.configuredAccountID(), request.getMetastoreId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -37,7 +46,10 @@ public AccountsStorageCredentialInfo get(GetAccountStorageCredentialRequest requ String.format( "/api/2.0/accounts/%s/metastores/%s/storage-credentials/", apiClient.configuredAccountID(), request.getMetastoreId()); - return apiClient.GET(path, request, AccountsStorageCredentialInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, AccountsStorageCredentialInfo.class, headers); } @Override @@ -46,7 +58,10 @@ public ListStorageCredentialsResponse list(ListAccountStorageCredentialsRequest String.format( "/api/2.0/accounts/%s/metastores/%s/storage-credentials", apiClient.configuredAccountID(), request.getMetastoreId()); - return apiClient.GET(path, request, ListStorageCredentialsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListStorageCredentialsResponse.class, headers); } @Override @@ -55,6 +70,10 @@ public AccountsStorageCredentialInfo update(AccountsUpdateStorageCredential requ String.format( "/api/2.0/accounts/%s/metastores/%s/storage-credentials/", apiClient.configuredAccountID(), request.getMetastoreId()); - return apiClient.PUT(path, request, AccountsStorageCredentialInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, AccountsStorageCredentialInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsImpl.java index 8a8ad220b..bb379ab9a 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Catalogs */ @Generated @@ -16,30 +18,47 @@ public CatalogsImpl(ApiClient apiClient) { @Override public CatalogInfo create(CreateCatalog request) { String path = "/api/2.1/unity-catalog/catalogs"; - return apiClient.POST(path, request, CatalogInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CatalogInfo.class, headers); } @Override public void delete(DeleteCatalogRequest request) { String path = String.format("/api/2.1/unity-catalog/catalogs/%s", request.getName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public CatalogInfo get(GetCatalogRequest request) { String path = String.format("/api/2.1/unity-catalog/catalogs/%s", request.getName()); - return apiClient.GET(path, request, CatalogInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, CatalogInfo.class, headers); } @Override public ListCatalogsResponse list() { String path = "/api/2.1/unity-catalog/catalogs"; - return apiClient.GET(path, ListCatalogsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListCatalogsResponse.class, headers); } @Override public CatalogInfo update(UpdateCatalog request) { String path = String.format("/api/2.1/unity-catalog/catalogs/%s", request.getName()); - return apiClient.PATCH(path, request, CatalogInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, CatalogInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionsImpl.java index b3c849ddb..5b1225374 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Connections */ @Generated @@ -16,30 +18,47 @@ public ConnectionsImpl(ApiClient apiClient) { @Override public ConnectionInfo create(CreateConnection request) { String path = "/api/2.1/unity-catalog/connections"; - return apiClient.POST(path, request, ConnectionInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ConnectionInfo.class, headers); } @Override public void delete(DeleteConnectionRequest request) { String path = String.format("/api/2.1/unity-catalog/connections/%s", request.getNameArg()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public ConnectionInfo get(GetConnectionRequest request) { String path = String.format("/api/2.1/unity-catalog/connections/%s", request.getNameArg()); - return apiClient.GET(path, request, ConnectionInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ConnectionInfo.class, headers); } @Override public ListConnectionsResponse list() { String path = "/api/2.1/unity-catalog/connections"; - return apiClient.GET(path, ListConnectionsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListConnectionsResponse.class, headers); } @Override public ConnectionInfo update(UpdateConnection request) { String path = String.format("/api/2.1/unity-catalog/connections/%s", request.getNameArg()); - return apiClient.PATCH(path, request, ConnectionInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ConnectionInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalLocationsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalLocationsImpl.java index b85819244..07a35b186 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalLocationsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalLocationsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of ExternalLocations */ @Generated @@ -16,30 +18,47 @@ public ExternalLocationsImpl(ApiClient apiClient) { @Override public ExternalLocationInfo create(CreateExternalLocation request) { String path = "/api/2.1/unity-catalog/external-locations"; - return apiClient.POST(path, request, ExternalLocationInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ExternalLocationInfo.class, headers); } @Override public void delete(DeleteExternalLocationRequest request) { String path = String.format("/api/2.1/unity-catalog/external-locations/%s", request.getName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public ExternalLocationInfo get(GetExternalLocationRequest request) { String path = String.format("/api/2.1/unity-catalog/external-locations/%s", request.getName()); - return apiClient.GET(path, request, ExternalLocationInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ExternalLocationInfo.class, headers); } @Override public ListExternalLocationsResponse list() { String path = "/api/2.1/unity-catalog/external-locations"; - return apiClient.GET(path, ListExternalLocationsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListExternalLocationsResponse.class, headers); } @Override public ExternalLocationInfo update(UpdateExternalLocation request) { String path = String.format("/api/2.1/unity-catalog/external-locations/%s", request.getName()); - return apiClient.PATCH(path, request, ExternalLocationInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ExternalLocationInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java index 6e05e5ce2..8aeab1341 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Functions */ @Generated @@ -16,30 +18,47 @@ public FunctionsImpl(ApiClient apiClient) { @Override public FunctionInfo create(CreateFunction request) { String path = "/api/2.1/unity-catalog/functions"; - return apiClient.POST(path, request, FunctionInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, FunctionInfo.class, headers); } @Override public void delete(DeleteFunctionRequest request) { String path = String.format("/api/2.1/unity-catalog/functions/%s", request.getName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public FunctionInfo get(GetFunctionRequest request) { String path = String.format("/api/2.1/unity-catalog/functions/%s", request.getName()); - return apiClient.GET(path, request, FunctionInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, FunctionInfo.class, headers); } @Override public ListFunctionsResponse list(ListFunctionsRequest request) { String path = "/api/2.1/unity-catalog/functions"; - return apiClient.GET(path, request, ListFunctionsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListFunctionsResponse.class, headers); } @Override public FunctionInfo update(UpdateFunction request) { String path = String.format("/api/2.1/unity-catalog/functions/%s", request.getName()); - return apiClient.PATCH(path, request, FunctionInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, FunctionInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GrantsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GrantsImpl.java index 1851ea58c..1019b0446 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GrantsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GrantsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Grants */ @Generated @@ -19,7 +21,10 @@ public PermissionsList get(GetGrantRequest request) { String.format( "/api/2.1/unity-catalog/permissions/%s/%s", request.getSecurableType(), request.getFullName()); - return apiClient.GET(path, request, PermissionsList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, PermissionsList.class, headers); } @Override @@ -28,7 +33,10 @@ public EffectivePermissionsList getEffective(GetEffectiveRequest request) { String.format( "/api/2.1/unity-catalog/effective-permissions/%s/%s", request.getSecurableType(), request.getFullName()); - return apiClient.GET(path, request, EffectivePermissionsList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, EffectivePermissionsList.class, headers); } @Override @@ -37,6 +45,10 @@ public PermissionsList update(UpdatePermissions request) { String.format( "/api/2.1/unity-catalog/permissions/%s/%s", request.getSecurableType(), request.getFullName()); - return apiClient.PATCH(path, request, PermissionsList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, PermissionsList.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/MetastoresImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/MetastoresImpl.java index eb0e4eb4a..8f59989e6 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/MetastoresImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/MetastoresImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Metastores */ @Generated @@ -17,69 +19,107 @@ public MetastoresImpl(ApiClient apiClient) { public void assign(CreateMetastoreAssignment request) { String path = String.format("/api/2.1/unity-catalog/workspaces/%s/metastore", request.getWorkspaceId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } @Override public MetastoreInfo create(CreateMetastore request) { String path = "/api/2.1/unity-catalog/metastores"; - return apiClient.POST(path, request, MetastoreInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, MetastoreInfo.class, headers); } @Override public MetastoreAssignment current() { String path = "/api/2.1/unity-catalog/current-metastore-assignment"; - return apiClient.GET(path, MetastoreAssignment.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, MetastoreAssignment.class, headers); } @Override public void delete(DeleteMetastoreRequest request) { String path = String.format("/api/2.1/unity-catalog/metastores/%s", request.getId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public UpdatePredictiveOptimizationResponse enableOptimization( UpdatePredictiveOptimization request) { String path = "/api/2.0/predictive-optimization/service"; - return apiClient.PATCH(path, request, UpdatePredictiveOptimizationResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, UpdatePredictiveOptimizationResponse.class, headers); } @Override public MetastoreInfo get(GetMetastoreRequest request) { String path = String.format("/api/2.1/unity-catalog/metastores/%s", request.getId()); - return apiClient.GET(path, request, MetastoreInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, MetastoreInfo.class, headers); } @Override public ListMetastoresResponse list() { String path = "/api/2.1/unity-catalog/metastores"; - return apiClient.GET(path, ListMetastoresResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListMetastoresResponse.class, headers); } @Override public GetMetastoreSummaryResponse summary() { String path = "/api/2.1/unity-catalog/metastore_summary"; - return apiClient.GET(path, GetMetastoreSummaryResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetMetastoreSummaryResponse.class, headers); } @Override public void unassign(UnassignRequest request) { String path = String.format("/api/2.1/unity-catalog/workspaces/%s/metastore", request.getWorkspaceId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public MetastoreInfo update(UpdateMetastore request) { String path = String.format("/api/2.1/unity-catalog/metastores/%s", request.getId()); - return apiClient.PATCH(path, request, MetastoreInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, MetastoreInfo.class, headers); } @Override public void updateAssignment(UpdateMetastoreAssignment request) { String path = String.format("/api/2.1/unity-catalog/workspaces/%s/metastore", request.getWorkspaceId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl.java index bf5cc4b1c..a8e2acced 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Schemas */ @Generated @@ -16,30 +18,47 @@ public SchemasImpl(ApiClient apiClient) { @Override public SchemaInfo create(CreateSchema request) { String path = "/api/2.1/unity-catalog/schemas"; - return apiClient.POST(path, request, SchemaInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, SchemaInfo.class, headers); } @Override public void delete(DeleteSchemaRequest request) { String path = String.format("/api/2.1/unity-catalog/schemas/%s", request.getFullName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public SchemaInfo get(GetSchemaRequest request) { String path = String.format("/api/2.1/unity-catalog/schemas/%s", request.getFullName()); - return apiClient.GET(path, request, SchemaInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, SchemaInfo.class, headers); } @Override public ListSchemasResponse list(ListSchemasRequest request) { String path = "/api/2.1/unity-catalog/schemas"; - return apiClient.GET(path, request, ListSchemasResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListSchemasResponse.class, headers); } @Override public SchemaInfo update(UpdateSchema request) { String path = String.format("/api/2.1/unity-catalog/schemas/%s", request.getFullName()); - return apiClient.PATCH(path, request, SchemaInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, SchemaInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java index cfc1033c2..79c0f292b 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of StorageCredentials */ @Generated @@ -16,36 +18,57 @@ public StorageCredentialsImpl(ApiClient apiClient) { @Override public StorageCredentialInfo create(CreateStorageCredential request) { String path = "/api/2.1/unity-catalog/storage-credentials"; - return apiClient.POST(path, request, StorageCredentialInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, StorageCredentialInfo.class, headers); } @Override public void delete(DeleteStorageCredentialRequest request) { String path = String.format("/api/2.1/unity-catalog/storage-credentials/%s", request.getName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public StorageCredentialInfo get(GetStorageCredentialRequest request) { String path = String.format("/api/2.1/unity-catalog/storage-credentials/%s", request.getName()); - return apiClient.GET(path, request, StorageCredentialInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, StorageCredentialInfo.class, headers); } @Override public ListStorageCredentialsResponse list() { String path = "/api/2.1/unity-catalog/storage-credentials"; - return apiClient.GET(path, ListStorageCredentialsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListStorageCredentialsResponse.class, headers); } @Override public StorageCredentialInfo update(UpdateStorageCredential request) { String path = String.format("/api/2.1/unity-catalog/storage-credentials/%s", request.getName()); - return apiClient.PATCH(path, request, StorageCredentialInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, StorageCredentialInfo.class, headers); } @Override public ValidateStorageCredentialResponse validate(ValidateStorageCredential request) { String path = "/api/2.1/unity-catalog/validate-storage-credentials"; - return apiClient.POST(path, request, ValidateStorageCredentialResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ValidateStorageCredentialResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasImpl.java index 9068f99d6..3fcf2ffdf 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of SystemSchemas */ @Generated @@ -19,7 +21,10 @@ public void disable(DisableRequest request) { String.format( "/api/2.1/unity-catalog/metastores/%s/systemschemas/%s", request.getMetastoreId(), request.getSchemaName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -28,7 +33,10 @@ public void enable(EnableRequest request) { String.format( "/api/2.1/unity-catalog/metastores/%s/systemschemas/%s", request.getMetastoreId(), request.getSchemaName()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } @Override @@ -36,6 +44,9 @@ public ListSystemSchemasResponse list(ListSystemSchemasRequest request) { String path = String.format( "/api/2.1/unity-catalog/metastores/%s/systemschemas", request.getMetastoreId()); - return apiClient.GET(path, request, ListSystemSchemasResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListSystemSchemasResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableConstraintsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableConstraintsImpl.java index 8517783b7..6bb656cf9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableConstraintsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableConstraintsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of TableConstraints */ @Generated @@ -16,12 +18,19 @@ public TableConstraintsImpl(ApiClient apiClient) { @Override public TableConstraint create(CreateTableConstraint request) { String path = "/api/2.1/unity-catalog/constraints"; - return apiClient.POST(path, request, TableConstraint.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, TableConstraint.class, headers); } @Override public void delete(DeleteTableConstraintRequest request) { String path = String.format("/api/2.1/unity-catalog/constraints/%s", request.getFullName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java index 9201366a6..c2503ba7f 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Tables */ @Generated @@ -16,30 +18,46 @@ public TablesImpl(ApiClient apiClient) { @Override public void delete(DeleteTableRequest request) { String path = String.format("/api/2.1/unity-catalog/tables/%s", request.getFullName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public TableInfo get(GetTableRequest request) { String path = String.format("/api/2.1/unity-catalog/tables/%s", request.getFullName()); - return apiClient.GET(path, request, TableInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, TableInfo.class, headers); } @Override public ListTablesResponse list(ListTablesRequest request) { String path = "/api/2.1/unity-catalog/tables"; - return apiClient.GET(path, request, ListTablesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListTablesResponse.class, headers); } @Override public ListTableSummariesResponse listSummaries(ListSummariesRequest request) { String path = "/api/2.1/unity-catalog/table-summaries"; - return apiClient.GET(path, request, ListTableSummariesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListTableSummariesResponse.class, headers); } @Override public void update(UpdateTableRequest request) { String path = String.format("/api/2.1/unity-catalog/tables/%s", request.getFullName()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java index 1f3028162..1124f3c34 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Volumes */ @Generated @@ -16,30 +18,46 @@ public VolumesImpl(ApiClient apiClient) { @Override public VolumeInfo create(CreateVolumeRequestContent request) { String path = "/api/2.1/unity-catalog/volumes"; - return apiClient.POST(path, request, VolumeInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, VolumeInfo.class, headers); } @Override public void delete(DeleteVolumeRequest request) { String path = String.format("/api/2.1/unity-catalog/volumes/%s", request.getFullNameArg()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public ListVolumesResponseContent list(ListVolumesRequest request) { String path = "/api/2.1/unity-catalog/volumes"; - return apiClient.GET(path, request, ListVolumesResponseContent.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListVolumesResponseContent.class, headers); } @Override public VolumeInfo read(ReadVolumeRequest request) { String path = String.format("/api/2.1/unity-catalog/volumes/%s", request.getFullNameArg()); - return apiClient.GET(path, request, VolumeInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, VolumeInfo.class, headers); } @Override public VolumeInfo update(UpdateVolumeRequestContent request) { String path = String.format("/api/2.1/unity-catalog/volumes/%s", request.getFullNameArg()); - return apiClient.PATCH(path, request, VolumeInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, VolumeInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/WorkspaceBindingsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/WorkspaceBindingsImpl.java index bd463e292..561cef4e2 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/WorkspaceBindingsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/WorkspaceBindingsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of WorkspaceBindings */ @Generated @@ -17,13 +19,20 @@ public WorkspaceBindingsImpl(ApiClient apiClient) { public CurrentWorkspaceBindings get(GetWorkspaceBindingRequest request) { String path = String.format("/api/2.1/unity-catalog/workspace-bindings/catalogs/%s", request.getName()); - return apiClient.GET(path, request, CurrentWorkspaceBindings.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, CurrentWorkspaceBindings.class, headers); } @Override public CurrentWorkspaceBindings update(UpdateWorkspaceBindings request) { String path = String.format("/api/2.1/unity-catalog/workspace-bindings/catalogs/%s", request.getName()); - return apiClient.PATCH(path, request, CurrentWorkspaceBindings.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, CurrentWorkspaceBindings.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterPoliciesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterPoliciesImpl.java index c3293c4f9..6a00fb0db 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterPoliciesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterPoliciesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of ClusterPolicies */ @Generated @@ -16,25 +18,40 @@ public ClusterPoliciesImpl(ApiClient apiClient) { @Override public CreatePolicyResponse create(CreatePolicy request) { String path = "/api/2.0/policies/clusters/create"; - return apiClient.POST(path, request, CreatePolicyResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreatePolicyResponse.class, headers); } @Override public void delete(DeletePolicy request) { String path = "/api/2.0/policies/clusters/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void edit(EditPolicy request) { String path = "/api/2.0/policies/clusters/edit"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public Policy get(GetClusterPolicyRequest request) { String path = "/api/2.0/policies/clusters/get"; - return apiClient.GET(path, request, Policy.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Policy.class, headers); } @Override @@ -44,7 +61,10 @@ public GetClusterPolicyPermissionLevelsResponse getClusterPolicyPermissionLevels String.format( "/api/2.0/permissions/cluster-policies/%s/permissionLevels", request.getClusterPolicyId()); - return apiClient.GET(path, request, GetClusterPolicyPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetClusterPolicyPermissionLevelsResponse.class, headers); } @Override @@ -52,13 +72,19 @@ public ClusterPolicyPermissions getClusterPolicyPermissions( GetClusterPolicyPermissionsRequest request) { String path = String.format("/api/2.0/permissions/cluster-policies/%s", request.getClusterPolicyId()); - return apiClient.GET(path, request, ClusterPolicyPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ClusterPolicyPermissions.class, headers); } @Override public ListPoliciesResponse list(ListClusterPoliciesRequest request) { String path = "/api/2.0/policies/clusters/list"; - return apiClient.GET(path, request, ListPoliciesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListPoliciesResponse.class, headers); } @Override @@ -66,7 +92,11 @@ public ClusterPolicyPermissions setClusterPolicyPermissions( ClusterPolicyPermissionsRequest request) { String path = String.format("/api/2.0/permissions/cluster-policies/%s", request.getClusterPolicyId()); - return apiClient.PUT(path, request, ClusterPolicyPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, ClusterPolicyPermissions.class, headers); } @Override @@ -74,6 +104,10 @@ public ClusterPolicyPermissions updateClusterPolicyPermissions( ClusterPolicyPermissionsRequest request) { String path = String.format("/api/2.0/permissions/cluster-policies/%s", request.getClusterPolicyId()); - return apiClient.PATCH(path, request, ClusterPolicyPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ClusterPolicyPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClustersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClustersImpl.java index 90caed689..a5c535c72 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClustersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClustersImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Clusters */ @Generated @@ -16,37 +18,60 @@ public ClustersImpl(ApiClient apiClient) { @Override public void changeOwner(ChangeClusterOwner request) { String path = "/api/2.0/clusters/change-owner"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public CreateClusterResponse create(CreateCluster request) { String path = "/api/2.0/clusters/create"; - return apiClient.POST(path, request, CreateClusterResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateClusterResponse.class, headers); } @Override public void delete(DeleteCluster request) { String path = "/api/2.0/clusters/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void edit(EditCluster request) { String path = "/api/2.0/clusters/edit"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public GetEventsResponse events(GetEvents request) { String path = "/api/2.0/clusters/events"; - return apiClient.POST(path, request, GetEventsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, GetEventsResponse.class, headers); } @Override public ClusterDetails get(GetClusterRequest request) { String path = "/api/2.0/clusters/get"; - return apiClient.GET(path, request, ClusterDetails.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ClusterDetails.class, headers); } @Override @@ -54,84 +79,134 @@ public GetClusterPermissionLevelsResponse getClusterPermissionLevels( GetClusterPermissionLevelsRequest request) { String path = String.format("/api/2.0/permissions/clusters/%s/permissionLevels", request.getClusterId()); - return apiClient.GET(path, request, GetClusterPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetClusterPermissionLevelsResponse.class, headers); } @Override public ClusterPermissions getClusterPermissions(GetClusterPermissionsRequest request) { String path = String.format("/api/2.0/permissions/clusters/%s", request.getClusterId()); - return apiClient.GET(path, request, ClusterPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ClusterPermissions.class, headers); } @Override public ListClustersResponse list(ListClustersRequest request) { String path = "/api/2.0/clusters/list"; - return apiClient.GET(path, request, ListClustersResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListClustersResponse.class, headers); } @Override public ListNodeTypesResponse listNodeTypes() { String path = "/api/2.0/clusters/list-node-types"; - return apiClient.GET(path, ListNodeTypesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListNodeTypesResponse.class, headers); } @Override public ListAvailableZonesResponse listZones() { String path = "/api/2.0/clusters/list-zones"; - return apiClient.GET(path, ListAvailableZonesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListAvailableZonesResponse.class, headers); } @Override public void permanentDelete(PermanentDeleteCluster request) { String path = "/api/2.0/clusters/permanent-delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void pin(PinCluster request) { String path = "/api/2.0/clusters/pin"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void resize(ResizeCluster request) { String path = "/api/2.0/clusters/resize"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void restart(RestartCluster request) { String path = "/api/2.0/clusters/restart"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ClusterPermissions setClusterPermissions(ClusterPermissionsRequest request) { String path = String.format("/api/2.0/permissions/clusters/%s", request.getClusterId()); - return apiClient.PUT(path, request, ClusterPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, ClusterPermissions.class, headers); } @Override public GetSparkVersionsResponse sparkVersions() { String path = "/api/2.0/clusters/spark-versions"; - return apiClient.GET(path, GetSparkVersionsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetSparkVersionsResponse.class, headers); } @Override public void start(StartCluster request) { String path = "/api/2.0/clusters/start"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void unpin(UnpinCluster request) { String path = "/api/2.0/clusters/unpin"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ClusterPermissions updateClusterPermissions(ClusterPermissionsRequest request) { String path = String.format("/api/2.0/permissions/clusters/%s", request.getClusterId()); - return apiClient.PATCH(path, request, ClusterPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ClusterPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CommandExecutionImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CommandExecutionImpl.java index 804011ce4..e94d0591f 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CommandExecutionImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CommandExecutionImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of CommandExecution */ @Generated @@ -16,36 +18,58 @@ public CommandExecutionImpl(ApiClient apiClient) { @Override public void cancel(CancelCommand request) { String path = "/api/1.2/commands/cancel"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public CommandStatusResponse commandStatus(CommandStatusRequest request) { String path = "/api/1.2/commands/status"; - return apiClient.GET(path, request, CommandStatusResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, CommandStatusResponse.class, headers); } @Override public ContextStatusResponse contextStatus(ContextStatusRequest request) { String path = "/api/1.2/contexts/status"; - return apiClient.GET(path, request, ContextStatusResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ContextStatusResponse.class, headers); } @Override public Created create(CreateContext request) { String path = "/api/1.2/contexts/create"; - return apiClient.POST(path, request, Created.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Created.class, headers); } @Override public void destroy(DestroyContext request) { String path = "/api/1.2/contexts/destroy"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public Created execute(Command request) { String path = "/api/1.2/commands/execute"; - return apiClient.POST(path, request, Created.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Created.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java index b6846695d..890863f1b 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of GlobalInitScripts */ @Generated @@ -16,30 +18,45 @@ public GlobalInitScriptsImpl(ApiClient apiClient) { @Override public CreateResponse create(GlobalInitScriptCreateRequest request) { String path = "/api/2.0/global-init-scripts"; - return apiClient.POST(path, request, CreateResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateResponse.class, headers); } @Override public void delete(DeleteGlobalInitScriptRequest request) { String path = String.format("/api/2.0/global-init-scripts/%s", request.getScriptId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public GlobalInitScriptDetailsWithContent get(GetGlobalInitScriptRequest request) { String path = String.format("/api/2.0/global-init-scripts/%s", request.getScriptId()); - return apiClient.GET(path, request, GlobalInitScriptDetailsWithContent.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GlobalInitScriptDetailsWithContent.class, headers); } @Override public ListGlobalInitScriptsResponse list() { String path = "/api/2.0/global-init-scripts"; - return apiClient.GET(path, ListGlobalInitScriptsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListGlobalInitScriptsResponse.class, headers); } @Override public void update(GlobalInitScriptUpdateRequest request) { String path = String.format("/api/2.0/global-init-scripts/%s", request.getScriptId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolsImpl.java index 2df3a704b..8e35d6da5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of InstancePools */ @Generated @@ -16,25 +18,40 @@ public InstancePoolsImpl(ApiClient apiClient) { @Override public CreateInstancePoolResponse create(CreateInstancePool request) { String path = "/api/2.0/instance-pools/create"; - return apiClient.POST(path, request, CreateInstancePoolResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateInstancePoolResponse.class, headers); } @Override public void delete(DeleteInstancePool request) { String path = "/api/2.0/instance-pools/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void edit(EditInstancePool request) { String path = "/api/2.0/instance-pools/edit"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public GetInstancePool get(GetInstancePoolRequest request) { String path = "/api/2.0/instance-pools/get"; - return apiClient.GET(path, request, GetInstancePool.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetInstancePool.class, headers); } @Override @@ -43,7 +60,10 @@ public GetInstancePoolPermissionLevelsResponse getInstancePoolPermissionLevels( String path = String.format( "/api/2.0/permissions/instance-pools/%s/permissionLevels", request.getInstancePoolId()); - return apiClient.GET(path, request, GetInstancePoolPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetInstancePoolPermissionLevelsResponse.class, headers); } @Override @@ -51,13 +71,19 @@ public InstancePoolPermissions getInstancePoolPermissions( GetInstancePoolPermissionsRequest request) { String path = String.format("/api/2.0/permissions/instance-pools/%s", request.getInstancePoolId()); - return apiClient.GET(path, request, InstancePoolPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, InstancePoolPermissions.class, headers); } @Override public ListInstancePools list() { String path = "/api/2.0/instance-pools/list"; - return apiClient.GET(path, ListInstancePools.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListInstancePools.class, headers); } @Override @@ -65,7 +91,11 @@ public InstancePoolPermissions setInstancePoolPermissions( InstancePoolPermissionsRequest request) { String path = String.format("/api/2.0/permissions/instance-pools/%s", request.getInstancePoolId()); - return apiClient.PUT(path, request, InstancePoolPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, InstancePoolPermissions.class, headers); } @Override @@ -73,6 +103,10 @@ public InstancePoolPermissions updateInstancePoolPermissions( InstancePoolPermissionsRequest request) { String path = String.format("/api/2.0/permissions/instance-pools/%s", request.getInstancePoolId()); - return apiClient.PATCH(path, request, InstancePoolPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, InstancePoolPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstanceProfilesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstanceProfilesImpl.java index 7c4cb66a0..ef5b800a4 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstanceProfilesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstanceProfilesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of InstanceProfiles */ @Generated @@ -16,24 +18,39 @@ public InstanceProfilesImpl(ApiClient apiClient) { @Override public void add(AddInstanceProfile request) { String path = "/api/2.0/instance-profiles/add"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void edit(InstanceProfile request) { String path = "/api/2.0/instance-profiles/edit"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ListInstanceProfilesResponse list() { String path = "/api/2.0/instance-profiles/list"; - return apiClient.GET(path, ListInstanceProfilesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListInstanceProfilesResponse.class, headers); } @Override public void remove(RemoveInstanceProfile request) { String path = "/api/2.0/instance-profiles/remove"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LibrariesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LibrariesImpl.java index 3edbb964c..7360fd0d7 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LibrariesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LibrariesImpl.java @@ -3,6 +3,8 @@ 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 @@ -16,24 +18,38 @@ public LibrariesImpl(ApiClient apiClient) { @Override public ListAllClusterLibraryStatusesResponse allClusterStatuses() { String path = "/api/2.0/libraries/all-cluster-statuses"; - return apiClient.GET(path, ListAllClusterLibraryStatusesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListAllClusterLibraryStatusesResponse.class, headers); } @Override public ClusterLibraryStatuses clusterStatus(ClusterStatusRequest request) { String path = "/api/2.0/libraries/cluster-status"; - return apiClient.GET(path, request, ClusterLibraryStatuses.class); + 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"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void uninstall(UninstallLibraries request) { String path = "/api/2.0/libraries/uninstall"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/PolicyFamiliesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/PolicyFamiliesImpl.java index 8219ff1e3..2d258e86a 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/PolicyFamiliesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/PolicyFamiliesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of PolicyFamilies */ @Generated @@ -16,12 +18,18 @@ public PolicyFamiliesImpl(ApiClient apiClient) { @Override public PolicyFamily get(GetPolicyFamilyRequest request) { String path = String.format("/api/2.0/policy-families/%s", request.getPolicyFamilyId()); - return apiClient.GET(path, request, PolicyFamily.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, PolicyFamily.class, headers); } @Override public ListPolicyFamiliesResponse list(ListPolicyFamiliesRequest request) { String path = "/api/2.0/policy-families"; - return apiClient.GET(path, request, ListPolicyFamiliesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListPolicyFamiliesResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java index 4f4032944..f32bc63df 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Dbfs */ @Generated @@ -16,60 +18,97 @@ public DbfsImpl(ApiClient apiClient) { @Override public void addBlock(AddBlock request) { String path = "/api/2.0/dbfs/add-block"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void close(Close request) { String path = "/api/2.0/dbfs/close"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public CreateResponse create(Create request) { String path = "/api/2.0/dbfs/create"; - return apiClient.POST(path, request, CreateResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateResponse.class, headers); } @Override public void delete(Delete request) { String path = "/api/2.0/dbfs/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public FileInfo getStatus(GetStatusRequest request) { String path = "/api/2.0/dbfs/get-status"; - return apiClient.GET(path, request, FileInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, FileInfo.class, headers); } @Override public ListStatusResponse list(ListDbfsRequest request) { String path = "/api/2.0/dbfs/list"; - return apiClient.GET(path, request, ListStatusResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListStatusResponse.class, headers); } @Override public void mkdirs(MkDirs request) { String path = "/api/2.0/dbfs/mkdirs"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void move(Move request) { String path = "/api/2.0/dbfs/move"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void put(Put request) { String path = "/api/2.0/dbfs/put"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ReadResponse read(ReadDbfsRequest request) { String path = "/api/2.0/dbfs/read"; - return apiClient.GET(path, request, ReadResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ReadResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlImpl.java index 41c9803ed..68e14906a 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountAccessControl */ @Generated @@ -20,7 +22,10 @@ public GetAssignableRolesForResourceResponse getAssignableRolesForResource( String.format( "/api/2.0/preview/accounts/%s/access-control/assignable-roles", apiClient.configuredAccountID()); - return apiClient.GET(path, request, GetAssignableRolesForResourceResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetAssignableRolesForResourceResponse.class, headers); } @Override @@ -29,7 +34,10 @@ public RuleSetResponse getRuleSet(GetRuleSetRequest request) { String.format( "/api/2.0/preview/accounts/%s/access-control/rule-sets", apiClient.configuredAccountID()); - return apiClient.GET(path, request, RuleSetResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, RuleSetResponse.class, headers); } @Override @@ -38,6 +46,10 @@ public RuleSetResponse updateRuleSet(UpdateRuleSetRequest request) { String.format( "/api/2.0/preview/accounts/%s/access-control/rule-sets", apiClient.configuredAccountID()); - return apiClient.PUT(path, request, RuleSetResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, RuleSetResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlProxyImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlProxyImpl.java index 9f17b9e14..609675279 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlProxyImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlProxyImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountAccessControlProxy */ @Generated @@ -17,18 +19,28 @@ public AccountAccessControlProxyImpl(ApiClient apiClient) { public GetAssignableRolesForResourceResponse getAssignableRolesForResource( GetAssignableRolesForResourceRequest request) { String path = "/api/2.0/preview/accounts/access-control/assignable-roles"; - return apiClient.GET(path, request, GetAssignableRolesForResourceResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetAssignableRolesForResourceResponse.class, headers); } @Override public RuleSetResponse getRuleSet(GetRuleSetRequest request) { String path = "/api/2.0/preview/accounts/access-control/rule-sets"; - return apiClient.GET(path, request, RuleSetResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, RuleSetResponse.class, headers); } @Override public RuleSetResponse updateRuleSet(UpdateRuleSetRequest request) { String path = "/api/2.0/preview/accounts/access-control/rule-sets"; - return apiClient.PUT(path, request, RuleSetResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, RuleSetResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java index 5328fcf17..be3c567e1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountGroups */ @Generated @@ -17,7 +19,11 @@ public AccountGroupsImpl(ApiClient apiClient) { public Group create(Group request) { String path = String.format("/api/2.0/accounts/%s/scim/v2/Groups", apiClient.configuredAccountID()); - return apiClient.POST(path, request, Group.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Group.class, headers); } @Override @@ -26,7 +32,9 @@ public void delete(DeleteAccountGroupRequest request) { String.format( "/api/2.0/accounts/%s/scim/v2/Groups/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -35,14 +43,20 @@ public Group get(GetAccountGroupRequest request) { String.format( "/api/2.0/accounts/%s/scim/v2/Groups/%s", apiClient.configuredAccountID(), request.getId()); - return apiClient.GET(path, request, Group.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Group.class, headers); } @Override public ListGroupsResponse list(ListAccountGroupsRequest request) { String path = String.format("/api/2.0/accounts/%s/scim/v2/Groups", apiClient.configuredAccountID()); - return apiClient.GET(path, request, ListGroupsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListGroupsResponse.class, headers); } @Override @@ -51,7 +65,11 @@ public void patch(PartialUpdate request) { String.format( "/api/2.0/accounts/%s/scim/v2/Groups/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override @@ -60,6 +78,10 @@ public void update(Group request) { String.format( "/api/2.0/accounts/%s/scim/v2/Groups/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java index d416c2c77..fb2388aa0 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountServicePrincipals */ @Generated @@ -18,7 +20,11 @@ public ServicePrincipal create(ServicePrincipal request) { String path = String.format( "/api/2.0/accounts/%s/scim/v2/ServicePrincipals", apiClient.configuredAccountID()); - return apiClient.POST(path, request, ServicePrincipal.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ServicePrincipal.class, headers); } @Override @@ -27,7 +33,9 @@ public void delete(DeleteAccountServicePrincipalRequest request) { String.format( "/api/2.0/accounts/%s/scim/v2/ServicePrincipals/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -36,7 +44,10 @@ public ServicePrincipal get(GetAccountServicePrincipalRequest request) { String.format( "/api/2.0/accounts/%s/scim/v2/ServicePrincipals/%s", apiClient.configuredAccountID(), request.getId()); - return apiClient.GET(path, request, ServicePrincipal.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ServicePrincipal.class, headers); } @Override @@ -44,7 +55,10 @@ public ListServicePrincipalResponse list(ListAccountServicePrincipalsRequest req String path = String.format( "/api/2.0/accounts/%s/scim/v2/ServicePrincipals", apiClient.configuredAccountID()); - return apiClient.GET(path, request, ListServicePrincipalResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListServicePrincipalResponse.class, headers); } @Override @@ -53,7 +67,11 @@ public void patch(PartialUpdate request) { String.format( "/api/2.0/accounts/%s/scim/v2/ServicePrincipals/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override @@ -62,6 +80,10 @@ public void update(ServicePrincipal request) { String.format( "/api/2.0/accounts/%s/scim/v2/ServicePrincipals/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java index 2bff4396d..53dc79208 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountUsers */ @Generated @@ -17,7 +19,11 @@ public AccountUsersImpl(ApiClient apiClient) { public User create(User request) { String path = String.format("/api/2.0/accounts/%s/scim/v2/Users", apiClient.configuredAccountID()); - return apiClient.POST(path, request, User.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, User.class, headers); } @Override @@ -26,7 +32,9 @@ public void delete(DeleteAccountUserRequest request) { String.format( "/api/2.0/accounts/%s/scim/v2/Users/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -35,14 +43,20 @@ public User get(GetAccountUserRequest request) { String.format( "/api/2.0/accounts/%s/scim/v2/Users/%s", apiClient.configuredAccountID(), request.getId()); - return apiClient.GET(path, request, User.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, User.class, headers); } @Override public ListUsersResponse list(ListAccountUsersRequest request) { String path = String.format("/api/2.0/accounts/%s/scim/v2/Users", apiClient.configuredAccountID()); - return apiClient.GET(path, request, ListUsersResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListUsersResponse.class, headers); } @Override @@ -51,7 +65,11 @@ public void patch(PartialUpdate request) { String.format( "/api/2.0/accounts/%s/scim/v2/Users/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override @@ -60,6 +78,10 @@ public void update(User request) { String.format( "/api/2.0/accounts/%s/scim/v2/Users/%s", apiClient.configuredAccountID(), request.getId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/CurrentUserImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/CurrentUserImpl.java index 481814412..45e3f627e 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/CurrentUserImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/CurrentUserImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of CurrentUser */ @Generated @@ -16,6 +18,9 @@ public CurrentUserImpl(ApiClient apiClient) { @Override public User me() { String path = "/api/2.0/preview/scim/v2/Me"; - return apiClient.GET(path, User.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, User.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java index 1ac900afb..bd9351a80 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Groups */ @Generated @@ -16,36 +18,56 @@ public GroupsImpl(ApiClient apiClient) { @Override public Group create(Group request) { String path = "/api/2.0/preview/scim/v2/Groups"; - return apiClient.POST(path, request, Group.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Group.class, headers); } @Override public void delete(DeleteGroupRequest request) { String path = String.format("/api/2.0/preview/scim/v2/Groups/%s", request.getId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public Group get(GetGroupRequest request) { String path = String.format("/api/2.0/preview/scim/v2/Groups/%s", request.getId()); - return apiClient.GET(path, request, Group.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Group.class, headers); } @Override public ListGroupsResponse list(ListGroupsRequest request) { String path = "/api/2.0/preview/scim/v2/Groups"; - return apiClient.GET(path, request, ListGroupsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListGroupsResponse.class, headers); } @Override public void patch(PartialUpdate request) { String path = String.format("/api/2.0/preview/scim/v2/Groups/%s", request.getId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override public void update(Group request) { String path = String.format("/api/2.0/preview/scim/v2/Groups/%s", request.getId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/PermissionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/PermissionsImpl.java index b0ae26b2b..9491b26b6 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/PermissionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/PermissionsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Permissions */ @Generated @@ -19,7 +21,10 @@ public ObjectPermissions get(GetPermissionRequest request) { String.format( "/api/2.0/permissions/%s/%s", request.getRequestObjectType(), request.getRequestObjectId()); - return apiClient.GET(path, request, ObjectPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ObjectPermissions.class, headers); } @Override @@ -28,7 +33,10 @@ public GetPermissionLevelsResponse getPermissionLevels(GetPermissionLevelsReques String.format( "/api/2.0/permissions/%s/%s/permissionLevels", request.getRequestObjectType(), request.getRequestObjectId()); - return apiClient.GET(path, request, GetPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetPermissionLevelsResponse.class, headers); } @Override @@ -37,7 +45,11 @@ public ObjectPermissions set(PermissionsRequest request) { String.format( "/api/2.0/permissions/%s/%s", request.getRequestObjectType(), request.getRequestObjectId()); - return apiClient.PUT(path, request, ObjectPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, ObjectPermissions.class, headers); } @Override @@ -46,6 +58,10 @@ public ObjectPermissions update(PermissionsRequest request) { String.format( "/api/2.0/permissions/%s/%s", request.getRequestObjectType(), request.getRequestObjectId()); - return apiClient.PATCH(path, request, ObjectPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ObjectPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java index c9186a089..129dd234d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of ServicePrincipals */ @Generated @@ -16,36 +18,56 @@ public ServicePrincipalsImpl(ApiClient apiClient) { @Override public ServicePrincipal create(ServicePrincipal request) { String path = "/api/2.0/preview/scim/v2/ServicePrincipals"; - return apiClient.POST(path, request, ServicePrincipal.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ServicePrincipal.class, headers); } @Override public void delete(DeleteServicePrincipalRequest request) { String path = String.format("/api/2.0/preview/scim/v2/ServicePrincipals/%s", request.getId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public ServicePrincipal get(GetServicePrincipalRequest request) { String path = String.format("/api/2.0/preview/scim/v2/ServicePrincipals/%s", request.getId()); - return apiClient.GET(path, request, ServicePrincipal.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ServicePrincipal.class, headers); } @Override public ListServicePrincipalResponse list(ListServicePrincipalsRequest request) { String path = "/api/2.0/preview/scim/v2/ServicePrincipals"; - return apiClient.GET(path, request, ListServicePrincipalResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListServicePrincipalResponse.class, headers); } @Override public void patch(PartialUpdate request) { String path = String.format("/api/2.0/preview/scim/v2/ServicePrincipals/%s", request.getId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override public void update(ServicePrincipal request) { String path = String.format("/api/2.0/preview/scim/v2/ServicePrincipals/%s", request.getId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java index 358cbec46..f56349403 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Users */ @Generated @@ -16,60 +18,94 @@ public UsersImpl(ApiClient apiClient) { @Override public User create(User request) { String path = "/api/2.0/preview/scim/v2/Users"; - return apiClient.POST(path, request, User.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, User.class, headers); } @Override public void delete(DeleteUserRequest request) { String path = String.format("/api/2.0/preview/scim/v2/Users/%s", request.getId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public User get(GetUserRequest request) { String path = String.format("/api/2.0/preview/scim/v2/Users/%s", request.getId()); - return apiClient.GET(path, request, User.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, User.class, headers); } @Override public GetPasswordPermissionLevelsResponse getPasswordPermissionLevels() { String path = "/api/2.0/permissions/authorization/passwords/permissionLevels"; - return apiClient.GET(path, GetPasswordPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetPasswordPermissionLevelsResponse.class, headers); } @Override public PasswordPermissions getPasswordPermissions() { String path = "/api/2.0/permissions/authorization/passwords"; - return apiClient.GET(path, PasswordPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, PasswordPermissions.class, headers); } @Override public ListUsersResponse list(ListUsersRequest request) { String path = "/api/2.0/preview/scim/v2/Users"; - return apiClient.GET(path, request, ListUsersResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListUsersResponse.class, headers); } @Override public void patch(PartialUpdate request) { String path = String.format("/api/2.0/preview/scim/v2/Users/%s", request.getId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override public PasswordPermissions setPasswordPermissions(PasswordPermissionsRequest request) { String path = "/api/2.0/permissions/authorization/passwords"; - return apiClient.PUT(path, request, PasswordPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, PasswordPermissions.class, headers); } @Override public void update(User request) { String path = String.format("/api/2.0/preview/scim/v2/Users/%s", request.getId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } @Override public PasswordPermissions updatePasswordPermissions(PasswordPermissionsRequest request) { String path = "/api/2.0/permissions/authorization/passwords"; - return apiClient.PATCH(path, request, PasswordPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, PasswordPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/WorkspaceAssignmentImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/WorkspaceAssignmentImpl.java index e68463959..1a5c518b9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/WorkspaceAssignmentImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/WorkspaceAssignmentImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of WorkspaceAssignment */ @Generated @@ -19,7 +21,10 @@ public void delete(DeleteWorkspaceAssignmentRequest request) { String.format( "/api/2.0/accounts/%s/workspaces/%s/permissionassignments/principals/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -28,7 +33,10 @@ public WorkspacePermissions get(GetWorkspaceAssignmentRequest request) { String.format( "/api/2.0/accounts/%s/workspaces/%s/permissionassignments/permissions", apiClient.configuredAccountID(), request.getWorkspaceId()); - return apiClient.GET(path, request, WorkspacePermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, WorkspacePermissions.class, headers); } @Override @@ -37,7 +45,10 @@ public PermissionAssignments list(ListWorkspaceAssignmentRequest request) { String.format( "/api/2.0/accounts/%s/workspaces/%s/permissionassignments", apiClient.configuredAccountID(), request.getWorkspaceId()); - return apiClient.GET(path, request, PermissionAssignments.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, PermissionAssignments.class, headers); } @Override @@ -46,6 +57,10 @@ public void update(UpdateWorkspaceAssignments request) { String.format( "/api/2.0/accounts/%s/workspaces/%s/permissionassignments/principals/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobsImpl.java index ff132cc96..c853b3e1b 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Jobs */ @Generated @@ -16,43 +18,69 @@ public JobsImpl(ApiClient apiClient) { @Override public void cancelAllRuns(CancelAllRuns request) { String path = "/api/2.1/jobs/runs/cancel-all"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void cancelRun(CancelRun request) { String path = "/api/2.1/jobs/runs/cancel"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public CreateResponse create(CreateJob request) { String path = "/api/2.1/jobs/create"; - return apiClient.POST(path, request, CreateResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateResponse.class, headers); } @Override public void delete(DeleteJob request) { String path = "/api/2.1/jobs/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void deleteRun(DeleteRun request) { String path = "/api/2.1/jobs/runs/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ExportRunOutput exportRun(ExportRunRequest request) { String path = "/api/2.1/jobs/runs/export"; - return apiClient.GET(path, request, ExportRunOutput.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ExportRunOutput.class, headers); } @Override public Job get(GetJobRequest request) { String path = "/api/2.1/jobs/get"; - return apiClient.GET(path, request, Job.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Job.class, headers); } @Override @@ -60,78 +88,124 @@ public GetJobPermissionLevelsResponse getJobPermissionLevels( GetJobPermissionLevelsRequest request) { String path = String.format("/api/2.0/permissions/jobs/%s/permissionLevels", request.getJobId()); - return apiClient.GET(path, request, GetJobPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetJobPermissionLevelsResponse.class, headers); } @Override public JobPermissions getJobPermissions(GetJobPermissionsRequest request) { String path = String.format("/api/2.0/permissions/jobs/%s", request.getJobId()); - return apiClient.GET(path, request, JobPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, JobPermissions.class, headers); } @Override public Run getRun(GetRunRequest request) { String path = "/api/2.1/jobs/runs/get"; - return apiClient.GET(path, request, Run.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Run.class, headers); } @Override public RunOutput getRunOutput(GetRunOutputRequest request) { String path = "/api/2.1/jobs/runs/get-output"; - return apiClient.GET(path, request, RunOutput.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, RunOutput.class, headers); } @Override public ListJobsResponse list(ListJobsRequest request) { String path = "/api/2.1/jobs/list"; - return apiClient.GET(path, request, ListJobsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListJobsResponse.class, headers); } @Override public ListRunsResponse listRuns(ListRunsRequest request) { String path = "/api/2.1/jobs/runs/list"; - return apiClient.GET(path, request, ListRunsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListRunsResponse.class, headers); } @Override public RepairRunResponse repairRun(RepairRun request) { String path = "/api/2.1/jobs/runs/repair"; - return apiClient.POST(path, request, RepairRunResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, RepairRunResponse.class, headers); } @Override public void reset(ResetJob request) { String path = "/api/2.1/jobs/reset"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public RunNowResponse runNow(RunNow request) { String path = "/api/2.1/jobs/run-now"; - return apiClient.POST(path, request, RunNowResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, RunNowResponse.class, headers); } @Override public JobPermissions setJobPermissions(JobPermissionsRequest request) { String path = String.format("/api/2.0/permissions/jobs/%s", request.getJobId()); - return apiClient.PUT(path, request, JobPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, JobPermissions.class, headers); } @Override public SubmitRunResponse submit(SubmitRun request) { String path = "/api/2.1/jobs/runs/submit"; - return apiClient.POST(path, request, SubmitRunResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, SubmitRunResponse.class, headers); } @Override public void update(UpdateJob request) { String path = "/api/2.1/jobs/update"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public JobPermissions updateJobPermissions(JobPermissionsRequest request) { String path = String.format("/api/2.0/permissions/jobs/%s", request.getJobId()); - return apiClient.PATCH(path, request, JobPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, JobPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java index dc5fb0f8c..3206a0f34 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Experiments */ @Generated @@ -16,43 +18,69 @@ public ExperimentsImpl(ApiClient apiClient) { @Override public CreateExperimentResponse createExperiment(CreateExperiment request) { String path = "/api/2.0/mlflow/experiments/create"; - return apiClient.POST(path, request, CreateExperimentResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateExperimentResponse.class, headers); } @Override public CreateRunResponse createRun(CreateRun request) { String path = "/api/2.0/mlflow/runs/create"; - return apiClient.POST(path, request, CreateRunResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateRunResponse.class, headers); } @Override public void deleteExperiment(DeleteExperiment request) { String path = "/api/2.0/mlflow/experiments/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void deleteRun(DeleteRun request) { String path = "/api/2.0/mlflow/runs/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void deleteTag(DeleteTag request) { String path = "/api/2.0/mlflow/runs/delete-tag"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public GetExperimentByNameResponse getByName(GetByNameRequest request) { String path = "/api/2.0/mlflow/experiments/get-by-name"; - return apiClient.GET(path, request, GetExperimentByNameResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetExperimentByNameResponse.class, headers); } @Override public Experiment getExperiment(GetExperimentRequest request) { String path = "/api/2.0/mlflow/experiments/get"; - return apiClient.GET(path, request, Experiment.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Experiment.class, headers); } @Override @@ -61,126 +89,204 @@ public GetExperimentPermissionLevelsResponse getExperimentPermissionLevels( String path = String.format( "/api/2.0/permissions/experiments/%s/permissionLevels", request.getExperimentId()); - return apiClient.GET(path, request, GetExperimentPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetExperimentPermissionLevelsResponse.class, headers); } @Override public ExperimentPermissions getExperimentPermissions(GetExperimentPermissionsRequest request) { String path = String.format("/api/2.0/permissions/experiments/%s", request.getExperimentId()); - return apiClient.GET(path, request, ExperimentPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ExperimentPermissions.class, headers); } @Override public GetMetricHistoryResponse getHistory(GetHistoryRequest request) { String path = "/api/2.0/mlflow/metrics/get-history"; - return apiClient.GET(path, request, GetMetricHistoryResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetMetricHistoryResponse.class, headers); } @Override public GetRunResponse getRun(GetRunRequest request) { String path = "/api/2.0/mlflow/runs/get"; - return apiClient.GET(path, request, GetRunResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetRunResponse.class, headers); } @Override public ListArtifactsResponse listArtifacts(ListArtifactsRequest request) { String path = "/api/2.0/mlflow/artifacts/list"; - return apiClient.GET(path, request, ListArtifactsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListArtifactsResponse.class, headers); } @Override public ListExperimentsResponse listExperiments(ListExperimentsRequest request) { String path = "/api/2.0/mlflow/experiments/list"; - return apiClient.GET(path, request, ListExperimentsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListExperimentsResponse.class, headers); } @Override public void logBatch(LogBatch request) { String path = "/api/2.0/mlflow/runs/log-batch"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void logInputs(LogInputs request) { String path = "/api/2.0/mlflow/runs/log-inputs"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void logMetric(LogMetric request) { String path = "/api/2.0/mlflow/runs/log-metric"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void logModel(LogModel request) { String path = "/api/2.0/mlflow/runs/log-model"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void logParam(LogParam request) { String path = "/api/2.0/mlflow/runs/log-parameter"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void restoreExperiment(RestoreExperiment request) { String path = "/api/2.0/mlflow/experiments/restore"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void restoreRun(RestoreRun request) { String path = "/api/2.0/mlflow/runs/restore"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public SearchExperimentsResponse searchExperiments(SearchExperiments request) { String path = "/api/2.0/mlflow/experiments/search"; - return apiClient.POST(path, request, SearchExperimentsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, SearchExperimentsResponse.class, headers); } @Override public SearchRunsResponse searchRuns(SearchRuns request) { String path = "/api/2.0/mlflow/runs/search"; - return apiClient.POST(path, request, SearchRunsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, SearchRunsResponse.class, headers); } @Override public ExperimentPermissions setExperimentPermissions(ExperimentPermissionsRequest request) { String path = String.format("/api/2.0/permissions/experiments/%s", request.getExperimentId()); - return apiClient.PUT(path, request, ExperimentPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, ExperimentPermissions.class, headers); } @Override public void setExperimentTag(SetExperimentTag request) { String path = "/api/2.0/mlflow/experiments/set-experiment-tag"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void setTag(SetTag request) { String path = "/api/2.0/mlflow/runs/set-tag"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void updateExperiment(UpdateExperiment request) { String path = "/api/2.0/mlflow/experiments/update"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ExperimentPermissions updateExperimentPermissions(ExperimentPermissionsRequest request) { String path = String.format("/api/2.0/permissions/experiments/%s", request.getExperimentId()); - return apiClient.PATCH(path, request, ExperimentPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ExperimentPermissions.class, headers); } @Override public UpdateRunResponse updateRun(UpdateRun request) { String path = "/api/2.0/mlflow/runs/update"; - return apiClient.POST(path, request, UpdateRunResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, UpdateRunResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryImpl.java index 868d74e7e..8cc8249bf 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of ModelRegistry */ @Generated @@ -17,104 +19,162 @@ public ModelRegistryImpl(ApiClient apiClient) { public ApproveTransitionRequestResponse approveTransitionRequest( ApproveTransitionRequest request) { String path = "/api/2.0/mlflow/transition-requests/approve"; - return apiClient.POST(path, request, ApproveTransitionRequestResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ApproveTransitionRequestResponse.class, headers); } @Override public CreateCommentResponse createComment(CreateComment request) { String path = "/api/2.0/mlflow/comments/create"; - return apiClient.POST(path, request, CreateCommentResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateCommentResponse.class, headers); } @Override public CreateModelResponse createModel(CreateModelRequest request) { String path = "/api/2.0/mlflow/registered-models/create"; - return apiClient.POST(path, request, CreateModelResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateModelResponse.class, headers); } @Override public CreateModelVersionResponse createModelVersion(CreateModelVersionRequest request) { String path = "/api/2.0/mlflow/model-versions/create"; - return apiClient.POST(path, request, CreateModelVersionResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateModelVersionResponse.class, headers); } @Override public CreateTransitionRequestResponse createTransitionRequest(CreateTransitionRequest request) { String path = "/api/2.0/mlflow/transition-requests/create"; - return apiClient.POST(path, request, CreateTransitionRequestResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateTransitionRequestResponse.class, headers); } @Override public CreateWebhookResponse createWebhook(CreateRegistryWebhook request) { String path = "/api/2.0/mlflow/registry-webhooks/create"; - return apiClient.POST(path, request, CreateWebhookResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateWebhookResponse.class, headers); } @Override public void deleteComment(DeleteCommentRequest request) { String path = "/api/2.0/mlflow/comments/delete"; - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public void deleteModel(DeleteModelRequest request) { String path = "/api/2.0/mlflow/registered-models/delete"; - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public void deleteModelTag(DeleteModelTagRequest request) { String path = "/api/2.0/mlflow/registered-models/delete-tag"; - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public void deleteModelVersion(DeleteModelVersionRequest request) { String path = "/api/2.0/mlflow/model-versions/delete"; - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public void deleteModelVersionTag(DeleteModelVersionTagRequest request) { String path = "/api/2.0/mlflow/model-versions/delete-tag"; - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public void deleteTransitionRequest(DeleteTransitionRequestRequest request) { String path = "/api/2.0/mlflow/transition-requests/delete"; - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public void deleteWebhook(DeleteWebhookRequest request) { String path = "/api/2.0/mlflow/registry-webhooks/delete"; - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public GetLatestVersionsResponse getLatestVersions(GetLatestVersionsRequest request) { String path = "/api/2.0/mlflow/registered-models/get-latest-versions"; - return apiClient.POST(path, request, GetLatestVersionsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, GetLatestVersionsResponse.class, headers); } @Override public GetModelResponse getModel(GetModelRequest request) { String path = "/api/2.0/mlflow/databricks/registered-models/get"; - return apiClient.GET(path, request, GetModelResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetModelResponse.class, headers); } @Override public GetModelVersionResponse getModelVersion(GetModelVersionRequest request) { String path = "/api/2.0/mlflow/model-versions/get"; - return apiClient.GET(path, request, GetModelVersionResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetModelVersionResponse.class, headers); } @Override public GetModelVersionDownloadUriResponse getModelVersionDownloadUri( GetModelVersionDownloadUriRequest request) { String path = "/api/2.0/mlflow/model-versions/get-download-uri"; - return apiClient.GET(path, request, GetModelVersionDownloadUriResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetModelVersionDownloadUriResponse.class, headers); } @Override @@ -124,7 +184,10 @@ public GetRegisteredModelPermissionLevelsResponse getRegisteredModelPermissionLe String.format( "/api/2.0/permissions/registered-models/%s/permissionLevels", request.getRegisteredModelId()); - return apiClient.GET(path, request, GetRegisteredModelPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetRegisteredModelPermissionLevelsResponse.class, headers); } @Override @@ -132,62 +195,96 @@ public RegisteredModelPermissions getRegisteredModelPermissions( GetRegisteredModelPermissionsRequest request) { String path = String.format("/api/2.0/permissions/registered-models/%s", request.getRegisteredModelId()); - return apiClient.GET(path, request, RegisteredModelPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, RegisteredModelPermissions.class, headers); } @Override public ListModelsResponse listModels(ListModelsRequest request) { String path = "/api/2.0/mlflow/registered-models/list"; - return apiClient.GET(path, request, ListModelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListModelsResponse.class, headers); } @Override public ListTransitionRequestsResponse listTransitionRequests( ListTransitionRequestsRequest request) { String path = "/api/2.0/mlflow/transition-requests/list"; - return apiClient.GET(path, request, ListTransitionRequestsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListTransitionRequestsResponse.class, headers); } @Override public ListRegistryWebhooks listWebhooks(ListWebhooksRequest request) { String path = "/api/2.0/mlflow/registry-webhooks/list"; - return apiClient.GET(path, request, ListRegistryWebhooks.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListRegistryWebhooks.class, headers); } @Override public RejectTransitionRequestResponse rejectTransitionRequest(RejectTransitionRequest request) { String path = "/api/2.0/mlflow/transition-requests/reject"; - return apiClient.POST(path, request, RejectTransitionRequestResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, RejectTransitionRequestResponse.class, headers); } @Override public RenameModelResponse renameModel(RenameModelRequest request) { String path = "/api/2.0/mlflow/registered-models/rename"; - return apiClient.POST(path, request, RenameModelResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, RenameModelResponse.class, headers); } @Override public SearchModelVersionsResponse searchModelVersions(SearchModelVersionsRequest request) { String path = "/api/2.0/mlflow/model-versions/search"; - return apiClient.GET(path, request, SearchModelVersionsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, SearchModelVersionsResponse.class, headers); } @Override public SearchModelsResponse searchModels(SearchModelsRequest request) { String path = "/api/2.0/mlflow/registered-models/search"; - return apiClient.GET(path, request, SearchModelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, SearchModelsResponse.class, headers); } @Override public void setModelTag(SetModelTagRequest request) { String path = "/api/2.0/mlflow/registered-models/set-tag"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void setModelVersionTag(SetModelVersionTagRequest request) { String path = "/api/2.0/mlflow/model-versions/set-tag"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override @@ -195,37 +292,61 @@ public RegisteredModelPermissions setRegisteredModelPermissions( RegisteredModelPermissionsRequest request) { String path = String.format("/api/2.0/permissions/registered-models/%s", request.getRegisteredModelId()); - return apiClient.PUT(path, request, RegisteredModelPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, RegisteredModelPermissions.class, headers); } @Override public TestRegistryWebhookResponse testRegistryWebhook(TestRegistryWebhookRequest request) { String path = "/api/2.0/mlflow/registry-webhooks/test"; - return apiClient.POST(path, request, TestRegistryWebhookResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, TestRegistryWebhookResponse.class, headers); } @Override public TransitionStageResponse transitionStage(TransitionModelVersionStageDatabricks request) { String path = "/api/2.0/mlflow/databricks/model-versions/transition-stage"; - return apiClient.POST(path, request, TransitionStageResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, TransitionStageResponse.class, headers); } @Override public UpdateCommentResponse updateComment(UpdateComment request) { String path = "/api/2.0/mlflow/comments/update"; - return apiClient.PATCH(path, request, UpdateCommentResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, UpdateCommentResponse.class, headers); } @Override public void updateModel(UpdateModelRequest request) { String path = "/api/2.0/mlflow/registered-models/update"; - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override public void updateModelVersion(UpdateModelVersionRequest request) { String path = "/api/2.0/mlflow/model-versions/update"; - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override @@ -233,12 +354,20 @@ public RegisteredModelPermissions updateRegisteredModelPermissions( RegisteredModelPermissionsRequest request) { String path = String.format("/api/2.0/permissions/registered-models/%s", request.getRegisteredModelId()); - return apiClient.PATCH(path, request, RegisteredModelPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, RegisteredModelPermissions.class, headers); } @Override public void updateWebhook(UpdateRegistryWebhook request) { String path = "/api/2.0/mlflow/registry-webhooks/update"; - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/CustomAppIntegrationImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/CustomAppIntegrationImpl.java index d15e5f85f..654990006 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/CustomAppIntegrationImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/CustomAppIntegrationImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of CustomAppIntegration */ @Generated @@ -18,7 +20,11 @@ public CreateCustomAppIntegrationOutput create(CreateCustomAppIntegration reques String path = String.format( "/api/2.0/accounts/%s/oauth2/custom-app-integrations", apiClient.configuredAccountID()); - return apiClient.POST(path, request, CreateCustomAppIntegrationOutput.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateCustomAppIntegrationOutput.class, headers); } @Override @@ -27,7 +33,10 @@ public void delete(DeleteCustomAppIntegrationRequest request) { String.format( "/api/2.0/accounts/%s/oauth2/custom-app-integrations/%s", apiClient.configuredAccountID(), request.getIntegrationId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -36,7 +45,10 @@ public GetCustomAppIntegrationOutput get(GetCustomAppIntegrationRequest request) String.format( "/api/2.0/accounts/%s/oauth2/custom-app-integrations/%s", apiClient.configuredAccountID(), request.getIntegrationId()); - return apiClient.GET(path, request, GetCustomAppIntegrationOutput.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetCustomAppIntegrationOutput.class, headers); } @Override @@ -44,7 +56,10 @@ public GetCustomAppIntegrationsOutput list() { String path = String.format( "/api/2.0/accounts/%s/oauth2/custom-app-integrations", apiClient.configuredAccountID()); - return apiClient.GET(path, GetCustomAppIntegrationsOutput.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetCustomAppIntegrationsOutput.class, headers); } @Override @@ -53,6 +68,10 @@ public void update(UpdateCustomAppIntegration request) { String.format( "/api/2.0/accounts/%s/oauth2/custom-app-integrations/%s", apiClient.configuredAccountID(), request.getIntegrationId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/OAuthEnrollmentImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/OAuthEnrollmentImpl.java index 2b8e93789..8cb42ad04 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/OAuthEnrollmentImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/OAuthEnrollmentImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of OAuthEnrollment */ @Generated @@ -17,13 +19,19 @@ public OAuthEnrollmentImpl(ApiClient apiClient) { public void create(CreateOAuthEnrollment request) { String path = String.format("/api/2.0/accounts/%s/oauth2/enrollment", apiClient.configuredAccountID()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public OAuthEnrollmentStatus get() { String path = String.format("/api/2.0/accounts/%s/oauth2/enrollment", apiClient.configuredAccountID()); - return apiClient.GET(path, OAuthEnrollmentStatus.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, OAuthEnrollmentStatus.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/PublishedAppIntegrationImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/PublishedAppIntegrationImpl.java index c86390344..387514b89 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/PublishedAppIntegrationImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/PublishedAppIntegrationImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of PublishedAppIntegration */ @Generated @@ -19,7 +21,11 @@ public CreatePublishedAppIntegrationOutput create(CreatePublishedAppIntegration String.format( "/api/2.0/accounts/%s/oauth2/published-app-integrations", apiClient.configuredAccountID()); - return apiClient.POST(path, request, CreatePublishedAppIntegrationOutput.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreatePublishedAppIntegrationOutput.class, headers); } @Override @@ -28,7 +34,10 @@ public void delete(DeletePublishedAppIntegrationRequest request) { String.format( "/api/2.0/accounts/%s/oauth2/published-app-integrations/%s", apiClient.configuredAccountID(), request.getIntegrationId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -37,7 +46,10 @@ public GetPublishedAppIntegrationOutput get(GetPublishedAppIntegrationRequest re String.format( "/api/2.0/accounts/%s/oauth2/published-app-integrations/%s", apiClient.configuredAccountID(), request.getIntegrationId()); - return apiClient.GET(path, request, GetPublishedAppIntegrationOutput.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetPublishedAppIntegrationOutput.class, headers); } @Override @@ -46,7 +58,10 @@ public GetPublishedAppIntegrationsOutput list() { String.format( "/api/2.0/accounts/%s/oauth2/published-app-integrations", apiClient.configuredAccountID()); - return apiClient.GET(path, GetPublishedAppIntegrationsOutput.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetPublishedAppIntegrationsOutput.class, headers); } @Override @@ -55,6 +70,10 @@ public void update(UpdatePublishedAppIntegration request) { String.format( "/api/2.0/accounts/%s/oauth2/published-app-integrations/%s", apiClient.configuredAccountID(), request.getIntegrationId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java index cc44a778d..81dc224d5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of ServicePrincipalSecrets */ @Generated @@ -19,7 +21,10 @@ public CreateServicePrincipalSecretResponse create(CreateServicePrincipalSecretR String.format( "/api/2.0/accounts/%s/servicePrincipals/%s/credentials/secrets", apiClient.configuredAccountID(), request.getServicePrincipalId()); - return apiClient.POST(path, request, CreateServicePrincipalSecretResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.POST(path, request, CreateServicePrincipalSecretResponse.class, headers); } @Override @@ -30,7 +35,9 @@ public void delete(DeleteServicePrincipalSecretRequest request) { apiClient.configuredAccountID(), request.getServicePrincipalId(), request.getSecretId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -39,6 +46,9 @@ public ListServicePrincipalSecretsResponse list(ListServicePrincipalSecretsReque String.format( "/api/2.0/accounts/%s/servicePrincipals/%s/credentials/secrets", apiClient.configuredAccountID(), request.getServicePrincipalId()); - return apiClient.GET(path, request, ListServicePrincipalSecretsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListServicePrincipalSecretsResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelinesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelinesImpl.java index 27cbb9a83..6cb8551e5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelinesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelinesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Pipelines */ @Generated @@ -16,19 +18,29 @@ public PipelinesImpl(ApiClient apiClient) { @Override public CreatePipelineResponse create(CreatePipeline request) { String path = "/api/2.0/pipelines"; - return apiClient.POST(path, request, CreatePipelineResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreatePipelineResponse.class, headers); } @Override public void delete(DeletePipelineRequest request) { String path = String.format("/api/2.0/pipelines/%s", request.getPipelineId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public GetPipelineResponse get(GetPipelineRequest request) { String path = String.format("/api/2.0/pipelines/%s", request.getPipelineId()); - return apiClient.GET(path, request, GetPipelineResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetPipelineResponse.class, headers); } @Override @@ -37,13 +49,19 @@ public GetPipelinePermissionLevelsResponse getPipelinePermissionLevels( String path = String.format( "/api/2.0/permissions/pipelines/%s/permissionLevels", request.getPipelineId()); - return apiClient.GET(path, request, GetPipelinePermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetPipelinePermissionLevelsResponse.class, headers); } @Override public PipelinePermissions getPipelinePermissions(GetPipelinePermissionsRequest request) { String path = String.format("/api/2.0/permissions/pipelines/%s", request.getPipelineId()); - return apiClient.GET(path, request, PipelinePermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, PipelinePermissions.class, headers); } @Override @@ -51,60 +69,94 @@ public GetUpdateResponse getUpdate(GetUpdateRequest request) { String path = String.format( "/api/2.0/pipelines/%s/updates/%s", request.getPipelineId(), request.getUpdateId()); - return apiClient.GET(path, request, GetUpdateResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetUpdateResponse.class, headers); } @Override public ListPipelineEventsResponse listPipelineEvents(ListPipelineEventsRequest request) { String path = String.format("/api/2.0/pipelines/%s/events", request.getPipelineId()); - return apiClient.GET(path, request, ListPipelineEventsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListPipelineEventsResponse.class, headers); } @Override public ListPipelinesResponse listPipelines(ListPipelinesRequest request) { String path = "/api/2.0/pipelines"; - return apiClient.GET(path, request, ListPipelinesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListPipelinesResponse.class, headers); } @Override public ListUpdatesResponse listUpdates(ListUpdatesRequest request) { String path = String.format("/api/2.0/pipelines/%s/updates", request.getPipelineId()); - return apiClient.GET(path, request, ListUpdatesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListUpdatesResponse.class, headers); } @Override public void reset(ResetRequest request) { String path = String.format("/api/2.0/pipelines/%s/reset", request.getPipelineId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public PipelinePermissions setPipelinePermissions(PipelinePermissionsRequest request) { String path = String.format("/api/2.0/permissions/pipelines/%s", request.getPipelineId()); - return apiClient.PUT(path, request, PipelinePermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, PipelinePermissions.class, headers); } @Override public StartUpdateResponse startUpdate(StartUpdate request) { String path = String.format("/api/2.0/pipelines/%s/updates", request.getPipelineId()); - return apiClient.POST(path, request, StartUpdateResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, StartUpdateResponse.class, headers); } @Override public void stop(StopRequest request) { String path = String.format("/api/2.0/pipelines/%s/stop", request.getPipelineId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void update(EditPipeline request) { String path = String.format("/api/2.0/pipelines/%s", request.getPipelineId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } @Override public PipelinePermissions updatePipelinePermissions(PipelinePermissionsRequest request) { String path = String.format("/api/2.0/permissions/pipelines/%s", request.getPipelineId()); - return apiClient.PATCH(path, request, PipelinePermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, PipelinePermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CredentialsImpl.java index e6c7ee826..fe44997a6 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CredentialsImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Credentials */ @Generated @@ -18,7 +20,11 @@ public CredentialsImpl(ApiClient apiClient) { public Credential create(CreateCredentialRequest request) { String path = String.format("/api/2.0/accounts/%s/credentials", apiClient.configuredAccountID()); - return apiClient.POST(path, request, Credential.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Credential.class, headers); } @Override @@ -27,7 +33,10 @@ public void delete(DeleteCredentialRequest request) { String.format( "/api/2.0/accounts/%s/credentials/%s", apiClient.configuredAccountID(), request.getCredentialsId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -36,13 +45,19 @@ public Credential get(GetCredentialRequest request) { String.format( "/api/2.0/accounts/%s/credentials/%s", apiClient.configuredAccountID(), request.getCredentialsId()); - return apiClient.GET(path, request, Credential.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Credential.class, headers); } @Override public Collection list() { String path = String.format("/api/2.0/accounts/%s/credentials", apiClient.configuredAccountID()); - return apiClient.getCollection(path, null, Credential.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, Credential.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/EncryptionKeysImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/EncryptionKeysImpl.java index 10d82e220..69f5fce58 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/EncryptionKeysImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/EncryptionKeysImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of EncryptionKeys */ @Generated @@ -19,7 +21,11 @@ public CustomerManagedKey create(CreateCustomerManagedKeyRequest request) { String path = String.format( "/api/2.0/accounts/%s/customer-managed-keys", apiClient.configuredAccountID()); - return apiClient.POST(path, request, CustomerManagedKey.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CustomerManagedKey.class, headers); } @Override @@ -28,7 +34,10 @@ public void delete(DeleteEncryptionKeyRequest request) { String.format( "/api/2.0/accounts/%s/customer-managed-keys/%s", apiClient.configuredAccountID(), request.getCustomerManagedKeyId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -37,7 +46,10 @@ public CustomerManagedKey get(GetEncryptionKeyRequest request) { String.format( "/api/2.0/accounts/%s/customer-managed-keys/%s", apiClient.configuredAccountID(), request.getCustomerManagedKeyId()); - return apiClient.GET(path, request, CustomerManagedKey.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, CustomerManagedKey.class, headers); } @Override @@ -45,6 +57,9 @@ public Collection list() { String path = String.format( "/api/2.0/accounts/%s/customer-managed-keys", apiClient.configuredAccountID()); - return apiClient.getCollection(path, null, CustomerManagedKey.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, CustomerManagedKey.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/NetworksImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/NetworksImpl.java index a45f53bb7..c293f2881 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/NetworksImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/NetworksImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Networks */ @Generated @@ -17,7 +19,11 @@ public NetworksImpl(ApiClient apiClient) { @Override public Network create(CreateNetworkRequest request) { String path = String.format("/api/2.0/accounts/%s/networks", apiClient.configuredAccountID()); - return apiClient.POST(path, request, Network.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Network.class, headers); } @Override @@ -26,7 +32,10 @@ public void delete(DeleteNetworkRequest request) { String.format( "/api/2.0/accounts/%s/networks/%s", apiClient.configuredAccountID(), request.getNetworkId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -35,12 +44,18 @@ public Network get(GetNetworkRequest request) { String.format( "/api/2.0/accounts/%s/networks/%s", apiClient.configuredAccountID(), request.getNetworkId()); - return apiClient.GET(path, request, Network.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Network.class, headers); } @Override public Collection list() { String path = String.format("/api/2.0/accounts/%s/networks", apiClient.configuredAccountID()); - return apiClient.getCollection(path, null, Network.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, Network.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/PrivateAccessImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/PrivateAccessImpl.java index 5e8399102..dde0eb486 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/PrivateAccessImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/PrivateAccessImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of PrivateAccess */ @Generated @@ -19,7 +21,11 @@ public PrivateAccessSettings create(UpsertPrivateAccessSettingsRequest request) String path = String.format( "/api/2.0/accounts/%s/private-access-settings", apiClient.configuredAccountID()); - return apiClient.POST(path, request, PrivateAccessSettings.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, PrivateAccessSettings.class, headers); } @Override @@ -28,7 +34,10 @@ public void delete(DeletePrivateAccesRequest request) { String.format( "/api/2.0/accounts/%s/private-access-settings/%s", apiClient.configuredAccountID(), request.getPrivateAccessSettingsId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -37,7 +46,10 @@ public PrivateAccessSettings get(GetPrivateAccesRequest request) { String.format( "/api/2.0/accounts/%s/private-access-settings/%s", apiClient.configuredAccountID(), request.getPrivateAccessSettingsId()); - return apiClient.GET(path, request, PrivateAccessSettings.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, PrivateAccessSettings.class, headers); } @Override @@ -45,7 +57,10 @@ public Collection list() { String path = String.format( "/api/2.0/accounts/%s/private-access-settings", apiClient.configuredAccountID()); - return apiClient.getCollection(path, null, PrivateAccessSettings.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, PrivateAccessSettings.class, headers); } @Override @@ -54,6 +69,10 @@ public void replace(UpsertPrivateAccessSettingsRequest request) { String.format( "/api/2.0/accounts/%s/private-access-settings/%s", apiClient.configuredAccountID(), request.getPrivateAccessSettingsId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/StorageImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/StorageImpl.java index 1be4991a6..87bdc0d93 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/StorageImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/StorageImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Storage */ @Generated @@ -19,7 +21,11 @@ public StorageConfiguration create(CreateStorageConfigurationRequest request) { String path = String.format( "/api/2.0/accounts/%s/storage-configurations", apiClient.configuredAccountID()); - return apiClient.POST(path, request, StorageConfiguration.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, StorageConfiguration.class, headers); } @Override @@ -28,7 +34,10 @@ public void delete(DeleteStorageRequest request) { String.format( "/api/2.0/accounts/%s/storage-configurations/%s", apiClient.configuredAccountID(), request.getStorageConfigurationId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -37,7 +46,10 @@ public StorageConfiguration get(GetStorageRequest request) { String.format( "/api/2.0/accounts/%s/storage-configurations/%s", apiClient.configuredAccountID(), request.getStorageConfigurationId()); - return apiClient.GET(path, request, StorageConfiguration.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, StorageConfiguration.class, headers); } @Override @@ -45,6 +57,9 @@ public Collection list() { String path = String.format( "/api/2.0/accounts/%s/storage-configurations", apiClient.configuredAccountID()); - return apiClient.getCollection(path, null, StorageConfiguration.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, StorageConfiguration.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/VpcEndpointsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/VpcEndpointsImpl.java index cec40f2db..ad238ba21 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/VpcEndpointsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/VpcEndpointsImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of VpcEndpoints */ @Generated @@ -18,7 +20,11 @@ public VpcEndpointsImpl(ApiClient apiClient) { public VpcEndpoint create(CreateVpcEndpointRequest request) { String path = String.format("/api/2.0/accounts/%s/vpc-endpoints", apiClient.configuredAccountID()); - return apiClient.POST(path, request, VpcEndpoint.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, VpcEndpoint.class, headers); } @Override @@ -27,7 +33,10 @@ public void delete(DeleteVpcEndpointRequest request) { String.format( "/api/2.0/accounts/%s/vpc-endpoints/%s", apiClient.configuredAccountID(), request.getVpcEndpointId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -36,13 +45,19 @@ public VpcEndpoint get(GetVpcEndpointRequest request) { String.format( "/api/2.0/accounts/%s/vpc-endpoints/%s", apiClient.configuredAccountID(), request.getVpcEndpointId()); - return apiClient.GET(path, request, VpcEndpoint.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, VpcEndpoint.class, headers); } @Override public Collection list() { String path = String.format("/api/2.0/accounts/%s/vpc-endpoints", apiClient.configuredAccountID()); - return apiClient.getCollection(path, null, VpcEndpoint.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, VpcEndpoint.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java index d2b8569a5..7805d0db7 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Workspaces */ @Generated @@ -17,7 +19,11 @@ public WorkspacesImpl(ApiClient apiClient) { @Override public Workspace create(CreateWorkspaceRequest request) { String path = String.format("/api/2.0/accounts/%s/workspaces", apiClient.configuredAccountID()); - return apiClient.POST(path, request, Workspace.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Workspace.class, headers); } @Override @@ -26,7 +32,10 @@ public void delete(DeleteWorkspaceRequest request) { String.format( "/api/2.0/accounts/%s/workspaces/%s", apiClient.configuredAccountID(), request.getWorkspaceId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -35,13 +44,19 @@ public Workspace get(GetWorkspaceRequest request) { String.format( "/api/2.0/accounts/%s/workspaces/%s", apiClient.configuredAccountID(), request.getWorkspaceId()); - return apiClient.GET(path, request, Workspace.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Workspace.class, headers); } @Override public Collection list() { String path = String.format("/api/2.0/accounts/%s/workspaces", apiClient.configuredAccountID()); - return apiClient.getCollection(path, null, Workspace.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, Workspace.class, headers); } @Override @@ -50,6 +65,10 @@ public void update(UpdateWorkspaceRequest request) { String.format( "/api/2.0/accounts/%s/workspaces/%s", apiClient.configuredAccountID(), request.getWorkspaceId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java index c43bbe266..1d767db5d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of ServingEndpoints */ @Generated @@ -19,31 +21,46 @@ public BuildLogsResponse buildLogs(BuildLogsRequest request) { String.format( "/api/2.0/serving-endpoints/%s/served-models/%s/build-logs", request.getName(), request.getServedModelName()); - return apiClient.GET(path, request, BuildLogsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, BuildLogsResponse.class, headers); } @Override public ServingEndpointDetailed create(CreateServingEndpoint request) { String path = "/api/2.0/serving-endpoints"; - return apiClient.POST(path, request, ServingEndpointDetailed.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ServingEndpointDetailed.class, headers); } @Override public void delete(DeleteServingEndpointRequest request) { String path = String.format("/api/2.0/serving-endpoints/%s", request.getName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public void exportMetrics(ExportMetricsRequest request) { String path = String.format("/api/2.0/serving-endpoints/%s/metrics", request.getName()); - apiClient.GET(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.GET(path, request, Void.class, headers); } @Override public ServingEndpointDetailed get(GetServingEndpointRequest request) { String path = String.format("/api/2.0/serving-endpoints/%s", request.getName()); - return apiClient.GET(path, request, ServingEndpointDetailed.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ServingEndpointDetailed.class, headers); } @Override @@ -53,7 +70,10 @@ public GetServingEndpointPermissionLevelsResponse getServingEndpointPermissionLe String.format( "/api/2.0/permissions/serving-endpoints/%s/permissionLevels", request.getServingEndpointId()); - return apiClient.GET(path, request, GetServingEndpointPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetServingEndpointPermissionLevelsResponse.class, headers); } @Override @@ -61,13 +81,19 @@ public ServingEndpointPermissions getServingEndpointPermissions( GetServingEndpointPermissionsRequest request) { String path = String.format("/api/2.0/permissions/serving-endpoints/%s", request.getServingEndpointId()); - return apiClient.GET(path, request, ServingEndpointPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ServingEndpointPermissions.class, headers); } @Override public ListEndpointsResponse list() { String path = "/api/2.0/serving-endpoints"; - return apiClient.GET(path, ListEndpointsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListEndpointsResponse.class, headers); } @Override @@ -76,13 +102,19 @@ public ServerLogsResponse logs(LogsRequest request) { String.format( "/api/2.0/serving-endpoints/%s/served-models/%s/logs", request.getName(), request.getServedModelName()); - return apiClient.GET(path, request, ServerLogsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ServerLogsResponse.class, headers); } @Override public QueryEndpointResponse query(QueryRequest request) { String path = String.format("/serving-endpoints/%s/invocations", request.getName()); - return apiClient.POST(path, request, QueryEndpointResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.POST(path, request, QueryEndpointResponse.class, headers); } @Override @@ -90,13 +122,21 @@ public ServingEndpointPermissions setServingEndpointPermissions( ServingEndpointPermissionsRequest request) { String path = String.format("/api/2.0/permissions/serving-endpoints/%s", request.getServingEndpointId()); - return apiClient.PUT(path, request, ServingEndpointPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, ServingEndpointPermissions.class, headers); } @Override public ServingEndpointDetailed updateConfig(EndpointCoreConfigInput request) { String path = String.format("/api/2.0/serving-endpoints/%s/config", request.getName()); - return apiClient.PUT(path, request, ServingEndpointDetailed.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, ServingEndpointDetailed.class, headers); } @Override @@ -104,6 +144,10 @@ public ServingEndpointPermissions updateServingEndpointPermissions( ServingEndpointPermissionsRequest request) { String path = String.format("/api/2.0/permissions/serving-endpoints/%s", request.getServingEndpointId()); - return apiClient.PATCH(path, request, ServingEndpointPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ServingEndpointPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java index 413d23085..1a04d30db 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountIpAccessLists */ @Generated @@ -18,7 +20,11 @@ public CreateIpAccessListResponse create(CreateIpAccessList request) { String path = String.format( "/api/2.0/preview/accounts/%s/ip-access-lists", apiClient.configuredAccountID()); - return apiClient.POST(path, request, CreateIpAccessListResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateIpAccessListResponse.class, headers); } @Override @@ -27,7 +33,9 @@ public void delete(DeleteAccountIpAccessListRequest request) { String.format( "/api/2.0/preview/accounts/%s/ip-access-lists/%s", apiClient.configuredAccountID(), request.getIpAccessListId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override @@ -36,7 +44,10 @@ public GetIpAccessListResponse get(GetAccountIpAccessListRequest request) { String.format( "/api/2.0/preview/accounts/%s/ip-access-lists/%s", apiClient.configuredAccountID(), request.getIpAccessListId()); - return apiClient.GET(path, request, GetIpAccessListResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetIpAccessListResponse.class, headers); } @Override @@ -44,7 +55,10 @@ public GetIpAccessListsResponse list() { String path = String.format( "/api/2.0/preview/accounts/%s/ip-access-lists", apiClient.configuredAccountID()); - return apiClient.GET(path, GetIpAccessListsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetIpAccessListsResponse.class, headers); } @Override @@ -53,7 +67,11 @@ public void replace(ReplaceIpAccessList request) { String.format( "/api/2.0/preview/accounts/%s/ip-access-lists/%s", apiClient.configuredAccountID(), request.getIpAccessListId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } @Override @@ -62,6 +80,10 @@ public void update(UpdateIpAccessList request) { String.format( "/api/2.0/preview/accounts/%s/ip-access-lists/%s", apiClient.configuredAccountID(), request.getIpAccessListId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java index e2b568588..dfde172c3 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountNetworkPolicy */ @Generated @@ -20,7 +22,10 @@ public DeleteAccountNetworkPolicyResponse deleteAccountNetworkPolicy( String.format( "/api/2.0/accounts/%s/settings/types/network_policy/names/default", apiClient.configuredAccountID()); - return apiClient.DELETE(path, request, DeleteAccountNetworkPolicyResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.DELETE(path, request, DeleteAccountNetworkPolicyResponse.class, headers); } @Override @@ -30,7 +35,10 @@ public AccountNetworkPolicyMessage readAccountNetworkPolicy( String.format( "/api/2.0/accounts/%s/settings/types/network_policy/names/default", apiClient.configuredAccountID()); - return apiClient.GET(path, request, AccountNetworkPolicyMessage.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, AccountNetworkPolicyMessage.class, headers); } @Override @@ -40,6 +48,10 @@ public AccountNetworkPolicyMessage updateAccountNetworkPolicy( String.format( "/api/2.0/accounts/%s/settings/types/network_policy/names/default", apiClient.configuredAccountID()); - return apiClient.PATCH(path, request, AccountNetworkPolicyMessage.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, AccountNetworkPolicyMessage.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java index cd2f5f42d..290e7e2da 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of AccountSettings */ @Generated @@ -20,7 +22,10 @@ public DeletePersonalComputeSettingResponse deletePersonalComputeSetting( String.format( "/api/2.0/accounts/%s/settings/types/dcp_acct_enable/names/default", apiClient.configuredAccountID()); - return apiClient.DELETE(path, request, DeletePersonalComputeSettingResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.DELETE(path, request, DeletePersonalComputeSettingResponse.class, headers); } @Override @@ -30,7 +35,10 @@ public PersonalComputeSetting readPersonalComputeSetting( String.format( "/api/2.0/accounts/%s/settings/types/dcp_acct_enable/names/default", apiClient.configuredAccountID()); - return apiClient.GET(path, request, PersonalComputeSetting.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, PersonalComputeSetting.class, headers); } @Override @@ -40,6 +48,10 @@ public PersonalComputeSetting updatePersonalComputeSetting( String.format( "/api/2.0/accounts/%s/settings/types/dcp_acct_enable/names/default", apiClient.configuredAccountID()); - return apiClient.PATCH(path, request, PersonalComputeSetting.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, PersonalComputeSetting.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java index 401d91781..ee6a8226c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of IpAccessLists */ @Generated @@ -16,36 +18,56 @@ public IpAccessListsImpl(ApiClient apiClient) { @Override public CreateIpAccessListResponse create(CreateIpAccessList request) { String path = "/api/2.0/ip-access-lists"; - return apiClient.POST(path, request, CreateIpAccessListResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateIpAccessListResponse.class, headers); } @Override public void delete(DeleteIpAccessListRequest request) { String path = String.format("/api/2.0/ip-access-lists/%s", request.getIpAccessListId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public FetchIpAccessListResponse get(GetIpAccessListRequest request) { String path = String.format("/api/2.0/ip-access-lists/%s", request.getIpAccessListId()); - return apiClient.GET(path, request, FetchIpAccessListResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, FetchIpAccessListResponse.class, headers); } @Override public GetIpAccessListResponse list() { String path = "/api/2.0/ip-access-lists"; - return apiClient.GET(path, GetIpAccessListResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetIpAccessListResponse.class, headers); } @Override public void replace(ReplaceIpAccessList request) { String path = String.format("/api/2.0/ip-access-lists/%s", request.getIpAccessListId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } @Override public void update(UpdateIpAccessList request) { String path = String.format("/api/2.0/ip-access-lists/%s", request.getIpAccessListId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java index 58ebec01a..b8ec0845e 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of TokenManagement */ @Generated @@ -16,48 +18,74 @@ public TokenManagementImpl(ApiClient apiClient) { @Override public CreateOboTokenResponse createOboToken(CreateOboTokenRequest request) { String path = "/api/2.0/token-management/on-behalf-of/tokens"; - return apiClient.POST(path, request, CreateOboTokenResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateOboTokenResponse.class, headers); } @Override public void delete(DeleteTokenManagementRequest request) { String path = String.format("/api/2.0/token-management/tokens/%s", request.getTokenId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public TokenInfo get(GetTokenManagementRequest request) { String path = String.format("/api/2.0/token-management/tokens/%s", request.getTokenId()); - return apiClient.GET(path, request, TokenInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, TokenInfo.class, headers); } @Override public GetTokenPermissionLevelsResponse getTokenPermissionLevels() { String path = "/api/2.0/permissions/authorization/tokens/permissionLevels"; - return apiClient.GET(path, GetTokenPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetTokenPermissionLevelsResponse.class, headers); } @Override public TokenPermissions getTokenPermissions() { String path = "/api/2.0/permissions/authorization/tokens"; - return apiClient.GET(path, TokenPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, TokenPermissions.class, headers); } @Override public ListTokensResponse list(ListTokenManagementRequest request) { String path = "/api/2.0/token-management/tokens"; - return apiClient.GET(path, request, ListTokensResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListTokensResponse.class, headers); } @Override public TokenPermissions setTokenPermissions(TokenPermissionsRequest request) { String path = "/api/2.0/permissions/authorization/tokens"; - return apiClient.PUT(path, request, TokenPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, TokenPermissions.class, headers); } @Override public TokenPermissions updateTokenPermissions(TokenPermissionsRequest request) { String path = "/api/2.0/permissions/authorization/tokens"; - return apiClient.PATCH(path, request, TokenPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, TokenPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java index 2709f91a9..38d2c7909 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Tokens */ @Generated @@ -16,18 +18,29 @@ public TokensImpl(ApiClient apiClient) { @Override public CreateTokenResponse create(CreateTokenRequest request) { String path = "/api/2.0/token/create"; - return apiClient.POST(path, request, CreateTokenResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateTokenResponse.class, headers); } @Override public void delete(RevokeTokenRequest request) { String path = "/api/2.0/token/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ListTokensResponse list() { String path = "/api/2.0/token/list"; - return apiClient.GET(path, ListTokensResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListTokensResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/WorkspaceConfImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/WorkspaceConfImpl.java index c863a3b54..805709dec 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/WorkspaceConfImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/WorkspaceConfImpl.java @@ -3,6 +3,7 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; import java.util.Map; /** Package-local implementation of WorkspaceConf */ @@ -17,12 +18,18 @@ public WorkspaceConfImpl(ApiClient apiClient) { @Override public Map getStatus(GetStatusRequest request) { String path = "/api/2.0/workspace-conf"; - return apiClient.getStringMap(path, request); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getStringMap(path, request, headers); } @Override public void setStatus(Map request) { String path = "/api/2.0/workspace-conf"; - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CleanRoomsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CleanRoomsImpl.java index d282108bc..d8d8362e6 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CleanRoomsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CleanRoomsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of CleanRooms */ @Generated @@ -16,30 +18,47 @@ public CleanRoomsImpl(ApiClient apiClient) { @Override public CleanRoomInfo create(CreateCleanRoom request) { String path = "/api/2.1/unity-catalog/clean-rooms"; - return apiClient.POST(path, request, CleanRoomInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CleanRoomInfo.class, headers); } @Override public void delete(DeleteCleanRoomRequest request) { String path = String.format("/api/2.1/unity-catalog/clean-rooms/%s", request.getNameArg()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public CleanRoomInfo get(GetCleanRoomRequest request) { String path = String.format("/api/2.1/unity-catalog/clean-rooms/%s", request.getNameArg()); - return apiClient.GET(path, request, CleanRoomInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, CleanRoomInfo.class, headers); } @Override public ListCleanRoomsResponse list() { String path = "/api/2.1/unity-catalog/clean-rooms"; - return apiClient.GET(path, ListCleanRoomsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListCleanRoomsResponse.class, headers); } @Override public CleanRoomInfo update(UpdateCleanRoom request) { String path = String.format("/api/2.1/unity-catalog/clean-rooms/%s", request.getNameArg()); - return apiClient.PATCH(path, request, CleanRoomInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, CleanRoomInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/ProvidersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/ProvidersImpl.java index cc579a396..35ddb84aa 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/ProvidersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/ProvidersImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Providers */ @Generated @@ -16,36 +18,56 @@ public ProvidersImpl(ApiClient apiClient) { @Override public ProviderInfo create(CreateProvider request) { String path = "/api/2.1/unity-catalog/providers"; - return apiClient.POST(path, request, ProviderInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ProviderInfo.class, headers); } @Override public void delete(DeleteProviderRequest request) { String path = String.format("/api/2.1/unity-catalog/providers/%s", request.getName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public ProviderInfo get(GetProviderRequest request) { String path = String.format("/api/2.1/unity-catalog/providers/%s", request.getName()); - return apiClient.GET(path, request, ProviderInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ProviderInfo.class, headers); } @Override public ListProvidersResponse list(ListProvidersRequest request) { String path = "/api/2.1/unity-catalog/providers"; - return apiClient.GET(path, request, ListProvidersResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListProvidersResponse.class, headers); } @Override public ListProviderSharesResponse listShares(ListSharesRequest request) { String path = String.format("/api/2.1/unity-catalog/providers/%s/shares", request.getName()); - return apiClient.GET(path, request, ListProviderSharesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListProviderSharesResponse.class, headers); } @Override public ProviderInfo update(UpdateProvider request) { String path = String.format("/api/2.1/unity-catalog/providers/%s", request.getName()); - return apiClient.PATCH(path, request, ProviderInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ProviderInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientActivationImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientActivationImpl.java index d8d1f85e8..85ce06b31 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientActivationImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientActivationImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of RecipientActivation */ @Generated @@ -19,7 +21,10 @@ public void getActivationUrlInfo(GetActivationUrlInfoRequest request) { String.format( "/api/2.1/unity-catalog/public/data_sharing_activation_info/%s", request.getActivationUrl()); - apiClient.GET(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.GET(path, request, Void.class, headers); } @Override @@ -27,6 +32,9 @@ public RetrieveTokenResponse retrieveToken(RetrieveTokenRequest request) { String path = String.format( "/api/2.1/unity-catalog/public/data_sharing_activation/%s", request.getActivationUrl()); - return apiClient.GET(path, request, RetrieveTokenResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, RetrieveTokenResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientsImpl.java index 860a4008a..98be9a1bf 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Recipients */ @Generated @@ -16,44 +18,68 @@ public RecipientsImpl(ApiClient apiClient) { @Override public RecipientInfo create(CreateRecipient request) { String path = "/api/2.1/unity-catalog/recipients"; - return apiClient.POST(path, request, RecipientInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, RecipientInfo.class, headers); } @Override public void delete(DeleteRecipientRequest request) { String path = String.format("/api/2.1/unity-catalog/recipients/%s", request.getName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public RecipientInfo get(GetRecipientRequest request) { String path = String.format("/api/2.1/unity-catalog/recipients/%s", request.getName()); - return apiClient.GET(path, request, RecipientInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, RecipientInfo.class, headers); } @Override public ListRecipientsResponse list(ListRecipientsRequest request) { String path = "/api/2.1/unity-catalog/recipients"; - return apiClient.GET(path, request, ListRecipientsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListRecipientsResponse.class, headers); } @Override public RecipientInfo rotateToken(RotateRecipientToken request) { String path = String.format("/api/2.1/unity-catalog/recipients/%s/rotate-token", request.getName()); - return apiClient.POST(path, request, RecipientInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, RecipientInfo.class, headers); } @Override public GetRecipientSharePermissionsResponse sharePermissions(SharePermissionsRequest request) { String path = String.format("/api/2.1/unity-catalog/recipients/%s/share-permissions", request.getName()); - return apiClient.GET(path, request, GetRecipientSharePermissionsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetRecipientSharePermissionsResponse.class, headers); } @Override public void update(UpdateRecipient request) { String path = String.format("/api/2.1/unity-catalog/recipients/%s", request.getName()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharesImpl.java index ae6cb89d5..a5b159dac 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Shares */ @Generated @@ -16,43 +18,68 @@ public SharesImpl(ApiClient apiClient) { @Override public ShareInfo create(CreateShare request) { String path = "/api/2.1/unity-catalog/shares"; - return apiClient.POST(path, request, ShareInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ShareInfo.class, headers); } @Override public void delete(DeleteShareRequest request) { String path = String.format("/api/2.1/unity-catalog/shares/%s", request.getName()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public ShareInfo get(GetShareRequest request) { String path = String.format("/api/2.1/unity-catalog/shares/%s", request.getName()); - return apiClient.GET(path, request, ShareInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ShareInfo.class, headers); } @Override public ListSharesResponse list() { String path = "/api/2.1/unity-catalog/shares"; - return apiClient.GET(path, ListSharesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListSharesResponse.class, headers); } @Override public com.databricks.sdk.service.catalog.PermissionsList sharePermissions( SharePermissionsRequest request) { String path = String.format("/api/2.1/unity-catalog/shares/%s/permissions", request.getName()); - return apiClient.GET(path, request, com.databricks.sdk.service.catalog.PermissionsList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET( + path, request, com.databricks.sdk.service.catalog.PermissionsList.class, headers); } @Override public ShareInfo update(UpdateShare request) { String path = String.format("/api/2.1/unity-catalog/shares/%s", request.getName()); - return apiClient.PATCH(path, request, ShareInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, ShareInfo.class, headers); } @Override public void updatePermissions(UpdateSharePermissions request) { String path = String.format("/api/2.1/unity-catalog/shares/%s/permissions", request.getName()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertsImpl.java index 0452f20ef..f0fc31738 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertsImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Alerts */ @Generated @@ -17,30 +19,47 @@ public AlertsImpl(ApiClient apiClient) { @Override public Alert create(CreateAlert request) { String path = "/api/2.0/preview/sql/alerts"; - return apiClient.POST(path, request, Alert.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Alert.class, headers); } @Override public void delete(DeleteAlertRequest request) { String path = String.format("/api/2.0/preview/sql/alerts/%s", request.getAlertId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public Alert get(GetAlertRequest request) { String path = String.format("/api/2.0/preview/sql/alerts/%s", request.getAlertId()); - return apiClient.GET(path, request, Alert.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Alert.class, headers); } @Override public Collection list() { String path = "/api/2.0/preview/sql/alerts"; - return apiClient.getCollection(path, null, Alert.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, Alert.class, headers); } @Override public void update(EditAlert request) { String path = String.format("/api/2.0/preview/sql/alerts/%s", request.getAlertId()); - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DashboardsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DashboardsImpl.java index 04a291165..622d7ef28 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DashboardsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DashboardsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Dashboards */ @Generated @@ -16,31 +18,47 @@ public DashboardsImpl(ApiClient apiClient) { @Override public Dashboard create(CreateDashboardRequest request) { String path = "/api/2.0/preview/sql/dashboards"; - return apiClient.POST(path, request, Dashboard.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Dashboard.class, headers); } @Override public void delete(DeleteDashboardRequest request) { String path = String.format("/api/2.0/preview/sql/dashboards/%s", request.getDashboardId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public Dashboard get(GetDashboardRequest request) { String path = String.format("/api/2.0/preview/sql/dashboards/%s", request.getDashboardId()); - return apiClient.GET(path, request, Dashboard.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Dashboard.class, headers); } @Override public ListResponse list(ListDashboardsRequest request) { String path = "/api/2.0/preview/sql/dashboards"; - return apiClient.GET(path, request, ListResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListResponse.class, headers); } @Override public void restore(RestoreDashboardRequest request) { String path = String.format("/api/2.0/preview/sql/dashboards/trash/%s", request.getDashboardId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DataSourcesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DataSourcesImpl.java index 7a373f3ce..ac59c7025 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DataSourcesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DataSourcesImpl.java @@ -4,6 +4,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; import java.util.Collection; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of DataSources */ @Generated @@ -17,6 +19,9 @@ public DataSourcesImpl(ApiClient apiClient) { @Override public Collection list() { String path = "/api/2.0/preview/sql/data_sources"; - return apiClient.getCollection(path, null, DataSource.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.getCollection(path, null, DataSource.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DbsqlPermissionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DbsqlPermissionsImpl.java index b4659a5df..a23a06423 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DbsqlPermissionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DbsqlPermissionsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of DbsqlPermissions */ @Generated @@ -19,7 +21,10 @@ public GetResponse get(GetDbsqlPermissionRequest request) { String.format( "/api/2.0/preview/sql/permissions/%s/%s", request.getObjectType(), request.getObjectId()); - return apiClient.GET(path, request, GetResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetResponse.class, headers); } @Override @@ -28,7 +33,11 @@ public SetResponse set(SetRequest request) { String.format( "/api/2.0/preview/sql/permissions/%s/%s", request.getObjectType(), request.getObjectId()); - return apiClient.POST(path, request, SetResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, SetResponse.class, headers); } @Override @@ -37,6 +46,10 @@ public Success transferOwnership(TransferOwnershipRequest request) { String.format( "/api/2.0/preview/sql/permissions/%s/%s/transfer", request.getObjectType(), request.getObjectId()); - return apiClient.POST(path, request, Success.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Success.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueriesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueriesImpl.java index 2ae271c9b..ce08e4960 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueriesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueriesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Queries */ @Generated @@ -16,36 +18,56 @@ public QueriesImpl(ApiClient apiClient) { @Override public Query create(QueryPostContent request) { String path = "/api/2.0/preview/sql/queries"; - return apiClient.POST(path, request, Query.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Query.class, headers); } @Override public void delete(DeleteQueryRequest request) { String path = String.format("/api/2.0/preview/sql/queries/%s", request.getQueryId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public Query get(GetQueryRequest request) { String path = String.format("/api/2.0/preview/sql/queries/%s", request.getQueryId()); - return apiClient.GET(path, request, Query.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, Query.class, headers); } @Override public QueryList list(ListQueriesRequest request) { String path = "/api/2.0/preview/sql/queries"; - return apiClient.GET(path, request, QueryList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, QueryList.class, headers); } @Override public void restore(RestoreQueryRequest request) { String path = String.format("/api/2.0/preview/sql/queries/trash/%s", request.getQueryId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public Query update(QueryEditContent request) { String path = String.format("/api/2.0/preview/sql/queries/%s", request.getQueryId()); - return apiClient.POST(path, request, Query.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, Query.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueryHistoryImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueryHistoryImpl.java index 73d2436c2..1b3714361 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueryHistoryImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueryHistoryImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of QueryHistory */ @Generated @@ -16,6 +18,9 @@ public QueryHistoryImpl(ApiClient apiClient) { @Override public ListQueriesResponse list(ListQueryHistoryRequest request) { String path = "/api/2.0/sql/history/queries"; - return apiClient.GET(path, request, ListQueriesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListQueriesResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java index 195d57113..c413f6ada 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of StatementExecution */ @Generated @@ -16,19 +18,28 @@ public StatementExecutionImpl(ApiClient apiClient) { @Override public void cancelExecution(CancelExecutionRequest request) { String path = String.format("/api/2.0/sql/statements/%s/cancel", request.getStatementId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.POST(path, request, Void.class, headers); } @Override public ExecuteStatementResponse executeStatement(ExecuteStatementRequest request) { String path = "/api/2.0/sql/statements/"; - return apiClient.POST(path, request, ExecuteStatementResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, ExecuteStatementResponse.class, headers); } @Override public GetStatementResponse getStatement(GetStatementRequest request) { String path = String.format("/api/2.0/sql/statements/%s", request.getStatementId()); - return apiClient.GET(path, request, GetStatementResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetStatementResponse.class, headers); } @Override @@ -37,6 +48,9 @@ public ResultData getStatementResultChunkN(GetStatementResultChunkNRequest reque String.format( "/api/2.0/sql/statements/%s/result/chunks/%s", request.getStatementId(), request.getChunkIndex()); - return apiClient.GET(path, request, ResultData.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ResultData.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/WarehousesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/WarehousesImpl.java index f28abaa7c..3c1751f84 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/WarehousesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/WarehousesImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Warehouses */ @Generated @@ -16,25 +18,39 @@ public WarehousesImpl(ApiClient apiClient) { @Override public CreateWarehouseResponse create(CreateWarehouseRequest request) { String path = "/api/2.0/sql/warehouses"; - return apiClient.POST(path, request, CreateWarehouseResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateWarehouseResponse.class, headers); } @Override public void delete(DeleteWarehouseRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s", request.getId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public void edit(EditWarehouseRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s/edit", request.getId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public GetWarehouseResponse get(GetWarehouseRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s", request.getId()); - return apiClient.GET(path, request, GetWarehouseResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetWarehouseResponse.class, headers); } @Override @@ -43,54 +59,84 @@ public GetWarehousePermissionLevelsResponse getWarehousePermissionLevels( String path = String.format( "/api/2.0/permissions/warehouses/%s/permissionLevels", request.getWarehouseId()); - return apiClient.GET(path, request, GetWarehousePermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetWarehousePermissionLevelsResponse.class, headers); } @Override public WarehousePermissions getWarehousePermissions(GetWarehousePermissionsRequest request) { String path = String.format("/api/2.0/permissions/warehouses/%s", request.getWarehouseId()); - return apiClient.GET(path, request, WarehousePermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, WarehousePermissions.class, headers); } @Override public GetWorkspaceWarehouseConfigResponse getWorkspaceWarehouseConfig() { String path = "/api/2.0/sql/config/warehouses"; - return apiClient.GET(path, GetWorkspaceWarehouseConfigResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetWorkspaceWarehouseConfigResponse.class, headers); } @Override public ListWarehousesResponse list(ListWarehousesRequest request) { String path = "/api/2.0/sql/warehouses"; - return apiClient.GET(path, request, ListWarehousesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListWarehousesResponse.class, headers); } @Override public WarehousePermissions setWarehousePermissions(WarehousePermissionsRequest request) { String path = String.format("/api/2.0/permissions/warehouses/%s", request.getWarehouseId()); - return apiClient.PUT(path, request, WarehousePermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, WarehousePermissions.class, headers); } @Override public void setWorkspaceWarehouseConfig(SetWorkspaceWarehouseConfigRequest request) { String path = "/api/2.0/sql/config/warehouses"; - apiClient.PUT(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PUT(path, request, Void.class, headers); } @Override public void start(StartRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s/start", request.getId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void stop(StopRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s/stop", request.getId()); - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public WarehousePermissions updateWarehousePermissions(WarehousePermissionsRequest request) { String path = String.format("/api/2.0/permissions/warehouses/%s", request.getWarehouseId()); - return apiClient.PATCH(path, request, WarehousePermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, WarehousePermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java index 85838459e..9a8c6d739 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of GitCredentials */ @Generated @@ -16,30 +18,46 @@ public GitCredentialsImpl(ApiClient apiClient) { @Override public CreateCredentialsResponse create(CreateCredentials request) { String path = "/api/2.0/git-credentials"; - return apiClient.POST(path, request, CreateCredentialsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, CreateCredentialsResponse.class, headers); } @Override public void delete(DeleteGitCredentialRequest request) { String path = String.format("/api/2.0/git-credentials/%s", request.getCredentialId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public CredentialInfo get(GetGitCredentialRequest request) { String path = String.format("/api/2.0/git-credentials/%s", request.getCredentialId()); - return apiClient.GET(path, request, CredentialInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, CredentialInfo.class, headers); } @Override public GetCredentialsResponse list() { String path = "/api/2.0/git-credentials"; - return apiClient.GET(path, GetCredentialsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, GetCredentialsResponse.class, headers); } @Override public void update(UpdateCredentials request) { String path = String.format("/api/2.0/git-credentials/%s", request.getCredentialId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java index cc11e840d..b923d4193 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Repos */ @Generated @@ -16,19 +18,28 @@ public ReposImpl(ApiClient apiClient) { @Override public RepoInfo create(CreateRepo request) { String path = "/api/2.0/repos"; - return apiClient.POST(path, request, RepoInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, RepoInfo.class, headers); } @Override public void delete(DeleteRepoRequest request) { String path = String.format("/api/2.0/repos/%s", request.getRepoId()); - apiClient.DELETE(path, request, Void.class); + Map headers = new HashMap<>(); + + apiClient.DELETE(path, request, Void.class, headers); } @Override public RepoInfo get(GetRepoRequest request) { String path = String.format("/api/2.0/repos/%s", request.getRepoId()); - return apiClient.GET(path, request, RepoInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, RepoInfo.class, headers); } @Override @@ -36,36 +47,57 @@ public GetRepoPermissionLevelsResponse getRepoPermissionLevels( GetRepoPermissionLevelsRequest request) { String path = String.format("/api/2.0/permissions/repos/%s/permissionLevels", request.getRepoId()); - return apiClient.GET(path, request, GetRepoPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetRepoPermissionLevelsResponse.class, headers); } @Override public RepoPermissions getRepoPermissions(GetRepoPermissionsRequest request) { String path = String.format("/api/2.0/permissions/repos/%s", request.getRepoId()); - return apiClient.GET(path, request, RepoPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, RepoPermissions.class, headers); } @Override public ListReposResponse list(ListReposRequest request) { String path = "/api/2.0/repos"; - return apiClient.GET(path, request, ListReposResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListReposResponse.class, headers); } @Override public RepoPermissions setRepoPermissions(RepoPermissionsRequest request) { String path = String.format("/api/2.0/permissions/repos/%s", request.getRepoId()); - return apiClient.PUT(path, request, RepoPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, RepoPermissions.class, headers); } @Override public void update(UpdateRepo request) { String path = String.format("/api/2.0/repos/%s", request.getRepoId()); - apiClient.PATCH(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.PATCH(path, request, Void.class, headers); } @Override public RepoPermissions updateRepoPermissions(RepoPermissionsRequest request) { String path = String.format("/api/2.0/permissions/repos/%s", request.getRepoId()); - return apiClient.PATCH(path, request, RepoPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, RepoPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java index c4e6a8bcf..0b97dbb4c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Secrets */ @Generated @@ -16,60 +18,96 @@ public SecretsImpl(ApiClient apiClient) { @Override public void createScope(CreateScope request) { String path = "/api/2.0/secrets/scopes/create"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void deleteAcl(DeleteAcl request) { String path = "/api/2.0/secrets/acls/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void deleteScope(DeleteScope request) { String path = "/api/2.0/secrets/scopes/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void deleteSecret(DeleteSecret request) { String path = "/api/2.0/secrets/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public AclItem getAcl(GetAclRequest request) { String path = "/api/2.0/secrets/acls/get"; - return apiClient.GET(path, request, AclItem.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, AclItem.class, headers); } @Override public ListAclsResponse listAcls(ListAclsRequest request) { String path = "/api/2.0/secrets/acls/list"; - return apiClient.GET(path, request, ListAclsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListAclsResponse.class, headers); } @Override public ListScopesResponse listScopes() { String path = "/api/2.0/secrets/scopes/list"; - return apiClient.GET(path, ListScopesResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, ListScopesResponse.class, headers); } @Override public ListSecretsResponse listSecrets(ListSecretsRequest request) { String path = "/api/2.0/secrets/list"; - return apiClient.GET(path, request, ListSecretsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListSecretsResponse.class, headers); } @Override public void putAcl(PutAcl request) { String path = "/api/2.0/secrets/acls/put"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public void putSecret(PutSecret request) { String path = "/api/2.0/secrets/put"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/WorkspaceImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/WorkspaceImpl.java index df66c495d..2795eb65f 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/WorkspaceImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/WorkspaceImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of Workspace */ @Generated @@ -16,19 +18,29 @@ public WorkspaceImpl(ApiClient apiClient) { @Override public void delete(Delete request) { String path = "/api/2.0/workspace/delete"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ExportResponse export(ExportRequest request) { String path = "/api/2.0/workspace/export"; - return apiClient.GET(path, request, ExportResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ExportResponse.class, headers); } @Override public ObjectInfo getStatus(GetStatusRequest request) { String path = "/api/2.0/workspace/get-status"; - return apiClient.GET(path, request, ObjectInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ObjectInfo.class, headers); } @Override @@ -38,7 +50,10 @@ public GetWorkspaceObjectPermissionLevelsResponse getWorkspaceObjectPermissionLe String.format( "/api/2.0/permissions/%s/%s/permissionLevels", request.getWorkspaceObjectType(), request.getWorkspaceObjectId()); - return apiClient.GET(path, request, GetWorkspaceObjectPermissionLevelsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetWorkspaceObjectPermissionLevelsResponse.class, headers); } @Override @@ -48,25 +63,39 @@ public WorkspaceObjectPermissions getWorkspaceObjectPermissions( String.format( "/api/2.0/permissions/%s/%s", request.getWorkspaceObjectType(), request.getWorkspaceObjectId()); - return apiClient.GET(path, request, WorkspaceObjectPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, WorkspaceObjectPermissions.class, headers); } @Override public void importContent(Import request) { String path = "/api/2.0/workspace/import"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override public ListResponse list(ListWorkspaceRequest request) { String path = "/api/2.0/workspace/list"; - return apiClient.GET(path, request, ListResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ListResponse.class, headers); } @Override public void mkdirs(Mkdirs request) { String path = "/api/2.0/workspace/mkdirs"; - apiClient.POST(path, request, Void.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + apiClient.POST(path, request, Void.class, headers); } @Override @@ -76,7 +105,11 @@ public WorkspaceObjectPermissions setWorkspaceObjectPermissions( String.format( "/api/2.0/permissions/%s/%s", request.getWorkspaceObjectType(), request.getWorkspaceObjectId()); - return apiClient.PUT(path, request, WorkspaceObjectPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, WorkspaceObjectPermissions.class, headers); } @Override @@ -86,6 +119,10 @@ public WorkspaceObjectPermissions updateWorkspaceObjectPermissions( String.format( "/api/2.0/permissions/%s/%s", request.getWorkspaceObjectType(), request.getWorkspaceObjectId()); - return apiClient.PATCH(path, request, WorkspaceObjectPermissions.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, WorkspaceObjectPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/support/HeaderParam.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/support/HeaderParam.java new file mode 100644 index 000000000..7a26664d8 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/support/HeaderParam.java @@ -0,0 +1,12 @@ +package com.databricks.sdk.support; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface HeaderParam { + String value(); +} diff --git a/databricks-sdk-java/src/test/java/com/databricks/sdk/core/ApiClientTest.java b/databricks-sdk-java/src/test/java/com/databricks/sdk/core/ApiClientTest.java index 51987fc0f..52a9c6d5e 100644 --- a/databricks-sdk-java/src/test/java/com/databricks/sdk/core/ApiClientTest.java +++ b/databricks-sdk-java/src/test/java/com/databricks/sdk/core/ApiClientTest.java @@ -61,7 +61,7 @@ private void runApiClientTest( Class clazz, T expectedResponse) { ApiClient client = getApiClient(request, responses); - T response = client.GET(request.getUri().getPath(), clazz); + T response = client.GET(request.getUri().getPath(), clazz, Collections.emptyMap()); assertEquals(response, expectedResponse); } @@ -70,7 +70,8 @@ private void runFailingApiClientTest( ApiClient client = getApiClient(request, responses); DatabricksException exception = assertThrows( - DatabricksException.class, () -> client.GET(request.getUri().getPath(), clazz)); + DatabricksException.class, + () -> client.GET(request.getUri().getPath(), clazz, Collections.emptyMap())); assertEquals(exception.getMessage(), expectedMessage); } From 269105ef7a691b08eeff16863416fa37da04bfc8 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Mon, 14 Aug 2023 20:16:33 +0200 Subject: [PATCH 2/9] remove unused code --- .../sdk/core/HeaderParamsSerializer.java | 74 ------------------- .../databricks/sdk/support/HeaderParam.java | 12 --- 2 files changed, 86 deletions(-) delete mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/core/HeaderParamsSerializer.java delete mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/support/HeaderParam.java diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/HeaderParamsSerializer.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/HeaderParamsSerializer.java deleted file mode 100644 index cd191ac03..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/HeaderParamsSerializer.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.databricks.sdk.core; - -import com.databricks.sdk.support.HeaderParam; -import java.lang.reflect.Field; -import java.util.*; - -public class HeaderParamsSerializer { - - public static class HeaderEntry { - private final String key; - private final String value; - - public HeaderEntry(String key, String value) { - this.key = key; - this.value = value; - } - - public String getKey() { - return key; - } - - public String getValue() { - return value; - } - } - /** - * Serializes an object into a map of query parameter values compatible with gRPC-transcoding. - * - *

This method respects the QueryParam and JsonProperty annotations on the object's fields when - * serializing the field name. If both annotations are present, the value of the QueryParam - * annotation is used. - * - *

The returned object does not contain any top-level fields that are not annotated with - * QueryParam. All nested fields are included, even if they are not annotated with QueryParam. - * - * @param o The object to serialize. - * @return A list of query parameter entries compatible with gRPC-transcoding. - */ - public static List serialize(Object o) { - List result = new ArrayList<>(); - for (Field f : o.getClass().getDeclaredFields()) { - HeaderParam headerParam = f.getAnnotation(HeaderParam.class); - if (headerParam == null) { - continue; - } - // Only support single string headers for now. - if (!f.getType().isAssignableFrom(String.class)) { - throw new IllegalArgumentException( - String.format( - "Field %s is annotated with @HeaderParam, but is not of type String.", - getFieldName(f))); - } - f.setAccessible(true); - try { - result.add(new HeaderParamsSerializer.HeaderEntry(headerParam.value(), (String) f.get(o))); - } catch (IllegalAccessException e) { - throw new DatabricksException("Failed to read header entries", e); - } finally { - f.setAccessible(false); - } - } - - return result; - } - - private static String getFieldName(Field f) { - HeaderParam headerParam = f.getAnnotation(HeaderParam.class); - if (headerParam != null) { - return headerParam.value(); - } else { - return f.getName(); - } - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/support/HeaderParam.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/support/HeaderParam.java deleted file mode 100644 index 7a26664d8..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/support/HeaderParam.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.databricks.sdk.support; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Target({ElementType.FIELD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface HeaderParam { - String value(); -} From 9b0c29cf947c0b3980d2c0d652c41247429b4af3 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 18 Aug 2023 14:43:23 +0200 Subject: [PATCH 3/9] regen --- .../sdk/service/catalog/ArtifactAllowlistsImpl.java | 13 +++++++++++-- .../sdk/service/catalog/SecurableTagsImpl.java | 13 +++++++++++-- .../sdk/service/catalog/SubentityTagsImpl.java | 13 +++++++++++-- .../databricks/sdk/service/ml/ExperimentsImpl.java | 12 ++++++++++-- .../sdk/service/workspace/SecretsImpl.java | 5 ++++- 5 files changed, 47 insertions(+), 9 deletions(-) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ArtifactAllowlistsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ArtifactAllowlistsImpl.java index b32cd2537..0fbbf9309 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ArtifactAllowlistsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ArtifactAllowlistsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of ArtifactAllowlists */ @Generated @@ -17,13 +19,20 @@ public ArtifactAllowlistsImpl(ApiClient apiClient) { public ArtifactAllowlistInfo get(GetArtifactAllowlistRequest request) { String path = String.format("/api/2.1/unity-catalog/artifact-allowlists/%s", request.getArtifactType()); - return apiClient.GET(path, request, ArtifactAllowlistInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, ArtifactAllowlistInfo.class, headers); } @Override public ArtifactAllowlistInfo update(SetArtifactAllowlist request) { String path = String.format("/api/2.1/unity-catalog/artifact-allowlists/%s", request.getArtifactType()); - return apiClient.PUT(path, request, ArtifactAllowlistInfo.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PUT(path, request, ArtifactAllowlistInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java index 107152684..3927c8c9d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of SecurableTags */ @Generated @@ -19,7 +21,10 @@ public TagSecurableAssignmentsList list(ListSecurableTagsRequest request) { String.format( "/api/2.1/unity-catalog/securable-tags/%s/%s", request.getSecurableType(), request.getFullName()); - return apiClient.GET(path, request, TagSecurableAssignmentsList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, TagSecurableAssignmentsList.class, headers); } @Override @@ -28,6 +33,10 @@ public TagSecurableAssignmentsList update(UpdateTags request) { String.format( "/api/2.1/unity-catalog/securable-tags/%s/%s", request.getSecurableType(), request.getFullName()); - return apiClient.PATCH(path, request, TagSecurableAssignmentsList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, TagSecurableAssignmentsList.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java index 3c569fef8..ad9543bb9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java @@ -3,6 +3,8 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; /** Package-local implementation of SubentityTags */ @Generated @@ -19,7 +21,10 @@ public TagSubentityAssignmentsList list(ListSubentityTagsRequest request) { String.format( "/api/2.1/unity-catalog/subentity-tags/%s/%s/%s", request.getSecurableType(), request.getFullName(), request.getSubentityName()); - return apiClient.GET(path, request, TagSubentityAssignmentsList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, TagSubentityAssignmentsList.class, headers); } @Override @@ -28,6 +33,10 @@ public TagSubentityAssignmentsList update(UpdateTags request) { String.format( "/api/2.1/unity-catalog/subentity-tags/%s/%s/%s", request.getSecurableType(), request.getFullName(), request.getSubentityName()); - return apiClient.PATCH(path, request, TagSubentityAssignmentsList.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.PATCH(path, request, TagSubentityAssignmentsList.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java index aeaea6530..b30adfba1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java @@ -58,7 +58,11 @@ public void deleteRun(DeleteRun request) { @Override public DeleteRunsResponse deleteRuns(DeleteRuns request) { String path = "/api/2.0/mlflow/databricks/runs/delete-runs"; - return apiClient.POST(path, request, DeleteRunsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, DeleteRunsResponse.class, headers); } @Override @@ -219,7 +223,11 @@ public void restoreRun(RestoreRun request) { @Override public RestoreRunsResponse restoreRuns(RestoreRuns request) { String path = "/api/2.0/mlflow/databricks/runs/restore-runs"; - return apiClient.POST(path, request, RestoreRunsResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + + return apiClient.POST(path, request, RestoreRunsResponse.class, headers); } @Override diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java index 1cabe5658..5f499d9b4 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java @@ -67,7 +67,10 @@ public AclItem getAcl(GetAclRequest request) { @Override public GetSecretResponse getSecret(GetSecretRequest request) { String path = "/api/2.0/secrets/get"; - return apiClient.GET(path, request, GetSecretResponse.class); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + + return apiClient.GET(path, request, GetSecretResponse.class, headers); } @Override From bb84dfff57fb357612ffe470f1e49a0259302b52 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 18 Aug 2023 21:38:23 +0200 Subject: [PATCH 4/9] some fixes --- .codegen/impl.java.tmpl | 6 +- .../com/databricks/sdk/AccountClient.java | 594 +++--- .../com/databricks/sdk/WorkspaceClient.java | 1783 +++++++++-------- .../com/databricks/sdk/core/ApiClient.java | 1 - .../service/iam/AccountAccessControlAPI.java | 94 +- .../iam/AccountAccessControlService.java | 51 +- 6 files changed, 1385 insertions(+), 1144 deletions(-) diff --git a/.codegen/impl.java.tmpl b/.codegen/impl.java.tmpl index bcfc9c62b..d8b62a13c 100644 --- a/.codegen/impl.java.tmpl +++ b/.codegen/impl.java.tmpl @@ -45,10 +45,8 @@ class {{.PascalName}}Impl implements {{.PascalName}}Service { } {{ define "headers" -}} - Map headers = new HashMap<>(); - {{ if .HasRequestHeaders -}} + Map headers = new HashMap<>(); {{- range $key, $value := .FixedRequestHeaders -}} - headers.put("{{$key}}", "{{$value}}"); + headers.put("{{$key}}", "{{$value}}"); {{ end -}} - {{- end }} {{- end }} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java index 643d8d65b..ce05e69df 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java @@ -5,64 +5,67 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.core.ConfigLoader; import com.databricks.sdk.core.DatabricksConfig; + +import com.databricks.sdk.service.iam.AccountAccessControlAPI; +import com.databricks.sdk.service.iam.AccountAccessControlService; import com.databricks.sdk.service.billing.BillableUsageAPI; import com.databricks.sdk.service.billing.BillableUsageService; import com.databricks.sdk.service.billing.BudgetsAPI; import com.databricks.sdk.service.billing.BudgetsService; +import com.databricks.sdk.service.provisioning.CredentialsAPI; +import com.databricks.sdk.service.provisioning.CredentialsService; +import com.databricks.sdk.service.oauth2.CustomAppIntegrationAPI; +import com.databricks.sdk.service.oauth2.CustomAppIntegrationService; +import com.databricks.sdk.service.provisioning.EncryptionKeysAPI; +import com.databricks.sdk.service.provisioning.EncryptionKeysService; +import com.databricks.sdk.service.iam.AccountGroupsAPI; +import com.databricks.sdk.service.iam.AccountGroupsService; +import com.databricks.sdk.service.settings.AccountIpAccessListsAPI; +import com.databricks.sdk.service.settings.AccountIpAccessListsService; import com.databricks.sdk.service.billing.LogDeliveryAPI; import com.databricks.sdk.service.billing.LogDeliveryService; import com.databricks.sdk.service.catalog.AccountMetastoreAssignmentsAPI; import com.databricks.sdk.service.catalog.AccountMetastoreAssignmentsService; import com.databricks.sdk.service.catalog.AccountMetastoresAPI; import com.databricks.sdk.service.catalog.AccountMetastoresService; -import com.databricks.sdk.service.catalog.AccountStorageCredentialsAPI; -import com.databricks.sdk.service.catalog.AccountStorageCredentialsService; -import com.databricks.sdk.service.iam.AccountAccessControlAPI; -import com.databricks.sdk.service.iam.AccountAccessControlService; -import com.databricks.sdk.service.iam.AccountGroupsAPI; -import com.databricks.sdk.service.iam.AccountGroupsService; -import com.databricks.sdk.service.iam.AccountServicePrincipalsAPI; -import com.databricks.sdk.service.iam.AccountServicePrincipalsService; -import com.databricks.sdk.service.iam.AccountUsersAPI; -import com.databricks.sdk.service.iam.AccountUsersService; -import com.databricks.sdk.service.iam.WorkspaceAssignmentAPI; -import com.databricks.sdk.service.iam.WorkspaceAssignmentService; -import com.databricks.sdk.service.oauth2.CustomAppIntegrationAPI; -import com.databricks.sdk.service.oauth2.CustomAppIntegrationService; +import com.databricks.sdk.service.settings.AccountNetworkPolicyAPI; +import com.databricks.sdk.service.settings.AccountNetworkPolicyService; +import com.databricks.sdk.service.provisioning.NetworksAPI; +import com.databricks.sdk.service.provisioning.NetworksService; import com.databricks.sdk.service.oauth2.OAuthEnrollmentAPI; import com.databricks.sdk.service.oauth2.OAuthEnrollmentService; +import com.databricks.sdk.service.provisioning.PrivateAccessAPI; +import com.databricks.sdk.service.provisioning.PrivateAccessService; import com.databricks.sdk.service.oauth2.PublishedAppIntegrationAPI; import com.databricks.sdk.service.oauth2.PublishedAppIntegrationService; import com.databricks.sdk.service.oauth2.ServicePrincipalSecretsAPI; import com.databricks.sdk.service.oauth2.ServicePrincipalSecretsService; -import com.databricks.sdk.service.provisioning.CredentialsAPI; -import com.databricks.sdk.service.provisioning.CredentialsService; -import com.databricks.sdk.service.provisioning.EncryptionKeysAPI; -import com.databricks.sdk.service.provisioning.EncryptionKeysService; -import com.databricks.sdk.service.provisioning.NetworksAPI; -import com.databricks.sdk.service.provisioning.NetworksService; -import com.databricks.sdk.service.provisioning.PrivateAccessAPI; -import com.databricks.sdk.service.provisioning.PrivateAccessService; +import com.databricks.sdk.service.iam.AccountServicePrincipalsAPI; +import com.databricks.sdk.service.iam.AccountServicePrincipalsService; +import com.databricks.sdk.service.settings.AccountSettingsAPI; +import com.databricks.sdk.service.settings.AccountSettingsService; import com.databricks.sdk.service.provisioning.StorageAPI; import com.databricks.sdk.service.provisioning.StorageService; +import com.databricks.sdk.service.catalog.AccountStorageCredentialsAPI; +import com.databricks.sdk.service.catalog.AccountStorageCredentialsService; +import com.databricks.sdk.service.iam.AccountUsersAPI; +import com.databricks.sdk.service.iam.AccountUsersService; import com.databricks.sdk.service.provisioning.VpcEndpointsAPI; import com.databricks.sdk.service.provisioning.VpcEndpointsService; +import com.databricks.sdk.service.iam.WorkspaceAssignmentAPI; +import com.databricks.sdk.service.iam.WorkspaceAssignmentService; import com.databricks.sdk.service.provisioning.WorkspacesAPI; import com.databricks.sdk.service.provisioning.WorkspacesService; -import com.databricks.sdk.service.settings.AccountIpAccessListsAPI; -import com.databricks.sdk.service.settings.AccountIpAccessListsService; -import com.databricks.sdk.service.settings.AccountNetworkPolicyAPI; -import com.databricks.sdk.service.settings.AccountNetworkPolicyService; -import com.databricks.sdk.service.settings.AccountSettingsAPI; -import com.databricks.sdk.service.settings.AccountSettingsService; import com.databricks.sdk.support.Generated; -/** Entry point for accessing Databricks account-level APIs */ +/** + * Entry point for accessing Databricks account-level APIs + */ @Generated public class AccountClient { private final ApiClient apiClient; private final DatabricksConfig config; - + private AccountAccessControlAPI accessControlAPI; private BillableUsageAPI billableUsageAPI; private BudgetsAPI budgetsAPI; @@ -96,7 +99,7 @@ public AccountClient() { public AccountClient(DatabricksConfig config) { this.config = config; apiClient = new ApiClient(config); - + accessControlAPI = new AccountAccessControlAPI(apiClient); billableUsageAPI = new BillableUsageAPI(apiClient); budgetsAPI = new BudgetsAPI(apiClient); @@ -129,493 +132,526 @@ public AccountClient(boolean mock) { apiClient = null; config = null; } - + /** - * These APIs manage access rules on resources in an account. Currently, only grant rules are - * supported. A grant rule specifies a role assigned to a set of principals. A list of rules - * attached to a resource is called a rule set. + * These APIs manage access rules on resources in an account. Currently, only + * grant rules are supported. A grant rule specifies a role assigned to a set + * of principals. A list of rules attached to a resource is called a rule set. */ public AccountAccessControlAPI accessControl() { return accessControlAPI; } - + /** - * This API allows you to download billable usage logs for the specified account and date range. - * This feature works with all account types. + * This API allows you to download billable usage logs for the specified + * account and date range. This feature works with all account types. */ public BillableUsageAPI billableUsage() { return billableUsageAPI; } - + /** - * These APIs manage budget configuration including notifications for exceeding a budget for a - * period. They can also retrieve the status of each budget. + * These APIs manage budget configuration including notifications for + * exceeding a budget for a period. They can also retrieve the status of each + * budget. */ public BudgetsAPI budgets() { return budgetsAPI; } - + /** - * These APIs manage credential configurations for this workspace. Databricks needs access to a - * cross-account service IAM role in your AWS account so that Databricks can deploy clusters in - * the appropriate VPC for the new workspace. A credential configuration encapsulates this role - * information, and its ID is used when creating a new workspace. + * These APIs manage credential configurations for this workspace. Databricks + * needs access to a cross-account service IAM role in your AWS account so + * that Databricks can deploy clusters in the appropriate VPC for the new + * workspace. A credential configuration encapsulates this role information, + * and its ID is used when creating a new workspace. */ public CredentialsAPI credentials() { return credentialsAPI; } - + /** - * These APIs enable administrators to manage custom oauth app integrations, which is required for - * adding/using Custom OAuth App Integration like Tableau Cloud for Databricks in AWS cloud. - * - *

**Note:** You can only add/use the OAuth custom application integrations when OAuth - * enrollment status is enabled. For more details see :method:OAuthEnrollment/create + * These APIs enable administrators to manage custom oauth app integrations, + * which is required for adding/using Custom OAuth App Integration like + * Tableau Cloud for Databricks in AWS cloud. + * + * **Note:** You can only add/use the OAuth custom application integrations + * when OAuth enrollment status is enabled. For more details see + * :method:OAuthEnrollment/create */ public CustomAppIntegrationAPI customAppIntegration() { return customAppIntegrationAPI; } - + /** - * These APIs manage encryption key configurations for this workspace (optional). A key - * configuration encapsulates the AWS KMS key information and some information about how the key - * configuration can be used. There are two possible uses for key configurations: - * - *

* Managed services: A key configuration can be used to encrypt a workspace's notebook and - * secret data in the control plane, as well as Databricks SQL queries and query history. * - * Storage: A key configuration can be used to encrypt a workspace's DBFS and EBS data in the data - * plane. - * - *

In both of these cases, the key configuration's ID is used when creating a new workspace. - * This Preview feature is available if your account is on the E2 version of the platform. - * Updating a running workspace with workspace storage encryption requires that the workspace is - * on the E2 version of the platform. If you have an older workspace, it might not be on the E2 - * version of the platform. If you are not sure, contact your Databricks representative. + * These APIs manage encryption key configurations for this workspace + * (optional). A key configuration encapsulates the AWS KMS key information + * and some information about how the key configuration can be used. There are + * two possible uses for key configurations: + * + * * Managed services: A key configuration can be used to encrypt a + * workspace's notebook and secret data in the control plane, as well as + * Databricks SQL queries and query history. * Storage: A key configuration + * can be used to encrypt a workspace's DBFS and EBS data in the data plane. + * + * In both of these cases, the key configuration's ID is used when creating a + * new workspace. This Preview feature is available if your account is on the + * E2 version of the platform. Updating a running workspace with workspace + * storage encryption requires that the workspace is on the E2 version of the + * platform. If you have an older workspace, it might not be on the E2 version + * of the platform. If you are not sure, contact your Databricks + * representative. */ public EncryptionKeysAPI encryptionKeys() { return encryptionKeysAPI; } - + /** - * Groups simplify identity management, making it easier to assign access to Databricks account, - * data, and other securable objects. - * - *

It is best practice to assign access to workspaces and access-control policies in Unity - * Catalog to groups, instead of to users individually. All Databricks account identities can be - * assigned as members of groups, and members inherit permissions that are assigned to their - * group. + * Groups simplify identity management, making it easier to assign access to + * Databricks account, data, and other securable objects. + * + * It is best practice to assign access to workspaces and access-control + * policies in Unity Catalog to groups, instead of to users individually. All + * Databricks account identities can be assigned as members of groups, and + * members inherit permissions that are assigned to their group. */ public AccountGroupsAPI groups() { return groupsAPI; } - + /** - * The Accounts IP Access List API enables account admins to configure IP access lists for access - * to the account console. - * - *

Account IP Access Lists affect web application access and REST API access to the account - * console and account APIs. If the feature is disabled for the account, all access is allowed for - * this account. There is support for allow lists (inclusion) and block lists (exclusion). - * - *

When a connection is attempted: 1. **First, all block lists are checked.** If the connection - * IP address matches any block list, the connection is rejected. 2. **If the connection was not - * rejected by block lists**, the IP address is compared with the allow lists. - * - *

If there is at least one allow list for the account, the connection is allowed only if the - * IP address matches an allow list. If there are no allow lists for the account, all IP addresses - * are allowed. - * - *

For all allow lists and block lists combined, the account supports a maximum of 1000 IP/CIDR - * values, where one CIDR counts as a single value. - * - *

After changes to the account-level IP access lists, it can take a few minutes for changes to - * take effect. + * The Accounts IP Access List API enables account admins to configure IP + * access lists for access to the account console. + * + * Account IP Access Lists affect web application access and REST API access + * to the account console and account APIs. If the feature is disabled for the + * account, all access is allowed for this account. There is support for allow + * lists (inclusion) and block lists (exclusion). + * + * When a connection is attempted: 1. **First, all block lists are checked.** + * If the connection IP address matches any block list, the connection is + * rejected. 2. **If the connection was not rejected by block lists**, the IP + * address is compared with the allow lists. + * + * If there is at least one allow list for the account, the connection is + * allowed only if the IP address matches an allow list. If there are no allow + * lists for the account, all IP addresses are allowed. + * + * For all allow lists and block lists combined, the account supports a + * maximum of 1000 IP/CIDR values, where one CIDR counts as a single value. + * + * After changes to the account-level IP access lists, it can take a few + * minutes for changes to take effect. */ public AccountIpAccessListsAPI ipAccessLists() { return ipAccessListsAPI; } - + /** - * These APIs manage log delivery configurations for this account. The two supported log types for - * this API are _billable usage logs_ and _audit logs_. This feature is in Public Preview. This - * feature works with all account ID types. - * - *

Log delivery works with all account types. However, if your account is on the E2 version of - * the platform or on a select custom plan that allows multiple workspaces per account, you can - * optionally configure different storage destinations for each workspace. Log delivery status is - * also provided to know the latest status of log delivery attempts. The high-level flow of - * billable usage delivery: - * - *

1. **Create storage**: In AWS, [create a new AWS S3 bucket] with a specific bucket policy. - * Using Databricks APIs, call the Account API to create a [storage configuration - * object](#operation/create-storage-config) that uses the bucket name. 2. **Create credentials**: - * In AWS, create the appropriate AWS IAM role. For full details, including the required IAM role - * policies and trust relationship, see [Billable usage log delivery]. Using Databricks APIs, call - * the Account API to create a [credential configuration - * object](#operation/create-credential-config) that uses the IAM role's ARN. 3. **Create log - * delivery configuration**: Using Databricks APIs, call the Account API to [create a log delivery - * configuration](#operation/create-log-delivery-config) that uses the credential and storage - * configuration objects from previous steps. You can specify if the logs should include all - * events of that log type in your account (_Account level_ delivery) or only events for a - * specific set of workspaces (_workspace level_ delivery). Account level log delivery applies to - * all current and future workspaces plus account level logs, while workspace level log delivery - * solely delivers logs related to the specified workspaces. You can create multiple types of - * delivery configurations per account. - * - *

For billable usage delivery: * For more information about billable usage logs, see [Billable - * usage log delivery]. For the CSV schema, see the [Usage page]. * The delivery location is - * `//billable-usage/csv/`, where `` is the name of the optional - * delivery path prefix you set up during log delivery configuration. Files are named - * `workspaceId=-usageMonth=.csv`. * All billable usage logs apply to - * specific workspaces (_workspace level_ logs). You can aggregate usage for your entire account - * by creating an _account level_ delivery configuration that delivers logs for all current and - * future workspaces in your account. * The files are delivered daily by overwriting the month's - * CSV file for each workspace. - * - *

For audit log delivery: * For more information about about audit log delivery, see [Audit - * log delivery], which includes information about the used JSON schema. * The delivery location - * is + * These APIs manage log delivery configurations for this account. The two + * supported log types for this API are _billable usage logs_ and _audit + * logs_. This feature is in Public Preview. This feature works with all + * account ID types. + * + * Log delivery works with all account types. However, if your account is on + * the E2 version of the platform or on a select custom plan that allows + * multiple workspaces per account, you can optionally configure different + * storage destinations for each workspace. Log delivery status is also + * provided to know the latest status of log delivery attempts. The high-level + * flow of billable usage delivery: + * + * 1. **Create storage**: In AWS, [create a new AWS S3 bucket] with a specific + * bucket policy. Using Databricks APIs, call the Account API to create a + * [storage configuration object](#operation/create-storage-config) that uses + * the bucket name. 2. **Create credentials**: In AWS, create the appropriate + * AWS IAM role. For full details, including the required IAM role policies + * and trust relationship, see [Billable usage log delivery]. Using Databricks + * APIs, call the Account API to create a [credential configuration + * object](#operation/create-credential-config) that uses the IAM role's ARN. + * 3. **Create log delivery configuration**: Using Databricks APIs, call the + * Account API to [create a log delivery + * configuration](#operation/create-log-delivery-config) that uses the + * credential and storage configuration objects from previous steps. You can + * specify if the logs should include all events of that log type in your + * account (_Account level_ delivery) or only events for a specific set of + * workspaces (_workspace level_ delivery). Account level log delivery applies + * to all current and future workspaces plus account level logs, while + * workspace level log delivery solely delivers logs related to the specified + * workspaces. You can create multiple types of delivery configurations per + * account. + * + * For billable usage delivery: * For more information about billable usage + * logs, see [Billable usage log delivery]. For the CSV schema, see the [Usage + * page]. * The delivery location is + * `//billable-usage/csv/`, where `` is the name + * of the optional delivery path prefix you set up during log delivery + * configuration. Files are named + * `workspaceId=-usageMonth=.csv`. * All billable usage + * logs apply to specific workspaces (_workspace level_ logs). You can + * aggregate usage for your entire account by creating an _account level_ + * delivery configuration that delivers logs for all current and future + * workspaces in your account. * The files are delivered daily by overwriting + * the month's CSV file for each workspace. + * + * For audit log delivery: * For more information about about audit log + * delivery, see [Audit log delivery], which includes information about the + * used JSON schema. * The delivery location is * `//workspaceId=/date=/auditlogs_.json`. - * Files may get overwritten with the same content multiple times to achieve exactly-once - * delivery. * If the audit log delivery configuration included specific workspace IDs, only - * _workspace-level_ audit logs for those workspaces are delivered. If the log delivery - * configuration applies to the entire account (_account level_ delivery configuration), the audit - * log delivery includes workspace-level audit logs for all workspaces in the account as well as - * account-level audit logs. See [Audit log delivery] for details. * Auditable events are - * typically available in logs within 15 minutes. - * - *

[Audit log delivery]: - * https://docs.databricks.com/administration-guide/account-settings/audit-logs.html [Billable - * usage log delivery]: - * https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html + * Files may get overwritten with the same content multiple times to achieve + * exactly-once delivery. * If the audit log delivery configuration included + * specific workspace IDs, only _workspace-level_ audit logs for those + * workspaces are delivered. If the log delivery configuration applies to the + * entire account (_account level_ delivery configuration), the audit log + * delivery includes workspace-level audit logs for all workspaces in the + * account as well as account-level audit logs. See [Audit log delivery] for + * details. * Auditable events are typically available in logs within 15 + * minutes. + * + * [Audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html + * [Billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html * [Usage page]: https://docs.databricks.com/administration-guide/account-settings/usage.html - * [create a new AWS S3 bucket]: - * https://docs.databricks.com/administration-guide/account-api/aws-storage.html + * [create a new AWS S3 bucket]: https://docs.databricks.com/administration-guide/account-api/aws-storage.html */ public LogDeliveryAPI logDelivery() { return logDeliveryAPI; } - - /** These APIs manage metastore assignments to a workspace. */ + + /** + * These APIs manage metastore assignments to a workspace. + */ public AccountMetastoreAssignmentsAPI metastoreAssignments() { return metastoreAssignmentsAPI; } - + /** - * These APIs manage Unity Catalog metastores for an account. A metastore contains catalogs that - * can be associated with workspaces + * These APIs manage Unity Catalog metastores for an account. A metastore + * contains catalogs that can be associated with workspaces */ public AccountMetastoresAPI metastores() { return metastoresAPI; } - + /** - * Network policy is a set of rules that defines what can be accessed from your Databricks - * network. E.g.: You can choose to block your SQL UDF to access internet from your Databricks - * serverless clusters. - * - *

There is only one instance of this setting per account. Since this setting has a default - * value, this setting is present on all accounts even though it's never set on a given account. - * Deletion reverts the value of the setting back to the default value. + * Network policy is a set of rules that defines what can be accessed from + * your Databricks network. E.g.: You can choose to block your SQL UDF to + * access internet from your Databricks serverless clusters. + * + * There is only one instance of this setting per account. Since this setting + * has a default value, this setting is present on all accounts even though + * it's never set on a given account. Deletion reverts the value of the + * setting back to the default value. */ public AccountNetworkPolicyAPI networkPolicy() { return networkPolicyAPI; } - + /** - * These APIs manage network configurations for customer-managed VPCs (optional). Its ID is used - * when creating a new workspace if you use customer-managed VPCs. + * These APIs manage network configurations for customer-managed VPCs + * (optional). Its ID is used when creating a new workspace if you use + * customer-managed VPCs. */ public NetworksAPI networks() { return networksAPI; } - + /** - * These APIs enable administrators to enroll OAuth for their accounts, which is required for - * adding/using any OAuth published/custom application integration. - * - *

**Note:** Your account must be on the E2 version to use these APIs, this is because OAuth is - * only supported on the E2 version. + * These APIs enable administrators to enroll OAuth for their accounts, which + * is required for adding/using any OAuth published/custom application + * integration. + * + * **Note:** Your account must be on the E2 version to use these APIs, this is + * because OAuth is only supported on the E2 version. */ public OAuthEnrollmentAPI oAuthEnrollment() { return oAuthEnrollmentAPI; } - - /** These APIs manage private access settings for this account. */ + + /** + * These APIs manage private access settings for this account. + */ public PrivateAccessAPI privateAccess() { return privateAccessAPI; } - + /** - * These APIs enable administrators to manage published oauth app integrations, which is required - * for adding/using Published OAuth App Integration like Tableau Cloud for Databricks in AWS - * cloud. - * - *

**Note:** You can only add/use the OAuth published application integrations when OAuth - * enrollment status is enabled. For more details see :method:OAuthEnrollment/create + * These APIs enable administrators to manage published oauth app + * integrations, which is required for adding/using Published OAuth App + * Integration like Tableau Cloud for Databricks in AWS cloud. + * + * **Note:** You can only add/use the OAuth published application integrations + * when OAuth enrollment status is enabled. For more details see + * :method:OAuthEnrollment/create */ public PublishedAppIntegrationAPI publishedAppIntegration() { return publishedAppIntegrationAPI; } - + /** * These APIs enable administrators to manage service principal secrets. - * - *

You can use the generated secrets to obtain OAuth access tokens for a service principal, - * which can then be used to access Databricks Accounts and Workspace APIs. For more information, - * see [Authentication using OAuth tokens for service principals], - * - *

In addition, the generated secrets can be used to configure the Databricks Terraform - * Provider to authenticate with the service principal. For more information, see [Databricks - * Terraform Provider]. - * - *

[Authentication using OAuth tokens for service principals]: - * https://docs.databricks.com/dev-tools/authentication-oauth.html [Databricks Terraform - * Provider]: - * https://github.com/databricks/terraform-provider-databricks/blob/master/docs/index.md#authenticating-with-service-principal + * + * You can use the generated secrets to obtain OAuth access tokens for a + * service principal, which can then be used to access Databricks Accounts and + * Workspace APIs. For more information, see [Authentication using OAuth + * tokens for service principals], + * + * In addition, the generated secrets can be used to configure the Databricks + * Terraform Provider to authenticate with the service principal. For more + * information, see [Databricks Terraform Provider]. + * + * [Authentication using OAuth tokens for service principals]: https://docs.databricks.com/dev-tools/authentication-oauth.html + * [Databricks Terraform Provider]: https://github.com/databricks/terraform-provider-databricks/blob/master/docs/index.md#authenticating-with-service-principal */ public ServicePrincipalSecretsAPI servicePrincipalSecrets() { return servicePrincipalSecretsAPI; } - + /** - * Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD - * platforms. Databricks recommends creating service principals to run production jobs or modify - * production data. If all processes that act on production data run with service principals, - * interactive users do not need any write, delete, or modify privileges in production. This - * eliminates the risk of a user overwriting production data by accident. + * Identities for use with jobs, automated tools, and systems such as scripts, + * apps, and CI/CD platforms. Databricks recommends creating service + * principals to run production jobs or modify production data. If all + * processes that act on production data run with service principals, + * interactive users do not need any write, delete, or modify privileges in + * production. This eliminates the risk of a user overwriting production data + * by accident. */ public AccountServicePrincipalsAPI servicePrincipals() { return servicePrincipalsAPI; } - + /** - * The Personal Compute enablement setting lets you control which users can use the Personal - * Compute default policy to create compute resources. By default all users in all workspaces have - * access (ON), but you can change the setting to instead let individual workspaces configure - * access control (DELEGATE). - * - *

There is only one instance of this setting per account. Since this setting has a default - * value, this setting is present on all accounts even though it's never set on a given account. - * Deletion reverts the value of the setting back to the default value. + * The Personal Compute enablement setting lets you control which users can + * use the Personal Compute default policy to create compute resources. By + * default all users in all workspaces have access (ON), but you can change + * the setting to instead let individual workspaces configure access control + * (DELEGATE). + * + * There is only one instance of this setting per account. Since this setting + * has a default value, this setting is present on all accounts even though + * it's never set on a given account. Deletion reverts the value of the + * setting back to the default value. */ public AccountSettingsAPI settings() { return settingsAPI; } - + /** - * These APIs manage storage configurations for this workspace. A root storage S3 bucket in your - * account is required to store objects like cluster logs, notebook revisions, and job results. - * You can also use the root storage S3 bucket for storage of non-production DBFS data. A storage - * configuration encapsulates this bucket information, and its ID is used when creating a new - * workspace. + * These APIs manage storage configurations for this workspace. A root storage + * S3 bucket in your account is required to store objects like cluster logs, + * notebook revisions, and job results. You can also use the root storage S3 + * bucket for storage of non-production DBFS data. A storage configuration + * encapsulates this bucket information, and its ID is used when creating a + * new workspace. */ public StorageAPI storage() { return storageAPI; } - - /** These APIs manage storage credentials for a particular metastore. */ + + /** + * These APIs manage storage credentials for a particular metastore. + */ public AccountStorageCredentialsAPI storageCredentials() { return storageCredentialsAPI; } - + /** - * User identities recognized by Databricks and represented by email addresses. - * - *

Databricks recommends using SCIM provisioning to sync users and groups automatically from - * your identity provider to your Databricks account. SCIM streamlines onboarding a new employee - * or team by using your identity provider to create users and groups in Databricks account and - * give them the proper level of access. When a user leaves your organization or no longer needs - * access to Databricks account, admins can terminate the user in your identity provider and that - * user’s account will also be removed from Databricks account. This ensures a consistent - * offboarding process and prevents unauthorized users from accessing sensitive data. + * User identities recognized by Databricks and represented by email + * addresses. + * + * Databricks recommends using SCIM provisioning to sync users and groups + * automatically from your identity provider to your Databricks account. SCIM + * streamlines onboarding a new employee or team by using your identity + * provider to create users and groups in Databricks account and give them the + * proper level of access. When a user leaves your organization or no longer + * needs access to Databricks account, admins can terminate the user in your + * identity provider and that user’s account will also be removed from + * Databricks account. This ensures a consistent offboarding process and + * prevents unauthorized users from accessing sensitive data. */ public AccountUsersAPI users() { return usersAPI; } - - /** These APIs manage VPC endpoint configurations for this account. */ + + /** + * These APIs manage VPC endpoint configurations for this account. + */ public VpcEndpointsAPI vpcEndpoints() { return vpcEndpointsAPI; } - + /** - * The Workspace Permission Assignment API allows you to manage workspace permissions for - * principals in your account. + * The Workspace Permission Assignment API allows you to manage workspace + * permissions for principals in your account. */ public WorkspaceAssignmentAPI workspaceAssignment() { return workspaceAssignmentAPI; } - + /** - * These APIs manage workspaces for this account. A Databricks workspace is an environment for - * accessing all of your Databricks assets. The workspace organizes objects (notebooks, libraries, - * and experiments) into folders, and provides access to data and computational resources such as - * clusters and jobs. - * - *

These endpoints are available if your account is on the E2 version of the platform or on a - * select custom plan that allows multiple workspaces per account. + * These APIs manage workspaces for this account. A Databricks workspace is an + * environment for accessing all of your Databricks assets. The workspace + * organizes objects (notebooks, libraries, and experiments) into folders, and + * provides access to data and computational resources such as clusters and + * jobs. + * + * These endpoints are available if your account is on the E2 version of the + * platform or on a select custom plan that allows multiple workspaces per + * account. */ public WorkspacesAPI workspaces() { return workspacesAPI; } - + + /** Override AccountAccessControlAPI with mock */ public AccountClient withAccessControlImpl(AccountAccessControlService accountAccessControl) { accessControlAPI = new AccountAccessControlAPI(accountAccessControl); return this; } - + /** Override BillableUsageAPI with mock */ public AccountClient withBillableUsageImpl(BillableUsageService billableUsage) { billableUsageAPI = new BillableUsageAPI(billableUsage); return this; } - + /** Override BudgetsAPI with mock */ public AccountClient withBudgetsImpl(BudgetsService budgets) { budgetsAPI = new BudgetsAPI(budgets); return this; } - + /** Override CredentialsAPI with mock */ public AccountClient withCredentialsImpl(CredentialsService credentials) { credentialsAPI = new CredentialsAPI(credentials); return this; } - + /** Override CustomAppIntegrationAPI with mock */ - public AccountClient withCustomAppIntegrationImpl( - CustomAppIntegrationService customAppIntegration) { + public AccountClient withCustomAppIntegrationImpl(CustomAppIntegrationService customAppIntegration) { customAppIntegrationAPI = new CustomAppIntegrationAPI(customAppIntegration); return this; } - + /** Override EncryptionKeysAPI with mock */ public AccountClient withEncryptionKeysImpl(EncryptionKeysService encryptionKeys) { encryptionKeysAPI = new EncryptionKeysAPI(encryptionKeys); return this; } - + /** Override AccountGroupsAPI with mock */ public AccountClient withGroupsImpl(AccountGroupsService accountGroups) { groupsAPI = new AccountGroupsAPI(accountGroups); return this; } - + /** Override AccountIpAccessListsAPI with mock */ public AccountClient withIpAccessListsImpl(AccountIpAccessListsService accountIpAccessLists) { ipAccessListsAPI = new AccountIpAccessListsAPI(accountIpAccessLists); return this; } - + /** Override LogDeliveryAPI with mock */ public AccountClient withLogDeliveryImpl(LogDeliveryService logDelivery) { logDeliveryAPI = new LogDeliveryAPI(logDelivery); return this; } - + /** Override AccountMetastoreAssignmentsAPI with mock */ - public AccountClient withMetastoreAssignmentsImpl( - AccountMetastoreAssignmentsService accountMetastoreAssignments) { + public AccountClient withMetastoreAssignmentsImpl(AccountMetastoreAssignmentsService accountMetastoreAssignments) { metastoreAssignmentsAPI = new AccountMetastoreAssignmentsAPI(accountMetastoreAssignments); return this; } - + /** Override AccountMetastoresAPI with mock */ public AccountClient withMetastoresImpl(AccountMetastoresService accountMetastores) { metastoresAPI = new AccountMetastoresAPI(accountMetastores); return this; } - + /** Override AccountNetworkPolicyAPI with mock */ public AccountClient withNetworkPolicyImpl(AccountNetworkPolicyService accountNetworkPolicy) { networkPolicyAPI = new AccountNetworkPolicyAPI(accountNetworkPolicy); return this; } - + /** Override NetworksAPI with mock */ public AccountClient withNetworksImpl(NetworksService networks) { networksAPI = new NetworksAPI(networks); return this; } - + /** Override OAuthEnrollmentAPI with mock */ public AccountClient withOAuthEnrollmentImpl(OAuthEnrollmentService oAuthEnrollment) { oAuthEnrollmentAPI = new OAuthEnrollmentAPI(oAuthEnrollment); return this; } - + /** Override PrivateAccessAPI with mock */ public AccountClient withPrivateAccessImpl(PrivateAccessService privateAccess) { privateAccessAPI = new PrivateAccessAPI(privateAccess); return this; } - + /** Override PublishedAppIntegrationAPI with mock */ - public AccountClient withPublishedAppIntegrationImpl( - PublishedAppIntegrationService publishedAppIntegration) { + public AccountClient withPublishedAppIntegrationImpl(PublishedAppIntegrationService publishedAppIntegration) { publishedAppIntegrationAPI = new PublishedAppIntegrationAPI(publishedAppIntegration); return this; } - + /** Override ServicePrincipalSecretsAPI with mock */ - public AccountClient withServicePrincipalSecretsImpl( - ServicePrincipalSecretsService servicePrincipalSecrets) { + public AccountClient withServicePrincipalSecretsImpl(ServicePrincipalSecretsService servicePrincipalSecrets) { servicePrincipalSecretsAPI = new ServicePrincipalSecretsAPI(servicePrincipalSecrets); return this; } - + /** Override AccountServicePrincipalsAPI with mock */ - public AccountClient withServicePrincipalsImpl( - AccountServicePrincipalsService accountServicePrincipals) { + public AccountClient withServicePrincipalsImpl(AccountServicePrincipalsService accountServicePrincipals) { servicePrincipalsAPI = new AccountServicePrincipalsAPI(accountServicePrincipals); return this; } - + /** Override AccountSettingsAPI with mock */ public AccountClient withSettingsImpl(AccountSettingsService accountSettings) { settingsAPI = new AccountSettingsAPI(accountSettings); return this; } - + /** Override StorageAPI with mock */ public AccountClient withStorageImpl(StorageService storage) { storageAPI = new StorageAPI(storage); return this; } - + /** Override AccountStorageCredentialsAPI with mock */ - public AccountClient withStorageCredentialsImpl( - AccountStorageCredentialsService accountStorageCredentials) { + public AccountClient withStorageCredentialsImpl(AccountStorageCredentialsService accountStorageCredentials) { storageCredentialsAPI = new AccountStorageCredentialsAPI(accountStorageCredentials); return this; } - + /** Override AccountUsersAPI with mock */ public AccountClient withUsersImpl(AccountUsersService accountUsers) { usersAPI = new AccountUsersAPI(accountUsers); return this; } - + /** Override VpcEndpointsAPI with mock */ public AccountClient withVpcEndpointsImpl(VpcEndpointsService vpcEndpoints) { vpcEndpointsAPI = new VpcEndpointsAPI(vpcEndpoints); return this; } - + /** Override WorkspaceAssignmentAPI with mock */ public AccountClient withWorkspaceAssignmentImpl(WorkspaceAssignmentService workspaceAssignment) { workspaceAssignmentAPI = new WorkspaceAssignmentAPI(workspaceAssignment); return this; } - + /** Override WorkspacesAPI with mock */ public AccountClient withWorkspacesImpl(WorkspacesService workspaces) { workspacesAPI = new WorkspacesAPI(workspaces); return this; } - + public ApiClient apiClient() { return apiClient; } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java index 8025198fb..d96e0ceb1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java @@ -4,129 +4,189 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.core.ConfigLoader; -import com.databricks.sdk.core.DatabricksConfig; -import com.databricks.sdk.mixin.ClustersExt; +import com.databricks.sdk.core.DatabricksConfig;import com.databricks.sdk.mixin.ClustersExt; import com.databricks.sdk.mixin.DbfsExt; import com.databricks.sdk.mixin.SecretsExt; + +import com.databricks.sdk.service.iam.AccountAccessControlProxyAPI; +import com.databricks.sdk.service.iam.AccountAccessControlProxyService; + +import com.databricks.sdk.service.sql.AlertsAPI; +import com.databricks.sdk.service.sql.AlertsService; + import com.databricks.sdk.service.catalog.ArtifactAllowlistsAPI; import com.databricks.sdk.service.catalog.ArtifactAllowlistsService; + import com.databricks.sdk.service.catalog.CatalogsAPI; import com.databricks.sdk.service.catalog.CatalogsService; + +import com.databricks.sdk.service.sharing.CleanRoomsAPI; +import com.databricks.sdk.service.sharing.CleanRoomsService; + +import com.databricks.sdk.service.compute.ClusterPoliciesAPI; +import com.databricks.sdk.service.compute.ClusterPoliciesService; + +import com.databricks.sdk.service.compute.ClustersAPI; +import com.databricks.sdk.service.compute.ClustersService; + +import com.databricks.sdk.service.compute.CommandExecutionAPI; +import com.databricks.sdk.service.compute.CommandExecutionService; + import com.databricks.sdk.service.catalog.ConnectionsAPI; import com.databricks.sdk.service.catalog.ConnectionsService; + +import com.databricks.sdk.service.iam.CurrentUserAPI; +import com.databricks.sdk.service.iam.CurrentUserService; + +import com.databricks.sdk.service.sql.DashboardsAPI; +import com.databricks.sdk.service.sql.DashboardsService; + +import com.databricks.sdk.service.sql.DataSourcesAPI; +import com.databricks.sdk.service.sql.DataSourcesService; + +import com.databricks.sdk.service.files.DbfsAPI; +import com.databricks.sdk.service.files.DbfsService; + +import com.databricks.sdk.service.sql.DbsqlPermissionsAPI; +import com.databricks.sdk.service.sql.DbsqlPermissionsService; + +import com.databricks.sdk.service.ml.ExperimentsAPI; +import com.databricks.sdk.service.ml.ExperimentsService; + import com.databricks.sdk.service.catalog.ExternalLocationsAPI; import com.databricks.sdk.service.catalog.ExternalLocationsService; + import com.databricks.sdk.service.catalog.FunctionsAPI; import com.databricks.sdk.service.catalog.FunctionsService; -import com.databricks.sdk.service.catalog.GrantsAPI; -import com.databricks.sdk.service.catalog.GrantsService; -import com.databricks.sdk.service.catalog.MetastoresAPI; -import com.databricks.sdk.service.catalog.MetastoresService; -import com.databricks.sdk.service.catalog.SchemasAPI; -import com.databricks.sdk.service.catalog.SchemasService; -import com.databricks.sdk.service.catalog.SecurableTagsAPI; -import com.databricks.sdk.service.catalog.SecurableTagsService; -import com.databricks.sdk.service.catalog.StorageCredentialsAPI; -import com.databricks.sdk.service.catalog.StorageCredentialsService; -import com.databricks.sdk.service.catalog.SubentityTagsAPI; -import com.databricks.sdk.service.catalog.SubentityTagsService; -import com.databricks.sdk.service.catalog.SystemSchemasAPI; -import com.databricks.sdk.service.catalog.SystemSchemasService; -import com.databricks.sdk.service.catalog.TableConstraintsAPI; -import com.databricks.sdk.service.catalog.TableConstraintsService; -import com.databricks.sdk.service.catalog.TablesAPI; -import com.databricks.sdk.service.catalog.TablesService; -import com.databricks.sdk.service.catalog.VolumesAPI; -import com.databricks.sdk.service.catalog.VolumesService; -import com.databricks.sdk.service.catalog.WorkspaceBindingsAPI; -import com.databricks.sdk.service.catalog.WorkspaceBindingsService; -import com.databricks.sdk.service.compute.ClusterPoliciesAPI; -import com.databricks.sdk.service.compute.ClusterPoliciesService; -import com.databricks.sdk.service.compute.ClustersService; -import com.databricks.sdk.service.compute.CommandExecutionAPI; -import com.databricks.sdk.service.compute.CommandExecutionService; + +import com.databricks.sdk.service.workspace.GitCredentialsAPI; +import com.databricks.sdk.service.workspace.GitCredentialsService; + import com.databricks.sdk.service.compute.GlobalInitScriptsAPI; import com.databricks.sdk.service.compute.GlobalInitScriptsService; + +import com.databricks.sdk.service.catalog.GrantsAPI; +import com.databricks.sdk.service.catalog.GrantsService; + +import com.databricks.sdk.service.iam.GroupsAPI; +import com.databricks.sdk.service.iam.GroupsService; + import com.databricks.sdk.service.compute.InstancePoolsAPI; import com.databricks.sdk.service.compute.InstancePoolsService; + import com.databricks.sdk.service.compute.InstanceProfilesAPI; import com.databricks.sdk.service.compute.InstanceProfilesService; -import com.databricks.sdk.service.compute.LibrariesAPI; -import com.databricks.sdk.service.compute.LibrariesService; -import com.databricks.sdk.service.compute.PolicyFamiliesAPI; -import com.databricks.sdk.service.compute.PolicyFamiliesService; -import com.databricks.sdk.service.files.DbfsService; -import com.databricks.sdk.service.iam.AccountAccessControlProxyAPI; -import com.databricks.sdk.service.iam.AccountAccessControlProxyService; -import com.databricks.sdk.service.iam.CurrentUserAPI; -import com.databricks.sdk.service.iam.CurrentUserService; -import com.databricks.sdk.service.iam.GroupsAPI; -import com.databricks.sdk.service.iam.GroupsService; -import com.databricks.sdk.service.iam.PermissionsAPI; -import com.databricks.sdk.service.iam.PermissionsService; -import com.databricks.sdk.service.iam.ServicePrincipalsAPI; -import com.databricks.sdk.service.iam.ServicePrincipalsService; -import com.databricks.sdk.service.iam.UsersAPI; -import com.databricks.sdk.service.iam.UsersService; + +import com.databricks.sdk.service.settings.IpAccessListsAPI; +import com.databricks.sdk.service.settings.IpAccessListsService; + import com.databricks.sdk.service.jobs.JobsAPI; import com.databricks.sdk.service.jobs.JobsService; -import com.databricks.sdk.service.ml.ExperimentsAPI; -import com.databricks.sdk.service.ml.ExperimentsService; + +import com.databricks.sdk.service.compute.LibrariesAPI; +import com.databricks.sdk.service.compute.LibrariesService; + +import com.databricks.sdk.service.catalog.MetastoresAPI; +import com.databricks.sdk.service.catalog.MetastoresService; + import com.databricks.sdk.service.ml.ModelRegistryAPI; import com.databricks.sdk.service.ml.ModelRegistryService; + +import com.databricks.sdk.service.iam.PermissionsAPI; +import com.databricks.sdk.service.iam.PermissionsService; + import com.databricks.sdk.service.pipelines.PipelinesAPI; import com.databricks.sdk.service.pipelines.PipelinesService; -import com.databricks.sdk.service.serving.ServingEndpointsAPI; -import com.databricks.sdk.service.serving.ServingEndpointsService; -import com.databricks.sdk.service.settings.IpAccessListsAPI; -import com.databricks.sdk.service.settings.IpAccessListsService; -import com.databricks.sdk.service.settings.TokenManagementAPI; -import com.databricks.sdk.service.settings.TokenManagementService; -import com.databricks.sdk.service.settings.TokensAPI; -import com.databricks.sdk.service.settings.TokensService; -import com.databricks.sdk.service.settings.WorkspaceConfAPI; -import com.databricks.sdk.service.settings.WorkspaceConfService; -import com.databricks.sdk.service.sharing.CleanRoomsAPI; -import com.databricks.sdk.service.sharing.CleanRoomsService; + +import com.databricks.sdk.service.compute.PolicyFamiliesAPI; +import com.databricks.sdk.service.compute.PolicyFamiliesService; + import com.databricks.sdk.service.sharing.ProvidersAPI; import com.databricks.sdk.service.sharing.ProvidersService; + +import com.databricks.sdk.service.sql.QueriesAPI; +import com.databricks.sdk.service.sql.QueriesService; + +import com.databricks.sdk.service.sql.QueryHistoryAPI; +import com.databricks.sdk.service.sql.QueryHistoryService; + import com.databricks.sdk.service.sharing.RecipientActivationAPI; import com.databricks.sdk.service.sharing.RecipientActivationService; + import com.databricks.sdk.service.sharing.RecipientsAPI; import com.databricks.sdk.service.sharing.RecipientsService; + +import com.databricks.sdk.service.workspace.ReposAPI; +import com.databricks.sdk.service.workspace.ReposService; + +import com.databricks.sdk.service.catalog.SchemasAPI; +import com.databricks.sdk.service.catalog.SchemasService; + +import com.databricks.sdk.service.workspace.SecretsAPI; +import com.databricks.sdk.service.workspace.SecretsService; + +import com.databricks.sdk.service.catalog.SecurableTagsAPI; +import com.databricks.sdk.service.catalog.SecurableTagsService; + +import com.databricks.sdk.service.iam.ServicePrincipalsAPI; +import com.databricks.sdk.service.iam.ServicePrincipalsService; + +import com.databricks.sdk.service.serving.ServingEndpointsAPI; +import com.databricks.sdk.service.serving.ServingEndpointsService; + import com.databricks.sdk.service.sharing.SharesAPI; import com.databricks.sdk.service.sharing.SharesService; -import com.databricks.sdk.service.sql.AlertsAPI; -import com.databricks.sdk.service.sql.AlertsService; -import com.databricks.sdk.service.sql.DashboardsAPI; -import com.databricks.sdk.service.sql.DashboardsService; -import com.databricks.sdk.service.sql.DataSourcesAPI; -import com.databricks.sdk.service.sql.DataSourcesService; -import com.databricks.sdk.service.sql.DbsqlPermissionsAPI; -import com.databricks.sdk.service.sql.DbsqlPermissionsService; -import com.databricks.sdk.service.sql.QueriesAPI; -import com.databricks.sdk.service.sql.QueriesService; -import com.databricks.sdk.service.sql.QueryHistoryAPI; -import com.databricks.sdk.service.sql.QueryHistoryService; + import com.databricks.sdk.service.sql.StatementExecutionAPI; import com.databricks.sdk.service.sql.StatementExecutionService; + +import com.databricks.sdk.service.catalog.StorageCredentialsAPI; +import com.databricks.sdk.service.catalog.StorageCredentialsService; + +import com.databricks.sdk.service.catalog.SubentityTagsAPI; +import com.databricks.sdk.service.catalog.SubentityTagsService; + +import com.databricks.sdk.service.catalog.SystemSchemasAPI; +import com.databricks.sdk.service.catalog.SystemSchemasService; + +import com.databricks.sdk.service.catalog.TableConstraintsAPI; +import com.databricks.sdk.service.catalog.TableConstraintsService; + +import com.databricks.sdk.service.catalog.TablesAPI; +import com.databricks.sdk.service.catalog.TablesService; + +import com.databricks.sdk.service.settings.TokenManagementAPI; +import com.databricks.sdk.service.settings.TokenManagementService; + +import com.databricks.sdk.service.settings.TokensAPI; +import com.databricks.sdk.service.settings.TokensService; + +import com.databricks.sdk.service.iam.UsersAPI; +import com.databricks.sdk.service.iam.UsersService; + +import com.databricks.sdk.service.catalog.VolumesAPI; +import com.databricks.sdk.service.catalog.VolumesService; + import com.databricks.sdk.service.sql.WarehousesAPI; import com.databricks.sdk.service.sql.WarehousesService; -import com.databricks.sdk.service.workspace.GitCredentialsAPI; -import com.databricks.sdk.service.workspace.GitCredentialsService; -import com.databricks.sdk.service.workspace.ReposAPI; -import com.databricks.sdk.service.workspace.ReposService; -import com.databricks.sdk.service.workspace.SecretsService; + import com.databricks.sdk.service.workspace.WorkspaceAPI; import com.databricks.sdk.service.workspace.WorkspaceService; -import com.databricks.sdk.support.Generated; -/** Entry point for accessing Databricks workspace-level APIs */ +import com.databricks.sdk.service.catalog.WorkspaceBindingsAPI; +import com.databricks.sdk.service.catalog.WorkspaceBindingsService; + +import com.databricks.sdk.service.settings.WorkspaceConfAPI; +import com.databricks.sdk.service.settings.WorkspaceConfService; + +import com.databricks.sdk.support.Generated;/** + * Entry point for accessing Databricks workspace-level APIs + */ @Generated public class WorkspaceClient { private final ApiClient apiClient; private final DatabricksConfig config; - + private AccountAccessControlProxyAPI accountAccessControlProxyAPI; private AlertsAPI alertsAPI; private ArtifactAllowlistsAPI artifactAllowlistsAPI; @@ -192,7 +252,7 @@ public WorkspaceClient() { public WorkspaceClient(DatabricksConfig config) { this.config = config; apiClient = new ApiClient(config); - + accountAccessControlProxyAPI = new AccountAccessControlProxyAPI(apiClient); alertsAPI = new AlertsAPI(apiClient); artifactAllowlistsAPI = new ArtifactAllowlistsAPI(apiClient); @@ -257,1309 +317,1412 @@ public WorkspaceClient(boolean mock) { apiClient = null; config = null; } - + /** - * These APIs manage access rules on resources in an account. Currently, only grant rules are - * supported. A grant rule specifies a role assigned to a set of principals. A list of rules - * attached to a resource is called a rule set. A workspace must belong to an account for these - * APIs to work. + * These APIs manage access rules on resources in an account. Currently, only + * grant rules are supported. A grant rule specifies a role assigned to a set + * of principals. A list of rules attached to a resource is called a rule set. + * A workspace must belong to an account for these APIs to work. */ public AccountAccessControlProxyAPI accountAccessControlProxy() { return accountAccessControlProxyAPI; } - + /** - * The alerts API can be used to perform CRUD operations on alerts. An alert is a Databricks SQL - * object that periodically runs a query, evaluates a condition of its result, and notifies one or - * more users and/or notification destinations if the condition was met. Alerts can be scheduled - * using the `sql_task` type of the Jobs API, e.g. :method:jobs/create. + * The alerts API can be used to perform CRUD operations on alerts. An alert + * is a Databricks SQL object that periodically runs a query, evaluates a + * condition of its result, and notifies one or more users and/or notification + * destinations if the condition was met. Alerts can be scheduled using the + * `sql_task` type of the Jobs API, e.g. :method:jobs/create. */ public AlertsAPI alerts() { return alertsAPI; } - + /** - * In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the `allowlist` - * in UC so that users can leverage these artifacts on compute configured with shared access mode. + * In Databricks Runtime 13.3 and above, you can add libraries and init + * scripts to the `allowlist` in UC so that users can leverage these artifacts + * on compute configured with shared access mode. */ public ArtifactAllowlistsAPI artifactAllowlists() { return artifactAllowlistsAPI; } - + /** - * A catalog is the first layer of Unity Catalog’s three-level namespace. It’s used to organize - * your data assets. Users can see all catalogs on which they have been assigned the USE_CATALOG - * data permission. - * - *

In Unity Catalog, admins and data stewards manage users and their access to data centrally - * across all of the workspaces in a Databricks account. Users in different workspaces can share - * access to the same data, depending on privileges granted centrally in Unity Catalog. + * A catalog is the first layer of Unity Catalog’s three-level namespace. + * It’s used to organize your data assets. Users can see all catalogs on + * which they have been assigned the USE_CATALOG data permission. + * + * In Unity Catalog, admins and data stewards manage users and their access to + * data centrally across all of the workspaces in a Databricks account. Users + * in different workspaces can share access to the same data, depending on + * privileges granted centrally in Unity Catalog. */ public CatalogsAPI catalogs() { return catalogsAPI; } - + /** - * A clean room is a secure, privacy-protecting environment where two or more parties can share - * sensitive enterprise data, including customer data, for measurements, insights, activation and - * other use cases. - * - *

To create clean rooms, you must be a metastore admin or a user with the + * A clean room is a secure, privacy-protecting environment where two or more + * parties can share sensitive enterprise data, including customer data, for + * measurements, insights, activation and other use cases. + * + * To create clean rooms, you must be a metastore admin or a user with the * **CREATE_CLEAN_ROOM** privilege. */ public CleanRoomsAPI cleanRooms() { return cleanRoomsAPI; } - + /** - * Cluster policy limits the ability to configure clusters based on a set of rules. The policy - * rules limit the attributes or attribute values available for cluster creation. Cluster policies - * have ACLs that limit their use to specific users and groups. - * - *

Cluster policies let you limit users to create clusters with prescribed settings, simplify - * the user interface and enable more users to create their own clusters (by fixing and hiding - * some values), control cost by limiting per cluster maximum cost (by setting limits on - * attributes whose values contribute to hourly price). - * - *

Cluster policy permissions limit which policies a user can select in the Policy drop-down - * when the user creates a cluster: - A user who has cluster create permission can select the - * Unrestricted policy and create fully-configurable clusters. - A user who has both cluster - * create permission and access to cluster policies can select the Unrestricted policy and - * policies they have access to. - A user that has access to only cluster policies, can select the - * policies they have access to. - * - *

If no policies have been created in the workspace, the Policy drop-down does not display. - * - *

Only admin users can create, edit, and delete policies. Admin users also have access to all - * policies. + * Cluster policy limits the ability to configure clusters based on a set of + * rules. The policy rules limit the attributes or attribute values available + * for cluster creation. Cluster policies have ACLs that limit their use to + * specific users and groups. + * + * Cluster policies let you limit users to create clusters with prescribed + * settings, simplify the user interface and enable more users to create their + * own clusters (by fixing and hiding some values), control cost by limiting + * per cluster maximum cost (by setting limits on attributes whose values + * contribute to hourly price). + * + * Cluster policy permissions limit which policies a user can select in the + * Policy drop-down when the user creates a cluster: - A user who has cluster + * create permission can select the Unrestricted policy and create + * fully-configurable clusters. - A user who has both cluster create + * permission and access to cluster policies can select the Unrestricted + * policy and policies they have access to. - A user that has access to only + * cluster policies, can select the policies they have access to. + * + * If no policies have been created in the workspace, the Policy drop-down + * does not display. + * + * Only admin users can create, edit, and delete policies. Admin users also + * have access to all policies. */ public ClusterPoliciesAPI clusterPolicies() { return clusterPoliciesAPI; } - + /** - * The Clusters API allows you to create, start, edit, list, terminate, and delete clusters. - * - *

Databricks maps cluster node instance types to compute units known as DBUs. See the instance - * type pricing page for a list of the supported instance types and their corresponding DBUs. - * - *

A Databricks cluster is a set of computation resources and configurations on which you run - * data engineering, data science, and data analytics workloads, such as production ETL pipelines, - * streaming analytics, ad-hoc analytics, and machine learning. - * - *

You run these workloads as a set of commands in a notebook or as an automated job. - * Databricks makes a distinction between all-purpose clusters and job clusters. You use - * all-purpose clusters to analyze data collaboratively using interactive notebooks. You use job - * clusters to run fast and robust automated jobs. - * - *

You can create an all-purpose cluster using the UI, CLI, or REST API. You can manually - * terminate and restart an all-purpose cluster. Multiple users can share such clusters to do - * collaborative interactive analysis. - * - *

IMPORTANT: Databricks retains cluster configuration information for up to 200 all-purpose - * clusters terminated in the last 30 days and up to 30 job clusters recently terminated by the - * job scheduler. To keep an all-purpose cluster configuration even after it has been terminated - * for more than 30 days, an administrator can pin a cluster to the cluster list. + * The Clusters API allows you to create, start, edit, list, terminate, and + * delete clusters. + * + * Databricks maps cluster node instance types to compute units known as DBUs. + * See the instance type pricing page for a list of the supported instance + * types and their corresponding DBUs. + * + * A Databricks cluster is a set of computation resources and configurations + * on which you run data engineering, data science, and data analytics + * workloads, such as production ETL pipelines, streaming analytics, ad-hoc + * analytics, and machine learning. + * + * You run these workloads as a set of commands in a notebook or as an + * automated job. Databricks makes a distinction between all-purpose clusters + * and job clusters. You use all-purpose clusters to analyze data + * collaboratively using interactive notebooks. You use job clusters to run + * fast and robust automated jobs. + * + * You can create an all-purpose cluster using the UI, CLI, or REST API. You + * can manually terminate and restart an all-purpose cluster. Multiple users + * can share such clusters to do collaborative interactive analysis. + * + * IMPORTANT: Databricks retains cluster configuration information for up to + * 200 all-purpose clusters terminated in the last 30 days and up to 30 job + * clusters recently terminated by the job scheduler. To keep an all-purpose + * cluster configuration even after it has been terminated for more than 30 + * days, an administrator can pin a cluster to the cluster list. */ public ClustersExt clusters() { return clustersAPI; } - + /** - * This API allows execution of Python, Scala, SQL, or R commands on running Databricks Clusters. + * This API allows execution of Python, Scala, SQL, or R commands on running + * Databricks Clusters. */ public CommandExecutionAPI commandExecution() { return commandExecutionAPI; } - + /** * Connections allow for creating a connection to an external data source. - * - *

A connection is an abstraction of an external data source that can be connected from - * Databricks Compute. Creating a connection object is the first step to managing external data - * sources within Unity Catalog, with the second step being creating a data object (catalog, - * schema, or table) using the connection. Data objects derived from a connection can be written - * to or read from similar to other Unity Catalog data objects based on cloud storage. Users may - * create different types of connections with each connection having a unique set of configuration - * options to support credential management and other settings. + * + * A connection is an abstraction of an external data source that can be + * connected from Databricks Compute. Creating a connection object is the + * first step to managing external data sources within Unity Catalog, with the + * second step being creating a data object (catalog, schema, or table) using + * the connection. Data objects derived from a connection can be written to or + * read from similar to other Unity Catalog data objects based on cloud + * storage. Users may create different types of connections with each + * connection having a unique set of configuration options to support + * credential management and other settings. */ public ConnectionsAPI connections() { return connectionsAPI; } - + /** - * This API allows retrieving information about currently authenticated user or service principal. + * This API allows retrieving information about currently authenticated user + * or service principal. */ public CurrentUserAPI currentUser() { return currentUserAPI; } - + /** - * In general, there is little need to modify dashboards using the API. However, it can be useful - * to use dashboard objects to look-up a collection of related query IDs. The API can also be used - * to duplicate multiple dashboards at once since you can get a dashboard definition with a GET - * request and then POST it to create a new one. Dashboards can be scheduled using the `sql_task` - * type of the Jobs API, e.g. :method:jobs/create. + * In general, there is little need to modify dashboards using the API. + * However, it can be useful to use dashboard objects to look-up a collection + * of related query IDs. The API can also be used to duplicate multiple + * dashboards at once since you can get a dashboard definition with a GET + * request and then POST it to create a new one. Dashboards can be scheduled + * using the `sql_task` type of the Jobs API, e.g. :method:jobs/create. */ public DashboardsAPI dashboards() { return dashboardsAPI; } - + /** - * This API is provided to assist you in making new query objects. When creating a query object, - * you may optionally specify a `data_source_id` for the SQL warehouse against which it will run. - * If you don't already know the `data_source_id` for your desired SQL warehouse, this API will - * help you find it. - * - *

This API does not support searches. It returns the full list of SQL warehouses in your - * workspace. We advise you to use any text editor, REST client, or `grep` to search the response - * from this API for the name of your SQL warehouse as it appears in Databricks SQL. + * This API is provided to assist you in making new query objects. When + * creating a query object, you may optionally specify a `data_source_id` for + * the SQL warehouse against which it will run. If you don't already know the + * `data_source_id` for your desired SQL warehouse, this API will help you + * find it. + * + * This API does not support searches. It returns the full list of SQL + * warehouses in your workspace. We advise you to use any text editor, REST + * client, or `grep` to search the response from this API for the name of your + * SQL warehouse as it appears in Databricks SQL. */ public DataSourcesAPI dataSources() { return dataSourcesAPI; } - + /** - * DBFS API makes it simple to interact with various data sources without having to include a - * users credentials every time to read a file. + * DBFS API makes it simple to interact with various data sources without + * having to include a users credentials every time to read a file. */ public DbfsExt dbfs() { return dbfsAPI; } - + /** - * The SQL Permissions API is similar to the endpoints of the :method:permissions/set. However, - * this exposes only one endpoint, which gets the Access Control List for a given object. You - * cannot modify any permissions using this API. - * - *

There are three levels of permission: - * - *

- `CAN_VIEW`: Allows read-only access - * - *

- `CAN_RUN`: Allows read access and run access (superset of `CAN_VIEW`) - * - *

- `CAN_MANAGE`: Allows all actions: read, run, edit, delete, modify permissions (superset of - * `CAN_RUN`) + * The SQL Permissions API is similar to the endpoints of the + * :method:permissions/set. However, this exposes only one endpoint, which + * gets the Access Control List for a given object. You cannot modify any + * permissions using this API. + * + * There are three levels of permission: + * + * - `CAN_VIEW`: Allows read-only access + * + * - `CAN_RUN`: Allows read access and run access (superset of `CAN_VIEW`) + * + * - `CAN_MANAGE`: Allows all actions: read, run, edit, delete, modify + * permissions (superset of `CAN_RUN`) */ public DbsqlPermissionsAPI dbsqlPermissions() { return dbsqlPermissionsAPI; } - + /** - * Experiments are the primary unit of organization in MLflow; all MLflow runs belong to an - * experiment. Each experiment lets you visualize, search, and compare runs, as well as download - * run artifacts or metadata for analysis in other tools. Experiments are maintained in a - * Databricks hosted MLflow tracking server. - * - *

Experiments are located in the workspace file tree. You manage experiments using the same - * tools you use to manage other workspace objects such as folders, notebooks, and libraries. + * Experiments are the primary unit of organization in MLflow; all MLflow runs + * belong to an experiment. Each experiment lets you visualize, search, and + * compare runs, as well as download run artifacts or metadata for analysis in + * other tools. Experiments are maintained in a Databricks hosted MLflow + * tracking server. + * + * Experiments are located in the workspace file tree. You manage experiments + * using the same tools you use to manage other workspace objects such as + * folders, notebooks, and libraries. */ public ExperimentsAPI experiments() { return experimentsAPI; } - + /** - * An external location is an object that combines a cloud storage path with a storage credential - * that authorizes access to the cloud storage path. Each external location is subject to Unity - * Catalog access-control policies that control which users and groups can access the credential. - * If a user does not have access to an external location in Unity Catalog, the request fails and - * Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf. - * - *

Databricks recommends using external locations rather than using storage credentials - * directly. - * - *

To create external locations, you must be a metastore admin or a user with the - * **CREATE_EXTERNAL_LOCATION** privilege. + * An external location is an object that combines a cloud storage path with a + * storage credential that authorizes access to the cloud storage path. Each + * external location is subject to Unity Catalog access-control policies that + * control which users and groups can access the credential. If a user does + * not have access to an external location in Unity Catalog, the request fails + * and Unity Catalog does not attempt to authenticate to your cloud tenant on + * the user’s behalf. + * + * Databricks recommends using external locations rather than using storage + * credentials directly. + * + * To create external locations, you must be a metastore admin or a user with + * the **CREATE_EXTERNAL_LOCATION** privilege. */ public ExternalLocationsAPI externalLocations() { return externalLocationsAPI; } - + /** * Functions implement User-Defined Functions (UDFs) in Unity Catalog. - * - *

The function implementation can be any SQL expression or Query, and it can be invoked - * wherever a table reference is allowed in a query. In Unity Catalog, a function resides at the - * same level as a table, so it can be referenced with the form + * + * The function implementation can be any SQL expression or Query, and it can + * be invoked wherever a table reference is allowed in a query. In Unity + * Catalog, a function resides at the same level as a table, so it can be + * referenced with the form * __catalog_name__.__schema_name__.__function_name__. */ public FunctionsAPI functions() { return functionsAPI; } - + /** - * Registers personal access token for Databricks to do operations on behalf of the user. - * - *

See [more info]. - * - *

[more info]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html + * Registers personal access token for Databricks to do operations on behalf + * of the user. + * + * See [more info]. + * + * [more info]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html */ public GitCredentialsAPI gitCredentials() { return gitCredentialsAPI; } - + /** - * The Global Init Scripts API enables Workspace administrators to configure global initialization - * scripts for their workspace. These scripts run on every node in every cluster in the workspace. - * - *

**Important:** Existing clusters must be restarted to pick up any changes made to global - * init scripts. Global init scripts are run in order. If the init script returns with a bad exit - * code, the Apache Spark container fails to launch and init scripts with later position are - * skipped. If enough containers fail, the entire cluster fails with a + * The Global Init Scripts API enables Workspace administrators to configure + * global initialization scripts for their workspace. These scripts run on + * every node in every cluster in the workspace. + * + * **Important:** Existing clusters must be restarted to pick up any changes + * made to global init scripts. Global init scripts are run in order. If the + * init script returns with a bad exit code, the Apache Spark container fails + * to launch and init scripts with later position are skipped. If enough + * containers fail, the entire cluster fails with a * `GLOBAL_INIT_SCRIPT_FAILURE` error code. */ public GlobalInitScriptsAPI globalInitScripts() { return globalInitScriptsAPI; } - + /** - * In Unity Catalog, data is secure by default. Initially, users have no access to data in a - * metastore. Access can be granted by either a metastore admin, the owner of an object, or the - * owner of the catalog or schema that contains the object. Securable objects in Unity Catalog are - * hierarchical and privileges are inherited downward. - * - *

Securable objects in Unity Catalog are hierarchical and privileges are inherited downward. - * This means that granting a privilege on the catalog automatically grants the privilege to all - * current and future objects within the catalog. Similarly, privileges granted on a schema are - * inherited by all current and future objects within that schema. + * In Unity Catalog, data is secure by default. Initially, users have no + * access to data in a metastore. Access can be granted by either a metastore + * admin, the owner of an object, or the owner of the catalog or schema that + * contains the object. Securable objects in Unity Catalog are hierarchical + * and privileges are inherited downward. + * + * Securable objects in Unity Catalog are hierarchical and privileges are + * inherited downward. This means that granting a privilege on the catalog + * automatically grants the privilege to all current and future objects within + * the catalog. Similarly, privileges granted on a schema are inherited by all + * current and future objects within that schema. */ public GrantsAPI grants() { return grantsAPI; } - + /** - * Groups simplify identity management, making it easier to assign access to Databricks workspace, - * data, and other securable objects. - * - *

It is best practice to assign access to workspaces and access-control policies in Unity - * Catalog to groups, instead of to users individually. All Databricks workspace identities can be - * assigned as members of groups, and members inherit permissions that are assigned to their - * group. + * Groups simplify identity management, making it easier to assign access to + * Databricks workspace, data, and other securable objects. + * + * It is best practice to assign access to workspaces and access-control + * policies in Unity Catalog to groups, instead of to users individually. All + * Databricks workspace identities can be assigned as members of groups, and + * members inherit permissions that are assigned to their group. */ public GroupsAPI groups() { return groupsAPI; } - + /** - * Instance Pools API are used to create, edit, delete and list instance pools by using - * ready-to-use cloud instances which reduces a cluster start and auto-scaling times. - * - *

Databricks pools reduce cluster start and auto-scaling times by maintaining a set of idle, - * ready-to-use instances. When a cluster is attached to a pool, cluster nodes are created using - * the pool’s idle instances. If the pool has no idle instances, the pool expands by allocating a - * new instance from the instance provider in order to accommodate the cluster’s request. When a - * cluster releases an instance, it returns to the pool and is free for another cluster to use. - * Only clusters attached to a pool can use that pool’s idle instances. - * - *

You can specify a different pool for the driver node and worker nodes, or use the same pool - * for both. - * - *

Databricks does not charge DBUs while instances are idle in the pool. Instance provider - * billing does apply. See pricing. + * Instance Pools API are used to create, edit, delete and list instance pools + * by using ready-to-use cloud instances which reduces a cluster start and + * auto-scaling times. + * + * Databricks pools reduce cluster start and auto-scaling times by maintaining + * a set of idle, ready-to-use instances. When a cluster is attached to a + * pool, cluster nodes are created using the pool’s idle instances. If the + * pool has no idle instances, the pool expands by allocating a new instance + * from the instance provider in order to accommodate the cluster’s request. + * When a cluster releases an instance, it returns to the pool and is free for + * another cluster to use. Only clusters attached to a pool can use that + * pool’s idle instances. + * + * You can specify a different pool for the driver node and worker nodes, or + * use the same pool for both. + * + * Databricks does not charge DBUs while instances are idle in the pool. + * Instance provider billing does apply. See pricing. */ public InstancePoolsAPI instancePools() { return instancePoolsAPI; } - + /** - * The Instance Profiles API allows admins to add, list, and remove instance profiles that users - * can launch clusters with. Regular users can list the instance profiles available to them. See - * [Secure access to S3 buckets] using instance profiles for more information. - * - *

[Secure access to S3 buckets]: - * https://docs.databricks.com/administration-guide/cloud-configurations/aws/instance-profiles.html + * The Instance Profiles API allows admins to add, list, and remove instance + * profiles that users can launch clusters with. Regular users can list the + * instance profiles available to them. See [Secure access to S3 buckets] + * using instance profiles for more information. + * + * [Secure access to S3 buckets]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/instance-profiles.html */ public InstanceProfilesAPI instanceProfiles() { return instanceProfilesAPI; } - + /** * IP Access List enables admins to configure IP access lists. - * - *

IP access lists affect web application access and REST API access to this workspace only. If - * the feature is disabled for a workspace, all access is allowed for this workspace. There is - * support for allow lists (inclusion) and block lists (exclusion). - * - *

When a connection is attempted: 1. **First, all block lists are checked.** If the connection - * IP address matches any block list, the connection is rejected. 2. **If the connection was not - * rejected by block lists**, the IP address is compared with the allow lists. - * - *

If there is at least one allow list for the workspace, the connection is allowed only if the - * IP address matches an allow list. If there are no allow lists for the workspace, all IP - * addresses are allowed. - * - *

For all allow lists and block lists combined, the workspace supports a maximum of 1000 - * IP/CIDR values, where one CIDR counts as a single value. - * - *

After changes to the IP access list feature, it can take a few minutes for changes to take - * effect. + * + * IP access lists affect web application access and REST API access to this + * workspace only. If the feature is disabled for a workspace, all access is + * allowed for this workspace. There is support for allow lists (inclusion) + * and block lists (exclusion). + * + * When a connection is attempted: 1. **First, all block lists are checked.** + * If the connection IP address matches any block list, the connection is + * rejected. 2. **If the connection was not rejected by block lists**, the IP + * address is compared with the allow lists. + * + * If there is at least one allow list for the workspace, the connection is + * allowed only if the IP address matches an allow list. If there are no allow + * lists for the workspace, all IP addresses are allowed. + * + * For all allow lists and block lists combined, the workspace supports a + * maximum of 1000 IP/CIDR values, where one CIDR counts as a single value. + * + * After changes to the IP access list feature, it can take a few minutes for + * changes to take effect. */ public IpAccessListsAPI ipAccessLists() { return ipAccessListsAPI; } - + /** * The Jobs API allows you to create, edit, and delete jobs. - * - *

You can use a Databricks job to run a data processing or data analysis task in a Databricks - * cluster with scalable resources. Your job can consist of a single task or can be a large, - * multi-task workflow with complex dependencies. Databricks manages the task orchestration, - * cluster management, monitoring, and error reporting for all of your jobs. You can run your jobs - * immediately or periodically through an easy-to-use scheduling system. You can implement job - * tasks using notebooks, JARS, Delta Live Tables pipelines, or Python, Scala, Spark submit, and - * Java applications. - * - *

You should never hard code secrets or store them in plain text. Use the [Secrets CLI] to - * manage secrets in the [Databricks CLI]. Use the [Secrets utility] to reference secrets in - * notebooks and jobs. - * - *

[Databricks CLI]: https://docs.databricks.com/dev-tools/cli/index.html [Secrets CLI]: - * https://docs.databricks.com/dev-tools/cli/secrets-cli.html [Secrets utility]: - * https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-secrets + * + * You can use a Databricks job to run a data processing or data analysis task + * in a Databricks cluster with scalable resources. Your job can consist of a + * single task or can be a large, multi-task workflow with complex + * dependencies. Databricks manages the task orchestration, cluster + * management, monitoring, and error reporting for all of your jobs. You can + * run your jobs immediately or periodically through an easy-to-use scheduling + * system. You can implement job tasks using notebooks, JARS, Delta Live + * Tables pipelines, or Python, Scala, Spark submit, and Java applications. + * + * You should never hard code secrets or store them in plain text. Use the + * [Secrets CLI] to manage secrets in the [Databricks CLI]. Use the [Secrets + * utility] to reference secrets in notebooks and jobs. + * + * [Databricks CLI]: https://docs.databricks.com/dev-tools/cli/index.html + * [Secrets CLI]: https://docs.databricks.com/dev-tools/cli/secrets-cli.html + * [Secrets utility]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-secrets */ public JobsAPI jobs() { return jobsAPI; } - + /** - * The Libraries API allows you to install and uninstall libraries and get the status of libraries - * on a cluster. - * - *

To make third-party or custom code available to notebooks and jobs running on your clusters, - * you can install a library. Libraries can be written in Python, Java, Scala, and R. You can - * upload Java, Scala, and Python libraries and point to external packages in PyPI, Maven, and - * CRAN repositories. - * - *

Cluster libraries can be used by all notebooks running on a cluster. You can install a - * cluster library directly from a public repository such as PyPI or Maven, using a previously - * installed workspace library, or using an init script. - * - *

When you install a library on a cluster, a notebook already attached to that cluster will - * not immediately see the new library. You must first detach and then reattach the notebook to - * the cluster. - * - *

When you uninstall a library from a cluster, the library is removed only when you restart - * the cluster. Until you restart the cluster, the status of the uninstalled library appears as - * Uninstall pending restart. + * The Libraries API allows you to install and uninstall libraries and get the + * status of libraries on a cluster. + * + * To make third-party or custom code available to notebooks and jobs running + * on your clusters, you can install a library. Libraries can be written in + * Python, Java, Scala, and R. You can upload Java, Scala, and Python + * libraries and point to external packages in PyPI, Maven, and CRAN + * repositories. + * + * Cluster libraries can be used by all notebooks running on a cluster. You + * can install a cluster library directly from a public repository such as + * PyPI or Maven, using a previously installed workspace library, or using an + * init script. + * + * When you install a library on a cluster, a notebook already attached to + * that cluster will not immediately see the new library. You must first + * detach and then reattach the notebook to the cluster. + * + * When you uninstall a library from a cluster, the library is removed only + * when you restart the cluster. Until you restart the cluster, the status of + * the uninstalled library appears as Uninstall pending restart. */ public LibrariesAPI libraries() { return librariesAPI; } - + /** - * A metastore is the top-level container of objects in Unity Catalog. It stores data assets - * (tables and views) and the permissions that govern access to them. Databricks account admins - * can create metastores and assign them to Databricks workspaces to control which workloads use - * each metastore. For a workspace to use Unity Catalog, it must have a Unity Catalog metastore - * attached. - * - *

Each metastore is configured with a root storage location in a cloud storage account. This - * storage location is used for metadata and managed tables data. - * - *

NOTE: This metastore is distinct from the metastore included in Databricks workspaces - * created before Unity Catalog was released. If your workspace includes a legacy Hive metastore, - * the data in that metastore is available in a catalog named hive_metastore. + * A metastore is the top-level container of objects in Unity Catalog. It + * stores data assets (tables and views) and the permissions that govern + * access to them. Databricks account admins can create metastores and assign + * them to Databricks workspaces to control which workloads use each + * metastore. For a workspace to use Unity Catalog, it must have a Unity + * Catalog metastore attached. + * + * Each metastore is configured with a root storage location in a cloud + * storage account. This storage location is used for metadata and managed + * tables data. + * + * NOTE: This metastore is distinct from the metastore included in Databricks + * workspaces created before Unity Catalog was released. If your workspace + * includes a legacy Hive metastore, the data in that metastore is available + * in a catalog named hive_metastore. */ public MetastoresAPI metastores() { return metastoresAPI; } - + /** - * MLflow Model Registry is a centralized model repository and a UI and set of APIs that enable - * you to manage the full lifecycle of MLflow Models. + * MLflow Model Registry is a centralized model repository and a UI and set of + * APIs that enable you to manage the full lifecycle of MLflow Models. */ public ModelRegistryAPI modelRegistry() { return modelRegistryAPI; } - + /** - * Permissions API are used to create read, write, edit, update and manage access for various - * users on different objects and endpoints. - * - *

* **[Cluster permissions](:service:clusters)** — Manage which users can manage, restart, or - * attach to clusters. - * - *

* **[Cluster policy permissions](:service:clusterpolicies)** — Manage which users can use - * cluster policies. - * - *

* **[Delta Live Tables pipeline permissions](:service:pipelines)** — Manage which users can - * view, manage, run, cancel, or own a Delta Live Tables pipeline. - * - *

* **[Job permissions](:service:jobs)** — Manage which users can view, manage, trigger, - * cancel, or own a job. - * - *

* **[MLflow experiment permissions](:service:experiments)** — Manage which users can read, - * edit, or manage MLflow experiments. - * - *

* **[MLflow registered model permissions](:service:modelregistry)** — Manage which users can - * read, edit, or manage MLflow registered models. - * - *

* **[Password permissions](:service:users)** — Manage which users can use password login - * when SSO is enabled. - * - *

* **[Instance Pool permissions](:service:instancepools)** — Manage which users can manage or - * attach to pools. - * - *

* **[Repo permissions](repos)** — Manage which users can read, run, edit, or manage a repo. - * - *

* **[Serving endpoint permissions](:service:servingendpoints)** — Manage which users can - * view, query, or manage a serving endpoint. - * - *

* **[SQL warehouse permissions](:service:warehouses)** — Manage which users can use or - * manage SQL warehouses. - * - *

* **[Token permissions](:service:tokenmanagement)** — Manage which users can create or use - * tokens. - * - *

* **[Workspace object permissions](:service:workspace)** — Manage which users can read, run, - * edit, or manage directories, files, and notebooks. - * - *

For the mapping of the required permissions for specific actions or abilities and other - * important information, see [Access Control]. - * - *

[Access Control]: https://docs.databricks.com/security/auth-authz/access-control/index.html + * Permissions API are used to create read, write, edit, update and manage + * access for various users on different objects and endpoints. + * + * * **[Cluster permissions](:service:clusters)** — Manage which users can + * manage, restart, or attach to clusters. + * + * * **[Cluster policy permissions](:service:clusterpolicies)** — Manage + * which users can use cluster policies. + * + * * **[Delta Live Tables pipeline permissions](:service:pipelines)** — + * Manage which users can view, manage, run, cancel, or own a Delta Live + * Tables pipeline. + * + * * **[Job permissions](:service:jobs)** — Manage which users can view, + * manage, trigger, cancel, or own a job. + * + * * **[MLflow experiment permissions](:service:experiments)** — Manage + * which users can read, edit, or manage MLflow experiments. + * + * * **[MLflow registered model permissions](:service:modelregistry)** — + * Manage which users can read, edit, or manage MLflow registered models. + * + * * **[Password permissions](:service:users)** — Manage which users can use + * password login when SSO is enabled. + * + * * **[Instance Pool permissions](:service:instancepools)** — Manage which + * users can manage or attach to pools. + * + * * **[Repo permissions](repos)** — Manage which users can read, run, edit, + * or manage a repo. + * + * * **[Serving endpoint permissions](:service:servingendpoints)** — Manage + * which users can view, query, or manage a serving endpoint. + * + * * **[SQL warehouse permissions](:service:warehouses)** — Manage which + * users can use or manage SQL warehouses. + * + * * **[Token permissions](:service:tokenmanagement)** — Manage which users + * can create or use tokens. + * + * * **[Workspace object permissions](:service:workspace)** — Manage which + * users can read, run, edit, or manage directories, files, and notebooks. + * + * For the mapping of the required permissions for specific actions or + * abilities and other important information, see [Access Control]. + * + * [Access Control]: https://docs.databricks.com/security/auth-authz/access-control/index.html */ public PermissionsAPI permissions() { return permissionsAPI; } - + /** - * The Delta Live Tables API allows you to create, edit, delete, start, and view details about - * pipelines. - * - *

Delta Live Tables is a framework for building reliable, maintainable, and testable data - * processing pipelines. You define the transformations to perform on your data, and Delta Live - * Tables manages task orchestration, cluster management, monitoring, data quality, and error - * handling. - * - *

Instead of defining your data pipelines using a series of separate Apache Spark tasks, Delta - * Live Tables manages how your data is transformed based on a target schema you define for each - * processing step. You can also enforce data quality with Delta Live Tables expectations. - * Expectations allow you to define expected data quality and specify how to handle records that - * fail those expectations. + * The Delta Live Tables API allows you to create, edit, delete, start, and + * view details about pipelines. + * + * Delta Live Tables is a framework for building reliable, maintainable, and + * testable data processing pipelines. You define the transformations to + * perform on your data, and Delta Live Tables manages task orchestration, + * cluster management, monitoring, data quality, and error handling. + * + * Instead of defining your data pipelines using a series of separate Apache + * Spark tasks, Delta Live Tables manages how your data is transformed based + * on a target schema you define for each processing step. You can also + * enforce data quality with Delta Live Tables expectations. Expectations + * allow you to define expected data quality and specify how to handle records + * that fail those expectations. */ public PipelinesAPI pipelines() { return pipelinesAPI; } - + /** - * View available policy families. A policy family contains a policy definition providing best - * practices for configuring clusters for a particular use case. - * - *

Databricks manages and provides policy families for several common cluster use cases. You - * cannot create, edit, or delete policy families. - * - *

Policy families cannot be used directly to create clusters. Instead, you create cluster - * policies using a policy family. Cluster policies created using a policy family inherit the - * policy family's policy definition. + * View available policy families. A policy family contains a policy + * definition providing best practices for configuring clusters for a + * particular use case. + * + * Databricks manages and provides policy families for several common cluster + * use cases. You cannot create, edit, or delete policy families. + * + * Policy families cannot be used directly to create clusters. Instead, you + * create cluster policies using a policy family. Cluster policies created + * using a policy family inherit the policy family's policy definition. */ public PolicyFamiliesAPI policyFamilies() { return policyFamiliesAPI; } - + /** - * A data provider is an object representing the organization in the real world who shares the - * data. A provider contains shares which further contain the shared data. + * A data provider is an object representing the organization in the real + * world who shares the data. A provider contains shares which further contain + * the shared data. */ public ProvidersAPI providers() { return providersAPI; } - + /** - * These endpoints are used for CRUD operations on query definitions. Query definitions include - * the target SQL warehouse, query text, name, description, tags, parameters, and visualizations. - * Queries can be scheduled using the `sql_task` type of the Jobs API, e.g. :method:jobs/create. + * These endpoints are used for CRUD operations on query definitions. Query + * definitions include the target SQL warehouse, query text, name, + * description, tags, parameters, and visualizations. Queries can be scheduled + * using the `sql_task` type of the Jobs API, e.g. :method:jobs/create. */ public QueriesAPI queries() { return queriesAPI; } - - /** Access the history of queries through SQL warehouses. */ + + /** + * Access the history of queries through SQL warehouses. + */ public QueryHistoryAPI queryHistory() { return queryHistoryAPI; } - + /** - * The Recipient Activation API is only applicable in the open sharing model where the recipient - * object has the authentication type of `TOKEN`. The data recipient follows the activation link - * shared by the data provider to download the credential file that includes the access token. The - * recipient will then use the credential file to establish a secure connection with the provider - * to receive the shared data. - * - *

Note that you can download the credential file only once. Recipients should treat the - * downloaded credential as a secret and must not share it outside of their organization. + * The Recipient Activation API is only applicable in the open sharing model + * where the recipient object has the authentication type of `TOKEN`. The data + * recipient follows the activation link shared by the data provider to + * download the credential file that includes the access token. The recipient + * will then use the credential file to establish a secure connection with the + * provider to receive the shared data. + * + * Note that you can download the credential file only once. Recipients should + * treat the downloaded credential as a secret and must not share it outside + * of their organization. */ public RecipientActivationAPI recipientActivation() { return recipientActivationAPI; } - + /** - * A recipient is an object you create using :method:recipients/create to represent an - * organization which you want to allow access shares. The way how sharing works differs depending - * on whether or not your recipient has access to a Databricks workspace that is enabled for Unity - * Catalog: - * - *

- For recipients with access to a Databricks workspace that is enabled for Unity Catalog, - * you can create a recipient object along with a unique sharing identifier you get from the - * recipient. The sharing identifier is the key identifier that enables the secure connection. - * This sharing mode is called **Databricks-to-Databricks sharing**. - * - *

- For recipients without access to a Databricks workspace that is enabled for Unity Catalog, - * when you create a recipient object, Databricks generates an activation link you can send to the - * recipient. The recipient follows the activation link to download the credential file, and then - * uses the credential file to establish a secure connection to receive the shared data. This - * sharing mode is called **open sharing**. + * A recipient is an object you create using :method:recipients/create to + * represent an organization which you want to allow access shares. The way + * how sharing works differs depending on whether or not your recipient has + * access to a Databricks workspace that is enabled for Unity Catalog: + * + * - For recipients with access to a Databricks workspace that is enabled for + * Unity Catalog, you can create a recipient object along with a unique + * sharing identifier you get from the recipient. The sharing identifier is + * the key identifier that enables the secure connection. This sharing mode is + * called **Databricks-to-Databricks sharing**. + * + * - For recipients without access to a Databricks workspace that is enabled + * for Unity Catalog, when you create a recipient object, Databricks generates + * an activation link you can send to the recipient. The recipient follows the + * activation link to download the credential file, and then uses the + * credential file to establish a secure connection to receive the shared + * data. This sharing mode is called **open sharing**. */ public RecipientsAPI recipients() { return recipientsAPI; } - + /** - * The Repos API allows users to manage their git repos. Users can use the API to access all repos - * that they have manage permissions on. - * - *

Databricks Repos is a visual Git client in Databricks. It supports common Git operations - * such a cloning a repository, committing and pushing, pulling, branch management, and visual - * comparison of diffs when committing. - * - *

Within Repos you can develop code in notebooks or other files and follow data science and - * engineering code development best practices using Git for version control, collaboration, and - * CI/CD. + * The Repos API allows users to manage their git repos. Users can use the API + * to access all repos that they have manage permissions on. + * + * Databricks Repos is a visual Git client in Databricks. It supports common + * Git operations such a cloning a repository, committing and pushing, + * pulling, branch management, and visual comparison of diffs when committing. + * + * Within Repos you can develop code in notebooks or other files and follow + * data science and engineering code development best practices using Git for + * version control, collaboration, and CI/CD. */ public ReposAPI repos() { return reposAPI; } - + /** - * A schema (also called a database) is the second layer of Unity Catalog’s three-level namespace. - * A schema organizes tables, views and functions. To access (or list) a table or view in a - * schema, users must have the USE_SCHEMA data permission on the schema and its parent catalog, - * and they must have the SELECT permission on the table or view. + * A schema (also called a database) is the second layer of Unity Catalog’s + * three-level namespace. A schema organizes tables, views and functions. To + * access (or list) a table or view in a schema, users must have the + * USE_SCHEMA data permission on the schema and its parent catalog, and they + * must have the SELECT permission on the table or view. */ public SchemasAPI schemas() { return schemasAPI; } - + /** - * The Secrets API allows you to manage secrets, secret scopes, and access permissions. - * - *

Sometimes accessing data requires that you authenticate to external data sources through - * JDBC. Instead of directly entering your credentials into a notebook, use Databricks secrets to - * store your credentials and reference them in notebooks and jobs. - * - *

Administrators, secret creators, and users granted permission can read Databricks secrets. - * While Databricks makes an effort to redact secret values that might be displayed in notebooks, - * it is not possible to prevent such users from reading secrets. + * The Secrets API allows you to manage secrets, secret scopes, and access + * permissions. + * + * Sometimes accessing data requires that you authenticate to external data + * sources through JDBC. Instead of directly entering your credentials into a + * notebook, use Databricks secrets to store your credentials and reference + * them in notebooks and jobs. + * + * Administrators, secret creators, and users granted permission can read + * Databricks secrets. While Databricks makes an effort to redact secret + * values that might be displayed in notebooks, it is not possible to prevent + * such users from reading secrets. */ public SecretsExt secrets() { return secretsAPI; } - + /** - * Tags are attributes containing keys and values that can be applied to different entities in - * Unity Catalog. Tags are useful for organizing and categorizing different entities within a - * metastore. SecurableTags are attached to Unity Catalog securable entities. + * Tags are attributes containing keys and values that can be applied to + * different entities in Unity Catalog. Tags are useful for organizing and + * categorizing different entities within a metastore. SecurableTags are + * attached to Unity Catalog securable entities. */ public SecurableTagsAPI securableTags() { return securableTagsAPI; } - + /** - * Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD - * platforms. Databricks recommends creating service principals to run production jobs or modify - * production data. If all processes that act on production data run with service principals, - * interactive users do not need any write, delete, or modify privileges in production. This - * eliminates the risk of a user overwriting production data by accident. + * Identities for use with jobs, automated tools, and systems such as scripts, + * apps, and CI/CD platforms. Databricks recommends creating service + * principals to run production jobs or modify production data. If all + * processes that act on production data run with service principals, + * interactive users do not need any write, delete, or modify privileges in + * production. This eliminates the risk of a user overwriting production data + * by accident. */ public ServicePrincipalsAPI servicePrincipals() { return servicePrincipalsAPI; } - + /** - * The Serving Endpoints API allows you to create, update, and delete model serving endpoints. - * - *

You can use a serving endpoint to serve models from the Databricks Model Registry or from - * Unity Catalog. Endpoints expose the underlying models as scalable REST API endpoints using - * serverless compute. This means the endpoints and associated compute resources are fully managed - * by Databricks and will not appear in your cloud account. A serving endpoint can consist of one - * or more MLflow models from the Databricks Model Registry, called served models. A serving - * endpoint can have at most ten served models. You can configure traffic settings to define how - * requests should be routed to your served models behind an endpoint. Additionally, you can - * configure the scale of resources that should be applied to each served model. + * The Serving Endpoints API allows you to create, update, and delete model + * serving endpoints. + * + * You can use a serving endpoint to serve models from the Databricks Model + * Registry or from Unity Catalog. Endpoints expose the underlying models as + * scalable REST API endpoints using serverless compute. This means the + * endpoints and associated compute resources are fully managed by Databricks + * and will not appear in your cloud account. A serving endpoint can consist + * of one or more MLflow models from the Databricks Model Registry, called + * served models. A serving endpoint can have at most ten served models. You + * can configure traffic settings to define how requests should be routed to + * your served models behind an endpoint. Additionally, you can configure the + * scale of resources that should be applied to each served model. */ public ServingEndpointsAPI servingEndpoints() { return servingEndpointsAPI; } - + /** - * A share is a container instantiated with :method:shares/create. Once created you can - * iteratively register a collection of existing data assets defined within the metastore using - * :method:shares/update. You can register data assets under their original name, qualified by - * their original schema, or provide alternate exposed names. + * A share is a container instantiated with :method:shares/create. Once + * created you can iteratively register a collection of existing data assets + * defined within the metastore using :method:shares/update. You can register + * data assets under their original name, qualified by their original schema, + * or provide alternate exposed names. */ public SharesAPI shares() { return sharesAPI; } - + /** - * The SQL Statement Execution API manages the execution of arbitrary SQL statements and the - * fetching of result data. - * - *

**Release status** - * - *

This feature is in [Public Preview]. - * - *

**Getting started** - * - *

We suggest beginning with the [SQL Statement Execution API tutorial]. - * - *

**Overview of statement execution and result fetching** - * - *

Statement execution begins by issuing a :method:statementexecution/executeStatement request - * with a valid SQL statement and warehouse ID, along with optional parameters such as the data + * The SQL Statement Execution API manages the execution of arbitrary SQL + * statements and the fetching of result data. + * + * **Release status** + * + * This feature is in [Public Preview]. + * + * **Getting started** + * + * We suggest beginning with the [SQL Statement Execution API tutorial]. + * + * **Overview of statement execution and result fetching** + * + * Statement execution begins by issuing a + * :method:statementexecution/executeStatement request with a valid SQL + * statement and warehouse ID, along with optional parameters such as the data * catalog and output format. - * - *

When submitting the statement, the call can behave synchronously or asynchronously, based on - * the `wait_timeout` setting. When set between 5-50 seconds (default: 10) the call behaves - * synchronously and waits for results up to the specified timeout; when set to `0s`, the call is - * asynchronous and responds immediately with a statement ID that can be used to poll for status - * or fetch the results in a separate call. - * - *

**Call mode: synchronous** - * - *

In synchronous mode, when statement execution completes within the `wait timeout`, the - * result data is returned directly in the response. This response will contain `statement_id`, - * `status`, `manifest`, and `result` fields. The `status` field confirms success whereas the - * `manifest` field contains the result data column schema and metadata about the result set. The - * `result` field contains the first chunk of result data according to the specified - * `disposition`, and links to fetch any remaining chunks. - * - *

If the execution does not complete before `wait_timeout`, the setting `on_wait_timeout` - * determines how the system responds. - * - *

By default, `on_wait_timeout=CONTINUE`, and after reaching `wait_timeout`, a response is - * returned and statement execution continues asynchronously. The response will contain only - * `statement_id` and `status` fields, and the caller must now follow the flow described for - * asynchronous call mode to poll and fetch the result. - * - *

Alternatively, `on_wait_timeout` can also be set to `CANCEL`; in this case if the timeout is - * reached before execution completes, the underlying statement execution is canceled, and a - * `CANCELED` status is returned in the response. - * - *

**Call mode: asynchronous** - * - *

In asynchronous mode, or after a timed-out synchronous request continues, a `statement_id` - * and `status` will be returned. In this case polling :method:statementexecution/getStatement - * calls are required to fetch the result and metadata. - * - *

Next, a caller must poll until execution completes (`SUCCEEDED`, `FAILED`, etc.) by issuing - * :method:statementexecution/getStatement requests for the given `statement_id`. - * - *

When execution has succeeded, the response will contain `status`, `manifest`, and `result` - * fields. These fields and the structure are identical to those in the response to a successful - * synchronous submission. The `result` field will contain the first chunk of result data, either - * `INLINE` or as `EXTERNAL_LINKS` depending on `disposition`. Additional chunks of result data - * can be fetched by checking for the presence of the `next_chunk_internal_link` field, and - * iteratively `GET` those paths until that field is unset: `GET + * + * When submitting the statement, the call can behave synchronously or + * asynchronously, based on the `wait_timeout` setting. When set between 5-50 + * seconds (default: 10) the call behaves synchronously and waits for results + * up to the specified timeout; when set to `0s`, the call is asynchronous and + * responds immediately with a statement ID that can be used to poll for + * status or fetch the results in a separate call. + * + * **Call mode: synchronous** + * + * In synchronous mode, when statement execution completes within the `wait + * timeout`, the result data is returned directly in the response. This + * response will contain `statement_id`, `status`, `manifest`, and `result` + * fields. The `status` field confirms success whereas the `manifest` field + * contains the result data column schema and metadata about the result set. + * The `result` field contains the first chunk of result data according to the + * specified `disposition`, and links to fetch any remaining chunks. + * + * If the execution does not complete before `wait_timeout`, the setting + * `on_wait_timeout` determines how the system responds. + * + * By default, `on_wait_timeout=CONTINUE`, and after reaching `wait_timeout`, + * a response is returned and statement execution continues asynchronously. + * The response will contain only `statement_id` and `status` fields, and the + * caller must now follow the flow described for asynchronous call mode to + * poll and fetch the result. + * + * Alternatively, `on_wait_timeout` can also be set to `CANCEL`; in this case + * if the timeout is reached before execution completes, the underlying + * statement execution is canceled, and a `CANCELED` status is returned in the + * response. + * + * **Call mode: asynchronous** + * + * In asynchronous mode, or after a timed-out synchronous request continues, a + * `statement_id` and `status` will be returned. In this case polling + * :method:statementexecution/getStatement calls are required to fetch the + * result and metadata. + * + * Next, a caller must poll until execution completes (`SUCCEEDED`, `FAILED`, + * etc.) by issuing :method:statementexecution/getStatement requests for the + * given `statement_id`. + * + * When execution has succeeded, the response will contain `status`, + * `manifest`, and `result` fields. These fields and the structure are + * identical to those in the response to a successful synchronous submission. + * The `result` field will contain the first chunk of result data, either + * `INLINE` or as `EXTERNAL_LINKS` depending on `disposition`. Additional + * chunks of result data can be fetched by checking for the presence of the + * `next_chunk_internal_link` field, and iteratively `GET` those paths until + * that field is unset: `GET * https://$DATABRICKS_HOST/{next_chunk_internal_link}`. - * - *

**Fetching result data: format and disposition** - * - *

To specify the result data format, set the `format` field to `JSON_ARRAY` (JSON), - * `ARROW_STREAM` ([Apache Arrow Columnar]), or `CSV`. - * - *

You can also configure how to fetch the result data in two different modes by setting the - * `disposition` field to `INLINE` or `EXTERNAL_LINKS`. - * - *

The `INLINE` disposition can only be used with the `JSON_ARRAY` format and allows results up - * to 16 MiB. When a statement executed with `INLINE` disposition exceeds this limit, the - * execution is aborted, and no result can be fetched. - * - *

The `EXTERNAL_LINKS` disposition allows fetching large result sets in `JSON_ARRAY`, - * `ARROW_STREAM` and `CSV` formats, and with higher throughput. - * - *

The API uses defaults of `format=JSON_ARRAY` and `disposition=INLINE`. Databricks recommends - * that you explicit setting the format and the disposition for all production use cases. - * - *

**Statement response: statement_id, status, manifest, and result** - * - *

The base call :method:statementexecution/getStatement returns a single response combining - * `statement_id`, `status`, a result `manifest`, and a `result` data chunk or link, depending on - * the `disposition`. The `manifest` contains the result schema definition and the result summary - * metadata. When using `disposition=EXTERNAL_LINKS`, it also contains a full listing of all + * + * **Fetching result data: format and disposition** + * + * To specify the result data format, set the `format` field to `JSON_ARRAY` + * (JSON), `ARROW_STREAM` ([Apache Arrow Columnar]), or `CSV`. + * + * You can also configure how to fetch the result data in two different modes + * by setting the `disposition` field to `INLINE` or `EXTERNAL_LINKS`. + * + * The `INLINE` disposition can only be used with the `JSON_ARRAY` format and + * allows results up to 16 MiB. When a statement executed with `INLINE` + * disposition exceeds this limit, the execution is aborted, and no result can + * be fetched. + * + * The `EXTERNAL_LINKS` disposition allows fetching large result sets in + * `JSON_ARRAY`, `ARROW_STREAM` and `CSV` formats, and with higher throughput. + * + * The API uses defaults of `format=JSON_ARRAY` and `disposition=INLINE`. + * Databricks recommends that you explicit setting the format and the + * disposition for all production use cases. + * + * **Statement response: statement_id, status, manifest, and result** + * + * The base call :method:statementexecution/getStatement returns a single + * response combining `statement_id`, `status`, a result `manifest`, and a + * `result` data chunk or link, depending on the `disposition`. The `manifest` + * contains the result schema definition and the result summary metadata. When + * using `disposition=EXTERNAL_LINKS`, it also contains a full listing of all * chunks and their summary metadata. - * - *

**Use case: small result sets with INLINE + JSON_ARRAY** - * - *

For flows that generate small and predictable result sets (<= 16 MiB), `INLINE` downloads of - * `JSON_ARRAY` result data are typically the simplest way to execute and fetch result data. - * - *

When the result set with `disposition=INLINE` is larger, the result can be transferred in - * chunks. After receiving the initial chunk with :method:statementexecution/executeStatement or - * :method:statementexecution/getStatement subsequent calls are required to iteratively fetch each - * chunk. Each result response contains a link to the next chunk, when there are additional chunks - * to fetch; it can be found in the field `.next_chunk_internal_link`. This link is an absolute - * `path` to be joined with your `$DATABRICKS_HOST`, and of the form - * `/api/2.0/sql/statements/{statement_id}/result/chunks/{chunk_index}`. The next chunk can be - * fetched by issuing a :method:statementexecution/getStatementResultChunkN request. - * - *

When using this mode, each chunk may be fetched once, and in order. A chunk without a field - * `next_chunk_internal_link` indicates the last chunk was reached and all chunks have been - * fetched from the result set. - * - *

**Use case: large result sets with EXTERNAL_LINKS + ARROW_STREAM** - * - *

Using `EXTERNAL_LINKS` to fetch result data in Arrow format allows you to fetch large result - * sets efficiently. The primary difference from using `INLINE` disposition is that fetched result - * chunks contain resolved `external_links` URLs, which can be fetched with standard HTTP. - * - *

**Presigned URLs** - * - *

External links point to data stored within your workspace's internal DBFS, in the form of a - * presigned URL. The URLs are valid for only a short period, <= 15 minutes. Alongside each - * `external_link` is an expiration field indicating the time at which the URL is no longer valid. - * In `EXTERNAL_LINKS` mode, chunks can be resolved and fetched multiple times and in parallel. - * - *

---- - * - *

### **Warning: We recommend you protect the URLs in the EXTERNAL_LINKS.** - * - *

When using the EXTERNAL_LINKS disposition, a short-lived pre-signed URL is generated, which - * the client can use to download the result chunk directly from cloud storage. As the short-lived - * credential is embedded in a pre-signed URL, this URL should be protected. - * - *

Since pre-signed URLs are generated with embedded temporary credentials, you need to remove - * the authorization header from the fetch requests. - * - *

---- - * - *

Similar to `INLINE` mode, callers can iterate through the result set, by using the - * `next_chunk_internal_link` field. Each internal link response will contain an external link to - * the raw chunk data, and additionally contain the `next_chunk_internal_link` if there are more - * chunks. - * - *

Unlike `INLINE` mode, when using `EXTERNAL_LINKS`, chunks may be fetched out of order, and - * in parallel to achieve higher throughput. - * - *

**Limits and limitations** - * - *

Note: All byte limits are calculated based on internal storage metrics and will not match - * byte counts of actual payloads. - * - *

- Statements with `disposition=INLINE` are limited to 16 MiB and will abort when this limit - * is exceeded. - Statements with `disposition=EXTERNAL_LINKS` are limited to 100 GiB. - The - * maximum query text size is 16 MiB. - Cancelation may silently fail. A successful response from - * a cancel request indicates that the cancel request was successfully received and sent to the - * processing engine. However, for example, an outstanding statement may complete execution during - * signal delivery, with the cancel signal arriving too late to be meaningful. Polling for status - * until a terminal state is reached is a reliable way to determine the final state. - Wait - * timeouts are approximate, occur server-side, and cannot account for caller delays, network - * latency from caller to service, and similarly. - After a statement has been submitted and a - * statement_id is returned, that statement's status and result will automatically close after - * either of 2 conditions: - The last result chunk is fetched (or resolved to an external link). - - * One hour passes with no calls to get the status or fetch the result. Best practice: in - * asynchronous clients, poll for status regularly (and with backoff) to keep the statement open - * and alive. - After fetching the last result chunk (including chunk_index=0) the statement is - * automatically closed. - * - *

[Apache Arrow Columnar]: https://arrow.apache.org/overview/ [Public Preview]: - * https://docs.databricks.com/release-notes/release-types.html [SQL Statement Execution API - * tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html + * + * **Use case: small result sets with INLINE + JSON_ARRAY** + * + * For flows that generate small and predictable result sets (<= 16 MiB), + * `INLINE` downloads of `JSON_ARRAY` result data are typically the simplest + * way to execute and fetch result data. + * + * When the result set with `disposition=INLINE` is larger, the result can be + * transferred in chunks. After receiving the initial chunk with + * :method:statementexecution/executeStatement or + * :method:statementexecution/getStatement subsequent calls are required to + * iteratively fetch each chunk. Each result response contains a link to the + * next chunk, when there are additional chunks to fetch; it can be found in + * the field `.next_chunk_internal_link`. This link is an absolute `path` to + * be joined with your `$DATABRICKS_HOST`, and of the form + * `/api/2.0/sql/statements/{statement_id}/result/chunks/{chunk_index}`. The + * next chunk can be fetched by issuing a + * :method:statementexecution/getStatementResultChunkN request. + * + * When using this mode, each chunk may be fetched once, and in order. A chunk + * without a field `next_chunk_internal_link` indicates the last chunk was + * reached and all chunks have been fetched from the result set. + * + * **Use case: large result sets with EXTERNAL_LINKS + ARROW_STREAM** + * + * Using `EXTERNAL_LINKS` to fetch result data in Arrow format allows you to + * fetch large result sets efficiently. The primary difference from using + * `INLINE` disposition is that fetched result chunks contain resolved + * `external_links` URLs, which can be fetched with standard HTTP. + * + * **Presigned URLs** + * + * External links point to data stored within your workspace's internal DBFS, + * in the form of a presigned URL. The URLs are valid for only a short period, + * <= 15 minutes. Alongside each `external_link` is an expiration field + * indicating the time at which the URL is no longer valid. In + * `EXTERNAL_LINKS` mode, chunks can be resolved and fetched multiple times + * and in parallel. + * + * ---- + * + * ### **Warning: We recommend you protect the URLs in the EXTERNAL_LINKS.** + * + * When using the EXTERNAL_LINKS disposition, a short-lived pre-signed URL is + * generated, which the client can use to download the result chunk directly + * from cloud storage. As the short-lived credential is embedded in a + * pre-signed URL, this URL should be protected. + * + * Since pre-signed URLs are generated with embedded temporary credentials, + * you need to remove the authorization header from the fetch requests. + * + * ---- + * + * Similar to `INLINE` mode, callers can iterate through the result set, by + * using the `next_chunk_internal_link` field. Each internal link response + * will contain an external link to the raw chunk data, and additionally + * contain the `next_chunk_internal_link` if there are more chunks. + * + * Unlike `INLINE` mode, when using `EXTERNAL_LINKS`, chunks may be fetched + * out of order, and in parallel to achieve higher throughput. + * + * **Limits and limitations** + * + * Note: All byte limits are calculated based on internal storage metrics and + * will not match byte counts of actual payloads. + * + * - Statements with `disposition=INLINE` are limited to 16 MiB and will abort + * when this limit is exceeded. - Statements with `disposition=EXTERNAL_LINKS` + * are limited to 100 GiB. - The maximum query text size is 16 MiB. - + * Cancelation may silently fail. A successful response from a cancel request + * indicates that the cancel request was successfully received and sent to the + * processing engine. However, for example, an outstanding statement may + * complete execution during signal delivery, with the cancel signal arriving + * too late to be meaningful. Polling for status until a terminal state is + * reached is a reliable way to determine the final state. - Wait timeouts are + * approximate, occur server-side, and cannot account for caller delays, + * network latency from caller to service, and similarly. - After a statement + * has been submitted and a statement_id is returned, that statement's status + * and result will automatically close after either of 2 conditions: - The + * last result chunk is fetched (or resolved to an external link). - One hour + * passes with no calls to get the status or fetch the result. Best practice: + * in asynchronous clients, poll for status regularly (and with backoff) to + * keep the statement open and alive. - After fetching the last result chunk + * (including chunk_index=0) the statement is automatically closed. + * + * [Apache Arrow Columnar]: https://arrow.apache.org/overview/ + * [Public Preview]: https://docs.databricks.com/release-notes/release-types.html + * [SQL Statement Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html */ public StatementExecutionAPI statementExecution() { return statementExecutionAPI; } - + /** - * A storage credential represents an authentication and authorization mechanism for accessing - * data stored on your cloud tenant. Each storage credential is subject to Unity Catalog - * access-control policies that control which users and groups can access the credential. If a - * user does not have access to a storage credential in Unity Catalog, the request fails and Unity - * Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf. - * - *

Databricks recommends using external locations rather than using storage credentials - * directly. - * - *

To create storage credentials, you must be a Databricks account admin. The account admin who - * creates the storage credential can delegate ownership to another user or group to manage - * permissions on it. + * A storage credential represents an authentication and authorization + * mechanism for accessing data stored on your cloud tenant. Each storage + * credential is subject to Unity Catalog access-control policies that control + * which users and groups can access the credential. If a user does not have + * access to a storage credential in Unity Catalog, the request fails and + * Unity Catalog does not attempt to authenticate to your cloud tenant on the + * user’s behalf. + * + * Databricks recommends using external locations rather than using storage + * credentials directly. + * + * To create storage credentials, you must be a Databricks account admin. The + * account admin who creates the storage credential can delegate ownership to + * another user or group to manage permissions on it. */ public StorageCredentialsAPI storageCredentials() { return storageCredentialsAPI; } - + /** - * Tags are attributes containing keys and values that can be applied to different entities in - * Unity Catalog. Tags are useful for organizing and categorizing different entities within a - * metastore. SubentityTags are attached to Unity Catalog subentities. + * Tags are attributes containing keys and values that can be applied to + * different entities in Unity Catalog. Tags are useful for organizing and + * categorizing different entities within a metastore. SubentityTags are + * attached to Unity Catalog subentities. */ public SubentityTagsAPI subentityTags() { return subentityTagsAPI; } - + /** - * A system schema is a schema that lives within the system catalog. A system schema may contain - * information about customer usage of Unity Catalog such as audit-logs, billing-logs, lineage - * information, etc. + * A system schema is a schema that lives within the system catalog. A system + * schema may contain information about customer usage of Unity Catalog such + * as audit-logs, billing-logs, lineage information, etc. */ public SystemSchemasAPI systemSchemas() { return systemSchemasAPI; } - + /** - * Primary key and foreign key constraints encode relationships between fields in tables. - * - *

Primary and foreign keys are informational only and are not enforced. Foreign keys must - * reference a primary key in another table. This primary key is the parent constraint of the - * foreign key and the table this primary key is on is the parent table of the foreign key. - * Similarly, the foreign key is the child constraint of its referenced primary key; the table of - * the foreign key is the child table of the primary key. - * - *

You can declare primary keys and foreign keys as part of the table specification during - * table creation. You can also add or drop constraints on existing tables. + * Primary key and foreign key constraints encode relationships between fields + * in tables. + * + * Primary and foreign keys are informational only and are not enforced. + * Foreign keys must reference a primary key in another table. This primary + * key is the parent constraint of the foreign key and the table this primary + * key is on is the parent table of the foreign key. Similarly, the foreign + * key is the child constraint of its referenced primary key; the table of the + * foreign key is the child table of the primary key. + * + * You can declare primary keys and foreign keys as part of the table + * specification during table creation. You can also add or drop constraints + * on existing tables. */ public TableConstraintsAPI tableConstraints() { return tableConstraintsAPI; } - + /** - * A table resides in the third layer of Unity Catalog’s three-level namespace. It contains rows - * of data. To create a table, users must have CREATE_TABLE and USE_SCHEMA permissions on the - * schema, and they must have the USE_CATALOG permission on its parent catalog. To query a table, - * users must have the SELECT permission on the table, and they must have the USE_CATALOG - * permission on its parent catalog and the USE_SCHEMA permission on its parent schema. - * - *

A table can be managed or external. From an API perspective, a __VIEW__ is a particular kind - * of table (rather than a managed or external table). + * A table resides in the third layer of Unity Catalog’s three-level + * namespace. It contains rows of data. To create a table, users must have + * CREATE_TABLE and USE_SCHEMA permissions on the schema, and they must have + * the USE_CATALOG permission on its parent catalog. To query a table, users + * must have the SELECT permission on the table, and they must have the + * USE_CATALOG permission on its parent catalog and the USE_SCHEMA permission + * on its parent schema. + * + * A table can be managed or external. From an API perspective, a __VIEW__ is + * a particular kind of table (rather than a managed or external table). */ public TablesAPI tables() { return tablesAPI; } - + /** - * Enables administrators to get all tokens and delete tokens for other users. Admins can either - * get every token, get a specific token by ID, or get all tokens for a particular user. + * Enables administrators to get all tokens and delete tokens for other users. + * Admins can either get every token, get a specific token by ID, or get all + * tokens for a particular user. */ public TokenManagementAPI tokenManagement() { return tokenManagementAPI; } - + /** - * The Token API allows you to create, list, and revoke tokens that can be used to authenticate - * and access Databricks REST APIs. + * The Token API allows you to create, list, and revoke tokens that can be + * used to authenticate and access Databricks REST APIs. */ public TokensAPI tokens() { return tokensAPI; } - + /** - * User identities recognized by Databricks and represented by email addresses. - * - *

Databricks recommends using SCIM provisioning to sync users and groups automatically from - * your identity provider to your Databricks workspace. SCIM streamlines onboarding a new employee - * or team by using your identity provider to create users and groups in Databricks workspace and - * give them the proper level of access. When a user leaves your organization or no longer needs - * access to Databricks workspace, admins can terminate the user in your identity provider and - * that user’s account will also be removed from Databricks workspace. This ensures a consistent - * offboarding process and prevents unauthorized users from accessing sensitive data. + * User identities recognized by Databricks and represented by email + * addresses. + * + * Databricks recommends using SCIM provisioning to sync users and groups + * automatically from your identity provider to your Databricks workspace. + * SCIM streamlines onboarding a new employee or team by using your identity + * provider to create users and groups in Databricks workspace and give them + * the proper level of access. When a user leaves your organization or no + * longer needs access to Databricks workspace, admins can terminate the user + * in your identity provider and that user’s account will also be removed + * from Databricks workspace. This ensures a consistent offboarding process + * and prevents unauthorized users from accessing sensitive data. */ public UsersAPI users() { return usersAPI; } - + /** - * Volumes are a Unity Catalog (UC) capability for accessing, storing, governing, organizing and - * processing files. Use cases include running machine learning on unstructured data such as - * image, audio, video, or PDF files, organizing data sets during the data exploration stages in - * data science, working with libraries that require access to the local file system on cluster - * machines, storing library and config files of arbitrary formats such as .whl or .txt centrally - * and providing secure access across workspaces to it, or transforming and querying non-tabular - * data files in ETL. + * Volumes are a Unity Catalog (UC) capability for accessing, storing, + * governing, organizing and processing files. Use cases include running + * machine learning on unstructured data such as image, audio, video, or PDF + * files, organizing data sets during the data exploration stages in data + * science, working with libraries that require access to the local file + * system on cluster machines, storing library and config files of arbitrary + * formats such as .whl or .txt centrally and providing secure access across + * workspaces to it, or transforming and querying non-tabular data files in + * ETL. */ public VolumesAPI volumes() { return volumesAPI; } - + /** - * A SQL warehouse is a compute resource that lets you run SQL commands on data objects within - * Databricks SQL. Compute resources are infrastructure resources that provide processing - * capabilities in the cloud. + * A SQL warehouse is a compute resource that lets you run SQL commands on + * data objects within Databricks SQL. Compute resources are infrastructure + * resources that provide processing capabilities in the cloud. */ public WarehousesAPI warehouses() { return warehousesAPI; } - + /** - * The Workspace API allows you to list, import, export, and delete notebooks and folders. - * - *

A notebook is a web-based interface to a document that contains runnable code, - * visualizations, and explanatory text. + * The Workspace API allows you to list, import, export, and delete notebooks + * and folders. + * + * A notebook is a web-based interface to a document that contains runnable + * code, visualizations, and explanatory text. */ public WorkspaceAPI workspace() { return workspaceAPI; } - + /** - * A catalog in Databricks can be configured as __OPEN__ or __ISOLATED__. An __OPEN__ catalog can - * be accessed from any workspace, while an __ISOLATED__ catalog can only be access from a - * configured list of workspaces. - * - *

A catalog's workspace bindings can be configured by a metastore admin or the owner of the - * catalog. + * A catalog in Databricks can be configured as __OPEN__ or __ISOLATED__. An + * __OPEN__ catalog can be accessed from any workspace, while an __ISOLATED__ + * catalog can only be access from a configured list of workspaces. + * + * A catalog's workspace bindings can be configured by a metastore admin or + * the owner of the catalog. */ public WorkspaceBindingsAPI workspaceBindings() { return workspaceBindingsAPI; } - - /** This API allows updating known workspace settings for advanced users. */ + + /** + * This API allows updating known workspace settings for advanced users. + */ public WorkspaceConfAPI workspaceConf() { return workspaceConfAPI; } - + + /** Replace AccountAccessControlProxyAPI implementation with mock */ - public WorkspaceClient withAccountAccessControlProxyImpl( - AccountAccessControlProxyService accountAccessControlProxy) { + public WorkspaceClient withAccountAccessControlProxyImpl(AccountAccessControlProxyService accountAccessControlProxy) { accountAccessControlProxyAPI = new AccountAccessControlProxyAPI(accountAccessControlProxy); return this; } - + /** Replace AlertsAPI implementation with mock */ public WorkspaceClient withAlertsImpl(AlertsService alerts) { alertsAPI = new AlertsAPI(alerts); return this; } - + /** Replace ArtifactAllowlistsAPI implementation with mock */ public WorkspaceClient withArtifactAllowlistsImpl(ArtifactAllowlistsService artifactAllowlists) { artifactAllowlistsAPI = new ArtifactAllowlistsAPI(artifactAllowlists); return this; } - + /** Replace CatalogsAPI implementation with mock */ public WorkspaceClient withCatalogsImpl(CatalogsService catalogs) { catalogsAPI = new CatalogsAPI(catalogs); return this; } - + /** Replace CleanRoomsAPI implementation with mock */ public WorkspaceClient withCleanRoomsImpl(CleanRoomsService cleanRooms) { cleanRoomsAPI = new CleanRoomsAPI(cleanRooms); return this; } - + /** Replace ClusterPoliciesAPI implementation with mock */ public WorkspaceClient withClusterPoliciesImpl(ClusterPoliciesService clusterPolicies) { clusterPoliciesAPI = new ClusterPoliciesAPI(clusterPolicies); return this; } - + /** Replace ClustersAPI implementation with mock */ public WorkspaceClient withClustersImpl(ClustersService clusters) { clustersAPI = new ClustersExt(clusters); return this; } - + /** Replace CommandExecutionAPI implementation with mock */ public WorkspaceClient withCommandExecutionImpl(CommandExecutionService commandExecution) { commandExecutionAPI = new CommandExecutionAPI(commandExecution); return this; } - + /** Replace ConnectionsAPI implementation with mock */ public WorkspaceClient withConnectionsImpl(ConnectionsService connections) { connectionsAPI = new ConnectionsAPI(connections); return this; } - + /** Replace CurrentUserAPI implementation with mock */ public WorkspaceClient withCurrentUserImpl(CurrentUserService currentUser) { currentUserAPI = new CurrentUserAPI(currentUser); return this; } - + /** Replace DashboardsAPI implementation with mock */ public WorkspaceClient withDashboardsImpl(DashboardsService dashboards) { dashboardsAPI = new DashboardsAPI(dashboards); return this; } - + /** Replace DataSourcesAPI implementation with mock */ public WorkspaceClient withDataSourcesImpl(DataSourcesService dataSources) { dataSourcesAPI = new DataSourcesAPI(dataSources); return this; } - + /** Replace DbfsAPI implementation with mock */ public WorkspaceClient withDbfsImpl(DbfsService dbfs) { dbfsAPI = new DbfsExt(dbfs); return this; } - + /** Replace DbsqlPermissionsAPI implementation with mock */ public WorkspaceClient withDbsqlPermissionsImpl(DbsqlPermissionsService dbsqlPermissions) { dbsqlPermissionsAPI = new DbsqlPermissionsAPI(dbsqlPermissions); return this; } - + /** Replace ExperimentsAPI implementation with mock */ public WorkspaceClient withExperimentsImpl(ExperimentsService experiments) { experimentsAPI = new ExperimentsAPI(experiments); return this; } - + /** Replace ExternalLocationsAPI implementation with mock */ public WorkspaceClient withExternalLocationsImpl(ExternalLocationsService externalLocations) { externalLocationsAPI = new ExternalLocationsAPI(externalLocations); return this; } - + /** Replace FunctionsAPI implementation with mock */ public WorkspaceClient withFunctionsImpl(FunctionsService functions) { functionsAPI = new FunctionsAPI(functions); return this; } - + /** Replace GitCredentialsAPI implementation with mock */ public WorkspaceClient withGitCredentialsImpl(GitCredentialsService gitCredentials) { gitCredentialsAPI = new GitCredentialsAPI(gitCredentials); return this; } - + /** Replace GlobalInitScriptsAPI implementation with mock */ public WorkspaceClient withGlobalInitScriptsImpl(GlobalInitScriptsService globalInitScripts) { globalInitScriptsAPI = new GlobalInitScriptsAPI(globalInitScripts); return this; } - + /** Replace GrantsAPI implementation with mock */ public WorkspaceClient withGrantsImpl(GrantsService grants) { grantsAPI = new GrantsAPI(grants); return this; } - + /** Replace GroupsAPI implementation with mock */ public WorkspaceClient withGroupsImpl(GroupsService groups) { groupsAPI = new GroupsAPI(groups); return this; } - + /** Replace InstancePoolsAPI implementation with mock */ public WorkspaceClient withInstancePoolsImpl(InstancePoolsService instancePools) { instancePoolsAPI = new InstancePoolsAPI(instancePools); return this; } - + /** Replace InstanceProfilesAPI implementation with mock */ public WorkspaceClient withInstanceProfilesImpl(InstanceProfilesService instanceProfiles) { instanceProfilesAPI = new InstanceProfilesAPI(instanceProfiles); return this; } - + /** Replace IpAccessListsAPI implementation with mock */ public WorkspaceClient withIpAccessListsImpl(IpAccessListsService ipAccessLists) { ipAccessListsAPI = new IpAccessListsAPI(ipAccessLists); return this; } - + /** Replace JobsAPI implementation with mock */ public WorkspaceClient withJobsImpl(JobsService jobs) { jobsAPI = new JobsAPI(jobs); return this; } - + /** Replace LibrariesAPI implementation with mock */ public WorkspaceClient withLibrariesImpl(LibrariesService libraries) { librariesAPI = new LibrariesAPI(libraries); return this; } - + /** Replace MetastoresAPI implementation with mock */ public WorkspaceClient withMetastoresImpl(MetastoresService metastores) { metastoresAPI = new MetastoresAPI(metastores); return this; } - + /** Replace ModelRegistryAPI implementation with mock */ public WorkspaceClient withModelRegistryImpl(ModelRegistryService modelRegistry) { modelRegistryAPI = new ModelRegistryAPI(modelRegistry); return this; } - + /** Replace PermissionsAPI implementation with mock */ public WorkspaceClient withPermissionsImpl(PermissionsService permissions) { permissionsAPI = new PermissionsAPI(permissions); return this; } - + /** Replace PipelinesAPI implementation with mock */ public WorkspaceClient withPipelinesImpl(PipelinesService pipelines) { pipelinesAPI = new PipelinesAPI(pipelines); return this; } - + /** Replace PolicyFamiliesAPI implementation with mock */ public WorkspaceClient withPolicyFamiliesImpl(PolicyFamiliesService policyFamilies) { policyFamiliesAPI = new PolicyFamiliesAPI(policyFamilies); return this; } - + /** Replace ProvidersAPI implementation with mock */ public WorkspaceClient withProvidersImpl(ProvidersService providers) { providersAPI = new ProvidersAPI(providers); return this; } - + /** Replace QueriesAPI implementation with mock */ public WorkspaceClient withQueriesImpl(QueriesService queries) { queriesAPI = new QueriesAPI(queries); return this; } - + /** Replace QueryHistoryAPI implementation with mock */ public WorkspaceClient withQueryHistoryImpl(QueryHistoryService queryHistory) { queryHistoryAPI = new QueryHistoryAPI(queryHistory); return this; } - + /** Replace RecipientActivationAPI implementation with mock */ - public WorkspaceClient withRecipientActivationImpl( - RecipientActivationService recipientActivation) { + public WorkspaceClient withRecipientActivationImpl(RecipientActivationService recipientActivation) { recipientActivationAPI = new RecipientActivationAPI(recipientActivation); return this; } - + /** Replace RecipientsAPI implementation with mock */ public WorkspaceClient withRecipientsImpl(RecipientsService recipients) { recipientsAPI = new RecipientsAPI(recipients); return this; } - + /** Replace ReposAPI implementation with mock */ public WorkspaceClient withReposImpl(ReposService repos) { reposAPI = new ReposAPI(repos); return this; } - + /** Replace SchemasAPI implementation with mock */ public WorkspaceClient withSchemasImpl(SchemasService schemas) { schemasAPI = new SchemasAPI(schemas); return this; } - + /** Replace SecretsAPI implementation with mock */ public WorkspaceClient withSecretsImpl(SecretsService secrets) { secretsAPI = new SecretsExt(secrets); return this; } - + /** Replace SecurableTagsAPI implementation with mock */ public WorkspaceClient withSecurableTagsImpl(SecurableTagsService securableTags) { securableTagsAPI = new SecurableTagsAPI(securableTags); return this; } - + /** Replace ServicePrincipalsAPI implementation with mock */ public WorkspaceClient withServicePrincipalsImpl(ServicePrincipalsService servicePrincipals) { servicePrincipalsAPI = new ServicePrincipalsAPI(servicePrincipals); return this; } - + /** Replace ServingEndpointsAPI implementation with mock */ public WorkspaceClient withServingEndpointsImpl(ServingEndpointsService servingEndpoints) { servingEndpointsAPI = new ServingEndpointsAPI(servingEndpoints); return this; } - + /** Replace SharesAPI implementation with mock */ public WorkspaceClient withSharesImpl(SharesService shares) { sharesAPI = new SharesAPI(shares); return this; } - + /** Replace StatementExecutionAPI implementation with mock */ public WorkspaceClient withStatementExecutionImpl(StatementExecutionService statementExecution) { statementExecutionAPI = new StatementExecutionAPI(statementExecution); return this; } - + /** Replace StorageCredentialsAPI implementation with mock */ public WorkspaceClient withStorageCredentialsImpl(StorageCredentialsService storageCredentials) { storageCredentialsAPI = new StorageCredentialsAPI(storageCredentials); return this; } - + /** Replace SubentityTagsAPI implementation with mock */ public WorkspaceClient withSubentityTagsImpl(SubentityTagsService subentityTags) { subentityTagsAPI = new SubentityTagsAPI(subentityTags); return this; } - + /** Replace SystemSchemasAPI implementation with mock */ public WorkspaceClient withSystemSchemasImpl(SystemSchemasService systemSchemas) { systemSchemasAPI = new SystemSchemasAPI(systemSchemas); return this; } - + /** Replace TableConstraintsAPI implementation with mock */ public WorkspaceClient withTableConstraintsImpl(TableConstraintsService tableConstraints) { tableConstraintsAPI = new TableConstraintsAPI(tableConstraints); return this; } - + /** Replace TablesAPI implementation with mock */ public WorkspaceClient withTablesImpl(TablesService tables) { tablesAPI = new TablesAPI(tables); return this; } - + /** Replace TokenManagementAPI implementation with mock */ public WorkspaceClient withTokenManagementImpl(TokenManagementService tokenManagement) { tokenManagementAPI = new TokenManagementAPI(tokenManagement); return this; } - + /** Replace TokensAPI implementation with mock */ public WorkspaceClient withTokensImpl(TokensService tokens) { tokensAPI = new TokensAPI(tokens); return this; } - + /** Replace UsersAPI implementation with mock */ public WorkspaceClient withUsersImpl(UsersService users) { usersAPI = new UsersAPI(users); return this; } - + /** Replace VolumesAPI implementation with mock */ public WorkspaceClient withVolumesImpl(VolumesService volumes) { volumesAPI = new VolumesAPI(volumes); return this; } - + /** Replace WarehousesAPI implementation with mock */ public WorkspaceClient withWarehousesImpl(WarehousesService warehouses) { warehousesAPI = new WarehousesAPI(warehouses); return this; } - + /** Replace WorkspaceAPI implementation with mock */ public WorkspaceClient withWorkspaceImpl(WorkspaceService workspace) { workspaceAPI = new WorkspaceAPI(workspace); return this; } - + /** Replace WorkspaceBindingsAPI implementation with mock */ public WorkspaceClient withWorkspaceBindingsImpl(WorkspaceBindingsService workspaceBindings) { workspaceBindingsAPI = new WorkspaceBindingsAPI(workspaceBindings); return this; } - + /** Replace WorkspaceConfAPI implementation with mock */ public WorkspaceClient withWorkspaceConfImpl(WorkspaceConfService workspaceConf) { workspaceConfAPI = new WorkspaceConfAPI(workspaceConf); return this; } - + public ApiClient apiClient() { return apiClient; } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java index e9d0dba85..d31008cdc 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java @@ -199,7 +199,6 @@ private T execute(Request in, Class target) throws IOException { private Response getResponse(Request in) { in.withUrl(config.getHost() + in.getUrl()); - in.withHeader("Accept", "application/json"); return executeInner(in); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java index cfa50b192..d1db9d6ac 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java @@ -1,15 +1,30 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. package com.databricks.sdk.service.iam; -import com.databricks.sdk.core.ApiClient; -import com.databricks.sdk.support.Generated; +import java.io.IOException; +import java.util.Collection; +import java.util.Map; +import java.time.Duration; +import java.util.Arrays; +import java.util.concurrent.TimeoutException; +import java.util.function.Consumer; +import java.util.function.Function; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.Paginator; +import com.databricks.sdk.support.Wait; + + + /** - * These APIs manage access rules on resources in an account. Currently, only grant rules are - * supported. A grant rule specifies a role assigned to a set of principals. A list of rules - * attached to a resource is called a rule set. + * These APIs manage access rules on resources in an account. Currently, only + * grant rules are supported. A grant rule specifies a role assigned to a set of + * principals. A list of rules attached to a resource is called a rule set. */ @Generated public class AccountAccessControlAPI { @@ -26,53 +41,78 @@ public AccountAccessControlAPI(ApiClient apiClient) { public AccountAccessControlAPI(AccountAccessControlService mock) { impl = mock; } + + + public GetAssignableRolesForResourceResponse getAssignableRolesForResource(String resource) { - return getAssignableRolesForResource( - new GetAssignableRolesForResourceRequest().setResource(resource)); + return getAssignableRolesForResource(new GetAssignableRolesForResourceRequest() + .setResource(resource)); } + - /** + /** * Get assignable roles for a resource. - * - *

Gets all the roles that can be granted on an account level resource. A role is grantable if - * the rule set on the resource can contain an access rule of the role. + * + * Gets all the roles that can be granted on an account level resource. A role + * is grantable if the rule set on the resource can contain an access rule of + * the role. */ - public GetAssignableRolesForResourceResponse getAssignableRolesForResource( - GetAssignableRolesForResourceRequest request) { + public GetAssignableRolesForResourceResponse getAssignableRolesForResource(GetAssignableRolesForResourceRequest request) { return impl.getAssignableRolesForResource(request); } - + + public RuleSetResponse getRuleSet(String name, String etag) { - return getRuleSet(new GetRuleSetRequest().setName(name).setEtag(etag)); + return getRuleSet(new GetRuleSetRequest() + .setName(name) + .setEtag(etag)); } + - /** + /** * Get a rule set. - * - *

Get a rule set by its name. A rule set is always attached to a resource and contains a list - * of access rules on the said resource. Currently only a default rule set for each resource is - * supported. + * + * Get a rule set by its name. A rule set is always attached to a resource and + * contains a list of access rules on the said resource. Currently only a + * default rule set for each resource is supported. */ public RuleSetResponse getRuleSet(GetRuleSetRequest request) { return impl.getRuleSet(request); } - + + public RuleSetResponse updateRuleSet(String name, RuleSetUpdateRequest ruleSet) { - return updateRuleSet(new UpdateRuleSetRequest().setName(name).setRuleSet(ruleSet)); + return updateRuleSet(new UpdateRuleSetRequest() + .setName(name) + .setRuleSet(ruleSet)); } + - /** + /** * Update a rule set. - * - *

Replace the rules of a rule set. First, use get to read the current version of the rule set - * before modifying it. This pattern helps prevent conflicts between concurrent updates. + * + * Replace the rules of a rule set. First, use get to read the current version + * of the rule set before modifying it. This pattern helps prevent conflicts + * between concurrent updates. */ public RuleSetResponse updateRuleSet(UpdateRuleSetRequest request) { return impl.updateRuleSet(request); } - + public AccountAccessControlService impl() { return impl; } } + + + + + + + + + + + + diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlService.java index 3b5f6f0cb..00cae1d8c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlService.java @@ -1,42 +1,47 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. package com.databricks.sdk.service.iam; +import java.util.Collection; +import java.util.Map; + import com.databricks.sdk.support.Generated; /** - * These APIs manage access rules on resources in an account. Currently, only grant rules are - * supported. A grant rule specifies a role assigned to a set of principals. A list of rules - * attached to a resource is called a rule set. + * These APIs manage access rules on resources in an account. Currently, only + * grant rules are supported. A grant rule specifies a role assigned to a set of + * principals. A list of rules attached to a resource is called a rule set. * - *

This is the high-level interface, that contains generated methods. + * This is the high-level interface, that contains generated methods. * - *

Evolving: this interface is under development. Method signatures may change. + * Evolving: this interface is under development. Method signatures may change. */ @Generated public interface AccountAccessControlService { - /** + /** * Get assignable roles for a resource. - * - *

Gets all the roles that can be granted on an account level resource. A role is grantable if - * the rule set on the resource can contain an access rule of the role. + * + * Gets all the roles that can be granted on an account level resource. A role + * is grantable if the rule set on the resource can contain an access rule of + * the role. */ - GetAssignableRolesForResourceResponse getAssignableRolesForResource( - GetAssignableRolesForResourceRequest getAssignableRolesForResourceRequest); - - /** + GetAssignableRolesForResourceResponse getAssignableRolesForResource(GetAssignableRolesForResourceRequest getAssignableRolesForResourceRequest); + + /** * Get a rule set. - * - *

Get a rule set by its name. A rule set is always attached to a resource and contains a list - * of access rules on the said resource. Currently only a default rule set for each resource is - * supported. + * + * Get a rule set by its name. A rule set is always attached to a resource and + * contains a list of access rules on the said resource. Currently only a + * default rule set for each resource is supported. */ RuleSetResponse getRuleSet(GetRuleSetRequest getRuleSetRequest); - - /** + + /** * Update a rule set. - * - *

Replace the rules of a rule set. First, use get to read the current version of the rule set - * before modifying it. This pattern helps prevent conflicts between concurrent updates. + * + * Replace the rules of a rule set. First, use get to read the current version + * of the rule set before modifying it. This pattern helps prevent conflicts + * between concurrent updates. */ RuleSetResponse updateRuleSet(UpdateRuleSetRequest updateRuleSetRequest); -} + +} \ No newline at end of file From de469bba940b20f662c81fb8fce300c8ee391c99 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 18 Aug 2023 21:39:14 +0200 Subject: [PATCH 5/9] tweaks --- .codegen/_openapi_sha | 2 +- .gitattributes | 26 +- .../com/databricks/sdk/AccountClient.java | 594 +++--- .../com/databricks/sdk/WorkspaceClient.java | 1811 ++++++++--------- .../service/billing/BillableUsageImpl.java | 1 - .../sdk/service/catalog/Privilege.java | 1 - .../sdk/service/catalog/VolumesImpl.java | 1 - .../compute/GlobalInitScriptsImpl.java | 1 - .../service/iam/AccountAccessControlAPI.java | 94 +- .../iam/AccountAccessControlService.java | 51 +- .../sdk/service/iam/AccountGroupsImpl.java | 1 - .../iam/AccountServicePrincipalsImpl.java | 1 - .../sdk/service/iam/AccountUsersImpl.java | 1 - .../sdk/service/iam/GroupsImpl.java | 1 - .../service/iam/ServicePrincipalsImpl.java | 1 - .../databricks/sdk/service/iam/UsersImpl.java | 1 - .../oauth2/ServicePrincipalSecretsImpl.java | 1 - .../service/serving/ServingEndpointsImpl.java | 1 - .../settings/AccountIpAccessListsImpl.java | 1 - .../service/settings/IpAccessListsImpl.java | 1 - .../service/settings/TokenManagementImpl.java | 1 - .../sdk/service/sharing/Privilege.java | 1 - .../service/sql/StatementExecutionImpl.java | 1 - .../service/workspace/GitCredentialsImpl.java | 1 - .../sdk/service/workspace/ReposImpl.java | 1 - 25 files changed, 1151 insertions(+), 1446 deletions(-) diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 8af74cf44..7b612f095 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -beff621d7b3e1d59244e2e34fc53a496f310e130 \ No newline at end of file +universe:/Users/miles/universe \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index ea2714882..68b93ec32 100755 --- a/.gitattributes +++ b/.gitattributes @@ -167,10 +167,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListFunctio databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListMetastoresResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSchemasRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSchemasResponse.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableTagsRequest.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListStorageCredentialsResponse.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSubentityTagsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSummariesRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSystemSchemasRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSystemSchemasResponse.java linguist-generated=true @@ -201,9 +198,6 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableOptionsMap.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurablePropertiesMap.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsAPI.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SetArtifactAllowlist.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SseEncryptionDetails.java linguist-generated=true @@ -212,9 +206,6 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCred databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsService.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsAPI.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemaInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemaInfoState.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasAPI.java linguist-generated=true @@ -233,14 +224,6 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableType.j databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesService.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagChanges.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagKeyValuePair.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurable.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignment.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignmentsList.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentity.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentityAssignmentsList.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagsSubentityAssignment.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UnassignRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateCatalog.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateConnection.java linguist-generated=true @@ -253,10 +236,8 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdatePermi databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdatePredictiveOptimization.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdatePredictiveOptimizationResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateSchema.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateSecurableType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateStorageCredential.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateTableRequest.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateTags.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateVolumeRequestContent.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateWorkspaceBindings.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateStorageCredential.java linguist-generated=true @@ -478,7 +459,13 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsAPI.java databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/Delete.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FileInfo.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/GetStatusRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/ListDbfsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/ListStatusResponse.java linguist-generated=true @@ -487,6 +474,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/Move.java lin databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/Put.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/ReadDbfsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/ReadResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccessControlRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccessControlResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java linguist-generated=true diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java index ce05e69df..643d8d65b 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java @@ -5,67 +5,64 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.core.ConfigLoader; import com.databricks.sdk.core.DatabricksConfig; - -import com.databricks.sdk.service.iam.AccountAccessControlAPI; -import com.databricks.sdk.service.iam.AccountAccessControlService; import com.databricks.sdk.service.billing.BillableUsageAPI; import com.databricks.sdk.service.billing.BillableUsageService; import com.databricks.sdk.service.billing.BudgetsAPI; import com.databricks.sdk.service.billing.BudgetsService; -import com.databricks.sdk.service.provisioning.CredentialsAPI; -import com.databricks.sdk.service.provisioning.CredentialsService; -import com.databricks.sdk.service.oauth2.CustomAppIntegrationAPI; -import com.databricks.sdk.service.oauth2.CustomAppIntegrationService; -import com.databricks.sdk.service.provisioning.EncryptionKeysAPI; -import com.databricks.sdk.service.provisioning.EncryptionKeysService; -import com.databricks.sdk.service.iam.AccountGroupsAPI; -import com.databricks.sdk.service.iam.AccountGroupsService; -import com.databricks.sdk.service.settings.AccountIpAccessListsAPI; -import com.databricks.sdk.service.settings.AccountIpAccessListsService; import com.databricks.sdk.service.billing.LogDeliveryAPI; import com.databricks.sdk.service.billing.LogDeliveryService; import com.databricks.sdk.service.catalog.AccountMetastoreAssignmentsAPI; import com.databricks.sdk.service.catalog.AccountMetastoreAssignmentsService; import com.databricks.sdk.service.catalog.AccountMetastoresAPI; import com.databricks.sdk.service.catalog.AccountMetastoresService; -import com.databricks.sdk.service.settings.AccountNetworkPolicyAPI; -import com.databricks.sdk.service.settings.AccountNetworkPolicyService; -import com.databricks.sdk.service.provisioning.NetworksAPI; -import com.databricks.sdk.service.provisioning.NetworksService; +import com.databricks.sdk.service.catalog.AccountStorageCredentialsAPI; +import com.databricks.sdk.service.catalog.AccountStorageCredentialsService; +import com.databricks.sdk.service.iam.AccountAccessControlAPI; +import com.databricks.sdk.service.iam.AccountAccessControlService; +import com.databricks.sdk.service.iam.AccountGroupsAPI; +import com.databricks.sdk.service.iam.AccountGroupsService; +import com.databricks.sdk.service.iam.AccountServicePrincipalsAPI; +import com.databricks.sdk.service.iam.AccountServicePrincipalsService; +import com.databricks.sdk.service.iam.AccountUsersAPI; +import com.databricks.sdk.service.iam.AccountUsersService; +import com.databricks.sdk.service.iam.WorkspaceAssignmentAPI; +import com.databricks.sdk.service.iam.WorkspaceAssignmentService; +import com.databricks.sdk.service.oauth2.CustomAppIntegrationAPI; +import com.databricks.sdk.service.oauth2.CustomAppIntegrationService; import com.databricks.sdk.service.oauth2.OAuthEnrollmentAPI; import com.databricks.sdk.service.oauth2.OAuthEnrollmentService; -import com.databricks.sdk.service.provisioning.PrivateAccessAPI; -import com.databricks.sdk.service.provisioning.PrivateAccessService; import com.databricks.sdk.service.oauth2.PublishedAppIntegrationAPI; import com.databricks.sdk.service.oauth2.PublishedAppIntegrationService; import com.databricks.sdk.service.oauth2.ServicePrincipalSecretsAPI; import com.databricks.sdk.service.oauth2.ServicePrincipalSecretsService; -import com.databricks.sdk.service.iam.AccountServicePrincipalsAPI; -import com.databricks.sdk.service.iam.AccountServicePrincipalsService; -import com.databricks.sdk.service.settings.AccountSettingsAPI; -import com.databricks.sdk.service.settings.AccountSettingsService; +import com.databricks.sdk.service.provisioning.CredentialsAPI; +import com.databricks.sdk.service.provisioning.CredentialsService; +import com.databricks.sdk.service.provisioning.EncryptionKeysAPI; +import com.databricks.sdk.service.provisioning.EncryptionKeysService; +import com.databricks.sdk.service.provisioning.NetworksAPI; +import com.databricks.sdk.service.provisioning.NetworksService; +import com.databricks.sdk.service.provisioning.PrivateAccessAPI; +import com.databricks.sdk.service.provisioning.PrivateAccessService; import com.databricks.sdk.service.provisioning.StorageAPI; import com.databricks.sdk.service.provisioning.StorageService; -import com.databricks.sdk.service.catalog.AccountStorageCredentialsAPI; -import com.databricks.sdk.service.catalog.AccountStorageCredentialsService; -import com.databricks.sdk.service.iam.AccountUsersAPI; -import com.databricks.sdk.service.iam.AccountUsersService; import com.databricks.sdk.service.provisioning.VpcEndpointsAPI; import com.databricks.sdk.service.provisioning.VpcEndpointsService; -import com.databricks.sdk.service.iam.WorkspaceAssignmentAPI; -import com.databricks.sdk.service.iam.WorkspaceAssignmentService; import com.databricks.sdk.service.provisioning.WorkspacesAPI; import com.databricks.sdk.service.provisioning.WorkspacesService; +import com.databricks.sdk.service.settings.AccountIpAccessListsAPI; +import com.databricks.sdk.service.settings.AccountIpAccessListsService; +import com.databricks.sdk.service.settings.AccountNetworkPolicyAPI; +import com.databricks.sdk.service.settings.AccountNetworkPolicyService; +import com.databricks.sdk.service.settings.AccountSettingsAPI; +import com.databricks.sdk.service.settings.AccountSettingsService; import com.databricks.sdk.support.Generated; -/** - * Entry point for accessing Databricks account-level APIs - */ +/** Entry point for accessing Databricks account-level APIs */ @Generated public class AccountClient { private final ApiClient apiClient; private final DatabricksConfig config; - + private AccountAccessControlAPI accessControlAPI; private BillableUsageAPI billableUsageAPI; private BudgetsAPI budgetsAPI; @@ -99,7 +96,7 @@ public AccountClient() { public AccountClient(DatabricksConfig config) { this.config = config; apiClient = new ApiClient(config); - + accessControlAPI = new AccountAccessControlAPI(apiClient); billableUsageAPI = new BillableUsageAPI(apiClient); budgetsAPI = new BudgetsAPI(apiClient); @@ -132,526 +129,493 @@ public AccountClient(boolean mock) { apiClient = null; config = null; } - + /** - * These APIs manage access rules on resources in an account. Currently, only - * grant rules are supported. A grant rule specifies a role assigned to a set - * of principals. A list of rules attached to a resource is called a rule set. + * These APIs manage access rules on resources in an account. Currently, only grant rules are + * supported. A grant rule specifies a role assigned to a set of principals. A list of rules + * attached to a resource is called a rule set. */ public AccountAccessControlAPI accessControl() { return accessControlAPI; } - + /** - * This API allows you to download billable usage logs for the specified - * account and date range. This feature works with all account types. + * This API allows you to download billable usage logs for the specified account and date range. + * This feature works with all account types. */ public BillableUsageAPI billableUsage() { return billableUsageAPI; } - + /** - * These APIs manage budget configuration including notifications for - * exceeding a budget for a period. They can also retrieve the status of each - * budget. + * These APIs manage budget configuration including notifications for exceeding a budget for a + * period. They can also retrieve the status of each budget. */ public BudgetsAPI budgets() { return budgetsAPI; } - + /** - * These APIs manage credential configurations for this workspace. Databricks - * needs access to a cross-account service IAM role in your AWS account so - * that Databricks can deploy clusters in the appropriate VPC for the new - * workspace. A credential configuration encapsulates this role information, - * and its ID is used when creating a new workspace. + * These APIs manage credential configurations for this workspace. Databricks needs access to a + * cross-account service IAM role in your AWS account so that Databricks can deploy clusters in + * the appropriate VPC for the new workspace. A credential configuration encapsulates this role + * information, and its ID is used when creating a new workspace. */ public CredentialsAPI credentials() { return credentialsAPI; } - + /** - * These APIs enable administrators to manage custom oauth app integrations, - * which is required for adding/using Custom OAuth App Integration like - * Tableau Cloud for Databricks in AWS cloud. - * - * **Note:** You can only add/use the OAuth custom application integrations - * when OAuth enrollment status is enabled. For more details see - * :method:OAuthEnrollment/create + * These APIs enable administrators to manage custom oauth app integrations, which is required for + * adding/using Custom OAuth App Integration like Tableau Cloud for Databricks in AWS cloud. + * + *

**Note:** You can only add/use the OAuth custom application integrations when OAuth + * enrollment status is enabled. For more details see :method:OAuthEnrollment/create */ public CustomAppIntegrationAPI customAppIntegration() { return customAppIntegrationAPI; } - + /** - * These APIs manage encryption key configurations for this workspace - * (optional). A key configuration encapsulates the AWS KMS key information - * and some information about how the key configuration can be used. There are - * two possible uses for key configurations: - * - * * Managed services: A key configuration can be used to encrypt a - * workspace's notebook and secret data in the control plane, as well as - * Databricks SQL queries and query history. * Storage: A key configuration - * can be used to encrypt a workspace's DBFS and EBS data in the data plane. - * - * In both of these cases, the key configuration's ID is used when creating a - * new workspace. This Preview feature is available if your account is on the - * E2 version of the platform. Updating a running workspace with workspace - * storage encryption requires that the workspace is on the E2 version of the - * platform. If you have an older workspace, it might not be on the E2 version - * of the platform. If you are not sure, contact your Databricks - * representative. + * These APIs manage encryption key configurations for this workspace (optional). A key + * configuration encapsulates the AWS KMS key information and some information about how the key + * configuration can be used. There are two possible uses for key configurations: + * + *

* Managed services: A key configuration can be used to encrypt a workspace's notebook and + * secret data in the control plane, as well as Databricks SQL queries and query history. * + * Storage: A key configuration can be used to encrypt a workspace's DBFS and EBS data in the data + * plane. + * + *

In both of these cases, the key configuration's ID is used when creating a new workspace. + * This Preview feature is available if your account is on the E2 version of the platform. + * Updating a running workspace with workspace storage encryption requires that the workspace is + * on the E2 version of the platform. If you have an older workspace, it might not be on the E2 + * version of the platform. If you are not sure, contact your Databricks representative. */ public EncryptionKeysAPI encryptionKeys() { return encryptionKeysAPI; } - + /** - * Groups simplify identity management, making it easier to assign access to - * Databricks account, data, and other securable objects. - * - * It is best practice to assign access to workspaces and access-control - * policies in Unity Catalog to groups, instead of to users individually. All - * Databricks account identities can be assigned as members of groups, and - * members inherit permissions that are assigned to their group. + * Groups simplify identity management, making it easier to assign access to Databricks account, + * data, and other securable objects. + * + *

It is best practice to assign access to workspaces and access-control policies in Unity + * Catalog to groups, instead of to users individually. All Databricks account identities can be + * assigned as members of groups, and members inherit permissions that are assigned to their + * group. */ public AccountGroupsAPI groups() { return groupsAPI; } - + /** - * The Accounts IP Access List API enables account admins to configure IP - * access lists for access to the account console. - * - * Account IP Access Lists affect web application access and REST API access - * to the account console and account APIs. If the feature is disabled for the - * account, all access is allowed for this account. There is support for allow - * lists (inclusion) and block lists (exclusion). - * - * When a connection is attempted: 1. **First, all block lists are checked.** - * If the connection IP address matches any block list, the connection is - * rejected. 2. **If the connection was not rejected by block lists**, the IP - * address is compared with the allow lists. - * - * If there is at least one allow list for the account, the connection is - * allowed only if the IP address matches an allow list. If there are no allow - * lists for the account, all IP addresses are allowed. - * - * For all allow lists and block lists combined, the account supports a - * maximum of 1000 IP/CIDR values, where one CIDR counts as a single value. - * - * After changes to the account-level IP access lists, it can take a few - * minutes for changes to take effect. + * The Accounts IP Access List API enables account admins to configure IP access lists for access + * to the account console. + * + *

Account IP Access Lists affect web application access and REST API access to the account + * console and account APIs. If the feature is disabled for the account, all access is allowed for + * this account. There is support for allow lists (inclusion) and block lists (exclusion). + * + *

When a connection is attempted: 1. **First, all block lists are checked.** If the connection + * IP address matches any block list, the connection is rejected. 2. **If the connection was not + * rejected by block lists**, the IP address is compared with the allow lists. + * + *

If there is at least one allow list for the account, the connection is allowed only if the + * IP address matches an allow list. If there are no allow lists for the account, all IP addresses + * are allowed. + * + *

For all allow lists and block lists combined, the account supports a maximum of 1000 IP/CIDR + * values, where one CIDR counts as a single value. + * + *

After changes to the account-level IP access lists, it can take a few minutes for changes to + * take effect. */ public AccountIpAccessListsAPI ipAccessLists() { return ipAccessListsAPI; } - + /** - * These APIs manage log delivery configurations for this account. The two - * supported log types for this API are _billable usage logs_ and _audit - * logs_. This feature is in Public Preview. This feature works with all - * account ID types. - * - * Log delivery works with all account types. However, if your account is on - * the E2 version of the platform or on a select custom plan that allows - * multiple workspaces per account, you can optionally configure different - * storage destinations for each workspace. Log delivery status is also - * provided to know the latest status of log delivery attempts. The high-level - * flow of billable usage delivery: - * - * 1. **Create storage**: In AWS, [create a new AWS S3 bucket] with a specific - * bucket policy. Using Databricks APIs, call the Account API to create a - * [storage configuration object](#operation/create-storage-config) that uses - * the bucket name. 2. **Create credentials**: In AWS, create the appropriate - * AWS IAM role. For full details, including the required IAM role policies - * and trust relationship, see [Billable usage log delivery]. Using Databricks - * APIs, call the Account API to create a [credential configuration - * object](#operation/create-credential-config) that uses the IAM role's ARN. - * 3. **Create log delivery configuration**: Using Databricks APIs, call the - * Account API to [create a log delivery - * configuration](#operation/create-log-delivery-config) that uses the - * credential and storage configuration objects from previous steps. You can - * specify if the logs should include all events of that log type in your - * account (_Account level_ delivery) or only events for a specific set of - * workspaces (_workspace level_ delivery). Account level log delivery applies - * to all current and future workspaces plus account level logs, while - * workspace level log delivery solely delivers logs related to the specified - * workspaces. You can create multiple types of delivery configurations per - * account. - * - * For billable usage delivery: * For more information about billable usage - * logs, see [Billable usage log delivery]. For the CSV schema, see the [Usage - * page]. * The delivery location is - * `//billable-usage/csv/`, where `` is the name - * of the optional delivery path prefix you set up during log delivery - * configuration. Files are named - * `workspaceId=-usageMonth=.csv`. * All billable usage - * logs apply to specific workspaces (_workspace level_ logs). You can - * aggregate usage for your entire account by creating an _account level_ - * delivery configuration that delivers logs for all current and future - * workspaces in your account. * The files are delivered daily by overwriting - * the month's CSV file for each workspace. - * - * For audit log delivery: * For more information about about audit log - * delivery, see [Audit log delivery], which includes information about the - * used JSON schema. * The delivery location is + * These APIs manage log delivery configurations for this account. The two supported log types for + * this API are _billable usage logs_ and _audit logs_. This feature is in Public Preview. This + * feature works with all account ID types. + * + *

Log delivery works with all account types. However, if your account is on the E2 version of + * the platform or on a select custom plan that allows multiple workspaces per account, you can + * optionally configure different storage destinations for each workspace. Log delivery status is + * also provided to know the latest status of log delivery attempts. The high-level flow of + * billable usage delivery: + * + *

1. **Create storage**: In AWS, [create a new AWS S3 bucket] with a specific bucket policy. + * Using Databricks APIs, call the Account API to create a [storage configuration + * object](#operation/create-storage-config) that uses the bucket name. 2. **Create credentials**: + * In AWS, create the appropriate AWS IAM role. For full details, including the required IAM role + * policies and trust relationship, see [Billable usage log delivery]. Using Databricks APIs, call + * the Account API to create a [credential configuration + * object](#operation/create-credential-config) that uses the IAM role's ARN. 3. **Create log + * delivery configuration**: Using Databricks APIs, call the Account API to [create a log delivery + * configuration](#operation/create-log-delivery-config) that uses the credential and storage + * configuration objects from previous steps. You can specify if the logs should include all + * events of that log type in your account (_Account level_ delivery) or only events for a + * specific set of workspaces (_workspace level_ delivery). Account level log delivery applies to + * all current and future workspaces plus account level logs, while workspace level log delivery + * solely delivers logs related to the specified workspaces. You can create multiple types of + * delivery configurations per account. + * + *

For billable usage delivery: * For more information about billable usage logs, see [Billable + * usage log delivery]. For the CSV schema, see the [Usage page]. * The delivery location is + * `//billable-usage/csv/`, where `` is the name of the optional + * delivery path prefix you set up during log delivery configuration. Files are named + * `workspaceId=-usageMonth=.csv`. * All billable usage logs apply to + * specific workspaces (_workspace level_ logs). You can aggregate usage for your entire account + * by creating an _account level_ delivery configuration that delivers logs for all current and + * future workspaces in your account. * The files are delivered daily by overwriting the month's + * CSV file for each workspace. + * + *

For audit log delivery: * For more information about about audit log delivery, see [Audit + * log delivery], which includes information about the used JSON schema. * The delivery location + * is * `//workspaceId=/date=/auditlogs_.json`. - * Files may get overwritten with the same content multiple times to achieve - * exactly-once delivery. * If the audit log delivery configuration included - * specific workspace IDs, only _workspace-level_ audit logs for those - * workspaces are delivered. If the log delivery configuration applies to the - * entire account (_account level_ delivery configuration), the audit log - * delivery includes workspace-level audit logs for all workspaces in the - * account as well as account-level audit logs. See [Audit log delivery] for - * details. * Auditable events are typically available in logs within 15 - * minutes. - * - * [Audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html - * [Billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html + * Files may get overwritten with the same content multiple times to achieve exactly-once + * delivery. * If the audit log delivery configuration included specific workspace IDs, only + * _workspace-level_ audit logs for those workspaces are delivered. If the log delivery + * configuration applies to the entire account (_account level_ delivery configuration), the audit + * log delivery includes workspace-level audit logs for all workspaces in the account as well as + * account-level audit logs. See [Audit log delivery] for details. * Auditable events are + * typically available in logs within 15 minutes. + * + *

[Audit log delivery]: + * https://docs.databricks.com/administration-guide/account-settings/audit-logs.html [Billable + * usage log delivery]: + * https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html * [Usage page]: https://docs.databricks.com/administration-guide/account-settings/usage.html - * [create a new AWS S3 bucket]: https://docs.databricks.com/administration-guide/account-api/aws-storage.html + * [create a new AWS S3 bucket]: + * https://docs.databricks.com/administration-guide/account-api/aws-storage.html */ public LogDeliveryAPI logDelivery() { return logDeliveryAPI; } - - /** - * These APIs manage metastore assignments to a workspace. - */ + + /** These APIs manage metastore assignments to a workspace. */ public AccountMetastoreAssignmentsAPI metastoreAssignments() { return metastoreAssignmentsAPI; } - + /** - * These APIs manage Unity Catalog metastores for an account. A metastore - * contains catalogs that can be associated with workspaces + * These APIs manage Unity Catalog metastores for an account. A metastore contains catalogs that + * can be associated with workspaces */ public AccountMetastoresAPI metastores() { return metastoresAPI; } - + /** - * Network policy is a set of rules that defines what can be accessed from - * your Databricks network. E.g.: You can choose to block your SQL UDF to - * access internet from your Databricks serverless clusters. - * - * There is only one instance of this setting per account. Since this setting - * has a default value, this setting is present on all accounts even though - * it's never set on a given account. Deletion reverts the value of the - * setting back to the default value. + * Network policy is a set of rules that defines what can be accessed from your Databricks + * network. E.g.: You can choose to block your SQL UDF to access internet from your Databricks + * serverless clusters. + * + *

There is only one instance of this setting per account. Since this setting has a default + * value, this setting is present on all accounts even though it's never set on a given account. + * Deletion reverts the value of the setting back to the default value. */ public AccountNetworkPolicyAPI networkPolicy() { return networkPolicyAPI; } - + /** - * These APIs manage network configurations for customer-managed VPCs - * (optional). Its ID is used when creating a new workspace if you use - * customer-managed VPCs. + * These APIs manage network configurations for customer-managed VPCs (optional). Its ID is used + * when creating a new workspace if you use customer-managed VPCs. */ public NetworksAPI networks() { return networksAPI; } - + /** - * These APIs enable administrators to enroll OAuth for their accounts, which - * is required for adding/using any OAuth published/custom application - * integration. - * - * **Note:** Your account must be on the E2 version to use these APIs, this is - * because OAuth is only supported on the E2 version. + * These APIs enable administrators to enroll OAuth for their accounts, which is required for + * adding/using any OAuth published/custom application integration. + * + *

**Note:** Your account must be on the E2 version to use these APIs, this is because OAuth is + * only supported on the E2 version. */ public OAuthEnrollmentAPI oAuthEnrollment() { return oAuthEnrollmentAPI; } - - /** - * These APIs manage private access settings for this account. - */ + + /** These APIs manage private access settings for this account. */ public PrivateAccessAPI privateAccess() { return privateAccessAPI; } - + /** - * These APIs enable administrators to manage published oauth app - * integrations, which is required for adding/using Published OAuth App - * Integration like Tableau Cloud for Databricks in AWS cloud. - * - * **Note:** You can only add/use the OAuth published application integrations - * when OAuth enrollment status is enabled. For more details see - * :method:OAuthEnrollment/create + * These APIs enable administrators to manage published oauth app integrations, which is required + * for adding/using Published OAuth App Integration like Tableau Cloud for Databricks in AWS + * cloud. + * + *

**Note:** You can only add/use the OAuth published application integrations when OAuth + * enrollment status is enabled. For more details see :method:OAuthEnrollment/create */ public PublishedAppIntegrationAPI publishedAppIntegration() { return publishedAppIntegrationAPI; } - + /** * These APIs enable administrators to manage service principal secrets. - * - * You can use the generated secrets to obtain OAuth access tokens for a - * service principal, which can then be used to access Databricks Accounts and - * Workspace APIs. For more information, see [Authentication using OAuth - * tokens for service principals], - * - * In addition, the generated secrets can be used to configure the Databricks - * Terraform Provider to authenticate with the service principal. For more - * information, see [Databricks Terraform Provider]. - * - * [Authentication using OAuth tokens for service principals]: https://docs.databricks.com/dev-tools/authentication-oauth.html - * [Databricks Terraform Provider]: https://github.com/databricks/terraform-provider-databricks/blob/master/docs/index.md#authenticating-with-service-principal + * + *

You can use the generated secrets to obtain OAuth access tokens for a service principal, + * which can then be used to access Databricks Accounts and Workspace APIs. For more information, + * see [Authentication using OAuth tokens for service principals], + * + *

In addition, the generated secrets can be used to configure the Databricks Terraform + * Provider to authenticate with the service principal. For more information, see [Databricks + * Terraform Provider]. + * + *

[Authentication using OAuth tokens for service principals]: + * https://docs.databricks.com/dev-tools/authentication-oauth.html [Databricks Terraform + * Provider]: + * https://github.com/databricks/terraform-provider-databricks/blob/master/docs/index.md#authenticating-with-service-principal */ public ServicePrincipalSecretsAPI servicePrincipalSecrets() { return servicePrincipalSecretsAPI; } - + /** - * Identities for use with jobs, automated tools, and systems such as scripts, - * apps, and CI/CD platforms. Databricks recommends creating service - * principals to run production jobs or modify production data. If all - * processes that act on production data run with service principals, - * interactive users do not need any write, delete, or modify privileges in - * production. This eliminates the risk of a user overwriting production data - * by accident. + * Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD + * platforms. Databricks recommends creating service principals to run production jobs or modify + * production data. If all processes that act on production data run with service principals, + * interactive users do not need any write, delete, or modify privileges in production. This + * eliminates the risk of a user overwriting production data by accident. */ public AccountServicePrincipalsAPI servicePrincipals() { return servicePrincipalsAPI; } - + /** - * The Personal Compute enablement setting lets you control which users can - * use the Personal Compute default policy to create compute resources. By - * default all users in all workspaces have access (ON), but you can change - * the setting to instead let individual workspaces configure access control - * (DELEGATE). - * - * There is only one instance of this setting per account. Since this setting - * has a default value, this setting is present on all accounts even though - * it's never set on a given account. Deletion reverts the value of the - * setting back to the default value. + * The Personal Compute enablement setting lets you control which users can use the Personal + * Compute default policy to create compute resources. By default all users in all workspaces have + * access (ON), but you can change the setting to instead let individual workspaces configure + * access control (DELEGATE). + * + *

There is only one instance of this setting per account. Since this setting has a default + * value, this setting is present on all accounts even though it's never set on a given account. + * Deletion reverts the value of the setting back to the default value. */ public AccountSettingsAPI settings() { return settingsAPI; } - + /** - * These APIs manage storage configurations for this workspace. A root storage - * S3 bucket in your account is required to store objects like cluster logs, - * notebook revisions, and job results. You can also use the root storage S3 - * bucket for storage of non-production DBFS data. A storage configuration - * encapsulates this bucket information, and its ID is used when creating a - * new workspace. + * These APIs manage storage configurations for this workspace. A root storage S3 bucket in your + * account is required to store objects like cluster logs, notebook revisions, and job results. + * You can also use the root storage S3 bucket for storage of non-production DBFS data. A storage + * configuration encapsulates this bucket information, and its ID is used when creating a new + * workspace. */ public StorageAPI storage() { return storageAPI; } - - /** - * These APIs manage storage credentials for a particular metastore. - */ + + /** These APIs manage storage credentials for a particular metastore. */ public AccountStorageCredentialsAPI storageCredentials() { return storageCredentialsAPI; } - + /** - * User identities recognized by Databricks and represented by email - * addresses. - * - * Databricks recommends using SCIM provisioning to sync users and groups - * automatically from your identity provider to your Databricks account. SCIM - * streamlines onboarding a new employee or team by using your identity - * provider to create users and groups in Databricks account and give them the - * proper level of access. When a user leaves your organization or no longer - * needs access to Databricks account, admins can terminate the user in your - * identity provider and that user’s account will also be removed from - * Databricks account. This ensures a consistent offboarding process and - * prevents unauthorized users from accessing sensitive data. + * User identities recognized by Databricks and represented by email addresses. + * + *

Databricks recommends using SCIM provisioning to sync users and groups automatically from + * your identity provider to your Databricks account. SCIM streamlines onboarding a new employee + * or team by using your identity provider to create users and groups in Databricks account and + * give them the proper level of access. When a user leaves your organization or no longer needs + * access to Databricks account, admins can terminate the user in your identity provider and that + * user’s account will also be removed from Databricks account. This ensures a consistent + * offboarding process and prevents unauthorized users from accessing sensitive data. */ public AccountUsersAPI users() { return usersAPI; } - - /** - * These APIs manage VPC endpoint configurations for this account. - */ + + /** These APIs manage VPC endpoint configurations for this account. */ public VpcEndpointsAPI vpcEndpoints() { return vpcEndpointsAPI; } - + /** - * The Workspace Permission Assignment API allows you to manage workspace - * permissions for principals in your account. + * The Workspace Permission Assignment API allows you to manage workspace permissions for + * principals in your account. */ public WorkspaceAssignmentAPI workspaceAssignment() { return workspaceAssignmentAPI; } - + /** - * These APIs manage workspaces for this account. A Databricks workspace is an - * environment for accessing all of your Databricks assets. The workspace - * organizes objects (notebooks, libraries, and experiments) into folders, and - * provides access to data and computational resources such as clusters and - * jobs. - * - * These endpoints are available if your account is on the E2 version of the - * platform or on a select custom plan that allows multiple workspaces per - * account. + * These APIs manage workspaces for this account. A Databricks workspace is an environment for + * accessing all of your Databricks assets. The workspace organizes objects (notebooks, libraries, + * and experiments) into folders, and provides access to data and computational resources such as + * clusters and jobs. + * + *

These endpoints are available if your account is on the E2 version of the platform or on a + * select custom plan that allows multiple workspaces per account. */ public WorkspacesAPI workspaces() { return workspacesAPI; } - - + /** Override AccountAccessControlAPI with mock */ public AccountClient withAccessControlImpl(AccountAccessControlService accountAccessControl) { accessControlAPI = new AccountAccessControlAPI(accountAccessControl); return this; } - + /** Override BillableUsageAPI with mock */ public AccountClient withBillableUsageImpl(BillableUsageService billableUsage) { billableUsageAPI = new BillableUsageAPI(billableUsage); return this; } - + /** Override BudgetsAPI with mock */ public AccountClient withBudgetsImpl(BudgetsService budgets) { budgetsAPI = new BudgetsAPI(budgets); return this; } - + /** Override CredentialsAPI with mock */ public AccountClient withCredentialsImpl(CredentialsService credentials) { credentialsAPI = new CredentialsAPI(credentials); return this; } - + /** Override CustomAppIntegrationAPI with mock */ - public AccountClient withCustomAppIntegrationImpl(CustomAppIntegrationService customAppIntegration) { + public AccountClient withCustomAppIntegrationImpl( + CustomAppIntegrationService customAppIntegration) { customAppIntegrationAPI = new CustomAppIntegrationAPI(customAppIntegration); return this; } - + /** Override EncryptionKeysAPI with mock */ public AccountClient withEncryptionKeysImpl(EncryptionKeysService encryptionKeys) { encryptionKeysAPI = new EncryptionKeysAPI(encryptionKeys); return this; } - + /** Override AccountGroupsAPI with mock */ public AccountClient withGroupsImpl(AccountGroupsService accountGroups) { groupsAPI = new AccountGroupsAPI(accountGroups); return this; } - + /** Override AccountIpAccessListsAPI with mock */ public AccountClient withIpAccessListsImpl(AccountIpAccessListsService accountIpAccessLists) { ipAccessListsAPI = new AccountIpAccessListsAPI(accountIpAccessLists); return this; } - + /** Override LogDeliveryAPI with mock */ public AccountClient withLogDeliveryImpl(LogDeliveryService logDelivery) { logDeliveryAPI = new LogDeliveryAPI(logDelivery); return this; } - + /** Override AccountMetastoreAssignmentsAPI with mock */ - public AccountClient withMetastoreAssignmentsImpl(AccountMetastoreAssignmentsService accountMetastoreAssignments) { + public AccountClient withMetastoreAssignmentsImpl( + AccountMetastoreAssignmentsService accountMetastoreAssignments) { metastoreAssignmentsAPI = new AccountMetastoreAssignmentsAPI(accountMetastoreAssignments); return this; } - + /** Override AccountMetastoresAPI with mock */ public AccountClient withMetastoresImpl(AccountMetastoresService accountMetastores) { metastoresAPI = new AccountMetastoresAPI(accountMetastores); return this; } - + /** Override AccountNetworkPolicyAPI with mock */ public AccountClient withNetworkPolicyImpl(AccountNetworkPolicyService accountNetworkPolicy) { networkPolicyAPI = new AccountNetworkPolicyAPI(accountNetworkPolicy); return this; } - + /** Override NetworksAPI with mock */ public AccountClient withNetworksImpl(NetworksService networks) { networksAPI = new NetworksAPI(networks); return this; } - + /** Override OAuthEnrollmentAPI with mock */ public AccountClient withOAuthEnrollmentImpl(OAuthEnrollmentService oAuthEnrollment) { oAuthEnrollmentAPI = new OAuthEnrollmentAPI(oAuthEnrollment); return this; } - + /** Override PrivateAccessAPI with mock */ public AccountClient withPrivateAccessImpl(PrivateAccessService privateAccess) { privateAccessAPI = new PrivateAccessAPI(privateAccess); return this; } - + /** Override PublishedAppIntegrationAPI with mock */ - public AccountClient withPublishedAppIntegrationImpl(PublishedAppIntegrationService publishedAppIntegration) { + public AccountClient withPublishedAppIntegrationImpl( + PublishedAppIntegrationService publishedAppIntegration) { publishedAppIntegrationAPI = new PublishedAppIntegrationAPI(publishedAppIntegration); return this; } - + /** Override ServicePrincipalSecretsAPI with mock */ - public AccountClient withServicePrincipalSecretsImpl(ServicePrincipalSecretsService servicePrincipalSecrets) { + public AccountClient withServicePrincipalSecretsImpl( + ServicePrincipalSecretsService servicePrincipalSecrets) { servicePrincipalSecretsAPI = new ServicePrincipalSecretsAPI(servicePrincipalSecrets); return this; } - + /** Override AccountServicePrincipalsAPI with mock */ - public AccountClient withServicePrincipalsImpl(AccountServicePrincipalsService accountServicePrincipals) { + public AccountClient withServicePrincipalsImpl( + AccountServicePrincipalsService accountServicePrincipals) { servicePrincipalsAPI = new AccountServicePrincipalsAPI(accountServicePrincipals); return this; } - + /** Override AccountSettingsAPI with mock */ public AccountClient withSettingsImpl(AccountSettingsService accountSettings) { settingsAPI = new AccountSettingsAPI(accountSettings); return this; } - + /** Override StorageAPI with mock */ public AccountClient withStorageImpl(StorageService storage) { storageAPI = new StorageAPI(storage); return this; } - + /** Override AccountStorageCredentialsAPI with mock */ - public AccountClient withStorageCredentialsImpl(AccountStorageCredentialsService accountStorageCredentials) { + public AccountClient withStorageCredentialsImpl( + AccountStorageCredentialsService accountStorageCredentials) { storageCredentialsAPI = new AccountStorageCredentialsAPI(accountStorageCredentials); return this; } - + /** Override AccountUsersAPI with mock */ public AccountClient withUsersImpl(AccountUsersService accountUsers) { usersAPI = new AccountUsersAPI(accountUsers); return this; } - + /** Override VpcEndpointsAPI with mock */ public AccountClient withVpcEndpointsImpl(VpcEndpointsService vpcEndpoints) { vpcEndpointsAPI = new VpcEndpointsAPI(vpcEndpoints); return this; } - + /** Override WorkspaceAssignmentAPI with mock */ public AccountClient withWorkspaceAssignmentImpl(WorkspaceAssignmentService workspaceAssignment) { workspaceAssignmentAPI = new WorkspaceAssignmentAPI(workspaceAssignment); return this; } - + /** Override WorkspacesAPI with mock */ public AccountClient withWorkspacesImpl(WorkspacesService workspaces) { workspacesAPI = new WorkspacesAPI(workspaces); return this; } - + public ApiClient apiClient() { return apiClient; } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java index d96e0ceb1..d23b619e5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java @@ -4,189 +4,127 @@ import com.databricks.sdk.core.ApiClient; import com.databricks.sdk.core.ConfigLoader; -import com.databricks.sdk.core.DatabricksConfig;import com.databricks.sdk.mixin.ClustersExt; +import com.databricks.sdk.core.DatabricksConfig; +import com.databricks.sdk.mixin.ClustersExt; import com.databricks.sdk.mixin.DbfsExt; import com.databricks.sdk.mixin.SecretsExt; - -import com.databricks.sdk.service.iam.AccountAccessControlProxyAPI; -import com.databricks.sdk.service.iam.AccountAccessControlProxyService; - -import com.databricks.sdk.service.sql.AlertsAPI; -import com.databricks.sdk.service.sql.AlertsService; - import com.databricks.sdk.service.catalog.ArtifactAllowlistsAPI; import com.databricks.sdk.service.catalog.ArtifactAllowlistsService; - import com.databricks.sdk.service.catalog.CatalogsAPI; import com.databricks.sdk.service.catalog.CatalogsService; - -import com.databricks.sdk.service.sharing.CleanRoomsAPI; -import com.databricks.sdk.service.sharing.CleanRoomsService; - -import com.databricks.sdk.service.compute.ClusterPoliciesAPI; -import com.databricks.sdk.service.compute.ClusterPoliciesService; - -import com.databricks.sdk.service.compute.ClustersAPI; -import com.databricks.sdk.service.compute.ClustersService; - -import com.databricks.sdk.service.compute.CommandExecutionAPI; -import com.databricks.sdk.service.compute.CommandExecutionService; - import com.databricks.sdk.service.catalog.ConnectionsAPI; import com.databricks.sdk.service.catalog.ConnectionsService; - -import com.databricks.sdk.service.iam.CurrentUserAPI; -import com.databricks.sdk.service.iam.CurrentUserService; - -import com.databricks.sdk.service.sql.DashboardsAPI; -import com.databricks.sdk.service.sql.DashboardsService; - -import com.databricks.sdk.service.sql.DataSourcesAPI; -import com.databricks.sdk.service.sql.DataSourcesService; - -import com.databricks.sdk.service.files.DbfsAPI; -import com.databricks.sdk.service.files.DbfsService; - -import com.databricks.sdk.service.sql.DbsqlPermissionsAPI; -import com.databricks.sdk.service.sql.DbsqlPermissionsService; - -import com.databricks.sdk.service.ml.ExperimentsAPI; -import com.databricks.sdk.service.ml.ExperimentsService; - import com.databricks.sdk.service.catalog.ExternalLocationsAPI; import com.databricks.sdk.service.catalog.ExternalLocationsService; - import com.databricks.sdk.service.catalog.FunctionsAPI; import com.databricks.sdk.service.catalog.FunctionsService; - -import com.databricks.sdk.service.workspace.GitCredentialsAPI; -import com.databricks.sdk.service.workspace.GitCredentialsService; - -import com.databricks.sdk.service.compute.GlobalInitScriptsAPI; -import com.databricks.sdk.service.compute.GlobalInitScriptsService; - import com.databricks.sdk.service.catalog.GrantsAPI; import com.databricks.sdk.service.catalog.GrantsService; - -import com.databricks.sdk.service.iam.GroupsAPI; -import com.databricks.sdk.service.iam.GroupsService; - +import com.databricks.sdk.service.catalog.MetastoresAPI; +import com.databricks.sdk.service.catalog.MetastoresService; +import com.databricks.sdk.service.catalog.SchemasAPI; +import com.databricks.sdk.service.catalog.SchemasService; +import com.databricks.sdk.service.catalog.StorageCredentialsAPI; +import com.databricks.sdk.service.catalog.StorageCredentialsService; +import com.databricks.sdk.service.catalog.SystemSchemasAPI; +import com.databricks.sdk.service.catalog.SystemSchemasService; +import com.databricks.sdk.service.catalog.TableConstraintsAPI; +import com.databricks.sdk.service.catalog.TableConstraintsService; +import com.databricks.sdk.service.catalog.TablesAPI; +import com.databricks.sdk.service.catalog.TablesService; +import com.databricks.sdk.service.catalog.VolumesAPI; +import com.databricks.sdk.service.catalog.VolumesService; +import com.databricks.sdk.service.catalog.WorkspaceBindingsAPI; +import com.databricks.sdk.service.catalog.WorkspaceBindingsService; +import com.databricks.sdk.service.compute.ClusterPoliciesAPI; +import com.databricks.sdk.service.compute.ClusterPoliciesService; +import com.databricks.sdk.service.compute.ClustersService; +import com.databricks.sdk.service.compute.CommandExecutionAPI; +import com.databricks.sdk.service.compute.CommandExecutionService; +import com.databricks.sdk.service.compute.GlobalInitScriptsAPI; +import com.databricks.sdk.service.compute.GlobalInitScriptsService; import com.databricks.sdk.service.compute.InstancePoolsAPI; import com.databricks.sdk.service.compute.InstancePoolsService; - import com.databricks.sdk.service.compute.InstanceProfilesAPI; import com.databricks.sdk.service.compute.InstanceProfilesService; - -import com.databricks.sdk.service.settings.IpAccessListsAPI; -import com.databricks.sdk.service.settings.IpAccessListsService; - -import com.databricks.sdk.service.jobs.JobsAPI; -import com.databricks.sdk.service.jobs.JobsService; - import com.databricks.sdk.service.compute.LibrariesAPI; import com.databricks.sdk.service.compute.LibrariesService; - -import com.databricks.sdk.service.catalog.MetastoresAPI; -import com.databricks.sdk.service.catalog.MetastoresService; - -import com.databricks.sdk.service.ml.ModelRegistryAPI; -import com.databricks.sdk.service.ml.ModelRegistryService; - +import com.databricks.sdk.service.compute.PolicyFamiliesAPI; +import com.databricks.sdk.service.compute.PolicyFamiliesService; +import com.databricks.sdk.service.files.DbfsService; +import com.databricks.sdk.service.files.FilesAPI; +import com.databricks.sdk.service.files.FilesService; +import com.databricks.sdk.service.iam.AccountAccessControlProxyAPI; +import com.databricks.sdk.service.iam.AccountAccessControlProxyService; +import com.databricks.sdk.service.iam.CurrentUserAPI; +import com.databricks.sdk.service.iam.CurrentUserService; +import com.databricks.sdk.service.iam.GroupsAPI; +import com.databricks.sdk.service.iam.GroupsService; import com.databricks.sdk.service.iam.PermissionsAPI; import com.databricks.sdk.service.iam.PermissionsService; - +import com.databricks.sdk.service.iam.ServicePrincipalsAPI; +import com.databricks.sdk.service.iam.ServicePrincipalsService; +import com.databricks.sdk.service.iam.UsersAPI; +import com.databricks.sdk.service.iam.UsersService; +import com.databricks.sdk.service.jobs.JobsAPI; +import com.databricks.sdk.service.jobs.JobsService; +import com.databricks.sdk.service.ml.ExperimentsAPI; +import com.databricks.sdk.service.ml.ExperimentsService; +import com.databricks.sdk.service.ml.ModelRegistryAPI; +import com.databricks.sdk.service.ml.ModelRegistryService; import com.databricks.sdk.service.pipelines.PipelinesAPI; import com.databricks.sdk.service.pipelines.PipelinesService; - -import com.databricks.sdk.service.compute.PolicyFamiliesAPI; -import com.databricks.sdk.service.compute.PolicyFamiliesService; - +import com.databricks.sdk.service.serving.ServingEndpointsAPI; +import com.databricks.sdk.service.serving.ServingEndpointsService; +import com.databricks.sdk.service.settings.IpAccessListsAPI; +import com.databricks.sdk.service.settings.IpAccessListsService; +import com.databricks.sdk.service.settings.TokenManagementAPI; +import com.databricks.sdk.service.settings.TokenManagementService; +import com.databricks.sdk.service.settings.TokensAPI; +import com.databricks.sdk.service.settings.TokensService; +import com.databricks.sdk.service.settings.WorkspaceConfAPI; +import com.databricks.sdk.service.settings.WorkspaceConfService; +import com.databricks.sdk.service.sharing.CleanRoomsAPI; +import com.databricks.sdk.service.sharing.CleanRoomsService; import com.databricks.sdk.service.sharing.ProvidersAPI; import com.databricks.sdk.service.sharing.ProvidersService; - -import com.databricks.sdk.service.sql.QueriesAPI; -import com.databricks.sdk.service.sql.QueriesService; - -import com.databricks.sdk.service.sql.QueryHistoryAPI; -import com.databricks.sdk.service.sql.QueryHistoryService; - import com.databricks.sdk.service.sharing.RecipientActivationAPI; import com.databricks.sdk.service.sharing.RecipientActivationService; - import com.databricks.sdk.service.sharing.RecipientsAPI; import com.databricks.sdk.service.sharing.RecipientsService; - -import com.databricks.sdk.service.workspace.ReposAPI; -import com.databricks.sdk.service.workspace.ReposService; - -import com.databricks.sdk.service.catalog.SchemasAPI; -import com.databricks.sdk.service.catalog.SchemasService; - -import com.databricks.sdk.service.workspace.SecretsAPI; -import com.databricks.sdk.service.workspace.SecretsService; - -import com.databricks.sdk.service.catalog.SecurableTagsAPI; -import com.databricks.sdk.service.catalog.SecurableTagsService; - -import com.databricks.sdk.service.iam.ServicePrincipalsAPI; -import com.databricks.sdk.service.iam.ServicePrincipalsService; - -import com.databricks.sdk.service.serving.ServingEndpointsAPI; -import com.databricks.sdk.service.serving.ServingEndpointsService; - import com.databricks.sdk.service.sharing.SharesAPI; import com.databricks.sdk.service.sharing.SharesService; - +import com.databricks.sdk.service.sql.AlertsAPI; +import com.databricks.sdk.service.sql.AlertsService; +import com.databricks.sdk.service.sql.DashboardsAPI; +import com.databricks.sdk.service.sql.DashboardsService; +import com.databricks.sdk.service.sql.DataSourcesAPI; +import com.databricks.sdk.service.sql.DataSourcesService; +import com.databricks.sdk.service.sql.DbsqlPermissionsAPI; +import com.databricks.sdk.service.sql.DbsqlPermissionsService; +import com.databricks.sdk.service.sql.QueriesAPI; +import com.databricks.sdk.service.sql.QueriesService; +import com.databricks.sdk.service.sql.QueryHistoryAPI; +import com.databricks.sdk.service.sql.QueryHistoryService; import com.databricks.sdk.service.sql.StatementExecutionAPI; import com.databricks.sdk.service.sql.StatementExecutionService; - -import com.databricks.sdk.service.catalog.StorageCredentialsAPI; -import com.databricks.sdk.service.catalog.StorageCredentialsService; - -import com.databricks.sdk.service.catalog.SubentityTagsAPI; -import com.databricks.sdk.service.catalog.SubentityTagsService; - -import com.databricks.sdk.service.catalog.SystemSchemasAPI; -import com.databricks.sdk.service.catalog.SystemSchemasService; - -import com.databricks.sdk.service.catalog.TableConstraintsAPI; -import com.databricks.sdk.service.catalog.TableConstraintsService; - -import com.databricks.sdk.service.catalog.TablesAPI; -import com.databricks.sdk.service.catalog.TablesService; - -import com.databricks.sdk.service.settings.TokenManagementAPI; -import com.databricks.sdk.service.settings.TokenManagementService; - -import com.databricks.sdk.service.settings.TokensAPI; -import com.databricks.sdk.service.settings.TokensService; - -import com.databricks.sdk.service.iam.UsersAPI; -import com.databricks.sdk.service.iam.UsersService; - -import com.databricks.sdk.service.catalog.VolumesAPI; -import com.databricks.sdk.service.catalog.VolumesService; - import com.databricks.sdk.service.sql.WarehousesAPI; import com.databricks.sdk.service.sql.WarehousesService; - +import com.databricks.sdk.service.workspace.GitCredentialsAPI; +import com.databricks.sdk.service.workspace.GitCredentialsService; +import com.databricks.sdk.service.workspace.ReposAPI; +import com.databricks.sdk.service.workspace.ReposService; +import com.databricks.sdk.service.workspace.SecretsService; import com.databricks.sdk.service.workspace.WorkspaceAPI; import com.databricks.sdk.service.workspace.WorkspaceService; +import com.databricks.sdk.support.Generated; -import com.databricks.sdk.service.catalog.WorkspaceBindingsAPI; -import com.databricks.sdk.service.catalog.WorkspaceBindingsService; - -import com.databricks.sdk.service.settings.WorkspaceConfAPI; -import com.databricks.sdk.service.settings.WorkspaceConfService; - -import com.databricks.sdk.support.Generated;/** - * Entry point for accessing Databricks workspace-level APIs - */ +/** Entry point for accessing Databricks workspace-level APIs */ @Generated public class WorkspaceClient { private final ApiClient apiClient; private final DatabricksConfig config; - + private AccountAccessControlProxyAPI accountAccessControlProxyAPI; private AlertsAPI alertsAPI; private ArtifactAllowlistsAPI artifactAllowlistsAPI; @@ -203,6 +141,7 @@ public class WorkspaceClient { private DbsqlPermissionsAPI dbsqlPermissionsAPI; private ExperimentsAPI experimentsAPI; private ExternalLocationsAPI externalLocationsAPI; + private FilesAPI filesAPI; private FunctionsAPI functionsAPI; private GitCredentialsAPI gitCredentialsAPI; private GlobalInitScriptsAPI globalInitScriptsAPI; @@ -226,13 +165,11 @@ public class WorkspaceClient { private ReposAPI reposAPI; private SchemasAPI schemasAPI; private SecretsExt secretsAPI; - private SecurableTagsAPI securableTagsAPI; private ServicePrincipalsAPI servicePrincipalsAPI; private ServingEndpointsAPI servingEndpointsAPI; private SharesAPI sharesAPI; private StatementExecutionAPI statementExecutionAPI; private StorageCredentialsAPI storageCredentialsAPI; - private SubentityTagsAPI subentityTagsAPI; private SystemSchemasAPI systemSchemasAPI; private TableConstraintsAPI tableConstraintsAPI; private TablesAPI tablesAPI; @@ -252,7 +189,7 @@ public WorkspaceClient() { public WorkspaceClient(DatabricksConfig config) { this.config = config; apiClient = new ApiClient(config); - + accountAccessControlProxyAPI = new AccountAccessControlProxyAPI(apiClient); alertsAPI = new AlertsAPI(apiClient); artifactAllowlistsAPI = new ArtifactAllowlistsAPI(apiClient); @@ -269,6 +206,7 @@ public WorkspaceClient(DatabricksConfig config) { dbsqlPermissionsAPI = new DbsqlPermissionsAPI(apiClient); experimentsAPI = new ExperimentsAPI(apiClient); externalLocationsAPI = new ExternalLocationsAPI(apiClient); + filesAPI = new FilesAPI(apiClient); functionsAPI = new FunctionsAPI(apiClient); gitCredentialsAPI = new GitCredentialsAPI(apiClient); globalInitScriptsAPI = new GlobalInitScriptsAPI(apiClient); @@ -292,13 +230,11 @@ public WorkspaceClient(DatabricksConfig config) { reposAPI = new ReposAPI(apiClient); schemasAPI = new SchemasAPI(apiClient); secretsAPI = new SecretsExt(apiClient); - securableTagsAPI = new SecurableTagsAPI(apiClient); servicePrincipalsAPI = new ServicePrincipalsAPI(apiClient); servingEndpointsAPI = new ServingEndpointsAPI(apiClient); sharesAPI = new SharesAPI(apiClient); statementExecutionAPI = new StatementExecutionAPI(apiClient); storageCredentialsAPI = new StorageCredentialsAPI(apiClient); - subentityTagsAPI = new SubentityTagsAPI(apiClient); systemSchemasAPI = new SystemSchemasAPI(apiClient); tableConstraintsAPI = new TableConstraintsAPI(apiClient); tablesAPI = new TablesAPI(apiClient); @@ -317,1412 +253,1293 @@ public WorkspaceClient(boolean mock) { apiClient = null; config = null; } - + /** - * These APIs manage access rules on resources in an account. Currently, only - * grant rules are supported. A grant rule specifies a role assigned to a set - * of principals. A list of rules attached to a resource is called a rule set. - * A workspace must belong to an account for these APIs to work. + * These APIs manage access rules on resources in an account. Currently, only grant rules are + * supported. A grant rule specifies a role assigned to a set of principals. A list of rules + * attached to a resource is called a rule set. A workspace must belong to an account for these + * APIs to work. */ public AccountAccessControlProxyAPI accountAccessControlProxy() { return accountAccessControlProxyAPI; } - + /** - * The alerts API can be used to perform CRUD operations on alerts. An alert - * is a Databricks SQL object that periodically runs a query, evaluates a - * condition of its result, and notifies one or more users and/or notification - * destinations if the condition was met. Alerts can be scheduled using the - * `sql_task` type of the Jobs API, e.g. :method:jobs/create. + * The alerts API can be used to perform CRUD operations on alerts. An alert is a Databricks SQL + * object that periodically runs a query, evaluates a condition of its result, and notifies one or + * more users and/or notification destinations if the condition was met. Alerts can be scheduled + * using the `sql_task` type of the Jobs API, e.g. :method:jobs/create. */ public AlertsAPI alerts() { return alertsAPI; } - + /** - * In Databricks Runtime 13.3 and above, you can add libraries and init - * scripts to the `allowlist` in UC so that users can leverage these artifacts - * on compute configured with shared access mode. + * In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the `allowlist` + * in UC so that users can leverage these artifacts on compute configured with shared access mode. */ public ArtifactAllowlistsAPI artifactAllowlists() { return artifactAllowlistsAPI; } - + /** - * A catalog is the first layer of Unity Catalog’s three-level namespace. - * It’s used to organize your data assets. Users can see all catalogs on - * which they have been assigned the USE_CATALOG data permission. - * - * In Unity Catalog, admins and data stewards manage users and their access to - * data centrally across all of the workspaces in a Databricks account. Users - * in different workspaces can share access to the same data, depending on - * privileges granted centrally in Unity Catalog. + * A catalog is the first layer of Unity Catalog’s three-level namespace. It’s used to organize + * your data assets. Users can see all catalogs on which they have been assigned the USE_CATALOG + * data permission. + * + *

In Unity Catalog, admins and data stewards manage users and their access to data centrally + * across all of the workspaces in a Databricks account. Users in different workspaces can share + * access to the same data, depending on privileges granted centrally in Unity Catalog. */ public CatalogsAPI catalogs() { return catalogsAPI; } - + /** - * A clean room is a secure, privacy-protecting environment where two or more - * parties can share sensitive enterprise data, including customer data, for - * measurements, insights, activation and other use cases. - * - * To create clean rooms, you must be a metastore admin or a user with the + * A clean room is a secure, privacy-protecting environment where two or more parties can share + * sensitive enterprise data, including customer data, for measurements, insights, activation and + * other use cases. + * + *

To create clean rooms, you must be a metastore admin or a user with the * **CREATE_CLEAN_ROOM** privilege. */ public CleanRoomsAPI cleanRooms() { return cleanRoomsAPI; } - + /** - * Cluster policy limits the ability to configure clusters based on a set of - * rules. The policy rules limit the attributes or attribute values available - * for cluster creation. Cluster policies have ACLs that limit their use to - * specific users and groups. - * - * Cluster policies let you limit users to create clusters with prescribed - * settings, simplify the user interface and enable more users to create their - * own clusters (by fixing and hiding some values), control cost by limiting - * per cluster maximum cost (by setting limits on attributes whose values - * contribute to hourly price). - * - * Cluster policy permissions limit which policies a user can select in the - * Policy drop-down when the user creates a cluster: - A user who has cluster - * create permission can select the Unrestricted policy and create - * fully-configurable clusters. - A user who has both cluster create - * permission and access to cluster policies can select the Unrestricted - * policy and policies they have access to. - A user that has access to only - * cluster policies, can select the policies they have access to. - * - * If no policies have been created in the workspace, the Policy drop-down - * does not display. - * - * Only admin users can create, edit, and delete policies. Admin users also - * have access to all policies. + * Cluster policy limits the ability to configure clusters based on a set of rules. The policy + * rules limit the attributes or attribute values available for cluster creation. Cluster policies + * have ACLs that limit their use to specific users and groups. + * + *

Cluster policies let you limit users to create clusters with prescribed settings, simplify + * the user interface and enable more users to create their own clusters (by fixing and hiding + * some values), control cost by limiting per cluster maximum cost (by setting limits on + * attributes whose values contribute to hourly price). + * + *

Cluster policy permissions limit which policies a user can select in the Policy drop-down + * when the user creates a cluster: - A user who has cluster create permission can select the + * Unrestricted policy and create fully-configurable clusters. - A user who has both cluster + * create permission and access to cluster policies can select the Unrestricted policy and + * policies they have access to. - A user that has access to only cluster policies, can select the + * policies they have access to. + * + *

If no policies have been created in the workspace, the Policy drop-down does not display. + * + *

Only admin users can create, edit, and delete policies. Admin users also have access to all + * policies. */ public ClusterPoliciesAPI clusterPolicies() { return clusterPoliciesAPI; } - + /** - * The Clusters API allows you to create, start, edit, list, terminate, and - * delete clusters. - * - * Databricks maps cluster node instance types to compute units known as DBUs. - * See the instance type pricing page for a list of the supported instance - * types and their corresponding DBUs. - * - * A Databricks cluster is a set of computation resources and configurations - * on which you run data engineering, data science, and data analytics - * workloads, such as production ETL pipelines, streaming analytics, ad-hoc - * analytics, and machine learning. - * - * You run these workloads as a set of commands in a notebook or as an - * automated job. Databricks makes a distinction between all-purpose clusters - * and job clusters. You use all-purpose clusters to analyze data - * collaboratively using interactive notebooks. You use job clusters to run - * fast and robust automated jobs. - * - * You can create an all-purpose cluster using the UI, CLI, or REST API. You - * can manually terminate and restart an all-purpose cluster. Multiple users - * can share such clusters to do collaborative interactive analysis. - * - * IMPORTANT: Databricks retains cluster configuration information for up to - * 200 all-purpose clusters terminated in the last 30 days and up to 30 job - * clusters recently terminated by the job scheduler. To keep an all-purpose - * cluster configuration even after it has been terminated for more than 30 - * days, an administrator can pin a cluster to the cluster list. + * The Clusters API allows you to create, start, edit, list, terminate, and delete clusters. + * + *

Databricks maps cluster node instance types to compute units known as DBUs. See the instance + * type pricing page for a list of the supported instance types and their corresponding DBUs. + * + *

A Databricks cluster is a set of computation resources and configurations on which you run + * data engineering, data science, and data analytics workloads, such as production ETL pipelines, + * streaming analytics, ad-hoc analytics, and machine learning. + * + *

You run these workloads as a set of commands in a notebook or as an automated job. + * Databricks makes a distinction between all-purpose clusters and job clusters. You use + * all-purpose clusters to analyze data collaboratively using interactive notebooks. You use job + * clusters to run fast and robust automated jobs. + * + *

You can create an all-purpose cluster using the UI, CLI, or REST API. You can manually + * terminate and restart an all-purpose cluster. Multiple users can share such clusters to do + * collaborative interactive analysis. + * + *

IMPORTANT: Databricks retains cluster configuration information for up to 200 all-purpose + * clusters terminated in the last 30 days and up to 30 job clusters recently terminated by the + * job scheduler. To keep an all-purpose cluster configuration even after it has been terminated + * for more than 30 days, an administrator can pin a cluster to the cluster list. */ public ClustersExt clusters() { return clustersAPI; } - + /** - * This API allows execution of Python, Scala, SQL, or R commands on running - * Databricks Clusters. + * This API allows execution of Python, Scala, SQL, or R commands on running Databricks Clusters. */ public CommandExecutionAPI commandExecution() { return commandExecutionAPI; } - + /** * Connections allow for creating a connection to an external data source. - * - * A connection is an abstraction of an external data source that can be - * connected from Databricks Compute. Creating a connection object is the - * first step to managing external data sources within Unity Catalog, with the - * second step being creating a data object (catalog, schema, or table) using - * the connection. Data objects derived from a connection can be written to or - * read from similar to other Unity Catalog data objects based on cloud - * storage. Users may create different types of connections with each - * connection having a unique set of configuration options to support - * credential management and other settings. + * + *

A connection is an abstraction of an external data source that can be connected from + * Databricks Compute. Creating a connection object is the first step to managing external data + * sources within Unity Catalog, with the second step being creating a data object (catalog, + * schema, or table) using the connection. Data objects derived from a connection can be written + * to or read from similar to other Unity Catalog data objects based on cloud storage. Users may + * create different types of connections with each connection having a unique set of configuration + * options to support credential management and other settings. */ public ConnectionsAPI connections() { return connectionsAPI; } - + /** - * This API allows retrieving information about currently authenticated user - * or service principal. + * This API allows retrieving information about currently authenticated user or service principal. */ public CurrentUserAPI currentUser() { return currentUserAPI; } - + /** - * In general, there is little need to modify dashboards using the API. - * However, it can be useful to use dashboard objects to look-up a collection - * of related query IDs. The API can also be used to duplicate multiple - * dashboards at once since you can get a dashboard definition with a GET - * request and then POST it to create a new one. Dashboards can be scheduled - * using the `sql_task` type of the Jobs API, e.g. :method:jobs/create. + * In general, there is little need to modify dashboards using the API. However, it can be useful + * to use dashboard objects to look-up a collection of related query IDs. The API can also be used + * to duplicate multiple dashboards at once since you can get a dashboard definition with a GET + * request and then POST it to create a new one. Dashboards can be scheduled using the `sql_task` + * type of the Jobs API, e.g. :method:jobs/create. */ public DashboardsAPI dashboards() { return dashboardsAPI; } - + /** - * This API is provided to assist you in making new query objects. When - * creating a query object, you may optionally specify a `data_source_id` for - * the SQL warehouse against which it will run. If you don't already know the - * `data_source_id` for your desired SQL warehouse, this API will help you - * find it. - * - * This API does not support searches. It returns the full list of SQL - * warehouses in your workspace. We advise you to use any text editor, REST - * client, or `grep` to search the response from this API for the name of your - * SQL warehouse as it appears in Databricks SQL. + * This API is provided to assist you in making new query objects. When creating a query object, + * you may optionally specify a `data_source_id` for the SQL warehouse against which it will run. + * If you don't already know the `data_source_id` for your desired SQL warehouse, this API will + * help you find it. + * + *

This API does not support searches. It returns the full list of SQL warehouses in your + * workspace. We advise you to use any text editor, REST client, or `grep` to search the response + * from this API for the name of your SQL warehouse as it appears in Databricks SQL. */ public DataSourcesAPI dataSources() { return dataSourcesAPI; } - + /** - * DBFS API makes it simple to interact with various data sources without - * having to include a users credentials every time to read a file. + * DBFS API makes it simple to interact with various data sources without having to include a + * users credentials every time to read a file. */ public DbfsExt dbfs() { return dbfsAPI; } - + /** - * The SQL Permissions API is similar to the endpoints of the - * :method:permissions/set. However, this exposes only one endpoint, which - * gets the Access Control List for a given object. You cannot modify any - * permissions using this API. - * - * There are three levels of permission: - * - * - `CAN_VIEW`: Allows read-only access - * - * - `CAN_RUN`: Allows read access and run access (superset of `CAN_VIEW`) - * - * - `CAN_MANAGE`: Allows all actions: read, run, edit, delete, modify - * permissions (superset of `CAN_RUN`) + * The SQL Permissions API is similar to the endpoints of the :method:permissions/set. However, + * this exposes only one endpoint, which gets the Access Control List for a given object. You + * cannot modify any permissions using this API. + * + *

There are three levels of permission: + * + *

- `CAN_VIEW`: Allows read-only access + * + *

- `CAN_RUN`: Allows read access and run access (superset of `CAN_VIEW`) + * + *

- `CAN_MANAGE`: Allows all actions: read, run, edit, delete, modify permissions (superset of + * `CAN_RUN`) */ public DbsqlPermissionsAPI dbsqlPermissions() { return dbsqlPermissionsAPI; } - + /** - * Experiments are the primary unit of organization in MLflow; all MLflow runs - * belong to an experiment. Each experiment lets you visualize, search, and - * compare runs, as well as download run artifacts or metadata for analysis in - * other tools. Experiments are maintained in a Databricks hosted MLflow - * tracking server. - * - * Experiments are located in the workspace file tree. You manage experiments - * using the same tools you use to manage other workspace objects such as - * folders, notebooks, and libraries. + * Experiments are the primary unit of organization in MLflow; all MLflow runs belong to an + * experiment. Each experiment lets you visualize, search, and compare runs, as well as download + * run artifacts or metadata for analysis in other tools. Experiments are maintained in a + * Databricks hosted MLflow tracking server. + * + *

Experiments are located in the workspace file tree. You manage experiments using the same + * tools you use to manage other workspace objects such as folders, notebooks, and libraries. */ public ExperimentsAPI experiments() { return experimentsAPI; } - + /** - * An external location is an object that combines a cloud storage path with a - * storage credential that authorizes access to the cloud storage path. Each - * external location is subject to Unity Catalog access-control policies that - * control which users and groups can access the credential. If a user does - * not have access to an external location in Unity Catalog, the request fails - * and Unity Catalog does not attempt to authenticate to your cloud tenant on - * the user’s behalf. - * - * Databricks recommends using external locations rather than using storage - * credentials directly. - * - * To create external locations, you must be a metastore admin or a user with - * the **CREATE_EXTERNAL_LOCATION** privilege. + * An external location is an object that combines a cloud storage path with a storage credential + * that authorizes access to the cloud storage path. Each external location is subject to Unity + * Catalog access-control policies that control which users and groups can access the credential. + * If a user does not have access to an external location in Unity Catalog, the request fails and + * Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf. + * + *

Databricks recommends using external locations rather than using storage credentials + * directly. + * + *

To create external locations, you must be a metastore admin or a user with the + * **CREATE_EXTERNAL_LOCATION** privilege. */ public ExternalLocationsAPI externalLocations() { return externalLocationsAPI; } - + + /** + * The Files API allows you to read, write, and delete files and directories in Unity Catalog + * volumes. + */ + public FilesAPI files() { + return filesAPI; + } + /** * Functions implement User-Defined Functions (UDFs) in Unity Catalog. - * - * The function implementation can be any SQL expression or Query, and it can - * be invoked wherever a table reference is allowed in a query. In Unity - * Catalog, a function resides at the same level as a table, so it can be - * referenced with the form + * + *

The function implementation can be any SQL expression or Query, and it can be invoked + * wherever a table reference is allowed in a query. In Unity Catalog, a function resides at the + * same level as a table, so it can be referenced with the form * __catalog_name__.__schema_name__.__function_name__. */ public FunctionsAPI functions() { return functionsAPI; } - + /** - * Registers personal access token for Databricks to do operations on behalf - * of the user. - * - * See [more info]. - * - * [more info]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html + * Registers personal access token for Databricks to do operations on behalf of the user. + * + *

See [more info]. + * + *

[more info]: https://docs.databricks.com/repos/get-access-tokens-from-git-provider.html */ public GitCredentialsAPI gitCredentials() { return gitCredentialsAPI; } - + /** - * The Global Init Scripts API enables Workspace administrators to configure - * global initialization scripts for their workspace. These scripts run on - * every node in every cluster in the workspace. - * - * **Important:** Existing clusters must be restarted to pick up any changes - * made to global init scripts. Global init scripts are run in order. If the - * init script returns with a bad exit code, the Apache Spark container fails - * to launch and init scripts with later position are skipped. If enough - * containers fail, the entire cluster fails with a + * The Global Init Scripts API enables Workspace administrators to configure global initialization + * scripts for their workspace. These scripts run on every node in every cluster in the workspace. + * + *

**Important:** Existing clusters must be restarted to pick up any changes made to global + * init scripts. Global init scripts are run in order. If the init script returns with a bad exit + * code, the Apache Spark container fails to launch and init scripts with later position are + * skipped. If enough containers fail, the entire cluster fails with a * `GLOBAL_INIT_SCRIPT_FAILURE` error code. */ public GlobalInitScriptsAPI globalInitScripts() { return globalInitScriptsAPI; } - + /** - * In Unity Catalog, data is secure by default. Initially, users have no - * access to data in a metastore. Access can be granted by either a metastore - * admin, the owner of an object, or the owner of the catalog or schema that - * contains the object. Securable objects in Unity Catalog are hierarchical - * and privileges are inherited downward. - * - * Securable objects in Unity Catalog are hierarchical and privileges are - * inherited downward. This means that granting a privilege on the catalog - * automatically grants the privilege to all current and future objects within - * the catalog. Similarly, privileges granted on a schema are inherited by all - * current and future objects within that schema. + * In Unity Catalog, data is secure by default. Initially, users have no access to data in a + * metastore. Access can be granted by either a metastore admin, the owner of an object, or the + * owner of the catalog or schema that contains the object. Securable objects in Unity Catalog are + * hierarchical and privileges are inherited downward. + * + *

Securable objects in Unity Catalog are hierarchical and privileges are inherited downward. + * This means that granting a privilege on the catalog automatically grants the privilege to all + * current and future objects within the catalog. Similarly, privileges granted on a schema are + * inherited by all current and future objects within that schema. */ public GrantsAPI grants() { return grantsAPI; } - + /** - * Groups simplify identity management, making it easier to assign access to - * Databricks workspace, data, and other securable objects. - * - * It is best practice to assign access to workspaces and access-control - * policies in Unity Catalog to groups, instead of to users individually. All - * Databricks workspace identities can be assigned as members of groups, and - * members inherit permissions that are assigned to their group. + * Groups simplify identity management, making it easier to assign access to Databricks workspace, + * data, and other securable objects. + * + *

It is best practice to assign access to workspaces and access-control policies in Unity + * Catalog to groups, instead of to users individually. All Databricks workspace identities can be + * assigned as members of groups, and members inherit permissions that are assigned to their + * group. */ public GroupsAPI groups() { return groupsAPI; } - + /** - * Instance Pools API are used to create, edit, delete and list instance pools - * by using ready-to-use cloud instances which reduces a cluster start and - * auto-scaling times. - * - * Databricks pools reduce cluster start and auto-scaling times by maintaining - * a set of idle, ready-to-use instances. When a cluster is attached to a - * pool, cluster nodes are created using the pool’s idle instances. If the - * pool has no idle instances, the pool expands by allocating a new instance - * from the instance provider in order to accommodate the cluster’s request. - * When a cluster releases an instance, it returns to the pool and is free for - * another cluster to use. Only clusters attached to a pool can use that - * pool’s idle instances. - * - * You can specify a different pool for the driver node and worker nodes, or - * use the same pool for both. - * - * Databricks does not charge DBUs while instances are idle in the pool. - * Instance provider billing does apply. See pricing. + * Instance Pools API are used to create, edit, delete and list instance pools by using + * ready-to-use cloud instances which reduces a cluster start and auto-scaling times. + * + *

Databricks pools reduce cluster start and auto-scaling times by maintaining a set of idle, + * ready-to-use instances. When a cluster is attached to a pool, cluster nodes are created using + * the pool’s idle instances. If the pool has no idle instances, the pool expands by allocating a + * new instance from the instance provider in order to accommodate the cluster’s request. When a + * cluster releases an instance, it returns to the pool and is free for another cluster to use. + * Only clusters attached to a pool can use that pool’s idle instances. + * + *

You can specify a different pool for the driver node and worker nodes, or use the same pool + * for both. + * + *

Databricks does not charge DBUs while instances are idle in the pool. Instance provider + * billing does apply. See pricing. */ public InstancePoolsAPI instancePools() { return instancePoolsAPI; } - + /** - * The Instance Profiles API allows admins to add, list, and remove instance - * profiles that users can launch clusters with. Regular users can list the - * instance profiles available to them. See [Secure access to S3 buckets] - * using instance profiles for more information. - * - * [Secure access to S3 buckets]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/instance-profiles.html + * The Instance Profiles API allows admins to add, list, and remove instance profiles that users + * can launch clusters with. Regular users can list the instance profiles available to them. See + * [Secure access to S3 buckets] using instance profiles for more information. + * + *

[Secure access to S3 buckets]: + * https://docs.databricks.com/administration-guide/cloud-configurations/aws/instance-profiles.html */ public InstanceProfilesAPI instanceProfiles() { return instanceProfilesAPI; } - + /** * IP Access List enables admins to configure IP access lists. - * - * IP access lists affect web application access and REST API access to this - * workspace only. If the feature is disabled for a workspace, all access is - * allowed for this workspace. There is support for allow lists (inclusion) - * and block lists (exclusion). - * - * When a connection is attempted: 1. **First, all block lists are checked.** - * If the connection IP address matches any block list, the connection is - * rejected. 2. **If the connection was not rejected by block lists**, the IP - * address is compared with the allow lists. - * - * If there is at least one allow list for the workspace, the connection is - * allowed only if the IP address matches an allow list. If there are no allow - * lists for the workspace, all IP addresses are allowed. - * - * For all allow lists and block lists combined, the workspace supports a - * maximum of 1000 IP/CIDR values, where one CIDR counts as a single value. - * - * After changes to the IP access list feature, it can take a few minutes for - * changes to take effect. + * + *

IP access lists affect web application access and REST API access to this workspace only. If + * the feature is disabled for a workspace, all access is allowed for this workspace. There is + * support for allow lists (inclusion) and block lists (exclusion). + * + *

When a connection is attempted: 1. **First, all block lists are checked.** If the connection + * IP address matches any block list, the connection is rejected. 2. **If the connection was not + * rejected by block lists**, the IP address is compared with the allow lists. + * + *

If there is at least one allow list for the workspace, the connection is allowed only if the + * IP address matches an allow list. If there are no allow lists for the workspace, all IP + * addresses are allowed. + * + *

For all allow lists and block lists combined, the workspace supports a maximum of 1000 + * IP/CIDR values, where one CIDR counts as a single value. + * + *

After changes to the IP access list feature, it can take a few minutes for changes to take + * effect. */ public IpAccessListsAPI ipAccessLists() { return ipAccessListsAPI; } - + /** * The Jobs API allows you to create, edit, and delete jobs. - * - * You can use a Databricks job to run a data processing or data analysis task - * in a Databricks cluster with scalable resources. Your job can consist of a - * single task or can be a large, multi-task workflow with complex - * dependencies. Databricks manages the task orchestration, cluster - * management, monitoring, and error reporting for all of your jobs. You can - * run your jobs immediately or periodically through an easy-to-use scheduling - * system. You can implement job tasks using notebooks, JARS, Delta Live - * Tables pipelines, or Python, Scala, Spark submit, and Java applications. - * - * You should never hard code secrets or store them in plain text. Use the - * [Secrets CLI] to manage secrets in the [Databricks CLI]. Use the [Secrets - * utility] to reference secrets in notebooks and jobs. - * - * [Databricks CLI]: https://docs.databricks.com/dev-tools/cli/index.html - * [Secrets CLI]: https://docs.databricks.com/dev-tools/cli/secrets-cli.html - * [Secrets utility]: https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-secrets + * + *

You can use a Databricks job to run a data processing or data analysis task in a Databricks + * cluster with scalable resources. Your job can consist of a single task or can be a large, + * multi-task workflow with complex dependencies. Databricks manages the task orchestration, + * cluster management, monitoring, and error reporting for all of your jobs. You can run your jobs + * immediately or periodically through an easy-to-use scheduling system. You can implement job + * tasks using notebooks, JARS, Delta Live Tables pipelines, or Python, Scala, Spark submit, and + * Java applications. + * + *

You should never hard code secrets or store them in plain text. Use the [Secrets CLI] to + * manage secrets in the [Databricks CLI]. Use the [Secrets utility] to reference secrets in + * notebooks and jobs. + * + *

[Databricks CLI]: https://docs.databricks.com/dev-tools/cli/index.html [Secrets CLI]: + * https://docs.databricks.com/dev-tools/cli/secrets-cli.html [Secrets utility]: + * https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-secrets */ public JobsAPI jobs() { return jobsAPI; } - + /** - * The Libraries API allows you to install and uninstall libraries and get the - * status of libraries on a cluster. - * - * To make third-party or custom code available to notebooks and jobs running - * on your clusters, you can install a library. Libraries can be written in - * Python, Java, Scala, and R. You can upload Java, Scala, and Python - * libraries and point to external packages in PyPI, Maven, and CRAN - * repositories. - * - * Cluster libraries can be used by all notebooks running on a cluster. You - * can install a cluster library directly from a public repository such as - * PyPI or Maven, using a previously installed workspace library, or using an - * init script. - * - * When you install a library on a cluster, a notebook already attached to - * that cluster will not immediately see the new library. You must first - * detach and then reattach the notebook to the cluster. - * - * When you uninstall a library from a cluster, the library is removed only - * when you restart the cluster. Until you restart the cluster, the status of - * the uninstalled library appears as Uninstall pending restart. + * The Libraries API allows you to install and uninstall libraries and get the status of libraries + * on a cluster. + * + *

To make third-party or custom code available to notebooks and jobs running on your clusters, + * you can install a library. Libraries can be written in Python, Java, Scala, and R. You can + * upload Java, Scala, and Python libraries and point to external packages in PyPI, Maven, and + * CRAN repositories. + * + *

Cluster libraries can be used by all notebooks running on a cluster. You can install a + * cluster library directly from a public repository such as PyPI or Maven, using a previously + * installed workspace library, or using an init script. + * + *

When you install a library on a cluster, a notebook already attached to that cluster will + * not immediately see the new library. You must first detach and then reattach the notebook to + * the cluster. + * + *

When you uninstall a library from a cluster, the library is removed only when you restart + * the cluster. Until you restart the cluster, the status of the uninstalled library appears as + * Uninstall pending restart. */ public LibrariesAPI libraries() { return librariesAPI; } - + /** - * A metastore is the top-level container of objects in Unity Catalog. It - * stores data assets (tables and views) and the permissions that govern - * access to them. Databricks account admins can create metastores and assign - * them to Databricks workspaces to control which workloads use each - * metastore. For a workspace to use Unity Catalog, it must have a Unity - * Catalog metastore attached. - * - * Each metastore is configured with a root storage location in a cloud - * storage account. This storage location is used for metadata and managed - * tables data. - * - * NOTE: This metastore is distinct from the metastore included in Databricks - * workspaces created before Unity Catalog was released. If your workspace - * includes a legacy Hive metastore, the data in that metastore is available - * in a catalog named hive_metastore. + * A metastore is the top-level container of objects in Unity Catalog. It stores data assets + * (tables and views) and the permissions that govern access to them. Databricks account admins + * can create metastores and assign them to Databricks workspaces to control which workloads use + * each metastore. For a workspace to use Unity Catalog, it must have a Unity Catalog metastore + * attached. + * + *

Each metastore is configured with a root storage location in a cloud storage account. This + * storage location is used for metadata and managed tables data. + * + *

NOTE: This metastore is distinct from the metastore included in Databricks workspaces + * created before Unity Catalog was released. If your workspace includes a legacy Hive metastore, + * the data in that metastore is available in a catalog named hive_metastore. */ public MetastoresAPI metastores() { return metastoresAPI; } - + /** - * MLflow Model Registry is a centralized model repository and a UI and set of - * APIs that enable you to manage the full lifecycle of MLflow Models. + * MLflow Model Registry is a centralized model repository and a UI and set of APIs that enable + * you to manage the full lifecycle of MLflow Models. */ public ModelRegistryAPI modelRegistry() { return modelRegistryAPI; } - + /** - * Permissions API are used to create read, write, edit, update and manage - * access for various users on different objects and endpoints. - * - * * **[Cluster permissions](:service:clusters)** — Manage which users can - * manage, restart, or attach to clusters. - * - * * **[Cluster policy permissions](:service:clusterpolicies)** — Manage - * which users can use cluster policies. - * - * * **[Delta Live Tables pipeline permissions](:service:pipelines)** — - * Manage which users can view, manage, run, cancel, or own a Delta Live - * Tables pipeline. - * - * * **[Job permissions](:service:jobs)** — Manage which users can view, - * manage, trigger, cancel, or own a job. - * - * * **[MLflow experiment permissions](:service:experiments)** — Manage - * which users can read, edit, or manage MLflow experiments. - * - * * **[MLflow registered model permissions](:service:modelregistry)** — - * Manage which users can read, edit, or manage MLflow registered models. - * - * * **[Password permissions](:service:users)** — Manage which users can use - * password login when SSO is enabled. - * - * * **[Instance Pool permissions](:service:instancepools)** — Manage which - * users can manage or attach to pools. - * - * * **[Repo permissions](repos)** — Manage which users can read, run, edit, - * or manage a repo. - * - * * **[Serving endpoint permissions](:service:servingendpoints)** — Manage - * which users can view, query, or manage a serving endpoint. - * - * * **[SQL warehouse permissions](:service:warehouses)** — Manage which - * users can use or manage SQL warehouses. - * - * * **[Token permissions](:service:tokenmanagement)** — Manage which users - * can create or use tokens. - * - * * **[Workspace object permissions](:service:workspace)** — Manage which - * users can read, run, edit, or manage directories, files, and notebooks. - * - * For the mapping of the required permissions for specific actions or - * abilities and other important information, see [Access Control]. - * - * [Access Control]: https://docs.databricks.com/security/auth-authz/access-control/index.html + * Permissions API are used to create read, write, edit, update and manage access for various + * users on different objects and endpoints. + * + *

* **[Cluster permissions](:service:clusters)** — Manage which users can manage, restart, or + * attach to clusters. + * + *

* **[Cluster policy permissions](:service:clusterpolicies)** — Manage which users can use + * cluster policies. + * + *

* **[Delta Live Tables pipeline permissions](:service:pipelines)** — Manage which users can + * view, manage, run, cancel, or own a Delta Live Tables pipeline. + * + *

* **[Job permissions](:service:jobs)** — Manage which users can view, manage, trigger, + * cancel, or own a job. + * + *

* **[MLflow experiment permissions](:service:experiments)** — Manage which users can read, + * edit, or manage MLflow experiments. + * + *

* **[MLflow registered model permissions](:service:modelregistry)** — Manage which users can + * read, edit, or manage MLflow registered models. + * + *

* **[Password permissions](:service:users)** — Manage which users can use password login + * when SSO is enabled. + * + *

* **[Instance Pool permissions](:service:instancepools)** — Manage which users can manage or + * attach to pools. + * + *

* **[Repo permissions](repos)** — Manage which users can read, run, edit, or manage a repo. + * + *

* **[Serving endpoint permissions](:service:servingendpoints)** — Manage which users can + * view, query, or manage a serving endpoint. + * + *

* **[SQL warehouse permissions](:service:warehouses)** — Manage which users can use or + * manage SQL warehouses. + * + *

* **[Token permissions](:service:tokenmanagement)** — Manage which users can create or use + * tokens. + * + *

* **[Workspace object permissions](:service:workspace)** — Manage which users can read, run, + * edit, or manage directories, files, and notebooks. + * + *

For the mapping of the required permissions for specific actions or abilities and other + * important information, see [Access Control]. + * + *

[Access Control]: https://docs.databricks.com/security/auth-authz/access-control/index.html */ public PermissionsAPI permissions() { return permissionsAPI; } - + /** - * The Delta Live Tables API allows you to create, edit, delete, start, and - * view details about pipelines. - * - * Delta Live Tables is a framework for building reliable, maintainable, and - * testable data processing pipelines. You define the transformations to - * perform on your data, and Delta Live Tables manages task orchestration, - * cluster management, monitoring, data quality, and error handling. - * - * Instead of defining your data pipelines using a series of separate Apache - * Spark tasks, Delta Live Tables manages how your data is transformed based - * on a target schema you define for each processing step. You can also - * enforce data quality with Delta Live Tables expectations. Expectations - * allow you to define expected data quality and specify how to handle records - * that fail those expectations. + * The Delta Live Tables API allows you to create, edit, delete, start, and view details about + * pipelines. + * + *

Delta Live Tables is a framework for building reliable, maintainable, and testable data + * processing pipelines. You define the transformations to perform on your data, and Delta Live + * Tables manages task orchestration, cluster management, monitoring, data quality, and error + * handling. + * + *

Instead of defining your data pipelines using a series of separate Apache Spark tasks, Delta + * Live Tables manages how your data is transformed based on a target schema you define for each + * processing step. You can also enforce data quality with Delta Live Tables expectations. + * Expectations allow you to define expected data quality and specify how to handle records that + * fail those expectations. */ public PipelinesAPI pipelines() { return pipelinesAPI; } - + /** - * View available policy families. A policy family contains a policy - * definition providing best practices for configuring clusters for a - * particular use case. - * - * Databricks manages and provides policy families for several common cluster - * use cases. You cannot create, edit, or delete policy families. - * - * Policy families cannot be used directly to create clusters. Instead, you - * create cluster policies using a policy family. Cluster policies created - * using a policy family inherit the policy family's policy definition. + * View available policy families. A policy family contains a policy definition providing best + * practices for configuring clusters for a particular use case. + * + *

Databricks manages and provides policy families for several common cluster use cases. You + * cannot create, edit, or delete policy families. + * + *

Policy families cannot be used directly to create clusters. Instead, you create cluster + * policies using a policy family. Cluster policies created using a policy family inherit the + * policy family's policy definition. */ public PolicyFamiliesAPI policyFamilies() { return policyFamiliesAPI; } - + /** - * A data provider is an object representing the organization in the real - * world who shares the data. A provider contains shares which further contain - * the shared data. + * A data provider is an object representing the organization in the real world who shares the + * data. A provider contains shares which further contain the shared data. */ public ProvidersAPI providers() { return providersAPI; } - + /** - * These endpoints are used for CRUD operations on query definitions. Query - * definitions include the target SQL warehouse, query text, name, - * description, tags, parameters, and visualizations. Queries can be scheduled - * using the `sql_task` type of the Jobs API, e.g. :method:jobs/create. + * These endpoints are used for CRUD operations on query definitions. Query definitions include + * the target SQL warehouse, query text, name, description, tags, parameters, and visualizations. + * Queries can be scheduled using the `sql_task` type of the Jobs API, e.g. :method:jobs/create. */ public QueriesAPI queries() { return queriesAPI; } - - /** - * Access the history of queries through SQL warehouses. - */ + + /** Access the history of queries through SQL warehouses. */ public QueryHistoryAPI queryHistory() { return queryHistoryAPI; } - + /** - * The Recipient Activation API is only applicable in the open sharing model - * where the recipient object has the authentication type of `TOKEN`. The data - * recipient follows the activation link shared by the data provider to - * download the credential file that includes the access token. The recipient - * will then use the credential file to establish a secure connection with the - * provider to receive the shared data. - * - * Note that you can download the credential file only once. Recipients should - * treat the downloaded credential as a secret and must not share it outside - * of their organization. + * The Recipient Activation API is only applicable in the open sharing model where the recipient + * object has the authentication type of `TOKEN`. The data recipient follows the activation link + * shared by the data provider to download the credential file that includes the access token. The + * recipient will then use the credential file to establish a secure connection with the provider + * to receive the shared data. + * + *

Note that you can download the credential file only once. Recipients should treat the + * downloaded credential as a secret and must not share it outside of their organization. */ public RecipientActivationAPI recipientActivation() { return recipientActivationAPI; } - + /** - * A recipient is an object you create using :method:recipients/create to - * represent an organization which you want to allow access shares. The way - * how sharing works differs depending on whether or not your recipient has - * access to a Databricks workspace that is enabled for Unity Catalog: - * - * - For recipients with access to a Databricks workspace that is enabled for - * Unity Catalog, you can create a recipient object along with a unique - * sharing identifier you get from the recipient. The sharing identifier is - * the key identifier that enables the secure connection. This sharing mode is - * called **Databricks-to-Databricks sharing**. - * - * - For recipients without access to a Databricks workspace that is enabled - * for Unity Catalog, when you create a recipient object, Databricks generates - * an activation link you can send to the recipient. The recipient follows the - * activation link to download the credential file, and then uses the - * credential file to establish a secure connection to receive the shared - * data. This sharing mode is called **open sharing**. + * A recipient is an object you create using :method:recipients/create to represent an + * organization which you want to allow access shares. The way how sharing works differs depending + * on whether or not your recipient has access to a Databricks workspace that is enabled for Unity + * Catalog: + * + *

- For recipients with access to a Databricks workspace that is enabled for Unity Catalog, + * you can create a recipient object along with a unique sharing identifier you get from the + * recipient. The sharing identifier is the key identifier that enables the secure connection. + * This sharing mode is called **Databricks-to-Databricks sharing**. + * + *

- For recipients without access to a Databricks workspace that is enabled for Unity Catalog, + * when you create a recipient object, Databricks generates an activation link you can send to the + * recipient. The recipient follows the activation link to download the credential file, and then + * uses the credential file to establish a secure connection to receive the shared data. This + * sharing mode is called **open sharing**. */ public RecipientsAPI recipients() { return recipientsAPI; } - + /** - * The Repos API allows users to manage their git repos. Users can use the API - * to access all repos that they have manage permissions on. - * - * Databricks Repos is a visual Git client in Databricks. It supports common - * Git operations such a cloning a repository, committing and pushing, - * pulling, branch management, and visual comparison of diffs when committing. - * - * Within Repos you can develop code in notebooks or other files and follow - * data science and engineering code development best practices using Git for - * version control, collaboration, and CI/CD. + * The Repos API allows users to manage their git repos. Users can use the API to access all repos + * that they have manage permissions on. + * + *

Databricks Repos is a visual Git client in Databricks. It supports common Git operations + * such a cloning a repository, committing and pushing, pulling, branch management, and visual + * comparison of diffs when committing. + * + *

Within Repos you can develop code in notebooks or other files and follow data science and + * engineering code development best practices using Git for version control, collaboration, and + * CI/CD. */ public ReposAPI repos() { return reposAPI; } - + /** - * A schema (also called a database) is the second layer of Unity Catalog’s - * three-level namespace. A schema organizes tables, views and functions. To - * access (or list) a table or view in a schema, users must have the - * USE_SCHEMA data permission on the schema and its parent catalog, and they - * must have the SELECT permission on the table or view. + * A schema (also called a database) is the second layer of Unity Catalog’s three-level namespace. + * A schema organizes tables, views and functions. To access (or list) a table or view in a + * schema, users must have the USE_SCHEMA data permission on the schema and its parent catalog, + * and they must have the SELECT permission on the table or view. */ public SchemasAPI schemas() { return schemasAPI; } - + /** - * The Secrets API allows you to manage secrets, secret scopes, and access - * permissions. - * - * Sometimes accessing data requires that you authenticate to external data - * sources through JDBC. Instead of directly entering your credentials into a - * notebook, use Databricks secrets to store your credentials and reference - * them in notebooks and jobs. - * - * Administrators, secret creators, and users granted permission can read - * Databricks secrets. While Databricks makes an effort to redact secret - * values that might be displayed in notebooks, it is not possible to prevent - * such users from reading secrets. + * The Secrets API allows you to manage secrets, secret scopes, and access permissions. + * + *

Sometimes accessing data requires that you authenticate to external data sources through + * JDBC. Instead of directly entering your credentials into a notebook, use Databricks secrets to + * store your credentials and reference them in notebooks and jobs. + * + *

Administrators, secret creators, and users granted permission can read Databricks secrets. + * While Databricks makes an effort to redact secret values that might be displayed in notebooks, + * it is not possible to prevent such users from reading secrets. */ public SecretsExt secrets() { return secretsAPI; } - - /** - * Tags are attributes containing keys and values that can be applied to - * different entities in Unity Catalog. Tags are useful for organizing and - * categorizing different entities within a metastore. SecurableTags are - * attached to Unity Catalog securable entities. - */ - public SecurableTagsAPI securableTags() { - return securableTagsAPI; - } - + /** - * Identities for use with jobs, automated tools, and systems such as scripts, - * apps, and CI/CD platforms. Databricks recommends creating service - * principals to run production jobs or modify production data. If all - * processes that act on production data run with service principals, - * interactive users do not need any write, delete, or modify privileges in - * production. This eliminates the risk of a user overwriting production data - * by accident. + * Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD + * platforms. Databricks recommends creating service principals to run production jobs or modify + * production data. If all processes that act on production data run with service principals, + * interactive users do not need any write, delete, or modify privileges in production. This + * eliminates the risk of a user overwriting production data by accident. */ public ServicePrincipalsAPI servicePrincipals() { return servicePrincipalsAPI; } - + /** - * The Serving Endpoints API allows you to create, update, and delete model - * serving endpoints. - * - * You can use a serving endpoint to serve models from the Databricks Model - * Registry or from Unity Catalog. Endpoints expose the underlying models as - * scalable REST API endpoints using serverless compute. This means the - * endpoints and associated compute resources are fully managed by Databricks - * and will not appear in your cloud account. A serving endpoint can consist - * of one or more MLflow models from the Databricks Model Registry, called - * served models. A serving endpoint can have at most ten served models. You - * can configure traffic settings to define how requests should be routed to - * your served models behind an endpoint. Additionally, you can configure the - * scale of resources that should be applied to each served model. + * The Serving Endpoints API allows you to create, update, and delete model serving endpoints. + * + *

You can use a serving endpoint to serve models from the Databricks Model Registry or from + * Unity Catalog. Endpoints expose the underlying models as scalable REST API endpoints using + * serverless compute. This means the endpoints and associated compute resources are fully managed + * by Databricks and will not appear in your cloud account. A serving endpoint can consist of one + * or more MLflow models from the Databricks Model Registry, called served models. A serving + * endpoint can have at most ten served models. You can configure traffic settings to define how + * requests should be routed to your served models behind an endpoint. Additionally, you can + * configure the scale of resources that should be applied to each served model. */ public ServingEndpointsAPI servingEndpoints() { return servingEndpointsAPI; } - + /** - * A share is a container instantiated with :method:shares/create. Once - * created you can iteratively register a collection of existing data assets - * defined within the metastore using :method:shares/update. You can register - * data assets under their original name, qualified by their original schema, - * or provide alternate exposed names. + * A share is a container instantiated with :method:shares/create. Once created you can + * iteratively register a collection of existing data assets defined within the metastore using + * :method:shares/update. You can register data assets under their original name, qualified by + * their original schema, or provide alternate exposed names. */ public SharesAPI shares() { return sharesAPI; } - + /** - * The SQL Statement Execution API manages the execution of arbitrary SQL - * statements and the fetching of result data. - * - * **Release status** - * - * This feature is in [Public Preview]. - * - * **Getting started** - * - * We suggest beginning with the [SQL Statement Execution API tutorial]. - * - * **Overview of statement execution and result fetching** - * - * Statement execution begins by issuing a - * :method:statementexecution/executeStatement request with a valid SQL - * statement and warehouse ID, along with optional parameters such as the data + * The SQL Statement Execution API manages the execution of arbitrary SQL statements and the + * fetching of result data. + * + *

**Release status** + * + *

This feature is in [Public Preview]. + * + *

**Getting started** + * + *

We suggest beginning with the [SQL Statement Execution API tutorial]. + * + *

**Overview of statement execution and result fetching** + * + *

Statement execution begins by issuing a :method:statementexecution/executeStatement request + * with a valid SQL statement and warehouse ID, along with optional parameters such as the data * catalog and output format. - * - * When submitting the statement, the call can behave synchronously or - * asynchronously, based on the `wait_timeout` setting. When set between 5-50 - * seconds (default: 10) the call behaves synchronously and waits for results - * up to the specified timeout; when set to `0s`, the call is asynchronous and - * responds immediately with a statement ID that can be used to poll for - * status or fetch the results in a separate call. - * - * **Call mode: synchronous** - * - * In synchronous mode, when statement execution completes within the `wait - * timeout`, the result data is returned directly in the response. This - * response will contain `statement_id`, `status`, `manifest`, and `result` - * fields. The `status` field confirms success whereas the `manifest` field - * contains the result data column schema and metadata about the result set. - * The `result` field contains the first chunk of result data according to the - * specified `disposition`, and links to fetch any remaining chunks. - * - * If the execution does not complete before `wait_timeout`, the setting - * `on_wait_timeout` determines how the system responds. - * - * By default, `on_wait_timeout=CONTINUE`, and after reaching `wait_timeout`, - * a response is returned and statement execution continues asynchronously. - * The response will contain only `statement_id` and `status` fields, and the - * caller must now follow the flow described for asynchronous call mode to - * poll and fetch the result. - * - * Alternatively, `on_wait_timeout` can also be set to `CANCEL`; in this case - * if the timeout is reached before execution completes, the underlying - * statement execution is canceled, and a `CANCELED` status is returned in the - * response. - * - * **Call mode: asynchronous** - * - * In asynchronous mode, or after a timed-out synchronous request continues, a - * `statement_id` and `status` will be returned. In this case polling - * :method:statementexecution/getStatement calls are required to fetch the - * result and metadata. - * - * Next, a caller must poll until execution completes (`SUCCEEDED`, `FAILED`, - * etc.) by issuing :method:statementexecution/getStatement requests for the - * given `statement_id`. - * - * When execution has succeeded, the response will contain `status`, - * `manifest`, and `result` fields. These fields and the structure are - * identical to those in the response to a successful synchronous submission. - * The `result` field will contain the first chunk of result data, either - * `INLINE` or as `EXTERNAL_LINKS` depending on `disposition`. Additional - * chunks of result data can be fetched by checking for the presence of the - * `next_chunk_internal_link` field, and iteratively `GET` those paths until - * that field is unset: `GET + * + *

When submitting the statement, the call can behave synchronously or asynchronously, based on + * the `wait_timeout` setting. When set between 5-50 seconds (default: 10) the call behaves + * synchronously and waits for results up to the specified timeout; when set to `0s`, the call is + * asynchronous and responds immediately with a statement ID that can be used to poll for status + * or fetch the results in a separate call. + * + *

**Call mode: synchronous** + * + *

In synchronous mode, when statement execution completes within the `wait timeout`, the + * result data is returned directly in the response. This response will contain `statement_id`, + * `status`, `manifest`, and `result` fields. The `status` field confirms success whereas the + * `manifest` field contains the result data column schema and metadata about the result set. The + * `result` field contains the first chunk of result data according to the specified + * `disposition`, and links to fetch any remaining chunks. + * + *

If the execution does not complete before `wait_timeout`, the setting `on_wait_timeout` + * determines how the system responds. + * + *

By default, `on_wait_timeout=CONTINUE`, and after reaching `wait_timeout`, a response is + * returned and statement execution continues asynchronously. The response will contain only + * `statement_id` and `status` fields, and the caller must now follow the flow described for + * asynchronous call mode to poll and fetch the result. + * + *

Alternatively, `on_wait_timeout` can also be set to `CANCEL`; in this case if the timeout is + * reached before execution completes, the underlying statement execution is canceled, and a + * `CANCELED` status is returned in the response. + * + *

**Call mode: asynchronous** + * + *

In asynchronous mode, or after a timed-out synchronous request continues, a `statement_id` + * and `status` will be returned. In this case polling :method:statementexecution/getStatement + * calls are required to fetch the result and metadata. + * + *

Next, a caller must poll until execution completes (`SUCCEEDED`, `FAILED`, etc.) by issuing + * :method:statementexecution/getStatement requests for the given `statement_id`. + * + *

When execution has succeeded, the response will contain `status`, `manifest`, and `result` + * fields. These fields and the structure are identical to those in the response to a successful + * synchronous submission. The `result` field will contain the first chunk of result data, either + * `INLINE` or as `EXTERNAL_LINKS` depending on `disposition`. Additional chunks of result data + * can be fetched by checking for the presence of the `next_chunk_internal_link` field, and + * iteratively `GET` those paths until that field is unset: `GET * https://$DATABRICKS_HOST/{next_chunk_internal_link}`. - * - * **Fetching result data: format and disposition** - * - * To specify the result data format, set the `format` field to `JSON_ARRAY` - * (JSON), `ARROW_STREAM` ([Apache Arrow Columnar]), or `CSV`. - * - * You can also configure how to fetch the result data in two different modes - * by setting the `disposition` field to `INLINE` or `EXTERNAL_LINKS`. - * - * The `INLINE` disposition can only be used with the `JSON_ARRAY` format and - * allows results up to 16 MiB. When a statement executed with `INLINE` - * disposition exceeds this limit, the execution is aborted, and no result can - * be fetched. - * - * The `EXTERNAL_LINKS` disposition allows fetching large result sets in - * `JSON_ARRAY`, `ARROW_STREAM` and `CSV` formats, and with higher throughput. - * - * The API uses defaults of `format=JSON_ARRAY` and `disposition=INLINE`. - * Databricks recommends that you explicit setting the format and the - * disposition for all production use cases. - * - * **Statement response: statement_id, status, manifest, and result** - * - * The base call :method:statementexecution/getStatement returns a single - * response combining `statement_id`, `status`, a result `manifest`, and a - * `result` data chunk or link, depending on the `disposition`. The `manifest` - * contains the result schema definition and the result summary metadata. When - * using `disposition=EXTERNAL_LINKS`, it also contains a full listing of all + * + *

**Fetching result data: format and disposition** + * + *

To specify the result data format, set the `format` field to `JSON_ARRAY` (JSON), + * `ARROW_STREAM` ([Apache Arrow Columnar]), or `CSV`. + * + *

You can also configure how to fetch the result data in two different modes by setting the + * `disposition` field to `INLINE` or `EXTERNAL_LINKS`. + * + *

The `INLINE` disposition can only be used with the `JSON_ARRAY` format and allows results up + * to 16 MiB. When a statement executed with `INLINE` disposition exceeds this limit, the + * execution is aborted, and no result can be fetched. + * + *

The `EXTERNAL_LINKS` disposition allows fetching large result sets in `JSON_ARRAY`, + * `ARROW_STREAM` and `CSV` formats, and with higher throughput. + * + *

The API uses defaults of `format=JSON_ARRAY` and `disposition=INLINE`. Databricks recommends + * that you explicit setting the format and the disposition for all production use cases. + * + *

**Statement response: statement_id, status, manifest, and result** + * + *

The base call :method:statementexecution/getStatement returns a single response combining + * `statement_id`, `status`, a result `manifest`, and a `result` data chunk or link, depending on + * the `disposition`. The `manifest` contains the result schema definition and the result summary + * metadata. When using `disposition=EXTERNAL_LINKS`, it also contains a full listing of all * chunks and their summary metadata. - * - * **Use case: small result sets with INLINE + JSON_ARRAY** - * - * For flows that generate small and predictable result sets (<= 16 MiB), - * `INLINE` downloads of `JSON_ARRAY` result data are typically the simplest - * way to execute and fetch result data. - * - * When the result set with `disposition=INLINE` is larger, the result can be - * transferred in chunks. After receiving the initial chunk with - * :method:statementexecution/executeStatement or - * :method:statementexecution/getStatement subsequent calls are required to - * iteratively fetch each chunk. Each result response contains a link to the - * next chunk, when there are additional chunks to fetch; it can be found in - * the field `.next_chunk_internal_link`. This link is an absolute `path` to - * be joined with your `$DATABRICKS_HOST`, and of the form - * `/api/2.0/sql/statements/{statement_id}/result/chunks/{chunk_index}`. The - * next chunk can be fetched by issuing a - * :method:statementexecution/getStatementResultChunkN request. - * - * When using this mode, each chunk may be fetched once, and in order. A chunk - * without a field `next_chunk_internal_link` indicates the last chunk was - * reached and all chunks have been fetched from the result set. - * - * **Use case: large result sets with EXTERNAL_LINKS + ARROW_STREAM** - * - * Using `EXTERNAL_LINKS` to fetch result data in Arrow format allows you to - * fetch large result sets efficiently. The primary difference from using - * `INLINE` disposition is that fetched result chunks contain resolved - * `external_links` URLs, which can be fetched with standard HTTP. - * - * **Presigned URLs** - * - * External links point to data stored within your workspace's internal DBFS, - * in the form of a presigned URL. The URLs are valid for only a short period, - * <= 15 minutes. Alongside each `external_link` is an expiration field - * indicating the time at which the URL is no longer valid. In - * `EXTERNAL_LINKS` mode, chunks can be resolved and fetched multiple times - * and in parallel. - * - * ---- - * - * ### **Warning: We recommend you protect the URLs in the EXTERNAL_LINKS.** - * - * When using the EXTERNAL_LINKS disposition, a short-lived pre-signed URL is - * generated, which the client can use to download the result chunk directly - * from cloud storage. As the short-lived credential is embedded in a - * pre-signed URL, this URL should be protected. - * - * Since pre-signed URLs are generated with embedded temporary credentials, - * you need to remove the authorization header from the fetch requests. - * - * ---- - * - * Similar to `INLINE` mode, callers can iterate through the result set, by - * using the `next_chunk_internal_link` field. Each internal link response - * will contain an external link to the raw chunk data, and additionally - * contain the `next_chunk_internal_link` if there are more chunks. - * - * Unlike `INLINE` mode, when using `EXTERNAL_LINKS`, chunks may be fetched - * out of order, and in parallel to achieve higher throughput. - * - * **Limits and limitations** - * - * Note: All byte limits are calculated based on internal storage metrics and - * will not match byte counts of actual payloads. - * - * - Statements with `disposition=INLINE` are limited to 16 MiB and will abort - * when this limit is exceeded. - Statements with `disposition=EXTERNAL_LINKS` - * are limited to 100 GiB. - The maximum query text size is 16 MiB. - - * Cancelation may silently fail. A successful response from a cancel request - * indicates that the cancel request was successfully received and sent to the - * processing engine. However, for example, an outstanding statement may - * complete execution during signal delivery, with the cancel signal arriving - * too late to be meaningful. Polling for status until a terminal state is - * reached is a reliable way to determine the final state. - Wait timeouts are - * approximate, occur server-side, and cannot account for caller delays, - * network latency from caller to service, and similarly. - After a statement - * has been submitted and a statement_id is returned, that statement's status - * and result will automatically close after either of 2 conditions: - The - * last result chunk is fetched (or resolved to an external link). - One hour - * passes with no calls to get the status or fetch the result. Best practice: - * in asynchronous clients, poll for status regularly (and with backoff) to - * keep the statement open and alive. - After fetching the last result chunk - * (including chunk_index=0) the statement is automatically closed. - * - * [Apache Arrow Columnar]: https://arrow.apache.org/overview/ - * [Public Preview]: https://docs.databricks.com/release-notes/release-types.html - * [SQL Statement Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html + * + *

**Use case: small result sets with INLINE + JSON_ARRAY** + * + *

For flows that generate small and predictable result sets (<= 16 MiB), `INLINE` downloads of + * `JSON_ARRAY` result data are typically the simplest way to execute and fetch result data. + * + *

When the result set with `disposition=INLINE` is larger, the result can be transferred in + * chunks. After receiving the initial chunk with :method:statementexecution/executeStatement or + * :method:statementexecution/getStatement subsequent calls are required to iteratively fetch each + * chunk. Each result response contains a link to the next chunk, when there are additional chunks + * to fetch; it can be found in the field `.next_chunk_internal_link`. This link is an absolute + * `path` to be joined with your `$DATABRICKS_HOST`, and of the form + * `/api/2.0/sql/statements/{statement_id}/result/chunks/{chunk_index}`. The next chunk can be + * fetched by issuing a :method:statementexecution/getStatementResultChunkN request. + * + *

When using this mode, each chunk may be fetched once, and in order. A chunk without a field + * `next_chunk_internal_link` indicates the last chunk was reached and all chunks have been + * fetched from the result set. + * + *

**Use case: large result sets with EXTERNAL_LINKS + ARROW_STREAM** + * + *

Using `EXTERNAL_LINKS` to fetch result data in Arrow format allows you to fetch large result + * sets efficiently. The primary difference from using `INLINE` disposition is that fetched result + * chunks contain resolved `external_links` URLs, which can be fetched with standard HTTP. + * + *

**Presigned URLs** + * + *

External links point to data stored within your workspace's internal DBFS, in the form of a + * presigned URL. The URLs are valid for only a short period, <= 15 minutes. Alongside each + * `external_link` is an expiration field indicating the time at which the URL is no longer valid. + * In `EXTERNAL_LINKS` mode, chunks can be resolved and fetched multiple times and in parallel. + * + *

---- + * + *

### **Warning: We recommend you protect the URLs in the EXTERNAL_LINKS.** + * + *

When using the EXTERNAL_LINKS disposition, a short-lived pre-signed URL is generated, which + * the client can use to download the result chunk directly from cloud storage. As the short-lived + * credential is embedded in a pre-signed URL, this URL should be protected. + * + *

Since pre-signed URLs are generated with embedded temporary credentials, you need to remove + * the authorization header from the fetch requests. + * + *

---- + * + *

Similar to `INLINE` mode, callers can iterate through the result set, by using the + * `next_chunk_internal_link` field. Each internal link response will contain an external link to + * the raw chunk data, and additionally contain the `next_chunk_internal_link` if there are more + * chunks. + * + *

Unlike `INLINE` mode, when using `EXTERNAL_LINKS`, chunks may be fetched out of order, and + * in parallel to achieve higher throughput. + * + *

**Limits and limitations** + * + *

Note: All byte limits are calculated based on internal storage metrics and will not match + * byte counts of actual payloads. + * + *

- Statements with `disposition=INLINE` are limited to 16 MiB and will abort when this limit + * is exceeded. - Statements with `disposition=EXTERNAL_LINKS` are limited to 100 GiB. - The + * maximum query text size is 16 MiB. - Cancelation may silently fail. A successful response from + * a cancel request indicates that the cancel request was successfully received and sent to the + * processing engine. However, for example, an outstanding statement may complete execution during + * signal delivery, with the cancel signal arriving too late to be meaningful. Polling for status + * until a terminal state is reached is a reliable way to determine the final state. - Wait + * timeouts are approximate, occur server-side, and cannot account for caller delays, network + * latency from caller to service, and similarly. - After a statement has been submitted and a + * statement_id is returned, that statement's status and result will automatically close after + * either of 2 conditions: - The last result chunk is fetched (or resolved to an external link). - + * One hour passes with no calls to get the status or fetch the result. Best practice: in + * asynchronous clients, poll for status regularly (and with backoff) to keep the statement open + * and alive. - After fetching the last result chunk (including chunk_index=0) the statement is + * automatically closed. + * + *

[Apache Arrow Columnar]: https://arrow.apache.org/overview/ [Public Preview]: + * https://docs.databricks.com/release-notes/release-types.html [SQL Statement Execution API + * tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html */ public StatementExecutionAPI statementExecution() { return statementExecutionAPI; } - + /** - * A storage credential represents an authentication and authorization - * mechanism for accessing data stored on your cloud tenant. Each storage - * credential is subject to Unity Catalog access-control policies that control - * which users and groups can access the credential. If a user does not have - * access to a storage credential in Unity Catalog, the request fails and - * Unity Catalog does not attempt to authenticate to your cloud tenant on the - * user’s behalf. - * - * Databricks recommends using external locations rather than using storage - * credentials directly. - * - * To create storage credentials, you must be a Databricks account admin. The - * account admin who creates the storage credential can delegate ownership to - * another user or group to manage permissions on it. + * A storage credential represents an authentication and authorization mechanism for accessing + * data stored on your cloud tenant. Each storage credential is subject to Unity Catalog + * access-control policies that control which users and groups can access the credential. If a + * user does not have access to a storage credential in Unity Catalog, the request fails and Unity + * Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf. + * + *

Databricks recommends using external locations rather than using storage credentials + * directly. + * + *

To create storage credentials, you must be a Databricks account admin. The account admin who + * creates the storage credential can delegate ownership to another user or group to manage + * permissions on it. */ public StorageCredentialsAPI storageCredentials() { return storageCredentialsAPI; } - - /** - * Tags are attributes containing keys and values that can be applied to - * different entities in Unity Catalog. Tags are useful for organizing and - * categorizing different entities within a metastore. SubentityTags are - * attached to Unity Catalog subentities. - */ - public SubentityTagsAPI subentityTags() { - return subentityTagsAPI; - } - + /** - * A system schema is a schema that lives within the system catalog. A system - * schema may contain information about customer usage of Unity Catalog such - * as audit-logs, billing-logs, lineage information, etc. + * A system schema is a schema that lives within the system catalog. A system schema may contain + * information about customer usage of Unity Catalog such as audit-logs, billing-logs, lineage + * information, etc. */ public SystemSchemasAPI systemSchemas() { return systemSchemasAPI; } - + /** - * Primary key and foreign key constraints encode relationships between fields - * in tables. - * - * Primary and foreign keys are informational only and are not enforced. - * Foreign keys must reference a primary key in another table. This primary - * key is the parent constraint of the foreign key and the table this primary - * key is on is the parent table of the foreign key. Similarly, the foreign - * key is the child constraint of its referenced primary key; the table of the - * foreign key is the child table of the primary key. - * - * You can declare primary keys and foreign keys as part of the table - * specification during table creation. You can also add or drop constraints - * on existing tables. + * Primary key and foreign key constraints encode relationships between fields in tables. + * + *

Primary and foreign keys are informational only and are not enforced. Foreign keys must + * reference a primary key in another table. This primary key is the parent constraint of the + * foreign key and the table this primary key is on is the parent table of the foreign key. + * Similarly, the foreign key is the child constraint of its referenced primary key; the table of + * the foreign key is the child table of the primary key. + * + *

You can declare primary keys and foreign keys as part of the table specification during + * table creation. You can also add or drop constraints on existing tables. */ public TableConstraintsAPI tableConstraints() { return tableConstraintsAPI; } - + /** - * A table resides in the third layer of Unity Catalog’s three-level - * namespace. It contains rows of data. To create a table, users must have - * CREATE_TABLE and USE_SCHEMA permissions on the schema, and they must have - * the USE_CATALOG permission on its parent catalog. To query a table, users - * must have the SELECT permission on the table, and they must have the - * USE_CATALOG permission on its parent catalog and the USE_SCHEMA permission - * on its parent schema. - * - * A table can be managed or external. From an API perspective, a __VIEW__ is - * a particular kind of table (rather than a managed or external table). + * A table resides in the third layer of Unity Catalog’s three-level namespace. It contains rows + * of data. To create a table, users must have CREATE_TABLE and USE_SCHEMA permissions on the + * schema, and they must have the USE_CATALOG permission on its parent catalog. To query a table, + * users must have the SELECT permission on the table, and they must have the USE_CATALOG + * permission on its parent catalog and the USE_SCHEMA permission on its parent schema. + * + *

A table can be managed or external. From an API perspective, a __VIEW__ is a particular kind + * of table (rather than a managed or external table). */ public TablesAPI tables() { return tablesAPI; } - + /** - * Enables administrators to get all tokens and delete tokens for other users. - * Admins can either get every token, get a specific token by ID, or get all - * tokens for a particular user. + * Enables administrators to get all tokens and delete tokens for other users. Admins can either + * get every token, get a specific token by ID, or get all tokens for a particular user. */ public TokenManagementAPI tokenManagement() { return tokenManagementAPI; } - + /** - * The Token API allows you to create, list, and revoke tokens that can be - * used to authenticate and access Databricks REST APIs. + * The Token API allows you to create, list, and revoke tokens that can be used to authenticate + * and access Databricks REST APIs. */ public TokensAPI tokens() { return tokensAPI; } - + /** - * User identities recognized by Databricks and represented by email - * addresses. - * - * Databricks recommends using SCIM provisioning to sync users and groups - * automatically from your identity provider to your Databricks workspace. - * SCIM streamlines onboarding a new employee or team by using your identity - * provider to create users and groups in Databricks workspace and give them - * the proper level of access. When a user leaves your organization or no - * longer needs access to Databricks workspace, admins can terminate the user - * in your identity provider and that user’s account will also be removed - * from Databricks workspace. This ensures a consistent offboarding process - * and prevents unauthorized users from accessing sensitive data. + * User identities recognized by Databricks and represented by email addresses. + * + *

Databricks recommends using SCIM provisioning to sync users and groups automatically from + * your identity provider to your Databricks workspace. SCIM streamlines onboarding a new employee + * or team by using your identity provider to create users and groups in Databricks workspace and + * give them the proper level of access. When a user leaves your organization or no longer needs + * access to Databricks workspace, admins can terminate the user in your identity provider and + * that user’s account will also be removed from Databricks workspace. This ensures a consistent + * offboarding process and prevents unauthorized users from accessing sensitive data. */ public UsersAPI users() { return usersAPI; } - + /** - * Volumes are a Unity Catalog (UC) capability for accessing, storing, - * governing, organizing and processing files. Use cases include running - * machine learning on unstructured data such as image, audio, video, or PDF - * files, organizing data sets during the data exploration stages in data - * science, working with libraries that require access to the local file - * system on cluster machines, storing library and config files of arbitrary - * formats such as .whl or .txt centrally and providing secure access across - * workspaces to it, or transforming and querying non-tabular data files in - * ETL. + * Volumes are a Unity Catalog (UC) capability for accessing, storing, governing, organizing and + * processing files. Use cases include running machine learning on unstructured data such as + * image, audio, video, or PDF files, organizing data sets during the data exploration stages in + * data science, working with libraries that require access to the local file system on cluster + * machines, storing library and config files of arbitrary formats such as .whl or .txt centrally + * and providing secure access across workspaces to it, or transforming and querying non-tabular + * data files in ETL. */ public VolumesAPI volumes() { return volumesAPI; } - + /** - * A SQL warehouse is a compute resource that lets you run SQL commands on - * data objects within Databricks SQL. Compute resources are infrastructure - * resources that provide processing capabilities in the cloud. + * A SQL warehouse is a compute resource that lets you run SQL commands on data objects within + * Databricks SQL. Compute resources are infrastructure resources that provide processing + * capabilities in the cloud. */ public WarehousesAPI warehouses() { return warehousesAPI; } - + /** - * The Workspace API allows you to list, import, export, and delete notebooks - * and folders. - * - * A notebook is a web-based interface to a document that contains runnable - * code, visualizations, and explanatory text. + * The Workspace API allows you to list, import, export, and delete notebooks and folders. + * + *

A notebook is a web-based interface to a document that contains runnable code, + * visualizations, and explanatory text. */ public WorkspaceAPI workspace() { return workspaceAPI; } - + /** - * A catalog in Databricks can be configured as __OPEN__ or __ISOLATED__. An - * __OPEN__ catalog can be accessed from any workspace, while an __ISOLATED__ - * catalog can only be access from a configured list of workspaces. - * - * A catalog's workspace bindings can be configured by a metastore admin or - * the owner of the catalog. + * A catalog in Databricks can be configured as __OPEN__ or __ISOLATED__. An __OPEN__ catalog can + * be accessed from any workspace, while an __ISOLATED__ catalog can only be access from a + * configured list of workspaces. + * + *

A catalog's workspace bindings can be configured by a metastore admin or the owner of the + * catalog. */ public WorkspaceBindingsAPI workspaceBindings() { return workspaceBindingsAPI; } - - /** - * This API allows updating known workspace settings for advanced users. - */ + + /** This API allows updating known workspace settings for advanced users. */ public WorkspaceConfAPI workspaceConf() { return workspaceConfAPI; } - - + /** Replace AccountAccessControlProxyAPI implementation with mock */ - public WorkspaceClient withAccountAccessControlProxyImpl(AccountAccessControlProxyService accountAccessControlProxy) { + public WorkspaceClient withAccountAccessControlProxyImpl( + AccountAccessControlProxyService accountAccessControlProxy) { accountAccessControlProxyAPI = new AccountAccessControlProxyAPI(accountAccessControlProxy); return this; } - + /** Replace AlertsAPI implementation with mock */ public WorkspaceClient withAlertsImpl(AlertsService alerts) { alertsAPI = new AlertsAPI(alerts); return this; } - + /** Replace ArtifactAllowlistsAPI implementation with mock */ public WorkspaceClient withArtifactAllowlistsImpl(ArtifactAllowlistsService artifactAllowlists) { artifactAllowlistsAPI = new ArtifactAllowlistsAPI(artifactAllowlists); return this; } - + /** Replace CatalogsAPI implementation with mock */ public WorkspaceClient withCatalogsImpl(CatalogsService catalogs) { catalogsAPI = new CatalogsAPI(catalogs); return this; } - + /** Replace CleanRoomsAPI implementation with mock */ public WorkspaceClient withCleanRoomsImpl(CleanRoomsService cleanRooms) { cleanRoomsAPI = new CleanRoomsAPI(cleanRooms); return this; } - + /** Replace ClusterPoliciesAPI implementation with mock */ public WorkspaceClient withClusterPoliciesImpl(ClusterPoliciesService clusterPolicies) { clusterPoliciesAPI = new ClusterPoliciesAPI(clusterPolicies); return this; } - + /** Replace ClustersAPI implementation with mock */ public WorkspaceClient withClustersImpl(ClustersService clusters) { clustersAPI = new ClustersExt(clusters); return this; } - + /** Replace CommandExecutionAPI implementation with mock */ public WorkspaceClient withCommandExecutionImpl(CommandExecutionService commandExecution) { commandExecutionAPI = new CommandExecutionAPI(commandExecution); return this; } - + /** Replace ConnectionsAPI implementation with mock */ public WorkspaceClient withConnectionsImpl(ConnectionsService connections) { connectionsAPI = new ConnectionsAPI(connections); return this; } - + /** Replace CurrentUserAPI implementation with mock */ public WorkspaceClient withCurrentUserImpl(CurrentUserService currentUser) { currentUserAPI = new CurrentUserAPI(currentUser); return this; } - + /** Replace DashboardsAPI implementation with mock */ public WorkspaceClient withDashboardsImpl(DashboardsService dashboards) { dashboardsAPI = new DashboardsAPI(dashboards); return this; } - + /** Replace DataSourcesAPI implementation with mock */ public WorkspaceClient withDataSourcesImpl(DataSourcesService dataSources) { dataSourcesAPI = new DataSourcesAPI(dataSources); return this; } - + /** Replace DbfsAPI implementation with mock */ public WorkspaceClient withDbfsImpl(DbfsService dbfs) { dbfsAPI = new DbfsExt(dbfs); return this; } - + /** Replace DbsqlPermissionsAPI implementation with mock */ public WorkspaceClient withDbsqlPermissionsImpl(DbsqlPermissionsService dbsqlPermissions) { dbsqlPermissionsAPI = new DbsqlPermissionsAPI(dbsqlPermissions); return this; } - + /** Replace ExperimentsAPI implementation with mock */ public WorkspaceClient withExperimentsImpl(ExperimentsService experiments) { experimentsAPI = new ExperimentsAPI(experiments); return this; } - + /** Replace ExternalLocationsAPI implementation with mock */ public WorkspaceClient withExternalLocationsImpl(ExternalLocationsService externalLocations) { externalLocationsAPI = new ExternalLocationsAPI(externalLocations); return this; } - + + /** Replace FilesAPI implementation with mock */ + public WorkspaceClient withFilesImpl(FilesService files) { + filesAPI = new FilesAPI(files); + return this; + } + /** Replace FunctionsAPI implementation with mock */ public WorkspaceClient withFunctionsImpl(FunctionsService functions) { functionsAPI = new FunctionsAPI(functions); return this; } - + /** Replace GitCredentialsAPI implementation with mock */ public WorkspaceClient withGitCredentialsImpl(GitCredentialsService gitCredentials) { gitCredentialsAPI = new GitCredentialsAPI(gitCredentials); return this; } - + /** Replace GlobalInitScriptsAPI implementation with mock */ public WorkspaceClient withGlobalInitScriptsImpl(GlobalInitScriptsService globalInitScripts) { globalInitScriptsAPI = new GlobalInitScriptsAPI(globalInitScripts); return this; } - + /** Replace GrantsAPI implementation with mock */ public WorkspaceClient withGrantsImpl(GrantsService grants) { grantsAPI = new GrantsAPI(grants); return this; } - + /** Replace GroupsAPI implementation with mock */ public WorkspaceClient withGroupsImpl(GroupsService groups) { groupsAPI = new GroupsAPI(groups); return this; } - + /** Replace InstancePoolsAPI implementation with mock */ public WorkspaceClient withInstancePoolsImpl(InstancePoolsService instancePools) { instancePoolsAPI = new InstancePoolsAPI(instancePools); return this; } - + /** Replace InstanceProfilesAPI implementation with mock */ public WorkspaceClient withInstanceProfilesImpl(InstanceProfilesService instanceProfiles) { instanceProfilesAPI = new InstanceProfilesAPI(instanceProfiles); return this; } - + /** Replace IpAccessListsAPI implementation with mock */ public WorkspaceClient withIpAccessListsImpl(IpAccessListsService ipAccessLists) { ipAccessListsAPI = new IpAccessListsAPI(ipAccessLists); return this; } - + /** Replace JobsAPI implementation with mock */ public WorkspaceClient withJobsImpl(JobsService jobs) { jobsAPI = new JobsAPI(jobs); return this; } - + /** Replace LibrariesAPI implementation with mock */ public WorkspaceClient withLibrariesImpl(LibrariesService libraries) { librariesAPI = new LibrariesAPI(libraries); return this; } - + /** Replace MetastoresAPI implementation with mock */ public WorkspaceClient withMetastoresImpl(MetastoresService metastores) { metastoresAPI = new MetastoresAPI(metastores); return this; } - + /** Replace ModelRegistryAPI implementation with mock */ public WorkspaceClient withModelRegistryImpl(ModelRegistryService modelRegistry) { modelRegistryAPI = new ModelRegistryAPI(modelRegistry); return this; } - + /** Replace PermissionsAPI implementation with mock */ public WorkspaceClient withPermissionsImpl(PermissionsService permissions) { permissionsAPI = new PermissionsAPI(permissions); return this; } - + /** Replace PipelinesAPI implementation with mock */ public WorkspaceClient withPipelinesImpl(PipelinesService pipelines) { pipelinesAPI = new PipelinesAPI(pipelines); return this; } - + /** Replace PolicyFamiliesAPI implementation with mock */ public WorkspaceClient withPolicyFamiliesImpl(PolicyFamiliesService policyFamilies) { policyFamiliesAPI = new PolicyFamiliesAPI(policyFamilies); return this; } - + /** Replace ProvidersAPI implementation with mock */ public WorkspaceClient withProvidersImpl(ProvidersService providers) { providersAPI = new ProvidersAPI(providers); return this; } - + /** Replace QueriesAPI implementation with mock */ public WorkspaceClient withQueriesImpl(QueriesService queries) { queriesAPI = new QueriesAPI(queries); return this; } - + /** Replace QueryHistoryAPI implementation with mock */ public WorkspaceClient withQueryHistoryImpl(QueryHistoryService queryHistory) { queryHistoryAPI = new QueryHistoryAPI(queryHistory); return this; } - + /** Replace RecipientActivationAPI implementation with mock */ - public WorkspaceClient withRecipientActivationImpl(RecipientActivationService recipientActivation) { + public WorkspaceClient withRecipientActivationImpl( + RecipientActivationService recipientActivation) { recipientActivationAPI = new RecipientActivationAPI(recipientActivation); return this; } - + /** Replace RecipientsAPI implementation with mock */ public WorkspaceClient withRecipientsImpl(RecipientsService recipients) { recipientsAPI = new RecipientsAPI(recipients); return this; } - + /** Replace ReposAPI implementation with mock */ public WorkspaceClient withReposImpl(ReposService repos) { reposAPI = new ReposAPI(repos); return this; } - + /** Replace SchemasAPI implementation with mock */ public WorkspaceClient withSchemasImpl(SchemasService schemas) { schemasAPI = new SchemasAPI(schemas); return this; } - + /** Replace SecretsAPI implementation with mock */ public WorkspaceClient withSecretsImpl(SecretsService secrets) { secretsAPI = new SecretsExt(secrets); return this; } - - /** Replace SecurableTagsAPI implementation with mock */ - public WorkspaceClient withSecurableTagsImpl(SecurableTagsService securableTags) { - securableTagsAPI = new SecurableTagsAPI(securableTags); - return this; - } - + /** Replace ServicePrincipalsAPI implementation with mock */ public WorkspaceClient withServicePrincipalsImpl(ServicePrincipalsService servicePrincipals) { servicePrincipalsAPI = new ServicePrincipalsAPI(servicePrincipals); return this; } - + /** Replace ServingEndpointsAPI implementation with mock */ public WorkspaceClient withServingEndpointsImpl(ServingEndpointsService servingEndpoints) { servingEndpointsAPI = new ServingEndpointsAPI(servingEndpoints); return this; } - + /** Replace SharesAPI implementation with mock */ public WorkspaceClient withSharesImpl(SharesService shares) { sharesAPI = new SharesAPI(shares); return this; } - + /** Replace StatementExecutionAPI implementation with mock */ public WorkspaceClient withStatementExecutionImpl(StatementExecutionService statementExecution) { statementExecutionAPI = new StatementExecutionAPI(statementExecution); return this; } - + /** Replace StorageCredentialsAPI implementation with mock */ public WorkspaceClient withStorageCredentialsImpl(StorageCredentialsService storageCredentials) { storageCredentialsAPI = new StorageCredentialsAPI(storageCredentials); return this; } - - /** Replace SubentityTagsAPI implementation with mock */ - public WorkspaceClient withSubentityTagsImpl(SubentityTagsService subentityTags) { - subentityTagsAPI = new SubentityTagsAPI(subentityTags); - return this; - } - + /** Replace SystemSchemasAPI implementation with mock */ public WorkspaceClient withSystemSchemasImpl(SystemSchemasService systemSchemas) { systemSchemasAPI = new SystemSchemasAPI(systemSchemas); return this; } - + /** Replace TableConstraintsAPI implementation with mock */ public WorkspaceClient withTableConstraintsImpl(TableConstraintsService tableConstraints) { tableConstraintsAPI = new TableConstraintsAPI(tableConstraints); return this; } - + /** Replace TablesAPI implementation with mock */ public WorkspaceClient withTablesImpl(TablesService tables) { tablesAPI = new TablesAPI(tables); return this; } - + /** Replace TokenManagementAPI implementation with mock */ public WorkspaceClient withTokenManagementImpl(TokenManagementService tokenManagement) { tokenManagementAPI = new TokenManagementAPI(tokenManagement); return this; } - + /** Replace TokensAPI implementation with mock */ public WorkspaceClient withTokensImpl(TokensService tokens) { tokensAPI = new TokensAPI(tokens); return this; } - + /** Replace UsersAPI implementation with mock */ public WorkspaceClient withUsersImpl(UsersService users) { usersAPI = new UsersAPI(users); return this; } - + /** Replace VolumesAPI implementation with mock */ public WorkspaceClient withVolumesImpl(VolumesService volumes) { volumesAPI = new VolumesAPI(volumes); return this; } - + /** Replace WarehousesAPI implementation with mock */ public WorkspaceClient withWarehousesImpl(WarehousesService warehouses) { warehousesAPI = new WarehousesAPI(warehouses); return this; } - + /** Replace WorkspaceAPI implementation with mock */ public WorkspaceClient withWorkspaceImpl(WorkspaceService workspace) { workspaceAPI = new WorkspaceAPI(workspace); return this; } - + /** Replace WorkspaceBindingsAPI implementation with mock */ public WorkspaceClient withWorkspaceBindingsImpl(WorkspaceBindingsService workspaceBindings) { workspaceBindingsAPI = new WorkspaceBindingsAPI(workspaceBindings); return this; } - + /** Replace WorkspaceConfAPI implementation with mock */ public WorkspaceClient withWorkspaceConfImpl(WorkspaceConfService workspaceConf) { workspaceConfAPI = new WorkspaceConfAPI(workspaceConf); return this; } - + public ApiClient apiClient() { return apiClient; } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BillableUsageImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BillableUsageImpl.java index f1513814d..bf243b185 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BillableUsageImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BillableUsageImpl.java @@ -20,7 +20,6 @@ public void download(DownloadRequest request) { String path = String.format("/api/2.0/accounts/%s/usage/download", apiClient.configuredAccountID()); Map headers = new HashMap<>(); - apiClient.GET(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java index b4b5f5f46..9bf67604b 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java @@ -7,7 +7,6 @@ @Generated public enum Privilege { ALL_PRIVILEGES, - APPLY_TAG, CREATE, CREATE_CATALOG, CREATE_CONNECTION, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java index 1124f3c34..966615b88 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java @@ -29,7 +29,6 @@ public VolumeInfo create(CreateVolumeRequestContent request) { public void delete(DeleteVolumeRequest request) { String path = String.format("/api/2.1/unity-catalog/volumes/%s", request.getFullNameArg()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java index 890863f1b..cd88c28e4 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java @@ -29,7 +29,6 @@ public CreateResponse create(GlobalInitScriptCreateRequest request) { public void delete(DeleteGlobalInitScriptRequest request) { String path = String.format("/api/2.0/global-init-scripts/%s", request.getScriptId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java index d1db9d6ac..cfa50b192 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java @@ -1,30 +1,15 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. package com.databricks.sdk.service.iam; -import java.io.IOException; -import java.util.Collection; -import java.util.Map; -import java.time.Duration; -import java.util.Arrays; -import java.util.concurrent.TimeoutException; -import java.util.function.Consumer; -import java.util.function.Function; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.databricks.sdk.core.ApiClient; -import com.databricks.sdk.core.DatabricksException; import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.Paginator; -import com.databricks.sdk.support.Wait; - - +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** - * These APIs manage access rules on resources in an account. Currently, only - * grant rules are supported. A grant rule specifies a role assigned to a set of - * principals. A list of rules attached to a resource is called a rule set. + * These APIs manage access rules on resources in an account. Currently, only grant rules are + * supported. A grant rule specifies a role assigned to a set of principals. A list of rules + * attached to a resource is called a rule set. */ @Generated public class AccountAccessControlAPI { @@ -41,78 +26,53 @@ public AccountAccessControlAPI(ApiClient apiClient) { public AccountAccessControlAPI(AccountAccessControlService mock) { impl = mock; } - - - public GetAssignableRolesForResourceResponse getAssignableRolesForResource(String resource) { - return getAssignableRolesForResource(new GetAssignableRolesForResourceRequest() - .setResource(resource)); + return getAssignableRolesForResource( + new GetAssignableRolesForResourceRequest().setResource(resource)); } - - /** + /** * Get assignable roles for a resource. - * - * Gets all the roles that can be granted on an account level resource. A role - * is grantable if the rule set on the resource can contain an access rule of - * the role. + * + *

Gets all the roles that can be granted on an account level resource. A role is grantable if + * the rule set on the resource can contain an access rule of the role. */ - public GetAssignableRolesForResourceResponse getAssignableRolesForResource(GetAssignableRolesForResourceRequest request) { + public GetAssignableRolesForResourceResponse getAssignableRolesForResource( + GetAssignableRolesForResourceRequest request) { return impl.getAssignableRolesForResource(request); } - - + public RuleSetResponse getRuleSet(String name, String etag) { - return getRuleSet(new GetRuleSetRequest() - .setName(name) - .setEtag(etag)); + return getRuleSet(new GetRuleSetRequest().setName(name).setEtag(etag)); } - - /** + /** * Get a rule set. - * - * Get a rule set by its name. A rule set is always attached to a resource and - * contains a list of access rules on the said resource. Currently only a - * default rule set for each resource is supported. + * + *

Get a rule set by its name. A rule set is always attached to a resource and contains a list + * of access rules on the said resource. Currently only a default rule set for each resource is + * supported. */ public RuleSetResponse getRuleSet(GetRuleSetRequest request) { return impl.getRuleSet(request); } - - + public RuleSetResponse updateRuleSet(String name, RuleSetUpdateRequest ruleSet) { - return updateRuleSet(new UpdateRuleSetRequest() - .setName(name) - .setRuleSet(ruleSet)); + return updateRuleSet(new UpdateRuleSetRequest().setName(name).setRuleSet(ruleSet)); } - - /** + /** * Update a rule set. - * - * Replace the rules of a rule set. First, use get to read the current version - * of the rule set before modifying it. This pattern helps prevent conflicts - * between concurrent updates. + * + *

Replace the rules of a rule set. First, use get to read the current version of the rule set + * before modifying it. This pattern helps prevent conflicts between concurrent updates. */ public RuleSetResponse updateRuleSet(UpdateRuleSetRequest request) { return impl.updateRuleSet(request); } - + public AccountAccessControlService impl() { return impl; } } - - - - - - - - - - - - diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlService.java index 00cae1d8c..3b5f6f0cb 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlService.java @@ -1,47 +1,42 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. package com.databricks.sdk.service.iam; -import java.util.Collection; -import java.util.Map; - import com.databricks.sdk.support.Generated; /** - * These APIs manage access rules on resources in an account. Currently, only - * grant rules are supported. A grant rule specifies a role assigned to a set of - * principals. A list of rules attached to a resource is called a rule set. + * These APIs manage access rules on resources in an account. Currently, only grant rules are + * supported. A grant rule specifies a role assigned to a set of principals. A list of rules + * attached to a resource is called a rule set. * - * This is the high-level interface, that contains generated methods. + *

This is the high-level interface, that contains generated methods. * - * Evolving: this interface is under development. Method signatures may change. + *

Evolving: this interface is under development. Method signatures may change. */ @Generated public interface AccountAccessControlService { - /** + /** * Get assignable roles for a resource. - * - * Gets all the roles that can be granted on an account level resource. A role - * is grantable if the rule set on the resource can contain an access rule of - * the role. + * + *

Gets all the roles that can be granted on an account level resource. A role is grantable if + * the rule set on the resource can contain an access rule of the role. */ - GetAssignableRolesForResourceResponse getAssignableRolesForResource(GetAssignableRolesForResourceRequest getAssignableRolesForResourceRequest); - - /** + GetAssignableRolesForResourceResponse getAssignableRolesForResource( + GetAssignableRolesForResourceRequest getAssignableRolesForResourceRequest); + + /** * Get a rule set. - * - * Get a rule set by its name. A rule set is always attached to a resource and - * contains a list of access rules on the said resource. Currently only a - * default rule set for each resource is supported. + * + *

Get a rule set by its name. A rule set is always attached to a resource and contains a list + * of access rules on the said resource. Currently only a default rule set for each resource is + * supported. */ RuleSetResponse getRuleSet(GetRuleSetRequest getRuleSetRequest); - - /** + + /** * Update a rule set. - * - * Replace the rules of a rule set. First, use get to read the current version - * of the rule set before modifying it. This pattern helps prevent conflicts - * between concurrent updates. + * + *

Replace the rules of a rule set. First, use get to read the current version of the rule set + * before modifying it. This pattern helps prevent conflicts between concurrent updates. */ RuleSetResponse updateRuleSet(UpdateRuleSetRequest updateRuleSetRequest); - -} \ No newline at end of file +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java index be3c567e1..5a1f526e1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java @@ -33,7 +33,6 @@ public void delete(DeleteAccountGroupRequest request) { "/api/2.0/accounts/%s/scim/v2/Groups/%s", apiClient.configuredAccountID(), request.getId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java index fb2388aa0..7fcf2bdd8 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java @@ -34,7 +34,6 @@ public void delete(DeleteAccountServicePrincipalRequest request) { "/api/2.0/accounts/%s/scim/v2/ServicePrincipals/%s", apiClient.configuredAccountID(), request.getId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java index 53dc79208..6fdd8e50d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java @@ -33,7 +33,6 @@ public void delete(DeleteAccountUserRequest request) { "/api/2.0/accounts/%s/scim/v2/Users/%s", apiClient.configuredAccountID(), request.getId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java index bd9351a80..ebb5f2d83 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java @@ -29,7 +29,6 @@ public Group create(Group request) { public void delete(DeleteGroupRequest request) { String path = String.format("/api/2.0/preview/scim/v2/Groups/%s", request.getId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java index 129dd234d..b5580ce83 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java @@ -29,7 +29,6 @@ public ServicePrincipal create(ServicePrincipal request) { public void delete(DeleteServicePrincipalRequest request) { String path = String.format("/api/2.0/preview/scim/v2/ServicePrincipals/%s", request.getId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java index f56349403..e925dd4e0 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java @@ -29,7 +29,6 @@ public User create(User request) { public void delete(DeleteUserRequest request) { String path = String.format("/api/2.0/preview/scim/v2/Users/%s", request.getId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java index 81dc224d5..6b3e28d4c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java @@ -36,7 +36,6 @@ public void delete(DeleteServicePrincipalSecretRequest request) { request.getServicePrincipalId(), request.getSecretId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java index 1d767db5d..d607ee6d7 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java @@ -50,7 +50,6 @@ public void delete(DeleteServingEndpointRequest request) { public void exportMetrics(ExportMetricsRequest request) { String path = String.format("/api/2.0/serving-endpoints/%s/metrics", request.getName()); Map headers = new HashMap<>(); - apiClient.GET(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java index 1a04d30db..8e912f3db 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java @@ -34,7 +34,6 @@ public void delete(DeleteAccountIpAccessListRequest request) { "/api/2.0/preview/accounts/%s/ip-access-lists/%s", apiClient.configuredAccountID(), request.getIpAccessListId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java index ee6a8226c..bb82abc5f 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java @@ -29,7 +29,6 @@ public CreateIpAccessListResponse create(CreateIpAccessList request) { public void delete(DeleteIpAccessListRequest request) { String path = String.format("/api/2.0/ip-access-lists/%s", request.getIpAccessListId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java index b8ec0845e..e7069db0d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java @@ -29,7 +29,6 @@ public CreateOboTokenResponse createOboToken(CreateOboTokenRequest request) { public void delete(DeleteTokenManagementRequest request) { String path = String.format("/api/2.0/token-management/tokens/%s", request.getTokenId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java index 83d75ff24..78a654b86 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java @@ -7,7 +7,6 @@ @Generated public enum Privilege { ALL_PRIVILEGES, - APPLY_TAG, CREATE, CREATE_CATALOG, CREATE_CONNECTION, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java index c413f6ada..f11853e43 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java @@ -19,7 +19,6 @@ public StatementExecutionImpl(ApiClient apiClient) { public void cancelExecution(CancelExecutionRequest request) { String path = String.format("/api/2.0/sql/statements/%s/cancel", request.getStatementId()); Map headers = new HashMap<>(); - apiClient.POST(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java index 9a8c6d739..366f5fae1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java @@ -29,7 +29,6 @@ public CreateCredentialsResponse create(CreateCredentials request) { public void delete(DeleteGitCredentialRequest request) { String path = String.format("/api/2.0/git-credentials/%s", request.getCredentialId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java index b923d4193..45b56fdf5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java @@ -29,7 +29,6 @@ public RepoInfo create(CreateRepo request) { public void delete(DeleteRepoRequest request) { String path = String.format("/api/2.0/repos/%s", request.getRepoId()); Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); } From 628a50ae535145b130ec205da565f22495751c78 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 18 Aug 2023 21:40:28 +0200 Subject: [PATCH 6/9] use main --- .codegen/_openapi_sha | 2 +- .gitattributes | 26 ++++++--- .../com/databricks/sdk/WorkspaceClient.java | 56 +++++++++++++------ .../sdk/service/catalog/Privilege.java | 1 + .../sdk/service/sharing/Privilege.java | 1 + .../sdk/service/sql/ChannelName.java | 1 + 6 files changed, 61 insertions(+), 26 deletions(-) diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 7b612f095..8af74cf44 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -universe:/Users/miles/universe \ No newline at end of file +beff621d7b3e1d59244e2e34fc53a496f310e130 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 68b93ec32..ea2714882 100755 --- a/.gitattributes +++ b/.gitattributes @@ -167,7 +167,10 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListFunctio databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListMetastoresResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSchemasRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSchemasResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableTagsRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListStorageCredentialsResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSubentityTagsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSummariesRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSystemSchemasRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSystemSchemasResponse.java linguist-generated=true @@ -198,6 +201,9 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableOptionsMap.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurablePropertiesMap.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsAPI.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SetArtifactAllowlist.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SseEncryptionDetails.java linguist-generated=true @@ -206,6 +212,9 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCred databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsService.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsAPI.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemaInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemaInfoState.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasAPI.java linguist-generated=true @@ -224,6 +233,14 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableType.j databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesService.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagChanges.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagKeyValuePair.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurable.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignment.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignmentsList.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentity.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentityAssignmentsList.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagsSubentityAssignment.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UnassignRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateCatalog.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateConnection.java linguist-generated=true @@ -236,8 +253,10 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdatePermi databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdatePredictiveOptimization.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdatePredictiveOptimizationResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateSchema.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateSecurableType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateStorageCredential.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateTableRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateTags.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateVolumeRequestContent.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateWorkspaceBindings.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateStorageCredential.java linguist-generated=true @@ -459,13 +478,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsAPI.java databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/Delete.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FileInfo.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/GetStatusRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/ListDbfsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/ListStatusResponse.java linguist-generated=true @@ -474,7 +487,6 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/Move.java lin databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/Put.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/ReadDbfsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/ReadResponse.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccessControlRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccessControlResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlAPI.java linguist-generated=true diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java index d23b619e5..8025198fb 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java @@ -24,8 +24,12 @@ import com.databricks.sdk.service.catalog.MetastoresService; import com.databricks.sdk.service.catalog.SchemasAPI; import com.databricks.sdk.service.catalog.SchemasService; +import com.databricks.sdk.service.catalog.SecurableTagsAPI; +import com.databricks.sdk.service.catalog.SecurableTagsService; import com.databricks.sdk.service.catalog.StorageCredentialsAPI; import com.databricks.sdk.service.catalog.StorageCredentialsService; +import com.databricks.sdk.service.catalog.SubentityTagsAPI; +import com.databricks.sdk.service.catalog.SubentityTagsService; import com.databricks.sdk.service.catalog.SystemSchemasAPI; import com.databricks.sdk.service.catalog.SystemSchemasService; import com.databricks.sdk.service.catalog.TableConstraintsAPI; @@ -52,8 +56,6 @@ import com.databricks.sdk.service.compute.PolicyFamiliesAPI; import com.databricks.sdk.service.compute.PolicyFamiliesService; import com.databricks.sdk.service.files.DbfsService; -import com.databricks.sdk.service.files.FilesAPI; -import com.databricks.sdk.service.files.FilesService; import com.databricks.sdk.service.iam.AccountAccessControlProxyAPI; import com.databricks.sdk.service.iam.AccountAccessControlProxyService; import com.databricks.sdk.service.iam.CurrentUserAPI; @@ -141,7 +143,6 @@ public class WorkspaceClient { private DbsqlPermissionsAPI dbsqlPermissionsAPI; private ExperimentsAPI experimentsAPI; private ExternalLocationsAPI externalLocationsAPI; - private FilesAPI filesAPI; private FunctionsAPI functionsAPI; private GitCredentialsAPI gitCredentialsAPI; private GlobalInitScriptsAPI globalInitScriptsAPI; @@ -165,11 +166,13 @@ public class WorkspaceClient { private ReposAPI reposAPI; private SchemasAPI schemasAPI; private SecretsExt secretsAPI; + private SecurableTagsAPI securableTagsAPI; private ServicePrincipalsAPI servicePrincipalsAPI; private ServingEndpointsAPI servingEndpointsAPI; private SharesAPI sharesAPI; private StatementExecutionAPI statementExecutionAPI; private StorageCredentialsAPI storageCredentialsAPI; + private SubentityTagsAPI subentityTagsAPI; private SystemSchemasAPI systemSchemasAPI; private TableConstraintsAPI tableConstraintsAPI; private TablesAPI tablesAPI; @@ -206,7 +209,6 @@ public WorkspaceClient(DatabricksConfig config) { dbsqlPermissionsAPI = new DbsqlPermissionsAPI(apiClient); experimentsAPI = new ExperimentsAPI(apiClient); externalLocationsAPI = new ExternalLocationsAPI(apiClient); - filesAPI = new FilesAPI(apiClient); functionsAPI = new FunctionsAPI(apiClient); gitCredentialsAPI = new GitCredentialsAPI(apiClient); globalInitScriptsAPI = new GlobalInitScriptsAPI(apiClient); @@ -230,11 +232,13 @@ public WorkspaceClient(DatabricksConfig config) { reposAPI = new ReposAPI(apiClient); schemasAPI = new SchemasAPI(apiClient); secretsAPI = new SecretsExt(apiClient); + securableTagsAPI = new SecurableTagsAPI(apiClient); servicePrincipalsAPI = new ServicePrincipalsAPI(apiClient); servingEndpointsAPI = new ServingEndpointsAPI(apiClient); sharesAPI = new SharesAPI(apiClient); statementExecutionAPI = new StatementExecutionAPI(apiClient); storageCredentialsAPI = new StorageCredentialsAPI(apiClient); + subentityTagsAPI = new SubentityTagsAPI(apiClient); systemSchemasAPI = new SystemSchemasAPI(apiClient); tableConstraintsAPI = new TableConstraintsAPI(apiClient); tablesAPI = new TablesAPI(apiClient); @@ -471,14 +475,6 @@ public ExternalLocationsAPI externalLocations() { return externalLocationsAPI; } - /** - * The Files API allows you to read, write, and delete files and directories in Unity Catalog - * volumes. - */ - public FilesAPI files() { - return filesAPI; - } - /** * Functions implement User-Defined Functions (UDFs) in Unity Catalog. * @@ -859,6 +855,15 @@ public SecretsExt secrets() { return secretsAPI; } + /** + * Tags are attributes containing keys and values that can be applied to different entities in + * Unity Catalog. Tags are useful for organizing and categorizing different entities within a + * metastore. SecurableTags are attached to Unity Catalog securable entities. + */ + public SecurableTagsAPI securableTags() { + return securableTagsAPI; + } + /** * Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD * platforms. Databricks recommends creating service principals to run production jobs or modify @@ -1083,6 +1088,15 @@ public StorageCredentialsAPI storageCredentials() { return storageCredentialsAPI; } + /** + * Tags are attributes containing keys and values that can be applied to different entities in + * Unity Catalog. Tags are useful for organizing and categorizing different entities within a + * metastore. SubentityTags are attached to Unity Catalog subentities. + */ + public SubentityTagsAPI subentityTags() { + return subentityTagsAPI; + } + /** * A system schema is a schema that lives within the system catalog. A system schema may contain * information about customer usage of Unity Catalog such as audit-logs, billing-logs, lineage @@ -1299,12 +1313,6 @@ public WorkspaceClient withExternalLocationsImpl(ExternalLocationsService extern return this; } - /** Replace FilesAPI implementation with mock */ - public WorkspaceClient withFilesImpl(FilesService files) { - filesAPI = new FilesAPI(files); - return this; - } - /** Replace FunctionsAPI implementation with mock */ public WorkspaceClient withFunctionsImpl(FunctionsService functions) { functionsAPI = new FunctionsAPI(functions); @@ -1444,6 +1452,12 @@ public WorkspaceClient withSecretsImpl(SecretsService secrets) { return this; } + /** Replace SecurableTagsAPI implementation with mock */ + public WorkspaceClient withSecurableTagsImpl(SecurableTagsService securableTags) { + securableTagsAPI = new SecurableTagsAPI(securableTags); + return this; + } + /** Replace ServicePrincipalsAPI implementation with mock */ public WorkspaceClient withServicePrincipalsImpl(ServicePrincipalsService servicePrincipals) { servicePrincipalsAPI = new ServicePrincipalsAPI(servicePrincipals); @@ -1474,6 +1488,12 @@ public WorkspaceClient withStorageCredentialsImpl(StorageCredentialsService stor return this; } + /** Replace SubentityTagsAPI implementation with mock */ + public WorkspaceClient withSubentityTagsImpl(SubentityTagsService subentityTags) { + subentityTagsAPI = new SubentityTagsAPI(subentityTags); + return this; + } + /** Replace SystemSchemasAPI implementation with mock */ public WorkspaceClient withSystemSchemasImpl(SystemSchemasService systemSchemas) { systemSchemasAPI = new SystemSchemasAPI(systemSchemas); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java index 9bf67604b..b4b5f5f46 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java @@ -7,6 +7,7 @@ @Generated public enum Privilege { ALL_PRIVILEGES, + APPLY_TAG, CREATE, CREATE_CATALOG, CREATE_CONNECTION, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java index 78a654b86..83d75ff24 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java @@ -7,6 +7,7 @@ @Generated public enum Privilege { ALL_PRIVILEGES, + APPLY_TAG, CREATE, CREATE_CATALOG, CREATE_CONNECTION, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ChannelName.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ChannelName.java index 3b9d4cbb0..8e0f647a1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ChannelName.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ChannelName.java @@ -4,6 +4,7 @@ import com.databricks.sdk.support.Generated; +/** Name of the channel */ @Generated public enum ChannelName { CHANNEL_NAME_CURRENT, From 596fed66d5efe8859696159e4b88de8fc315b9d1 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 18 Aug 2023 21:44:57 +0200 Subject: [PATCH 7/9] Looking good --- .codegen/impl.java.tmpl | 4 +- .../sdk/service/billing/BudgetsImpl.java | 5 -- .../sdk/service/billing/LogDeliveryImpl.java | 4 - .../AccountMetastoreAssignmentsImpl.java | 5 -- .../catalog/AccountMetastoresImpl.java | 5 -- .../AccountStorageCredentialsImpl.java | 5 -- .../catalog/ArtifactAllowlistsImpl.java | 2 - .../sdk/service/catalog/CatalogsImpl.java | 5 -- .../sdk/service/catalog/ConnectionsImpl.java | 5 -- .../catalog/ExternalLocationsImpl.java | 5 -- .../sdk/service/catalog/FunctionsImpl.java | 5 -- .../sdk/service/catalog/GrantsImpl.java | 3 - .../sdk/service/catalog/MetastoresImpl.java | 11 --- .../sdk/service/catalog/SchemasImpl.java | 5 -- .../service/catalog/SecurableTagsImpl.java | 2 - .../catalog/StorageCredentialsImpl.java | 6 -- .../service/catalog/SubentityTagsImpl.java | 2 - .../service/catalog/SystemSchemasImpl.java | 3 - .../service/catalog/TableConstraintsImpl.java | 2 - .../sdk/service/catalog/TablesImpl.java | 5 -- .../sdk/service/catalog/VolumesImpl.java | 4 - .../catalog/WorkspaceBindingsImpl.java | 2 - .../service/compute/ClusterPoliciesImpl.java | 9 -- .../sdk/service/compute/ClustersImpl.java | 20 ----- .../service/compute/CommandExecutionImpl.java | 6 -- .../compute/GlobalInitScriptsImpl.java | 4 - .../service/compute/InstancePoolsImpl.java | 9 -- .../service/compute/InstanceProfilesImpl.java | 4 - .../sdk/service/compute/LibrariesImpl.java | 4 - .../service/compute/PolicyFamiliesImpl.java | 2 - .../sdk/service/files/DbfsImpl.java | 10 --- .../sdk/service/files/DeleteFileRequest.java | 41 +++++++++ .../service/files/DownloadFileRequest.java | 41 +++++++++ .../service/files/DownloadFileResponse.java | 40 +++++++++ .../sdk/service/files/FilesAPI.java | 84 +++++++++++++++++++ .../sdk/service/files/FilesImpl.java | 48 +++++++++++ .../sdk/service/files/FilesService.java | 43 ++++++++++ .../sdk/service/files/UploadFileRequest.java | 73 ++++++++++++++++ .../service/iam/AccountAccessControlImpl.java | 3 - .../iam/AccountAccessControlProxyImpl.java | 3 - .../sdk/service/iam/AccountGroupsImpl.java | 5 -- .../iam/AccountServicePrincipalsImpl.java | 5 -- .../sdk/service/iam/AccountUsersImpl.java | 5 -- .../sdk/service/iam/CurrentUserImpl.java | 1 - .../sdk/service/iam/GroupsImpl.java | 5 -- .../sdk/service/iam/PermissionsImpl.java | 4 - .../service/iam/ServicePrincipalsImpl.java | 5 -- .../databricks/sdk/service/iam/UsersImpl.java | 9 -- .../service/iam/WorkspaceAssignmentImpl.java | 4 - .../databricks/sdk/service/jobs/JobsImpl.java | 20 ----- .../sdk/service/ml/ExperimentsImpl.java | 30 ------- .../sdk/service/ml/ModelRegistryImpl.java | 36 -------- .../oauth2/CustomAppIntegrationImpl.java | 5 -- .../service/oauth2/OAuthEnrollmentImpl.java | 2 - .../oauth2/PublishedAppIntegrationImpl.java | 5 -- .../oauth2/ServicePrincipalSecretsImpl.java | 2 - .../sdk/service/pipelines/PipelinesImpl.java | 15 ---- .../service/provisioning/CredentialsImpl.java | 4 - .../provisioning/EncryptionKeysImpl.java | 4 - .../service/provisioning/NetworksImpl.java | 4 - .../provisioning/PrivateAccessImpl.java | 5 -- .../sdk/service/provisioning/StorageImpl.java | 4 - .../provisioning/VpcEndpointsImpl.java | 4 - .../service/provisioning/WorkspacesImpl.java | 5 -- .../service/serving/ServingEndpointsImpl.java | 12 --- .../settings/AccountIpAccessListsImpl.java | 5 -- .../settings/AccountNetworkPolicyImpl.java | 3 - .../service/settings/AccountSettingsImpl.java | 3 - .../service/settings/IpAccessListsImpl.java | 5 -- .../service/settings/TokenManagementImpl.java | 7 -- .../sdk/service/settings/TokensImpl.java | 3 - .../service/settings/WorkspaceConfImpl.java | 2 - .../sdk/service/sharing/CleanRoomsImpl.java | 5 -- .../sdk/service/sharing/ProvidersImpl.java | 6 -- .../sharing/RecipientActivationImpl.java | 2 - .../sdk/service/sharing/RecipientsImpl.java | 7 -- .../sdk/service/sharing/SharesImpl.java | 7 -- .../sdk/service/sql/AlertsImpl.java | 5 -- .../sdk/service/sql/DashboardsImpl.java | 5 -- .../sdk/service/sql/DataSourcesImpl.java | 1 - .../sdk/service/sql/DbsqlPermissionsImpl.java | 3 - .../sdk/service/sql/QueriesImpl.java | 6 -- .../sdk/service/sql/QueryHistoryImpl.java | 1 - .../service/sql/StatementExecutionImpl.java | 3 - .../sdk/service/sql/WarehousesImpl.java | 13 --- .../service/workspace/GitCredentialsImpl.java | 4 - .../sdk/service/workspace/ReposImpl.java | 8 -- .../sdk/service/workspace/SecretsImpl.java | 11 --- .../sdk/service/workspace/WorkspaceImpl.java | 10 --- 89 files changed, 372 insertions(+), 492 deletions(-) create mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java create mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java create mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java create mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java create mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java create mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java create mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java diff --git a/.codegen/impl.java.tmpl b/.codegen/impl.java.tmpl index d8b62a13c..e9a3d5541 100644 --- a/.codegen/impl.java.tmpl +++ b/.codegen/impl.java.tmpl @@ -46,7 +46,7 @@ class {{.PascalName}}Impl implements {{.PascalName}}Service { {{ define "headers" -}} Map headers = new HashMap<>(); - {{- range $key, $value := .FixedRequestHeaders -}} + {{- range $key, $value := .FixedRequestHeaders }} headers.put("{{$key}}", "{{$value}}"); - {{ end -}} + {{- end -}} {{- end }} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsImpl.java index 7c10fa0a1..874f31f81 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsImpl.java @@ -21,7 +21,6 @@ public WrappedBudgetWithStatus create(WrappedBudget request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, WrappedBudgetWithStatus.class, headers); } @@ -33,7 +32,6 @@ public void delete(DeleteBudgetRequest request) { apiClient.configuredAccountID(), request.getBudgetId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -45,7 +43,6 @@ public WrappedBudgetWithStatus get(GetBudgetRequest request) { apiClient.configuredAccountID(), request.getBudgetId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, WrappedBudgetWithStatus.class, headers); } @@ -54,7 +51,6 @@ public BudgetList list() { String path = String.format("/api/2.0/accounts/%s/budget", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, BudgetList.class, headers); } @@ -67,7 +63,6 @@ public void update(WrappedBudget request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryImpl.java index 701378bb0..bd0ed9b90 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryImpl.java @@ -22,7 +22,6 @@ public WrappedLogDeliveryConfiguration create(WrappedCreateLogDeliveryConfigurat Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, WrappedLogDeliveryConfiguration.class, headers); } @@ -34,7 +33,6 @@ public WrappedLogDeliveryConfiguration get(GetLogDeliveryRequest request) { apiClient.configuredAccountID(), request.getLogDeliveryConfigurationId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, WrappedLogDeliveryConfiguration.class, headers); } @@ -44,7 +42,6 @@ public WrappedLogDeliveryConfigurations list(ListLogDeliveryRequest request) { String.format("/api/2.0/accounts/%s/log-delivery", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, WrappedLogDeliveryConfigurations.class, headers); } @@ -57,7 +54,6 @@ public void patchStatus(UpdateLogDeliveryConfigurationStatusRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java index 9c4a47e94..9674b15a5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java @@ -25,7 +25,6 @@ public void create(AccountsCreateMetastoreAssignment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -37,7 +36,6 @@ public void delete(DeleteAccountMetastoreAssignmentRequest request) { apiClient.configuredAccountID(), request.getWorkspaceId(), request.getMetastoreId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -49,7 +47,6 @@ public AccountsMetastoreAssignment get(GetAccountMetastoreAssignmentRequest requ apiClient.configuredAccountID(), request.getWorkspaceId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, AccountsMetastoreAssignment.class, headers); } @@ -61,7 +58,6 @@ public Collection list(ListAccountMetastoreAssignmentsReque apiClient.configuredAccountID(), request.getMetastoreId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, MetastoreAssignment.class, headers); } @@ -74,7 +70,6 @@ public void update(AccountsUpdateMetastoreAssignment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresImpl.java index eae2d42c8..cddea3a03 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresImpl.java @@ -21,7 +21,6 @@ public AccountsMetastoreInfo create(AccountsCreateMetastore request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, AccountsMetastoreInfo.class, headers); } @@ -33,7 +32,6 @@ public void delete(DeleteAccountMetastoreRequest request) { apiClient.configuredAccountID(), request.getMetastoreId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -45,7 +43,6 @@ public AccountsMetastoreInfo get(GetAccountMetastoreRequest request) { apiClient.configuredAccountID(), request.getMetastoreId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, AccountsMetastoreInfo.class, headers); } @@ -54,7 +51,6 @@ public ListMetastoresResponse list() { String path = String.format("/api/2.0/accounts/%s/metastores", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListMetastoresResponse.class, headers); } @@ -67,7 +63,6 @@ public AccountsMetastoreInfo update(AccountsUpdateMetastore request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, AccountsMetastoreInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsImpl.java index 3192f89aa..51aba9700 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsImpl.java @@ -24,7 +24,6 @@ public AccountsStorageCredentialInfo create(AccountsCreateStorageCredential requ Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, AccountsStorageCredentialInfo.class, headers); } @@ -36,7 +35,6 @@ public void delete(DeleteAccountStorageCredentialRequest request) { apiClient.configuredAccountID(), request.getMetastoreId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -48,7 +46,6 @@ public AccountsStorageCredentialInfo get(GetAccountStorageCredentialRequest requ apiClient.configuredAccountID(), request.getMetastoreId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, AccountsStorageCredentialInfo.class, headers); } @@ -60,7 +57,6 @@ public ListStorageCredentialsResponse list(ListAccountStorageCredentialsRequest apiClient.configuredAccountID(), request.getMetastoreId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListStorageCredentialsResponse.class, headers); } @@ -73,7 +69,6 @@ public AccountsStorageCredentialInfo update(AccountsUpdateStorageCredential requ Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, AccountsStorageCredentialInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ArtifactAllowlistsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ArtifactAllowlistsImpl.java index 0fbbf9309..5a7a55677 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ArtifactAllowlistsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ArtifactAllowlistsImpl.java @@ -21,7 +21,6 @@ public ArtifactAllowlistInfo get(GetArtifactAllowlistRequest request) { String.format("/api/2.1/unity-catalog/artifact-allowlists/%s", request.getArtifactType()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ArtifactAllowlistInfo.class, headers); } @@ -32,7 +31,6 @@ public ArtifactAllowlistInfo update(SetArtifactAllowlist request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, ArtifactAllowlistInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsImpl.java index bb379ab9a..d2b78e313 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsImpl.java @@ -21,7 +21,6 @@ public CatalogInfo create(CreateCatalog request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CatalogInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteCatalogRequest request) { String path = String.format("/api/2.1/unity-catalog/catalogs/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public CatalogInfo get(GetCatalogRequest request) { String path = String.format("/api/2.1/unity-catalog/catalogs/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, CatalogInfo.class, headers); } @@ -48,7 +45,6 @@ public ListCatalogsResponse list() { String path = "/api/2.1/unity-catalog/catalogs"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListCatalogsResponse.class, headers); } @@ -58,7 +54,6 @@ public CatalogInfo update(UpdateCatalog request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, CatalogInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionsImpl.java index 5b1225374..05032a1dd 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionsImpl.java @@ -21,7 +21,6 @@ public ConnectionInfo create(CreateConnection request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ConnectionInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteConnectionRequest request) { String path = String.format("/api/2.1/unity-catalog/connections/%s", request.getNameArg()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public ConnectionInfo get(GetConnectionRequest request) { String path = String.format("/api/2.1/unity-catalog/connections/%s", request.getNameArg()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ConnectionInfo.class, headers); } @@ -48,7 +45,6 @@ public ListConnectionsResponse list() { String path = "/api/2.1/unity-catalog/connections"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListConnectionsResponse.class, headers); } @@ -58,7 +54,6 @@ public ConnectionInfo update(UpdateConnection request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ConnectionInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalLocationsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalLocationsImpl.java index 07a35b186..f4a68dea1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalLocationsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalLocationsImpl.java @@ -21,7 +21,6 @@ public ExternalLocationInfo create(CreateExternalLocation request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ExternalLocationInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteExternalLocationRequest request) { String path = String.format("/api/2.1/unity-catalog/external-locations/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public ExternalLocationInfo get(GetExternalLocationRequest request) { String path = String.format("/api/2.1/unity-catalog/external-locations/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ExternalLocationInfo.class, headers); } @@ -48,7 +45,6 @@ public ListExternalLocationsResponse list() { String path = "/api/2.1/unity-catalog/external-locations"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListExternalLocationsResponse.class, headers); } @@ -58,7 +54,6 @@ public ExternalLocationInfo update(UpdateExternalLocation request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ExternalLocationInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java index 8aeab1341..dc4fc9518 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java @@ -21,7 +21,6 @@ public FunctionInfo create(CreateFunction request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, FunctionInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteFunctionRequest request) { String path = String.format("/api/2.1/unity-catalog/functions/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public FunctionInfo get(GetFunctionRequest request) { String path = String.format("/api/2.1/unity-catalog/functions/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, FunctionInfo.class, headers); } @@ -48,7 +45,6 @@ public ListFunctionsResponse list(ListFunctionsRequest request) { String path = "/api/2.1/unity-catalog/functions"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListFunctionsResponse.class, headers); } @@ -58,7 +54,6 @@ public FunctionInfo update(UpdateFunction request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, FunctionInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GrantsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GrantsImpl.java index 1019b0446..a4f83e394 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GrantsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GrantsImpl.java @@ -23,7 +23,6 @@ public PermissionsList get(GetGrantRequest request) { request.getSecurableType(), request.getFullName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, PermissionsList.class, headers); } @@ -35,7 +34,6 @@ public EffectivePermissionsList getEffective(GetEffectiveRequest request) { request.getSecurableType(), request.getFullName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, EffectivePermissionsList.class, headers); } @@ -48,7 +46,6 @@ public PermissionsList update(UpdatePermissions request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, PermissionsList.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/MetastoresImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/MetastoresImpl.java index 8f59989e6..b533753bc 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/MetastoresImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/MetastoresImpl.java @@ -22,7 +22,6 @@ public void assign(CreateMetastoreAssignment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } @@ -32,7 +31,6 @@ public MetastoreInfo create(CreateMetastore request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, MetastoreInfo.class, headers); } @@ -41,7 +39,6 @@ public MetastoreAssignment current() { String path = "/api/2.1/unity-catalog/current-metastore-assignment"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, MetastoreAssignment.class, headers); } @@ -50,7 +47,6 @@ public void delete(DeleteMetastoreRequest request) { String path = String.format("/api/2.1/unity-catalog/metastores/%s", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -61,7 +57,6 @@ public UpdatePredictiveOptimizationResponse enableOptimization( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, UpdatePredictiveOptimizationResponse.class, headers); } @@ -70,7 +65,6 @@ public MetastoreInfo get(GetMetastoreRequest request) { String path = String.format("/api/2.1/unity-catalog/metastores/%s", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, MetastoreInfo.class, headers); } @@ -79,7 +73,6 @@ public ListMetastoresResponse list() { String path = "/api/2.1/unity-catalog/metastores"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListMetastoresResponse.class, headers); } @@ -88,7 +81,6 @@ public GetMetastoreSummaryResponse summary() { String path = "/api/2.1/unity-catalog/metastore_summary"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetMetastoreSummaryResponse.class, headers); } @@ -98,7 +90,6 @@ public void unassign(UnassignRequest request) { String.format("/api/2.1/unity-catalog/workspaces/%s/metastore", request.getWorkspaceId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -108,7 +99,6 @@ public MetastoreInfo update(UpdateMetastore request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, MetastoreInfo.class, headers); } @@ -119,7 +109,6 @@ public void updateAssignment(UpdateMetastoreAssignment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl.java index a8e2acced..491966ccb 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SchemasImpl.java @@ -21,7 +21,6 @@ public SchemaInfo create(CreateSchema request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, SchemaInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteSchemaRequest request) { String path = String.format("/api/2.1/unity-catalog/schemas/%s", request.getFullName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public SchemaInfo get(GetSchemaRequest request) { String path = String.format("/api/2.1/unity-catalog/schemas/%s", request.getFullName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, SchemaInfo.class, headers); } @@ -48,7 +45,6 @@ public ListSchemasResponse list(ListSchemasRequest request) { String path = "/api/2.1/unity-catalog/schemas"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListSchemasResponse.class, headers); } @@ -58,7 +54,6 @@ public SchemaInfo update(UpdateSchema request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, SchemaInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java index 3927c8c9d..fd697d51e 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java @@ -23,7 +23,6 @@ public TagSecurableAssignmentsList list(ListSecurableTagsRequest request) { request.getSecurableType(), request.getFullName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, TagSecurableAssignmentsList.class, headers); } @@ -36,7 +35,6 @@ public TagSecurableAssignmentsList update(UpdateTags request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, TagSecurableAssignmentsList.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java index 79c0f292b..10a3743b1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsImpl.java @@ -21,7 +21,6 @@ public StorageCredentialInfo create(CreateStorageCredential request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, StorageCredentialInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteStorageCredentialRequest request) { String path = String.format("/api/2.1/unity-catalog/storage-credentials/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public StorageCredentialInfo get(GetStorageCredentialRequest request) { String path = String.format("/api/2.1/unity-catalog/storage-credentials/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, StorageCredentialInfo.class, headers); } @@ -48,7 +45,6 @@ public ListStorageCredentialsResponse list() { String path = "/api/2.1/unity-catalog/storage-credentials"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListStorageCredentialsResponse.class, headers); } @@ -58,7 +54,6 @@ public StorageCredentialInfo update(UpdateStorageCredential request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, StorageCredentialInfo.class, headers); } @@ -68,7 +63,6 @@ public ValidateStorageCredentialResponse validate(ValidateStorageCredential requ Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ValidateStorageCredentialResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java index ad9543bb9..1bcaceeb6 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java @@ -23,7 +23,6 @@ public TagSubentityAssignmentsList list(ListSubentityTagsRequest request) { request.getSecurableType(), request.getFullName(), request.getSubentityName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, TagSubentityAssignmentsList.class, headers); } @@ -36,7 +35,6 @@ public TagSubentityAssignmentsList update(UpdateTags request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, TagSubentityAssignmentsList.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasImpl.java index 3fcf2ffdf..fdc106cef 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SystemSchemasImpl.java @@ -23,7 +23,6 @@ public void disable(DisableRequest request) { request.getMetastoreId(), request.getSchemaName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -35,7 +34,6 @@ public void enable(EnableRequest request) { request.getMetastoreId(), request.getSchemaName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } @@ -46,7 +44,6 @@ public ListSystemSchemasResponse list(ListSystemSchemasRequest request) { "/api/2.1/unity-catalog/metastores/%s/systemschemas", request.getMetastoreId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListSystemSchemasResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableConstraintsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableConstraintsImpl.java index 6bb656cf9..2c210d3a4 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableConstraintsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableConstraintsImpl.java @@ -21,7 +21,6 @@ public TableConstraint create(CreateTableConstraint request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, TableConstraint.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteTableConstraintRequest request) { String path = String.format("/api/2.1/unity-catalog/constraints/%s", request.getFullName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java index c2503ba7f..53b043863 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java @@ -20,7 +20,6 @@ public void delete(DeleteTableRequest request) { String path = String.format("/api/2.1/unity-catalog/tables/%s", request.getFullName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -29,7 +28,6 @@ public TableInfo get(GetTableRequest request) { String path = String.format("/api/2.1/unity-catalog/tables/%s", request.getFullName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, TableInfo.class, headers); } @@ -38,7 +36,6 @@ public ListTablesResponse list(ListTablesRequest request) { String path = "/api/2.1/unity-catalog/tables"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListTablesResponse.class, headers); } @@ -47,7 +44,6 @@ public ListTableSummariesResponse listSummaries(ListSummariesRequest request) { String path = "/api/2.1/unity-catalog/table-summaries"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListTableSummariesResponse.class, headers); } @@ -57,7 +53,6 @@ public void update(UpdateTableRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java index 966615b88..26382aefc 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/VolumesImpl.java @@ -21,7 +21,6 @@ public VolumeInfo create(CreateVolumeRequestContent request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, VolumeInfo.class, headers); } @@ -37,7 +36,6 @@ public ListVolumesResponseContent list(ListVolumesRequest request) { String path = "/api/2.1/unity-catalog/volumes"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListVolumesResponseContent.class, headers); } @@ -46,7 +44,6 @@ public VolumeInfo read(ReadVolumeRequest request) { String path = String.format("/api/2.1/unity-catalog/volumes/%s", request.getFullNameArg()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, VolumeInfo.class, headers); } @@ -56,7 +53,6 @@ public VolumeInfo update(UpdateVolumeRequestContent request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, VolumeInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/WorkspaceBindingsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/WorkspaceBindingsImpl.java index 561cef4e2..1c0721e03 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/WorkspaceBindingsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/WorkspaceBindingsImpl.java @@ -21,7 +21,6 @@ public CurrentWorkspaceBindings get(GetWorkspaceBindingRequest request) { String.format("/api/2.1/unity-catalog/workspace-bindings/catalogs/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, CurrentWorkspaceBindings.class, headers); } @@ -32,7 +31,6 @@ public CurrentWorkspaceBindings update(UpdateWorkspaceBindings request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, CurrentWorkspaceBindings.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterPoliciesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterPoliciesImpl.java index 6a00fb0db..6abd470c5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterPoliciesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterPoliciesImpl.java @@ -21,7 +21,6 @@ public CreatePolicyResponse create(CreatePolicy request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreatePolicyResponse.class, headers); } @@ -31,7 +30,6 @@ public void delete(DeletePolicy request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -41,7 +39,6 @@ public void edit(EditPolicy request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -50,7 +47,6 @@ public Policy get(GetClusterPolicyRequest request) { String path = "/api/2.0/policies/clusters/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Policy.class, headers); } @@ -63,7 +59,6 @@ public GetClusterPolicyPermissionLevelsResponse getClusterPolicyPermissionLevels request.getClusterPolicyId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetClusterPolicyPermissionLevelsResponse.class, headers); } @@ -74,7 +69,6 @@ public ClusterPolicyPermissions getClusterPolicyPermissions( String.format("/api/2.0/permissions/cluster-policies/%s", request.getClusterPolicyId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ClusterPolicyPermissions.class, headers); } @@ -83,7 +77,6 @@ public ListPoliciesResponse list(ListClusterPoliciesRequest request) { String path = "/api/2.0/policies/clusters/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListPoliciesResponse.class, headers); } @@ -95,7 +88,6 @@ public ClusterPolicyPermissions setClusterPolicyPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, ClusterPolicyPermissions.class, headers); } @@ -107,7 +99,6 @@ public ClusterPolicyPermissions updateClusterPolicyPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ClusterPolicyPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClustersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClustersImpl.java index a5c535c72..b4dbf7987 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClustersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClustersImpl.java @@ -21,7 +21,6 @@ public void changeOwner(ChangeClusterOwner request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -31,7 +30,6 @@ public CreateClusterResponse create(CreateCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateClusterResponse.class, headers); } @@ -41,7 +39,6 @@ public void delete(DeleteCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -51,7 +48,6 @@ public void edit(EditCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -61,7 +57,6 @@ public GetEventsResponse events(GetEvents request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, GetEventsResponse.class, headers); } @@ -70,7 +65,6 @@ public ClusterDetails get(GetClusterRequest request) { String path = "/api/2.0/clusters/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ClusterDetails.class, headers); } @@ -81,7 +75,6 @@ public GetClusterPermissionLevelsResponse getClusterPermissionLevels( String.format("/api/2.0/permissions/clusters/%s/permissionLevels", request.getClusterId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetClusterPermissionLevelsResponse.class, headers); } @@ -90,7 +83,6 @@ public ClusterPermissions getClusterPermissions(GetClusterPermissionsRequest req String path = String.format("/api/2.0/permissions/clusters/%s", request.getClusterId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ClusterPermissions.class, headers); } @@ -99,7 +91,6 @@ public ListClustersResponse list(ListClustersRequest request) { String path = "/api/2.0/clusters/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListClustersResponse.class, headers); } @@ -108,7 +99,6 @@ public ListNodeTypesResponse listNodeTypes() { String path = "/api/2.0/clusters/list-node-types"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListNodeTypesResponse.class, headers); } @@ -117,7 +107,6 @@ public ListAvailableZonesResponse listZones() { String path = "/api/2.0/clusters/list-zones"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListAvailableZonesResponse.class, headers); } @@ -127,7 +116,6 @@ public void permanentDelete(PermanentDeleteCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -137,7 +125,6 @@ public void pin(PinCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -147,7 +134,6 @@ public void resize(ResizeCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -157,7 +143,6 @@ public void restart(RestartCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -167,7 +152,6 @@ public ClusterPermissions setClusterPermissions(ClusterPermissionsRequest reques Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, ClusterPermissions.class, headers); } @@ -176,7 +160,6 @@ public GetSparkVersionsResponse sparkVersions() { String path = "/api/2.0/clusters/spark-versions"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetSparkVersionsResponse.class, headers); } @@ -186,7 +169,6 @@ public void start(StartCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -196,7 +178,6 @@ public void unpin(UnpinCluster request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -206,7 +187,6 @@ public ClusterPermissions updateClusterPermissions(ClusterPermissionsRequest req Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ClusterPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CommandExecutionImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CommandExecutionImpl.java index e94d0591f..1a53931e9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CommandExecutionImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CommandExecutionImpl.java @@ -21,7 +21,6 @@ public void cancel(CancelCommand request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -30,7 +29,6 @@ public CommandStatusResponse commandStatus(CommandStatusRequest request) { String path = "/api/1.2/commands/status"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, CommandStatusResponse.class, headers); } @@ -39,7 +37,6 @@ public ContextStatusResponse contextStatus(ContextStatusRequest request) { String path = "/api/1.2/contexts/status"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ContextStatusResponse.class, headers); } @@ -49,7 +46,6 @@ public Created create(CreateContext request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Created.class, headers); } @@ -59,7 +55,6 @@ public void destroy(DestroyContext request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -69,7 +64,6 @@ public Created execute(Command request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Created.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java index cd88c28e4..fcb1bac9c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/GlobalInitScriptsImpl.java @@ -21,7 +21,6 @@ public CreateResponse create(GlobalInitScriptCreateRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateResponse.class, headers); } @@ -37,7 +36,6 @@ public GlobalInitScriptDetailsWithContent get(GetGlobalInitScriptRequest request String path = String.format("/api/2.0/global-init-scripts/%s", request.getScriptId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GlobalInitScriptDetailsWithContent.class, headers); } @@ -46,7 +44,6 @@ public ListGlobalInitScriptsResponse list() { String path = "/api/2.0/global-init-scripts"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListGlobalInitScriptsResponse.class, headers); } @@ -55,7 +52,6 @@ public void update(GlobalInitScriptUpdateRequest request) { String path = String.format("/api/2.0/global-init-scripts/%s", request.getScriptId()); Map headers = new HashMap<>(); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolsImpl.java index 8e35d6da5..3efdb23d1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolsImpl.java @@ -21,7 +21,6 @@ public CreateInstancePoolResponse create(CreateInstancePool request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateInstancePoolResponse.class, headers); } @@ -31,7 +30,6 @@ public void delete(DeleteInstancePool request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -41,7 +39,6 @@ public void edit(EditInstancePool request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -50,7 +47,6 @@ public GetInstancePool get(GetInstancePoolRequest request) { String path = "/api/2.0/instance-pools/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetInstancePool.class, headers); } @@ -62,7 +58,6 @@ public GetInstancePoolPermissionLevelsResponse getInstancePoolPermissionLevels( "/api/2.0/permissions/instance-pools/%s/permissionLevels", request.getInstancePoolId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetInstancePoolPermissionLevelsResponse.class, headers); } @@ -73,7 +68,6 @@ public InstancePoolPermissions getInstancePoolPermissions( String.format("/api/2.0/permissions/instance-pools/%s", request.getInstancePoolId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, InstancePoolPermissions.class, headers); } @@ -82,7 +76,6 @@ public ListInstancePools list() { String path = "/api/2.0/instance-pools/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListInstancePools.class, headers); } @@ -94,7 +87,6 @@ public InstancePoolPermissions setInstancePoolPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, InstancePoolPermissions.class, headers); } @@ -106,7 +98,6 @@ public InstancePoolPermissions updateInstancePoolPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, InstancePoolPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstanceProfilesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstanceProfilesImpl.java index ef5b800a4..cd90cac4d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstanceProfilesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstanceProfilesImpl.java @@ -21,7 +21,6 @@ public void add(AddInstanceProfile request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -31,7 +30,6 @@ public void edit(InstanceProfile request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -40,7 +38,6 @@ public ListInstanceProfilesResponse list() { String path = "/api/2.0/instance-profiles/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListInstanceProfilesResponse.class, headers); } @@ -50,7 +47,6 @@ public void remove(RemoveInstanceProfile request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LibrariesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LibrariesImpl.java index 7360fd0d7..de279ca31 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LibrariesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LibrariesImpl.java @@ -20,7 +20,6 @@ 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); } @@ -29,7 +28,6 @@ public ClusterLibraryStatuses clusterStatus(ClusterStatusRequest 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); } @@ -39,7 +37,6 @@ public void install(InstallLibraries request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -49,7 +46,6 @@ public void uninstall(UninstallLibraries request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/PolicyFamiliesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/PolicyFamiliesImpl.java index 2d258e86a..9902a2134 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/PolicyFamiliesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/PolicyFamiliesImpl.java @@ -20,7 +20,6 @@ public PolicyFamily get(GetPolicyFamilyRequest request) { String path = String.format("/api/2.0/policy-families/%s", request.getPolicyFamilyId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, PolicyFamily.class, headers); } @@ -29,7 +28,6 @@ public ListPolicyFamiliesResponse list(ListPolicyFamiliesRequest request) { String path = "/api/2.0/policy-families"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListPolicyFamiliesResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java index f32bc63df..6a1efb994 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DbfsImpl.java @@ -21,7 +21,6 @@ public void addBlock(AddBlock request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -31,7 +30,6 @@ public void close(Close request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -41,7 +39,6 @@ public CreateResponse create(Create request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateResponse.class, headers); } @@ -51,7 +48,6 @@ public void delete(Delete request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -60,7 +56,6 @@ public FileInfo getStatus(GetStatusRequest request) { String path = "/api/2.0/dbfs/get-status"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, FileInfo.class, headers); } @@ -69,7 +64,6 @@ public ListStatusResponse list(ListDbfsRequest request) { String path = "/api/2.0/dbfs/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListStatusResponse.class, headers); } @@ -79,7 +73,6 @@ public void mkdirs(MkDirs request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -89,7 +82,6 @@ public void move(Move request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -99,7 +91,6 @@ public void put(Put request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -108,7 +99,6 @@ public ReadResponse read(ReadDbfsRequest request) { String path = "/api/2.0/dbfs/read"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ReadResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java new file mode 100755 index 000000000..810be7b4b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.files; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Delete a file or directory */ +@Generated +public class DeleteFileRequest { + /** The absolute path of the file or directory in DBFS. */ + private String filePath; + + public DeleteFileRequest setFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + public String getFilePath() { + return filePath; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeleteFileRequest that = (DeleteFileRequest) o; + return Objects.equals(filePath, that.filePath); + } + + @Override + public int hashCode() { + return Objects.hash(filePath); + } + + @Override + public String toString() { + return new ToStringer(DeleteFileRequest.class).add("filePath", filePath).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java new file mode 100755 index 000000000..5c1664bab --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.files; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Download a file */ +@Generated +public class DownloadFileRequest { + /** The absolute path of the file or directory in DBFS. */ + private String filePath; + + public DownloadFileRequest setFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + public String getFilePath() { + return filePath; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DownloadFileRequest that = (DownloadFileRequest) o; + return Objects.equals(filePath, that.filePath); + } + + @Override + public int hashCode() { + return Objects.hash(filePath); + } + + @Override + public String toString() { + return new ToStringer(DownloadFileRequest.class).add("filePath", filePath).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java new file mode 100755 index 000000000..1c096c0e0 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java @@ -0,0 +1,40 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.files; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +@Generated +public class DownloadFileResponse { + /** */ + private Object /* MISSING TYPE */ contents; + + public DownloadFileResponse setContents(Object /* MISSING TYPE */ contents) { + this.contents = contents; + return this; + } + + public Object /* MISSING TYPE */ getContents() { + return contents; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DownloadFileResponse that = (DownloadFileResponse) o; + return Objects.equals(contents, that.contents); + } + + @Override + public int hashCode() { + return Objects.hash(contents); + } + + @Override + public String toString() { + return new ToStringer(DownloadFileResponse.class).add("contents", contents).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java new file mode 100755 index 000000000..28e9db914 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java @@ -0,0 +1,84 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.files; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * The Files API allows you to read, write, and delete files and directories in Unity Catalog + * volumes. + */ +@Generated +public class FilesAPI { + private static final Logger LOG = LoggerFactory.getLogger(FilesAPI.class); + + private final FilesService impl; + + /** Regular-use constructor */ + public FilesAPI(ApiClient apiClient) { + impl = new FilesImpl(apiClient); + } + + /** Constructor for mocks */ + public FilesAPI(FilesService mock) { + impl = mock; + } + + public void deleteFile(String filePath) { + deleteFile(new DeleteFileRequest().setFilePath(filePath)); + } + + /** + * Delete a file or directory. + * + *

Deletes a file or directory. + */ + public void deleteFile(DeleteFileRequest request) { + impl.deleteFile(request); + } + + public DownloadFileResponse downloadFile(String filePath) { + return downloadFile(new DownloadFileRequest().setFilePath(filePath)); + } + + /** + * Download a file. + * + *

Downloads a file of up to 2 GiB. + */ + public DownloadFileResponse downloadFile(DownloadFileRequest request) { + return impl.downloadFile(request); + } + + public FileInfo getStatus(String path) { + return getStatus(new GetStatusRequest().setPath(path)); + } + + /** + * Get the status of a file or directory. + * + *

Returns the status of a file or directory. + */ + public FileInfo getStatus(GetStatusRequest request) { + return impl.getStatus(request); + } + + public void uploadFile(String filePath, Object /* MISSING TYPE */ contents) { + uploadFile(new UploadFileRequest().setFilePath(filePath).setContents(contents)); + } + + /** + * Upload a file. + * + *

Uploads a file of up to 2 GiB. + */ + public void uploadFile(UploadFileRequest request) { + impl.uploadFile(request); + } + + public FilesService impl() { + return impl; + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java new file mode 100755 index 000000000..f0a473efa --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java @@ -0,0 +1,48 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.files; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; + +/** Package-local implementation of Files */ +@Generated +class FilesImpl implements FilesService { + private final ApiClient apiClient; + + public FilesImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public void deleteFile(DeleteFileRequest request) { + String path = String.format("/api/2.0/fs/files/%s", request.getFilePath()); + Map headers = new HashMap<>(); + apiClient.DELETE(path, request, Void.class, headers); + } + + @Override + public DownloadFileResponse downloadFile(DownloadFileRequest request) { + String path = String.format("/api/2.0/fs/files/%s", request.getFilePath()); + Map headers = new HashMap<>(); + headers.put("Accept", "application/octet-stream"); + return apiClient.GET(path, request, DownloadFileResponse.class, headers); + } + + @Override + public FileInfo getStatus(GetStatusRequest request) { + String path = "/api/2.0/fs/get-status"; + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + return apiClient.GET(path, request, FileInfo.class, headers); + } + + @Override + public void uploadFile(UploadFileRequest request) { + String path = String.format("/api/2.0/fs/files/%s", request.getFilePath()); + Map headers = new HashMap<>(); + headers.put("Content-Type", "application/octet-stream"); + apiClient.PUT(path, request, Void.class, headers); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java new file mode 100755 index 000000000..de0c0c2d6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.files; + +import com.databricks.sdk.support.Generated; + +/** + * The Files API allows you to read, write, and delete files and directories in Unity Catalog + * volumes. + * + *

This is the high-level interface, that contains generated methods. + * + *

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface FilesService { + /** + * Delete a file or directory. + * + *

Deletes a file or directory. + */ + void deleteFile(DeleteFileRequest deleteFileRequest); + + /** + * Download a file. + * + *

Downloads a file of up to 2 GiB. + */ + DownloadFileResponse downloadFile(DownloadFileRequest downloadFileRequest); + + /** + * Get the status of a file or directory. + * + *

Returns the status of a file or directory. + */ + FileInfo getStatus(GetStatusRequest getStatusRequest); + + /** + * Upload a file. + * + *

Uploads a file of up to 2 GiB. + */ + void uploadFile(UploadFileRequest uploadFileRequest); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java new file mode 100755 index 000000000..69d800b80 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java @@ -0,0 +1,73 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.files; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Upload a file */ +@Generated +public class UploadFileRequest { + /** */ + private Object /* MISSING TYPE */ contents; + + /** The absolute path of the file or directory in DBFS. */ + private String filePath; + + /** The flag that specifies whether to overwrite existing file/files. */ + @QueryParam("overwrite") + private Boolean overwrite; + + public UploadFileRequest setContents(Object /* MISSING TYPE */ contents) { + this.contents = contents; + return this; + } + + public Object /* MISSING TYPE */ getContents() { + return contents; + } + + public UploadFileRequest setFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + public String getFilePath() { + return filePath; + } + + public UploadFileRequest setOverwrite(Boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + public Boolean getOverwrite() { + return overwrite; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UploadFileRequest that = (UploadFileRequest) o; + return Objects.equals(contents, that.contents) + && Objects.equals(filePath, that.filePath) + && Objects.equals(overwrite, that.overwrite); + } + + @Override + public int hashCode() { + return Objects.hash(contents, filePath, overwrite); + } + + @Override + public String toString() { + return new ToStringer(UploadFileRequest.class) + .add("contents", contents) + .add("filePath", filePath) + .add("overwrite", overwrite) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlImpl.java index 68e14906a..43bc13198 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlImpl.java @@ -24,7 +24,6 @@ public GetAssignableRolesForResourceResponse getAssignableRolesForResource( apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetAssignableRolesForResourceResponse.class, headers); } @@ -36,7 +35,6 @@ public RuleSetResponse getRuleSet(GetRuleSetRequest request) { apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, RuleSetResponse.class, headers); } @@ -49,7 +47,6 @@ public RuleSetResponse updateRuleSet(UpdateRuleSetRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, RuleSetResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlProxyImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlProxyImpl.java index 609675279..b3292da04 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlProxyImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountAccessControlProxyImpl.java @@ -21,7 +21,6 @@ public GetAssignableRolesForResourceResponse getAssignableRolesForResource( String path = "/api/2.0/preview/accounts/access-control/assignable-roles"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetAssignableRolesForResourceResponse.class, headers); } @@ -30,7 +29,6 @@ public RuleSetResponse getRuleSet(GetRuleSetRequest request) { String path = "/api/2.0/preview/accounts/access-control/rule-sets"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, RuleSetResponse.class, headers); } @@ -40,7 +38,6 @@ public RuleSetResponse updateRuleSet(UpdateRuleSetRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, RuleSetResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java index 5a1f526e1..13017f65b 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountGroupsImpl.java @@ -22,7 +22,6 @@ public Group create(Group request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Group.class, headers); } @@ -44,7 +43,6 @@ public Group get(GetAccountGroupRequest request) { apiClient.configuredAccountID(), request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Group.class, headers); } @@ -54,7 +52,6 @@ public ListGroupsResponse list(ListAccountGroupsRequest request) { String.format("/api/2.0/accounts/%s/scim/v2/Groups", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListGroupsResponse.class, headers); } @@ -67,7 +64,6 @@ public void patch(PartialUpdate request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -80,7 +76,6 @@ public void update(Group request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java index 7fcf2bdd8..af1163981 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountServicePrincipalsImpl.java @@ -23,7 +23,6 @@ public ServicePrincipal create(ServicePrincipal request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ServicePrincipal.class, headers); } @@ -45,7 +44,6 @@ public ServicePrincipal get(GetAccountServicePrincipalRequest request) { apiClient.configuredAccountID(), request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ServicePrincipal.class, headers); } @@ -56,7 +54,6 @@ public ListServicePrincipalResponse list(ListAccountServicePrincipalsRequest req "/api/2.0/accounts/%s/scim/v2/ServicePrincipals", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListServicePrincipalResponse.class, headers); } @@ -69,7 +66,6 @@ public void patch(PartialUpdate request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -82,7 +78,6 @@ public void update(ServicePrincipal request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java index 6fdd8e50d..f80624783 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/AccountUsersImpl.java @@ -22,7 +22,6 @@ public User create(User request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, User.class, headers); } @@ -44,7 +43,6 @@ public User get(GetAccountUserRequest request) { apiClient.configuredAccountID(), request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, User.class, headers); } @@ -54,7 +52,6 @@ public ListUsersResponse list(ListAccountUsersRequest request) { String.format("/api/2.0/accounts/%s/scim/v2/Users", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListUsersResponse.class, headers); } @@ -67,7 +64,6 @@ public void patch(PartialUpdate request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -80,7 +76,6 @@ public void update(User request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/CurrentUserImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/CurrentUserImpl.java index 45e3f627e..d33b0f8b1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/CurrentUserImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/CurrentUserImpl.java @@ -20,7 +20,6 @@ public User me() { String path = "/api/2.0/preview/scim/v2/Me"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, User.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java index ebb5f2d83..9b26ca969 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java @@ -21,7 +21,6 @@ public Group create(Group request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Group.class, headers); } @@ -37,7 +36,6 @@ public Group get(GetGroupRequest request) { String path = String.format("/api/2.0/preview/scim/v2/Groups/%s", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Group.class, headers); } @@ -46,7 +44,6 @@ public ListGroupsResponse list(ListGroupsRequest request) { String path = "/api/2.0/preview/scim/v2/Groups"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListGroupsResponse.class, headers); } @@ -56,7 +53,6 @@ public void patch(PartialUpdate request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -66,7 +62,6 @@ public void update(Group request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/PermissionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/PermissionsImpl.java index 9491b26b6..cd11548dd 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/PermissionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/PermissionsImpl.java @@ -23,7 +23,6 @@ public ObjectPermissions get(GetPermissionRequest request) { request.getRequestObjectType(), request.getRequestObjectId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ObjectPermissions.class, headers); } @@ -35,7 +34,6 @@ public GetPermissionLevelsResponse getPermissionLevels(GetPermissionLevelsReques request.getRequestObjectType(), request.getRequestObjectId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetPermissionLevelsResponse.class, headers); } @@ -48,7 +46,6 @@ public ObjectPermissions set(PermissionsRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, ObjectPermissions.class, headers); } @@ -61,7 +58,6 @@ public ObjectPermissions update(PermissionsRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ObjectPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java index b5580ce83..a67321a33 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java @@ -21,7 +21,6 @@ public ServicePrincipal create(ServicePrincipal request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ServicePrincipal.class, headers); } @@ -37,7 +36,6 @@ public ServicePrincipal get(GetServicePrincipalRequest request) { String path = String.format("/api/2.0/preview/scim/v2/ServicePrincipals/%s", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ServicePrincipal.class, headers); } @@ -46,7 +44,6 @@ public ListServicePrincipalResponse list(ListServicePrincipalsRequest request) { String path = "/api/2.0/preview/scim/v2/ServicePrincipals"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListServicePrincipalResponse.class, headers); } @@ -56,7 +53,6 @@ public void patch(PartialUpdate request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -66,7 +62,6 @@ public void update(ServicePrincipal request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java index e925dd4e0..74e2d5915 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java @@ -21,7 +21,6 @@ public User create(User request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, User.class, headers); } @@ -37,7 +36,6 @@ public User get(GetUserRequest request) { String path = String.format("/api/2.0/preview/scim/v2/Users/%s", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, User.class, headers); } @@ -46,7 +44,6 @@ public GetPasswordPermissionLevelsResponse getPasswordPermissionLevels() { String path = "/api/2.0/permissions/authorization/passwords/permissionLevels"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetPasswordPermissionLevelsResponse.class, headers); } @@ -55,7 +52,6 @@ public PasswordPermissions getPasswordPermissions() { String path = "/api/2.0/permissions/authorization/passwords"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, PasswordPermissions.class, headers); } @@ -64,7 +60,6 @@ public ListUsersResponse list(ListUsersRequest request) { String path = "/api/2.0/preview/scim/v2/Users"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListUsersResponse.class, headers); } @@ -74,7 +69,6 @@ public void patch(PartialUpdate request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -84,7 +78,6 @@ public PasswordPermissions setPasswordPermissions(PasswordPermissionsRequest req Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, PasswordPermissions.class, headers); } @@ -94,7 +87,6 @@ public void update(User request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } @@ -104,7 +96,6 @@ public PasswordPermissions updatePasswordPermissions(PasswordPermissionsRequest Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, PasswordPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/WorkspaceAssignmentImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/WorkspaceAssignmentImpl.java index 1a5c518b9..77f4c5b9a 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/WorkspaceAssignmentImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/WorkspaceAssignmentImpl.java @@ -23,7 +23,6 @@ public void delete(DeleteWorkspaceAssignmentRequest request) { apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -35,7 +34,6 @@ public WorkspacePermissions get(GetWorkspaceAssignmentRequest request) { apiClient.configuredAccountID(), request.getWorkspaceId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, WorkspacePermissions.class, headers); } @@ -47,7 +45,6 @@ public PermissionAssignments list(ListWorkspaceAssignmentRequest request) { apiClient.configuredAccountID(), request.getWorkspaceId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, PermissionAssignments.class, headers); } @@ -60,7 +57,6 @@ public void update(UpdateWorkspaceAssignments request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobsImpl.java index c853b3e1b..b2f3fe6cf 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobsImpl.java @@ -21,7 +21,6 @@ public void cancelAllRuns(CancelAllRuns request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -31,7 +30,6 @@ public void cancelRun(CancelRun request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -41,7 +39,6 @@ public CreateResponse create(CreateJob request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateResponse.class, headers); } @@ -51,7 +48,6 @@ public void delete(DeleteJob request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -61,7 +57,6 @@ public void deleteRun(DeleteRun request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -70,7 +65,6 @@ public ExportRunOutput exportRun(ExportRunRequest request) { String path = "/api/2.1/jobs/runs/export"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ExportRunOutput.class, headers); } @@ -79,7 +73,6 @@ public Job get(GetJobRequest request) { String path = "/api/2.1/jobs/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Job.class, headers); } @@ -90,7 +83,6 @@ public GetJobPermissionLevelsResponse getJobPermissionLevels( String.format("/api/2.0/permissions/jobs/%s/permissionLevels", request.getJobId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetJobPermissionLevelsResponse.class, headers); } @@ -99,7 +91,6 @@ public JobPermissions getJobPermissions(GetJobPermissionsRequest request) { String path = String.format("/api/2.0/permissions/jobs/%s", request.getJobId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, JobPermissions.class, headers); } @@ -108,7 +99,6 @@ public Run getRun(GetRunRequest request) { String path = "/api/2.1/jobs/runs/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Run.class, headers); } @@ -117,7 +107,6 @@ public RunOutput getRunOutput(GetRunOutputRequest request) { String path = "/api/2.1/jobs/runs/get-output"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, RunOutput.class, headers); } @@ -126,7 +115,6 @@ public ListJobsResponse list(ListJobsRequest request) { String path = "/api/2.1/jobs/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListJobsResponse.class, headers); } @@ -135,7 +123,6 @@ public ListRunsResponse listRuns(ListRunsRequest request) { String path = "/api/2.1/jobs/runs/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListRunsResponse.class, headers); } @@ -145,7 +132,6 @@ public RepairRunResponse repairRun(RepairRun request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, RepairRunResponse.class, headers); } @@ -155,7 +141,6 @@ public void reset(ResetJob request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -165,7 +150,6 @@ public RunNowResponse runNow(RunNow request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, RunNowResponse.class, headers); } @@ -175,7 +159,6 @@ public JobPermissions setJobPermissions(JobPermissionsRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, JobPermissions.class, headers); } @@ -185,7 +168,6 @@ public SubmitRunResponse submit(SubmitRun request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, SubmitRunResponse.class, headers); } @@ -195,7 +177,6 @@ public void update(UpdateJob request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -205,7 +186,6 @@ public JobPermissions updateJobPermissions(JobPermissionsRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, JobPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java index b30adfba1..d30d19482 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExperimentsImpl.java @@ -21,7 +21,6 @@ public CreateExperimentResponse createExperiment(CreateExperiment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateExperimentResponse.class, headers); } @@ -31,7 +30,6 @@ public CreateRunResponse createRun(CreateRun request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateRunResponse.class, headers); } @@ -41,7 +39,6 @@ public void deleteExperiment(DeleteExperiment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -51,7 +48,6 @@ public void deleteRun(DeleteRun request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -61,7 +57,6 @@ public DeleteRunsResponse deleteRuns(DeleteRuns request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, DeleteRunsResponse.class, headers); } @@ -71,7 +66,6 @@ public void deleteTag(DeleteTag request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -80,7 +74,6 @@ public GetExperimentByNameResponse getByName(GetByNameRequest request) { String path = "/api/2.0/mlflow/experiments/get-by-name"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetExperimentByNameResponse.class, headers); } @@ -89,7 +82,6 @@ public Experiment getExperiment(GetExperimentRequest request) { String path = "/api/2.0/mlflow/experiments/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Experiment.class, headers); } @@ -101,7 +93,6 @@ public GetExperimentPermissionLevelsResponse getExperimentPermissionLevels( "/api/2.0/permissions/experiments/%s/permissionLevels", request.getExperimentId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetExperimentPermissionLevelsResponse.class, headers); } @@ -110,7 +101,6 @@ public ExperimentPermissions getExperimentPermissions(GetExperimentPermissionsRe String path = String.format("/api/2.0/permissions/experiments/%s", request.getExperimentId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ExperimentPermissions.class, headers); } @@ -119,7 +109,6 @@ public GetMetricHistoryResponse getHistory(GetHistoryRequest request) { String path = "/api/2.0/mlflow/metrics/get-history"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetMetricHistoryResponse.class, headers); } @@ -128,7 +117,6 @@ public GetRunResponse getRun(GetRunRequest request) { String path = "/api/2.0/mlflow/runs/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetRunResponse.class, headers); } @@ -137,7 +125,6 @@ public ListArtifactsResponse listArtifacts(ListArtifactsRequest request) { String path = "/api/2.0/mlflow/artifacts/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListArtifactsResponse.class, headers); } @@ -146,7 +133,6 @@ public ListExperimentsResponse listExperiments(ListExperimentsRequest request) { String path = "/api/2.0/mlflow/experiments/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListExperimentsResponse.class, headers); } @@ -156,7 +142,6 @@ public void logBatch(LogBatch request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -166,7 +151,6 @@ public void logInputs(LogInputs request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -176,7 +160,6 @@ public void logMetric(LogMetric request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -186,7 +169,6 @@ public void logModel(LogModel request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -196,7 +178,6 @@ public void logParam(LogParam request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -206,7 +187,6 @@ public void restoreExperiment(RestoreExperiment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -216,7 +196,6 @@ public void restoreRun(RestoreRun request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -226,7 +205,6 @@ public RestoreRunsResponse restoreRuns(RestoreRuns request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, RestoreRunsResponse.class, headers); } @@ -236,7 +214,6 @@ public SearchExperimentsResponse searchExperiments(SearchExperiments request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, SearchExperimentsResponse.class, headers); } @@ -246,7 +223,6 @@ public SearchRunsResponse searchRuns(SearchRuns request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, SearchRunsResponse.class, headers); } @@ -256,7 +232,6 @@ public ExperimentPermissions setExperimentPermissions(ExperimentPermissionsReque Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, ExperimentPermissions.class, headers); } @@ -266,7 +241,6 @@ public void setExperimentTag(SetExperimentTag request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -276,7 +250,6 @@ public void setTag(SetTag request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -286,7 +259,6 @@ public void updateExperiment(UpdateExperiment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -296,7 +268,6 @@ public ExperimentPermissions updateExperimentPermissions(ExperimentPermissionsRe Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ExperimentPermissions.class, headers); } @@ -306,7 +277,6 @@ public UpdateRunResponse updateRun(UpdateRun request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, UpdateRunResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryImpl.java index 8cc8249bf..15d0b8160 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryImpl.java @@ -22,7 +22,6 @@ public ApproveTransitionRequestResponse approveTransitionRequest( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ApproveTransitionRequestResponse.class, headers); } @@ -32,7 +31,6 @@ public CreateCommentResponse createComment(CreateComment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateCommentResponse.class, headers); } @@ -42,7 +40,6 @@ public CreateModelResponse createModel(CreateModelRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateModelResponse.class, headers); } @@ -52,7 +49,6 @@ public CreateModelVersionResponse createModelVersion(CreateModelVersionRequest r Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateModelVersionResponse.class, headers); } @@ -62,7 +58,6 @@ public CreateTransitionRequestResponse createTransitionRequest(CreateTransitionR Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateTransitionRequestResponse.class, headers); } @@ -72,7 +67,6 @@ public CreateWebhookResponse createWebhook(CreateRegistryWebhook request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateWebhookResponse.class, headers); } @@ -81,7 +75,6 @@ public void deleteComment(DeleteCommentRequest request) { String path = "/api/2.0/mlflow/comments/delete"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -90,7 +83,6 @@ public void deleteModel(DeleteModelRequest request) { String path = "/api/2.0/mlflow/registered-models/delete"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -99,7 +91,6 @@ public void deleteModelTag(DeleteModelTagRequest request) { String path = "/api/2.0/mlflow/registered-models/delete-tag"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -108,7 +99,6 @@ public void deleteModelVersion(DeleteModelVersionRequest request) { String path = "/api/2.0/mlflow/model-versions/delete"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -117,7 +107,6 @@ public void deleteModelVersionTag(DeleteModelVersionTagRequest request) { String path = "/api/2.0/mlflow/model-versions/delete-tag"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -126,7 +115,6 @@ public void deleteTransitionRequest(DeleteTransitionRequestRequest request) { String path = "/api/2.0/mlflow/transition-requests/delete"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -135,7 +123,6 @@ public void deleteWebhook(DeleteWebhookRequest request) { String path = "/api/2.0/mlflow/registry-webhooks/delete"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -145,7 +132,6 @@ public GetLatestVersionsResponse getLatestVersions(GetLatestVersionsRequest requ Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, GetLatestVersionsResponse.class, headers); } @@ -154,7 +140,6 @@ public GetModelResponse getModel(GetModelRequest request) { String path = "/api/2.0/mlflow/databricks/registered-models/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetModelResponse.class, headers); } @@ -163,7 +148,6 @@ public GetModelVersionResponse getModelVersion(GetModelVersionRequest request) { String path = "/api/2.0/mlflow/model-versions/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetModelVersionResponse.class, headers); } @@ -173,7 +157,6 @@ public GetModelVersionDownloadUriResponse getModelVersionDownloadUri( String path = "/api/2.0/mlflow/model-versions/get-download-uri"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetModelVersionDownloadUriResponse.class, headers); } @@ -186,7 +169,6 @@ public GetRegisteredModelPermissionLevelsResponse getRegisteredModelPermissionLe request.getRegisteredModelId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetRegisteredModelPermissionLevelsResponse.class, headers); } @@ -197,7 +179,6 @@ public RegisteredModelPermissions getRegisteredModelPermissions( String.format("/api/2.0/permissions/registered-models/%s", request.getRegisteredModelId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, RegisteredModelPermissions.class, headers); } @@ -206,7 +187,6 @@ public ListModelsResponse listModels(ListModelsRequest request) { String path = "/api/2.0/mlflow/registered-models/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListModelsResponse.class, headers); } @@ -216,7 +196,6 @@ public ListTransitionRequestsResponse listTransitionRequests( String path = "/api/2.0/mlflow/transition-requests/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListTransitionRequestsResponse.class, headers); } @@ -225,7 +204,6 @@ public ListRegistryWebhooks listWebhooks(ListWebhooksRequest request) { String path = "/api/2.0/mlflow/registry-webhooks/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListRegistryWebhooks.class, headers); } @@ -235,7 +213,6 @@ public RejectTransitionRequestResponse rejectTransitionRequest(RejectTransitionR Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, RejectTransitionRequestResponse.class, headers); } @@ -245,7 +222,6 @@ public RenameModelResponse renameModel(RenameModelRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, RenameModelResponse.class, headers); } @@ -254,7 +230,6 @@ public SearchModelVersionsResponse searchModelVersions(SearchModelVersionsReques String path = "/api/2.0/mlflow/model-versions/search"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, SearchModelVersionsResponse.class, headers); } @@ -263,7 +238,6 @@ public SearchModelsResponse searchModels(SearchModelsRequest request) { String path = "/api/2.0/mlflow/registered-models/search"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, SearchModelsResponse.class, headers); } @@ -273,7 +247,6 @@ public void setModelTag(SetModelTagRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -283,7 +256,6 @@ public void setModelVersionTag(SetModelVersionTagRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -295,7 +267,6 @@ public RegisteredModelPermissions setRegisteredModelPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, RegisteredModelPermissions.class, headers); } @@ -305,7 +276,6 @@ public TestRegistryWebhookResponse testRegistryWebhook(TestRegistryWebhookReques Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, TestRegistryWebhookResponse.class, headers); } @@ -315,7 +285,6 @@ public TransitionStageResponse transitionStage(TransitionModelVersionStageDatabr Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, TransitionStageResponse.class, headers); } @@ -325,7 +294,6 @@ public UpdateCommentResponse updateComment(UpdateComment request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, UpdateCommentResponse.class, headers); } @@ -335,7 +303,6 @@ public void updateModel(UpdateModelRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -345,7 +312,6 @@ public void updateModelVersion(UpdateModelVersionRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -357,7 +323,6 @@ public RegisteredModelPermissions updateRegisteredModelPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, RegisteredModelPermissions.class, headers); } @@ -367,7 +332,6 @@ public void updateWebhook(UpdateRegistryWebhook request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/CustomAppIntegrationImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/CustomAppIntegrationImpl.java index 654990006..6f662e741 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/CustomAppIntegrationImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/CustomAppIntegrationImpl.java @@ -23,7 +23,6 @@ public CreateCustomAppIntegrationOutput create(CreateCustomAppIntegration reques Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateCustomAppIntegrationOutput.class, headers); } @@ -35,7 +34,6 @@ public void delete(DeleteCustomAppIntegrationRequest request) { apiClient.configuredAccountID(), request.getIntegrationId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -47,7 +45,6 @@ public GetCustomAppIntegrationOutput get(GetCustomAppIntegrationRequest request) apiClient.configuredAccountID(), request.getIntegrationId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetCustomAppIntegrationOutput.class, headers); } @@ -58,7 +55,6 @@ public GetCustomAppIntegrationsOutput list() { "/api/2.0/accounts/%s/oauth2/custom-app-integrations", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetCustomAppIntegrationsOutput.class, headers); } @@ -71,7 +67,6 @@ public void update(UpdateCustomAppIntegration request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/OAuthEnrollmentImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/OAuthEnrollmentImpl.java index 8cb42ad04..66a705da9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/OAuthEnrollmentImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/OAuthEnrollmentImpl.java @@ -21,7 +21,6 @@ public void create(CreateOAuthEnrollment request) { String.format("/api/2.0/accounts/%s/oauth2/enrollment", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -31,7 +30,6 @@ public OAuthEnrollmentStatus get() { String.format("/api/2.0/accounts/%s/oauth2/enrollment", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, OAuthEnrollmentStatus.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/PublishedAppIntegrationImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/PublishedAppIntegrationImpl.java index 387514b89..583d6f4c6 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/PublishedAppIntegrationImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/PublishedAppIntegrationImpl.java @@ -24,7 +24,6 @@ public CreatePublishedAppIntegrationOutput create(CreatePublishedAppIntegration Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreatePublishedAppIntegrationOutput.class, headers); } @@ -36,7 +35,6 @@ public void delete(DeletePublishedAppIntegrationRequest request) { apiClient.configuredAccountID(), request.getIntegrationId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -48,7 +46,6 @@ public GetPublishedAppIntegrationOutput get(GetPublishedAppIntegrationRequest re apiClient.configuredAccountID(), request.getIntegrationId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetPublishedAppIntegrationOutput.class, headers); } @@ -60,7 +57,6 @@ public GetPublishedAppIntegrationsOutput list() { apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetPublishedAppIntegrationsOutput.class, headers); } @@ -73,7 +69,6 @@ public void update(UpdatePublishedAppIntegration request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java index 6b3e28d4c..57f8f9bb1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/ServicePrincipalSecretsImpl.java @@ -23,7 +23,6 @@ public CreateServicePrincipalSecretResponse create(CreateServicePrincipalSecretR apiClient.configuredAccountID(), request.getServicePrincipalId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.POST(path, request, CreateServicePrincipalSecretResponse.class, headers); } @@ -47,7 +46,6 @@ public ListServicePrincipalSecretsResponse list(ListServicePrincipalSecretsReque apiClient.configuredAccountID(), request.getServicePrincipalId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListServicePrincipalSecretsResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelinesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelinesImpl.java index 6cb8551e5..b60b63244 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelinesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelinesImpl.java @@ -21,7 +21,6 @@ public CreatePipelineResponse create(CreatePipeline request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreatePipelineResponse.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeletePipelineRequest request) { String path = String.format("/api/2.0/pipelines/%s", request.getPipelineId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public GetPipelineResponse get(GetPipelineRequest request) { String path = String.format("/api/2.0/pipelines/%s", request.getPipelineId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetPipelineResponse.class, headers); } @@ -51,7 +48,6 @@ public GetPipelinePermissionLevelsResponse getPipelinePermissionLevels( "/api/2.0/permissions/pipelines/%s/permissionLevels", request.getPipelineId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetPipelinePermissionLevelsResponse.class, headers); } @@ -60,7 +56,6 @@ public PipelinePermissions getPipelinePermissions(GetPipelinePermissionsRequest String path = String.format("/api/2.0/permissions/pipelines/%s", request.getPipelineId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, PipelinePermissions.class, headers); } @@ -71,7 +66,6 @@ public GetUpdateResponse getUpdate(GetUpdateRequest request) { "/api/2.0/pipelines/%s/updates/%s", request.getPipelineId(), request.getUpdateId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetUpdateResponse.class, headers); } @@ -80,7 +74,6 @@ public ListPipelineEventsResponse listPipelineEvents(ListPipelineEventsRequest r String path = String.format("/api/2.0/pipelines/%s/events", request.getPipelineId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListPipelineEventsResponse.class, headers); } @@ -89,7 +82,6 @@ public ListPipelinesResponse listPipelines(ListPipelinesRequest request) { String path = "/api/2.0/pipelines"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListPipelinesResponse.class, headers); } @@ -98,7 +90,6 @@ public ListUpdatesResponse listUpdates(ListUpdatesRequest request) { String path = String.format("/api/2.0/pipelines/%s/updates", request.getPipelineId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListUpdatesResponse.class, headers); } @@ -107,7 +98,6 @@ public void reset(ResetRequest request) { String path = String.format("/api/2.0/pipelines/%s/reset", request.getPipelineId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -117,7 +107,6 @@ public PipelinePermissions setPipelinePermissions(PipelinePermissionsRequest req Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, PipelinePermissions.class, headers); } @@ -127,7 +116,6 @@ public StartUpdateResponse startUpdate(StartUpdate request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, StartUpdateResponse.class, headers); } @@ -136,7 +124,6 @@ public void stop(StopRequest request) { String path = String.format("/api/2.0/pipelines/%s/stop", request.getPipelineId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -146,7 +133,6 @@ public void update(EditPipeline request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } @@ -156,7 +142,6 @@ public PipelinePermissions updatePipelinePermissions(PipelinePermissionsRequest Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, PipelinePermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CredentialsImpl.java index fe44997a6..769f1755a 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CredentialsImpl.java @@ -23,7 +23,6 @@ public Credential create(CreateCredentialRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Credential.class, headers); } @@ -35,7 +34,6 @@ public void delete(DeleteCredentialRequest request) { apiClient.configuredAccountID(), request.getCredentialsId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -47,7 +45,6 @@ public Credential get(GetCredentialRequest request) { apiClient.configuredAccountID(), request.getCredentialsId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Credential.class, headers); } @@ -57,7 +54,6 @@ public Collection list() { String.format("/api/2.0/accounts/%s/credentials", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, Credential.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/EncryptionKeysImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/EncryptionKeysImpl.java index 69f5fce58..ef8b82db1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/EncryptionKeysImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/EncryptionKeysImpl.java @@ -24,7 +24,6 @@ public CustomerManagedKey create(CreateCustomerManagedKeyRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CustomerManagedKey.class, headers); } @@ -36,7 +35,6 @@ public void delete(DeleteEncryptionKeyRequest request) { apiClient.configuredAccountID(), request.getCustomerManagedKeyId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -48,7 +46,6 @@ public CustomerManagedKey get(GetEncryptionKeyRequest request) { apiClient.configuredAccountID(), request.getCustomerManagedKeyId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, CustomerManagedKey.class, headers); } @@ -59,7 +56,6 @@ public Collection list() { "/api/2.0/accounts/%s/customer-managed-keys", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, CustomerManagedKey.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/NetworksImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/NetworksImpl.java index c293f2881..023e9060c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/NetworksImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/NetworksImpl.java @@ -22,7 +22,6 @@ public Network create(CreateNetworkRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Network.class, headers); } @@ -34,7 +33,6 @@ public void delete(DeleteNetworkRequest request) { apiClient.configuredAccountID(), request.getNetworkId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -46,7 +44,6 @@ public Network get(GetNetworkRequest request) { apiClient.configuredAccountID(), request.getNetworkId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Network.class, headers); } @@ -55,7 +52,6 @@ public Collection list() { String path = String.format("/api/2.0/accounts/%s/networks", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, Network.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/PrivateAccessImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/PrivateAccessImpl.java index dde0eb486..56ea36a4c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/PrivateAccessImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/PrivateAccessImpl.java @@ -24,7 +24,6 @@ public PrivateAccessSettings create(UpsertPrivateAccessSettingsRequest request) Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, PrivateAccessSettings.class, headers); } @@ -36,7 +35,6 @@ public void delete(DeletePrivateAccesRequest request) { apiClient.configuredAccountID(), request.getPrivateAccessSettingsId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -48,7 +46,6 @@ public PrivateAccessSettings get(GetPrivateAccesRequest request) { apiClient.configuredAccountID(), request.getPrivateAccessSettingsId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, PrivateAccessSettings.class, headers); } @@ -59,7 +56,6 @@ public Collection list() { "/api/2.0/accounts/%s/private-access-settings", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, PrivateAccessSettings.class, headers); } @@ -72,7 +68,6 @@ public void replace(UpsertPrivateAccessSettingsRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/StorageImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/StorageImpl.java index 87bdc0d93..cf6b0a977 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/StorageImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/StorageImpl.java @@ -24,7 +24,6 @@ public StorageConfiguration create(CreateStorageConfigurationRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, StorageConfiguration.class, headers); } @@ -36,7 +35,6 @@ public void delete(DeleteStorageRequest request) { apiClient.configuredAccountID(), request.getStorageConfigurationId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -48,7 +46,6 @@ public StorageConfiguration get(GetStorageRequest request) { apiClient.configuredAccountID(), request.getStorageConfigurationId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, StorageConfiguration.class, headers); } @@ -59,7 +56,6 @@ public Collection list() { "/api/2.0/accounts/%s/storage-configurations", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, StorageConfiguration.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/VpcEndpointsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/VpcEndpointsImpl.java index ad238ba21..065171b28 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/VpcEndpointsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/VpcEndpointsImpl.java @@ -23,7 +23,6 @@ public VpcEndpoint create(CreateVpcEndpointRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, VpcEndpoint.class, headers); } @@ -35,7 +34,6 @@ public void delete(DeleteVpcEndpointRequest request) { apiClient.configuredAccountID(), request.getVpcEndpointId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -47,7 +45,6 @@ public VpcEndpoint get(GetVpcEndpointRequest request) { apiClient.configuredAccountID(), request.getVpcEndpointId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, VpcEndpoint.class, headers); } @@ -57,7 +54,6 @@ public Collection list() { String.format("/api/2.0/accounts/%s/vpc-endpoints", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, VpcEndpoint.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java index 7805d0db7..d798348cc 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java @@ -22,7 +22,6 @@ public Workspace create(CreateWorkspaceRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Workspace.class, headers); } @@ -34,7 +33,6 @@ public void delete(DeleteWorkspaceRequest request) { apiClient.configuredAccountID(), request.getWorkspaceId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -46,7 +44,6 @@ public Workspace get(GetWorkspaceRequest request) { apiClient.configuredAccountID(), request.getWorkspaceId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Workspace.class, headers); } @@ -55,7 +52,6 @@ public Collection list() { String path = String.format("/api/2.0/accounts/%s/workspaces", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, Workspace.class, headers); } @@ -68,7 +64,6 @@ public void update(UpdateWorkspaceRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java index d607ee6d7..b1b639902 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ServingEndpointsImpl.java @@ -23,7 +23,6 @@ public BuildLogsResponse buildLogs(BuildLogsRequest request) { request.getName(), request.getServedModelName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, BuildLogsResponse.class, headers); } @@ -33,7 +32,6 @@ public ServingEndpointDetailed create(CreateServingEndpoint request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ServingEndpointDetailed.class, headers); } @@ -42,7 +40,6 @@ public void delete(DeleteServingEndpointRequest request) { String path = String.format("/api/2.0/serving-endpoints/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -58,7 +55,6 @@ public ServingEndpointDetailed get(GetServingEndpointRequest request) { String path = String.format("/api/2.0/serving-endpoints/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ServingEndpointDetailed.class, headers); } @@ -71,7 +67,6 @@ public GetServingEndpointPermissionLevelsResponse getServingEndpointPermissionLe request.getServingEndpointId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetServingEndpointPermissionLevelsResponse.class, headers); } @@ -82,7 +77,6 @@ public ServingEndpointPermissions getServingEndpointPermissions( String.format("/api/2.0/permissions/serving-endpoints/%s", request.getServingEndpointId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ServingEndpointPermissions.class, headers); } @@ -91,7 +85,6 @@ public ListEndpointsResponse list() { String path = "/api/2.0/serving-endpoints"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListEndpointsResponse.class, headers); } @@ -103,7 +96,6 @@ public ServerLogsResponse logs(LogsRequest request) { request.getName(), request.getServedModelName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ServerLogsResponse.class, headers); } @@ -112,7 +104,6 @@ public QueryEndpointResponse query(QueryRequest request) { String path = String.format("/serving-endpoints/%s/invocations", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.POST(path, request, QueryEndpointResponse.class, headers); } @@ -124,7 +115,6 @@ public ServingEndpointPermissions setServingEndpointPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, ServingEndpointPermissions.class, headers); } @@ -134,7 +124,6 @@ public ServingEndpointDetailed updateConfig(EndpointCoreConfigInput request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, ServingEndpointDetailed.class, headers); } @@ -146,7 +135,6 @@ public ServingEndpointPermissions updateServingEndpointPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ServingEndpointPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java index 8e912f3db..429d4c6f9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java @@ -23,7 +23,6 @@ public CreateIpAccessListResponse create(CreateIpAccessList request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateIpAccessListResponse.class, headers); } @@ -45,7 +44,6 @@ public GetIpAccessListResponse get(GetAccountIpAccessListRequest request) { apiClient.configuredAccountID(), request.getIpAccessListId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetIpAccessListResponse.class, headers); } @@ -56,7 +54,6 @@ public GetIpAccessListsResponse list() { "/api/2.0/preview/accounts/%s/ip-access-lists", apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetIpAccessListsResponse.class, headers); } @@ -69,7 +66,6 @@ public void replace(ReplaceIpAccessList request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } @@ -82,7 +78,6 @@ public void update(UpdateIpAccessList request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java index dfde172c3..4a8f39d83 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java @@ -24,7 +24,6 @@ public DeleteAccountNetworkPolicyResponse deleteAccountNetworkPolicy( apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.DELETE(path, request, DeleteAccountNetworkPolicyResponse.class, headers); } @@ -37,7 +36,6 @@ public AccountNetworkPolicyMessage readAccountNetworkPolicy( apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, AccountNetworkPolicyMessage.class, headers); } @@ -51,7 +49,6 @@ public AccountNetworkPolicyMessage updateAccountNetworkPolicy( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, AccountNetworkPolicyMessage.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java index 290e7e2da..a30f7d135 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java @@ -24,7 +24,6 @@ public DeletePersonalComputeSettingResponse deletePersonalComputeSetting( apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.DELETE(path, request, DeletePersonalComputeSettingResponse.class, headers); } @@ -37,7 +36,6 @@ public PersonalComputeSetting readPersonalComputeSetting( apiClient.configuredAccountID()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, PersonalComputeSetting.class, headers); } @@ -51,7 +49,6 @@ public PersonalComputeSetting updatePersonalComputeSetting( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, PersonalComputeSetting.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java index bb82abc5f..95aa2bffa 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/IpAccessListsImpl.java @@ -21,7 +21,6 @@ public CreateIpAccessListResponse create(CreateIpAccessList request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateIpAccessListResponse.class, headers); } @@ -37,7 +36,6 @@ public FetchIpAccessListResponse get(GetIpAccessListRequest request) { String path = String.format("/api/2.0/ip-access-lists/%s", request.getIpAccessListId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, FetchIpAccessListResponse.class, headers); } @@ -46,7 +44,6 @@ public GetIpAccessListResponse list() { String path = "/api/2.0/ip-access-lists"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetIpAccessListResponse.class, headers); } @@ -56,7 +53,6 @@ public void replace(ReplaceIpAccessList request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } @@ -66,7 +62,6 @@ public void update(UpdateIpAccessList request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java index e7069db0d..693abe8fb 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenManagementImpl.java @@ -21,7 +21,6 @@ public CreateOboTokenResponse createOboToken(CreateOboTokenRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateOboTokenResponse.class, headers); } @@ -37,7 +36,6 @@ public TokenInfo get(GetTokenManagementRequest request) { String path = String.format("/api/2.0/token-management/tokens/%s", request.getTokenId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, TokenInfo.class, headers); } @@ -46,7 +44,6 @@ public GetTokenPermissionLevelsResponse getTokenPermissionLevels() { String path = "/api/2.0/permissions/authorization/tokens/permissionLevels"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetTokenPermissionLevelsResponse.class, headers); } @@ -55,7 +52,6 @@ public TokenPermissions getTokenPermissions() { String path = "/api/2.0/permissions/authorization/tokens"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, TokenPermissions.class, headers); } @@ -64,7 +60,6 @@ public ListTokensResponse list(ListTokenManagementRequest request) { String path = "/api/2.0/token-management/tokens"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListTokensResponse.class, headers); } @@ -74,7 +69,6 @@ public TokenPermissions setTokenPermissions(TokenPermissionsRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, TokenPermissions.class, headers); } @@ -84,7 +78,6 @@ public TokenPermissions updateTokenPermissions(TokenPermissionsRequest request) Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, TokenPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java index 38d2c7909..44019a6a8 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java @@ -21,7 +21,6 @@ public CreateTokenResponse create(CreateTokenRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateTokenResponse.class, headers); } @@ -31,7 +30,6 @@ public void delete(RevokeTokenRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -40,7 +38,6 @@ public ListTokensResponse list() { String path = "/api/2.0/token/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListTokensResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/WorkspaceConfImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/WorkspaceConfImpl.java index 805709dec..6ae4e5384 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/WorkspaceConfImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/WorkspaceConfImpl.java @@ -20,7 +20,6 @@ public Map getStatus(GetStatusRequest request) { String path = "/api/2.0/workspace-conf"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getStringMap(path, request, headers); } @@ -29,7 +28,6 @@ public void setStatus(Map request) { String path = "/api/2.0/workspace-conf"; Map headers = new HashMap<>(); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CleanRoomsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CleanRoomsImpl.java index d8d8362e6..1de3db59f 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CleanRoomsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CleanRoomsImpl.java @@ -21,7 +21,6 @@ public CleanRoomInfo create(CreateCleanRoom request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CleanRoomInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteCleanRoomRequest request) { String path = String.format("/api/2.1/unity-catalog/clean-rooms/%s", request.getNameArg()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public CleanRoomInfo get(GetCleanRoomRequest request) { String path = String.format("/api/2.1/unity-catalog/clean-rooms/%s", request.getNameArg()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, CleanRoomInfo.class, headers); } @@ -48,7 +45,6 @@ public ListCleanRoomsResponse list() { String path = "/api/2.1/unity-catalog/clean-rooms"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListCleanRoomsResponse.class, headers); } @@ -58,7 +54,6 @@ public CleanRoomInfo update(UpdateCleanRoom request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, CleanRoomInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/ProvidersImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/ProvidersImpl.java index 35ddb84aa..ff677eac3 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/ProvidersImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/ProvidersImpl.java @@ -21,7 +21,6 @@ public ProviderInfo create(CreateProvider request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ProviderInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteProviderRequest request) { String path = String.format("/api/2.1/unity-catalog/providers/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public ProviderInfo get(GetProviderRequest request) { String path = String.format("/api/2.1/unity-catalog/providers/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ProviderInfo.class, headers); } @@ -48,7 +45,6 @@ public ListProvidersResponse list(ListProvidersRequest request) { String path = "/api/2.1/unity-catalog/providers"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListProvidersResponse.class, headers); } @@ -57,7 +53,6 @@ public ListProviderSharesResponse listShares(ListSharesRequest request) { String path = String.format("/api/2.1/unity-catalog/providers/%s/shares", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListProviderSharesResponse.class, headers); } @@ -67,7 +62,6 @@ public ProviderInfo update(UpdateProvider request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ProviderInfo.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientActivationImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientActivationImpl.java index 85ce06b31..49bd076a0 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientActivationImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientActivationImpl.java @@ -23,7 +23,6 @@ public void getActivationUrlInfo(GetActivationUrlInfoRequest request) { request.getActivationUrl()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.GET(path, request, Void.class, headers); } @@ -34,7 +33,6 @@ public RetrieveTokenResponse retrieveToken(RetrieveTokenRequest request) { "/api/2.1/unity-catalog/public/data_sharing_activation/%s", request.getActivationUrl()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, RetrieveTokenResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientsImpl.java index 98be9a1bf..9a603c716 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/RecipientsImpl.java @@ -21,7 +21,6 @@ public RecipientInfo create(CreateRecipient request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, RecipientInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteRecipientRequest request) { String path = String.format("/api/2.1/unity-catalog/recipients/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public RecipientInfo get(GetRecipientRequest request) { String path = String.format("/api/2.1/unity-catalog/recipients/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, RecipientInfo.class, headers); } @@ -48,7 +45,6 @@ public ListRecipientsResponse list(ListRecipientsRequest request) { String path = "/api/2.1/unity-catalog/recipients"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListRecipientsResponse.class, headers); } @@ -59,7 +55,6 @@ public RecipientInfo rotateToken(RotateRecipientToken request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, RecipientInfo.class, headers); } @@ -69,7 +64,6 @@ public GetRecipientSharePermissionsResponse sharePermissions(SharePermissionsReq String.format("/api/2.1/unity-catalog/recipients/%s/share-permissions", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetRecipientSharePermissionsResponse.class, headers); } @@ -79,7 +73,6 @@ public void update(UpdateRecipient request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharesImpl.java index a5b159dac..b95646c84 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharesImpl.java @@ -21,7 +21,6 @@ public ShareInfo create(CreateShare request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ShareInfo.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteShareRequest request) { String path = String.format("/api/2.1/unity-catalog/shares/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public ShareInfo get(GetShareRequest request) { String path = String.format("/api/2.1/unity-catalog/shares/%s", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ShareInfo.class, headers); } @@ -48,7 +45,6 @@ public ListSharesResponse list() { String path = "/api/2.1/unity-catalog/shares"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListSharesResponse.class, headers); } @@ -58,7 +54,6 @@ public com.databricks.sdk.service.catalog.PermissionsList sharePermissions( String path = String.format("/api/2.1/unity-catalog/shares/%s/permissions", request.getName()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET( path, request, com.databricks.sdk.service.catalog.PermissionsList.class, headers); } @@ -69,7 +64,6 @@ public ShareInfo update(UpdateShare request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, ShareInfo.class, headers); } @@ -79,7 +73,6 @@ public void updatePermissions(UpdateSharePermissions request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertsImpl.java index f0fc31738..365333011 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertsImpl.java @@ -22,7 +22,6 @@ public Alert create(CreateAlert request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Alert.class, headers); } @@ -31,7 +30,6 @@ public void delete(DeleteAlertRequest request) { String path = String.format("/api/2.0/preview/sql/alerts/%s", request.getAlertId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -40,7 +38,6 @@ public Alert get(GetAlertRequest request) { String path = String.format("/api/2.0/preview/sql/alerts/%s", request.getAlertId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Alert.class, headers); } @@ -49,7 +46,6 @@ public Collection list() { String path = "/api/2.0/preview/sql/alerts"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, Alert.class, headers); } @@ -59,7 +55,6 @@ public void update(EditAlert request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DashboardsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DashboardsImpl.java index 622d7ef28..be0cd0c80 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DashboardsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DashboardsImpl.java @@ -21,7 +21,6 @@ public Dashboard create(CreateDashboardRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Dashboard.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteDashboardRequest request) { String path = String.format("/api/2.0/preview/sql/dashboards/%s", request.getDashboardId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public Dashboard get(GetDashboardRequest request) { String path = String.format("/api/2.0/preview/sql/dashboards/%s", request.getDashboardId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Dashboard.class, headers); } @@ -48,7 +45,6 @@ public ListResponse list(ListDashboardsRequest request) { String path = "/api/2.0/preview/sql/dashboards"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListResponse.class, headers); } @@ -58,7 +54,6 @@ public void restore(RestoreDashboardRequest request) { String.format("/api/2.0/preview/sql/dashboards/trash/%s", request.getDashboardId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.POST(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DataSourcesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DataSourcesImpl.java index ac59c7025..13a373ff9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DataSourcesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DataSourcesImpl.java @@ -21,7 +21,6 @@ public Collection list() { String path = "/api/2.0/preview/sql/data_sources"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.getCollection(path, null, DataSource.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DbsqlPermissionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DbsqlPermissionsImpl.java index a23a06423..a49470dbc 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DbsqlPermissionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/DbsqlPermissionsImpl.java @@ -23,7 +23,6 @@ public GetResponse get(GetDbsqlPermissionRequest request) { request.getObjectType(), request.getObjectId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetResponse.class, headers); } @@ -36,7 +35,6 @@ public SetResponse set(SetRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, SetResponse.class, headers); } @@ -49,7 +47,6 @@ public Success transferOwnership(TransferOwnershipRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Success.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueriesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueriesImpl.java index ce08e4960..91951e493 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueriesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueriesImpl.java @@ -21,7 +21,6 @@ public Query create(QueryPostContent request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Query.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteQueryRequest request) { String path = String.format("/api/2.0/preview/sql/queries/%s", request.getQueryId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -39,7 +37,6 @@ public Query get(GetQueryRequest request) { String path = String.format("/api/2.0/preview/sql/queries/%s", request.getQueryId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, Query.class, headers); } @@ -48,7 +45,6 @@ public QueryList list(ListQueriesRequest request) { String path = "/api/2.0/preview/sql/queries"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, QueryList.class, headers); } @@ -57,7 +53,6 @@ public void restore(RestoreQueryRequest request) { String path = String.format("/api/2.0/preview/sql/queries/trash/%s", request.getQueryId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -67,7 +62,6 @@ public Query update(QueryEditContent request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, Query.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueryHistoryImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueryHistoryImpl.java index 1b3714361..1a07ce143 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueryHistoryImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/QueryHistoryImpl.java @@ -20,7 +20,6 @@ public ListQueriesResponse list(ListQueryHistoryRequest request) { String path = "/api/2.0/sql/history/queries"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListQueriesResponse.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java index f11853e43..d0955f3eb 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionImpl.java @@ -28,7 +28,6 @@ public ExecuteStatementResponse executeStatement(ExecuteStatementRequest request Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, ExecuteStatementResponse.class, headers); } @@ -37,7 +36,6 @@ public GetStatementResponse getStatement(GetStatementRequest request) { String path = String.format("/api/2.0/sql/statements/%s", request.getStatementId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetStatementResponse.class, headers); } @@ -49,7 +47,6 @@ public ResultData getStatementResultChunkN(GetStatementResultChunkNRequest reque request.getStatementId(), request.getChunkIndex()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ResultData.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/WarehousesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/WarehousesImpl.java index 3c1751f84..77de24693 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/WarehousesImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/WarehousesImpl.java @@ -21,7 +21,6 @@ public CreateWarehouseResponse create(CreateWarehouseRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateWarehouseResponse.class, headers); } @@ -30,7 +29,6 @@ public void delete(DeleteWarehouseRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.DELETE(path, request, Void.class, headers); } @@ -40,7 +38,6 @@ public void edit(EditWarehouseRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -49,7 +46,6 @@ public GetWarehouseResponse get(GetWarehouseRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetWarehouseResponse.class, headers); } @@ -61,7 +57,6 @@ public GetWarehousePermissionLevelsResponse getWarehousePermissionLevels( "/api/2.0/permissions/warehouses/%s/permissionLevels", request.getWarehouseId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetWarehousePermissionLevelsResponse.class, headers); } @@ -70,7 +65,6 @@ public WarehousePermissions getWarehousePermissions(GetWarehousePermissionsReque String path = String.format("/api/2.0/permissions/warehouses/%s", request.getWarehouseId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, WarehousePermissions.class, headers); } @@ -79,7 +73,6 @@ public GetWorkspaceWarehouseConfigResponse getWorkspaceWarehouseConfig() { String path = "/api/2.0/sql/config/warehouses"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetWorkspaceWarehouseConfigResponse.class, headers); } @@ -88,7 +81,6 @@ public ListWarehousesResponse list(ListWarehousesRequest request) { String path = "/api/2.0/sql/warehouses"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListWarehousesResponse.class, headers); } @@ -98,7 +90,6 @@ public WarehousePermissions setWarehousePermissions(WarehousePermissionsRequest Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, WarehousePermissions.class, headers); } @@ -108,7 +99,6 @@ public void setWorkspaceWarehouseConfig(SetWorkspaceWarehouseConfigRequest reque Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PUT(path, request, Void.class, headers); } @@ -117,7 +107,6 @@ public void start(StartRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s/start", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -126,7 +115,6 @@ public void stop(StopRequest request) { String path = String.format("/api/2.0/sql/warehouses/%s/stop", request.getId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -136,7 +124,6 @@ public WarehousePermissions updateWarehousePermissions(WarehousePermissionsReque Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, WarehousePermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java index 366f5fae1..556130d6f 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GitCredentialsImpl.java @@ -21,7 +21,6 @@ public CreateCredentialsResponse create(CreateCredentials request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, CreateCredentialsResponse.class, headers); } @@ -37,7 +36,6 @@ public CredentialInfo get(GetGitCredentialRequest request) { String path = String.format("/api/2.0/git-credentials/%s", request.getCredentialId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, CredentialInfo.class, headers); } @@ -46,7 +44,6 @@ public GetCredentialsResponse list() { String path = "/api/2.0/git-credentials"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, GetCredentialsResponse.class, headers); } @@ -56,7 +53,6 @@ public void update(UpdateCredentials request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java index 45b56fdf5..3bd7948a9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/ReposImpl.java @@ -21,7 +21,6 @@ public RepoInfo create(CreateRepo request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.POST(path, request, RepoInfo.class, headers); } @@ -37,7 +36,6 @@ public RepoInfo get(GetRepoRequest request) { String path = String.format("/api/2.0/repos/%s", request.getRepoId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, RepoInfo.class, headers); } @@ -48,7 +46,6 @@ public GetRepoPermissionLevelsResponse getRepoPermissionLevels( String.format("/api/2.0/permissions/repos/%s/permissionLevels", request.getRepoId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetRepoPermissionLevelsResponse.class, headers); } @@ -57,7 +54,6 @@ public RepoPermissions getRepoPermissions(GetRepoPermissionsRequest request) { String path = String.format("/api/2.0/permissions/repos/%s", request.getRepoId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, RepoPermissions.class, headers); } @@ -66,7 +62,6 @@ public ListReposResponse list(ListReposRequest request) { String path = "/api/2.0/repos"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListReposResponse.class, headers); } @@ -76,7 +71,6 @@ public RepoPermissions setRepoPermissions(RepoPermissionsRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, RepoPermissions.class, headers); } @@ -86,7 +80,6 @@ public void update(UpdateRepo request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.PATCH(path, request, Void.class, headers); } @@ -96,7 +89,6 @@ public RepoPermissions updateRepoPermissions(RepoPermissionsRequest request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, RepoPermissions.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java index 5f499d9b4..ab31bf60e 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/SecretsImpl.java @@ -21,7 +21,6 @@ public void createScope(CreateScope request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -31,7 +30,6 @@ public void deleteAcl(DeleteAcl request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -41,7 +39,6 @@ public void deleteScope(DeleteScope request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -51,7 +48,6 @@ public void deleteSecret(DeleteSecret request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -60,7 +56,6 @@ public AclItem getAcl(GetAclRequest request) { String path = "/api/2.0/secrets/acls/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, AclItem.class, headers); } @@ -69,7 +64,6 @@ public GetSecretResponse getSecret(GetSecretRequest request) { String path = "/api/2.0/secrets/get"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetSecretResponse.class, headers); } @@ -78,7 +72,6 @@ public ListAclsResponse listAcls(ListAclsRequest request) { String path = "/api/2.0/secrets/acls/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListAclsResponse.class, headers); } @@ -87,7 +80,6 @@ public ListScopesResponse listScopes() { String path = "/api/2.0/secrets/scopes/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, ListScopesResponse.class, headers); } @@ -96,7 +88,6 @@ public ListSecretsResponse listSecrets(ListSecretsRequest request) { String path = "/api/2.0/secrets/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListSecretsResponse.class, headers); } @@ -106,7 +97,6 @@ public void putAcl(PutAcl request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -116,7 +106,6 @@ public void putSecret(PutSecret request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/WorkspaceImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/WorkspaceImpl.java index 2795eb65f..b6310eb57 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/WorkspaceImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/WorkspaceImpl.java @@ -21,7 +21,6 @@ public void delete(Delete request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -30,7 +29,6 @@ public ExportResponse export(ExportRequest request) { String path = "/api/2.0/workspace/export"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ExportResponse.class, headers); } @@ -39,7 +37,6 @@ public ObjectInfo getStatus(GetStatusRequest request) { String path = "/api/2.0/workspace/get-status"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ObjectInfo.class, headers); } @@ -52,7 +49,6 @@ public GetWorkspaceObjectPermissionLevelsResponse getWorkspaceObjectPermissionLe request.getWorkspaceObjectType(), request.getWorkspaceObjectId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, GetWorkspaceObjectPermissionLevelsResponse.class, headers); } @@ -65,7 +61,6 @@ public WorkspaceObjectPermissions getWorkspaceObjectPermissions( request.getWorkspaceObjectType(), request.getWorkspaceObjectId()); Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, WorkspaceObjectPermissions.class, headers); } @@ -75,7 +70,6 @@ public void importContent(Import request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -84,7 +78,6 @@ public ListResponse list(ListWorkspaceRequest request) { String path = "/api/2.0/workspace/list"; Map headers = new HashMap<>(); headers.put("Accept", "application/json"); - return apiClient.GET(path, request, ListResponse.class, headers); } @@ -94,7 +87,6 @@ public void mkdirs(Mkdirs request) { Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - apiClient.POST(path, request, Void.class, headers); } @@ -108,7 +100,6 @@ public WorkspaceObjectPermissions setWorkspaceObjectPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PUT(path, request, WorkspaceObjectPermissions.class, headers); } @@ -122,7 +113,6 @@ public WorkspaceObjectPermissions updateWorkspaceObjectPermissions( Map headers = new HashMap<>(); headers.put("Accept", "application/json"); headers.put("Content-Type", "application/json"); - return apiClient.PATCH(path, request, WorkspaceObjectPermissions.class, headers); } } From 0d30290d084e34fddb0b12a5a2482573904dd076 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 18 Aug 2023 22:00:02 +0200 Subject: [PATCH 8/9] address comments --- .../src/main/java/com/databricks/sdk/core/ApiClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java index d31008cdc..b5dff7e3e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/ApiClient.java @@ -83,7 +83,7 @@ private ObjectMapper makeObjectMapper() { return mapper; } - private void setQuery(Request in, I entity) { + private static void setQuery(Request in, I entity) { if (entity == null) { return; } @@ -93,7 +93,7 @@ private void setQuery(Request in, I entity) { } } - private void setHeaders(Request in, Map headers) { + private static void setHeaders(Request in, Map headers) { if (headers == null) { return; } From e390283b4dc8e74800bd08065bc42bb3d2e3f120 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 18 Aug 2023 22:14:37 +0200 Subject: [PATCH 9/9] remove extra file --- ...reateMetastoreAssignmentsResponseItem.java | 75 ----------------- .../catalog/EffectiveAutoMaintenanceFlag.java | 81 ------------------ ...eAutoMaintenanceFlagInheritedFromType.java | 15 ---- .../catalog/EnableAutoMaintenance.java | 13 --- .../catalog/UpdateAutoMaintenance.java | 58 ------------- .../UpdateAutoMaintenanceResponse.java | 77 ----------------- .../sdk/service/files/DeleteFileRequest.java | 41 --------- .../service/files/DownloadFileRequest.java | 41 --------- .../service/files/DownloadFileResponse.java | 40 --------- .../sdk/service/files/FilesAPI.java | 84 ------------------- .../sdk/service/files/FilesImpl.java | 48 ----------- .../sdk/service/files/FilesService.java | 43 ---------- .../sdk/service/files/UploadFileRequest.java | 73 ---------------- 13 files changed, 689 deletions(-) delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CreateMetastoreAssignmentsResponseItem.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EffectiveAutoMaintenanceFlag.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EffectiveAutoMaintenanceFlagInheritedFromType.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EnableAutoMaintenance.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateAutoMaintenance.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateAutoMaintenanceResponse.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java delete mode 100755 databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CreateMetastoreAssignmentsResponseItem.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CreateMetastoreAssignmentsResponseItem.java deleted file mode 100755 index 63275bcfb..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CreateMetastoreAssignmentsResponseItem.java +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.catalog; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -@Generated -public class CreateMetastoreAssignmentsResponseItem { - /** A human-readable message describing the outcome of the creation */ - @JsonProperty("message") - private String message; - - /** */ - @JsonProperty("metastore_assignment") - private MetastoreAssignment metastoreAssignment; - - /** The returned HTTP status code for an individual creation in the batch */ - @JsonProperty("status_code") - private Long statusCode; - - public CreateMetastoreAssignmentsResponseItem setMessage(String message) { - this.message = message; - return this; - } - - public String getMessage() { - return message; - } - - public CreateMetastoreAssignmentsResponseItem setMetastoreAssignment( - MetastoreAssignment metastoreAssignment) { - this.metastoreAssignment = metastoreAssignment; - return this; - } - - public MetastoreAssignment getMetastoreAssignment() { - return metastoreAssignment; - } - - public CreateMetastoreAssignmentsResponseItem setStatusCode(Long statusCode) { - this.statusCode = statusCode; - return this; - } - - public Long getStatusCode() { - return statusCode; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - CreateMetastoreAssignmentsResponseItem that = (CreateMetastoreAssignmentsResponseItem) o; - return Objects.equals(message, that.message) - && Objects.equals(metastoreAssignment, that.metastoreAssignment) - && Objects.equals(statusCode, that.statusCode); - } - - @Override - public int hashCode() { - return Objects.hash(message, metastoreAssignment, statusCode); - } - - @Override - public String toString() { - return new ToStringer(CreateMetastoreAssignmentsResponseItem.class) - .add("message", message) - .add("metastoreAssignment", metastoreAssignment) - .add("statusCode", statusCode) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EffectiveAutoMaintenanceFlag.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EffectiveAutoMaintenanceFlag.java deleted file mode 100755 index 5dcb8fb7c..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EffectiveAutoMaintenanceFlag.java +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.catalog; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -@Generated -public class EffectiveAutoMaintenanceFlag { - /** - * The name of the object from which the flag was inherited. If there was no inheritance, this - * field is left blank. - */ - @JsonProperty("inherited_from_name") - private String inheritedFromName; - - /** - * The type of the object from which the flag was inherited. If there was no inheritance, this - * field is left blank. - */ - @JsonProperty("inherited_from_type") - private EffectiveAutoMaintenanceFlagInheritedFromType inheritedFromType; - - /** Whether auto maintenance should be enabled for this object and objects under it. */ - @JsonProperty("value") - private EnableAutoMaintenance value; - - public EffectiveAutoMaintenanceFlag setInheritedFromName(String inheritedFromName) { - this.inheritedFromName = inheritedFromName; - return this; - } - - public String getInheritedFromName() { - return inheritedFromName; - } - - public EffectiveAutoMaintenanceFlag setInheritedFromType( - EffectiveAutoMaintenanceFlagInheritedFromType inheritedFromType) { - this.inheritedFromType = inheritedFromType; - return this; - } - - public EffectiveAutoMaintenanceFlagInheritedFromType getInheritedFromType() { - return inheritedFromType; - } - - public EffectiveAutoMaintenanceFlag setValue(EnableAutoMaintenance value) { - this.value = value; - return this; - } - - public EnableAutoMaintenance getValue() { - return value; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - EffectiveAutoMaintenanceFlag that = (EffectiveAutoMaintenanceFlag) o; - return Objects.equals(inheritedFromName, that.inheritedFromName) - && Objects.equals(inheritedFromType, that.inheritedFromType) - && Objects.equals(value, that.value); - } - - @Override - public int hashCode() { - return Objects.hash(inheritedFromName, inheritedFromType, value); - } - - @Override - public String toString() { - return new ToStringer(EffectiveAutoMaintenanceFlag.class) - .add("inheritedFromName", inheritedFromName) - .add("inheritedFromType", inheritedFromType) - .add("value", value) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EffectiveAutoMaintenanceFlagInheritedFromType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EffectiveAutoMaintenanceFlagInheritedFromType.java deleted file mode 100755 index 8fc3ee579..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EffectiveAutoMaintenanceFlagInheritedFromType.java +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.catalog; - -import com.databricks.sdk.support.Generated; - -/** - * The type of the object from which the flag was inherited. If there was no inheritance, this field - * is left blank. - */ -@Generated -public enum EffectiveAutoMaintenanceFlagInheritedFromType { - CATALOG, - SCHEMA, -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EnableAutoMaintenance.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EnableAutoMaintenance.java deleted file mode 100755 index 4a59df6fb..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/EnableAutoMaintenance.java +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.catalog; - -import com.databricks.sdk.support.Generated; - -/** Whether auto maintenance should be enabled for this object and objects under it. */ -@Generated -public enum EnableAutoMaintenance { - DISABLE, - ENABLE, - INHERIT, -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateAutoMaintenance.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateAutoMaintenance.java deleted file mode 100755 index e918118ca..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateAutoMaintenance.java +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.catalog; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -@Generated -public class UpdateAutoMaintenance { - /** Whether to enable auto maintenance on the metastore. */ - @JsonProperty("enable") - private Boolean enable; - - /** Unique identifier of metastore. */ - @JsonProperty("metastore_id") - private String metastoreId; - - public UpdateAutoMaintenance setEnable(Boolean enable) { - this.enable = enable; - return this; - } - - public Boolean getEnable() { - return enable; - } - - public UpdateAutoMaintenance setMetastoreId(String metastoreId) { - this.metastoreId = metastoreId; - return this; - } - - public String getMetastoreId() { - return metastoreId; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - UpdateAutoMaintenance that = (UpdateAutoMaintenance) o; - return Objects.equals(enable, that.enable) && Objects.equals(metastoreId, that.metastoreId); - } - - @Override - public int hashCode() { - return Objects.hash(enable, metastoreId); - } - - @Override - public String toString() { - return new ToStringer(UpdateAutoMaintenance.class) - .add("enable", enable) - .add("metastoreId", metastoreId) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateAutoMaintenanceResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateAutoMaintenanceResponse.java deleted file mode 100755 index 68a097f79..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateAutoMaintenanceResponse.java +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.catalog; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -@Generated -public class UpdateAutoMaintenanceResponse { - /** Whether auto maintenance is enabled on the metastore. */ - @JsonProperty("state") - private Boolean state; - - /** - * Id of the auto maintenance service principal. This will be the user used to run maintenance - * tasks. - */ - @JsonProperty("user_id") - private Long userId; - - /** Name of the auto maintenance service principal. */ - @JsonProperty("username") - private String username; - - public UpdateAutoMaintenanceResponse setState(Boolean state) { - this.state = state; - return this; - } - - public Boolean getState() { - return state; - } - - public UpdateAutoMaintenanceResponse setUserId(Long userId) { - this.userId = userId; - return this; - } - - public Long getUserId() { - return userId; - } - - public UpdateAutoMaintenanceResponse setUsername(String username) { - this.username = username; - return this; - } - - public String getUsername() { - return username; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - UpdateAutoMaintenanceResponse that = (UpdateAutoMaintenanceResponse) o; - return Objects.equals(state, that.state) - && Objects.equals(userId, that.userId) - && Objects.equals(username, that.username); - } - - @Override - public int hashCode() { - return Objects.hash(state, userId, username); - } - - @Override - public String toString() { - return new ToStringer(UpdateAutoMaintenanceResponse.class) - .add("state", state) - .add("userId", userId) - .add("username", username) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java deleted file mode 100755 index 810be7b4b..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DeleteFileRequest.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.files; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import java.util.Objects; - -/** Delete a file or directory */ -@Generated -public class DeleteFileRequest { - /** The absolute path of the file or directory in DBFS. */ - private String filePath; - - public DeleteFileRequest setFilePath(String filePath) { - this.filePath = filePath; - return this; - } - - public String getFilePath() { - return filePath; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - DeleteFileRequest that = (DeleteFileRequest) o; - return Objects.equals(filePath, that.filePath); - } - - @Override - public int hashCode() { - return Objects.hash(filePath); - } - - @Override - public String toString() { - return new ToStringer(DeleteFileRequest.class).add("filePath", filePath).toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java deleted file mode 100755 index 5c1664bab..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileRequest.java +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.files; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import java.util.Objects; - -/** Download a file */ -@Generated -public class DownloadFileRequest { - /** The absolute path of the file or directory in DBFS. */ - private String filePath; - - public DownloadFileRequest setFilePath(String filePath) { - this.filePath = filePath; - return this; - } - - public String getFilePath() { - return filePath; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - DownloadFileRequest that = (DownloadFileRequest) o; - return Objects.equals(filePath, that.filePath); - } - - @Override - public int hashCode() { - return Objects.hash(filePath); - } - - @Override - public String toString() { - return new ToStringer(DownloadFileRequest.class).add("filePath", filePath).toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java deleted file mode 100755 index 1c096c0e0..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/DownloadFileResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.files; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import java.util.Objects; - -@Generated -public class DownloadFileResponse { - /** */ - private Object /* MISSING TYPE */ contents; - - public DownloadFileResponse setContents(Object /* MISSING TYPE */ contents) { - this.contents = contents; - return this; - } - - public Object /* MISSING TYPE */ getContents() { - return contents; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - DownloadFileResponse that = (DownloadFileResponse) o; - return Objects.equals(contents, that.contents); - } - - @Override - public int hashCode() { - return Objects.hash(contents); - } - - @Override - public String toString() { - return new ToStringer(DownloadFileResponse.class).add("contents", contents).toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java deleted file mode 100755 index 28e9db914..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesAPI.java +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -package com.databricks.sdk.service.files; - -import com.databricks.sdk.core.ApiClient; -import com.databricks.sdk.support.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Files API allows you to read, write, and delete files and directories in Unity Catalog - * volumes. - */ -@Generated -public class FilesAPI { - private static final Logger LOG = LoggerFactory.getLogger(FilesAPI.class); - - private final FilesService impl; - - /** Regular-use constructor */ - public FilesAPI(ApiClient apiClient) { - impl = new FilesImpl(apiClient); - } - - /** Constructor for mocks */ - public FilesAPI(FilesService mock) { - impl = mock; - } - - public void deleteFile(String filePath) { - deleteFile(new DeleteFileRequest().setFilePath(filePath)); - } - - /** - * Delete a file or directory. - * - *

Deletes a file or directory. - */ - public void deleteFile(DeleteFileRequest request) { - impl.deleteFile(request); - } - - public DownloadFileResponse downloadFile(String filePath) { - return downloadFile(new DownloadFileRequest().setFilePath(filePath)); - } - - /** - * Download a file. - * - *

Downloads a file of up to 2 GiB. - */ - public DownloadFileResponse downloadFile(DownloadFileRequest request) { - return impl.downloadFile(request); - } - - public FileInfo getStatus(String path) { - return getStatus(new GetStatusRequest().setPath(path)); - } - - /** - * Get the status of a file or directory. - * - *

Returns the status of a file or directory. - */ - public FileInfo getStatus(GetStatusRequest request) { - return impl.getStatus(request); - } - - public void uploadFile(String filePath, Object /* MISSING TYPE */ contents) { - uploadFile(new UploadFileRequest().setFilePath(filePath).setContents(contents)); - } - - /** - * Upload a file. - * - *

Uploads a file of up to 2 GiB. - */ - public void uploadFile(UploadFileRequest request) { - impl.uploadFile(request); - } - - public FilesService impl() { - return impl; - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java deleted file mode 100755 index f0a473efa..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -package com.databricks.sdk.service.files; - -import com.databricks.sdk.core.ApiClient; -import com.databricks.sdk.support.Generated; -import java.util.HashMap; -import java.util.Map; - -/** Package-local implementation of Files */ -@Generated -class FilesImpl implements FilesService { - private final ApiClient apiClient; - - public FilesImpl(ApiClient apiClient) { - this.apiClient = apiClient; - } - - @Override - public void deleteFile(DeleteFileRequest request) { - String path = String.format("/api/2.0/fs/files/%s", request.getFilePath()); - Map headers = new HashMap<>(); - apiClient.DELETE(path, request, Void.class, headers); - } - - @Override - public DownloadFileResponse downloadFile(DownloadFileRequest request) { - String path = String.format("/api/2.0/fs/files/%s", request.getFilePath()); - Map headers = new HashMap<>(); - headers.put("Accept", "application/octet-stream"); - return apiClient.GET(path, request, DownloadFileResponse.class, headers); - } - - @Override - public FileInfo getStatus(GetStatusRequest request) { - String path = "/api/2.0/fs/get-status"; - Map headers = new HashMap<>(); - headers.put("Accept", "application/json"); - return apiClient.GET(path, request, FileInfo.class, headers); - } - - @Override - public void uploadFile(UploadFileRequest request) { - String path = String.format("/api/2.0/fs/files/%s", request.getFilePath()); - Map headers = new HashMap<>(); - headers.put("Content-Type", "application/octet-stream"); - apiClient.PUT(path, request, Void.class, headers); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java deleted file mode 100755 index de0c0c2d6..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/FilesService.java +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -package com.databricks.sdk.service.files; - -import com.databricks.sdk.support.Generated; - -/** - * The Files API allows you to read, write, and delete files and directories in Unity Catalog - * volumes. - * - *

This is the high-level interface, that contains generated methods. - * - *

Evolving: this interface is under development. Method signatures may change. - */ -@Generated -public interface FilesService { - /** - * Delete a file or directory. - * - *

Deletes a file or directory. - */ - void deleteFile(DeleteFileRequest deleteFileRequest); - - /** - * Download a file. - * - *

Downloads a file of up to 2 GiB. - */ - DownloadFileResponse downloadFile(DownloadFileRequest downloadFileRequest); - - /** - * Get the status of a file or directory. - * - *

Returns the status of a file or directory. - */ - FileInfo getStatus(GetStatusRequest getStatusRequest); - - /** - * Upload a file. - * - *

Uploads a file of up to 2 GiB. - */ - void uploadFile(UploadFileRequest uploadFileRequest); -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java deleted file mode 100755 index 69d800b80..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/files/UploadFileRequest.java +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.files; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.QueryParam; -import com.databricks.sdk.support.ToStringer; -import java.util.Objects; - -/** Upload a file */ -@Generated -public class UploadFileRequest { - /** */ - private Object /* MISSING TYPE */ contents; - - /** The absolute path of the file or directory in DBFS. */ - private String filePath; - - /** The flag that specifies whether to overwrite existing file/files. */ - @QueryParam("overwrite") - private Boolean overwrite; - - public UploadFileRequest setContents(Object /* MISSING TYPE */ contents) { - this.contents = contents; - return this; - } - - public Object /* MISSING TYPE */ getContents() { - return contents; - } - - public UploadFileRequest setFilePath(String filePath) { - this.filePath = filePath; - return this; - } - - public String getFilePath() { - return filePath; - } - - public UploadFileRequest setOverwrite(Boolean overwrite) { - this.overwrite = overwrite; - return this; - } - - public Boolean getOverwrite() { - return overwrite; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - UploadFileRequest that = (UploadFileRequest) o; - return Objects.equals(contents, that.contents) - && Objects.equals(filePath, that.filePath) - && Objects.equals(overwrite, that.overwrite); - } - - @Override - public int hashCode() { - return Objects.hash(contents, filePath, overwrite); - } - - @Override - public String toString() { - return new ToStringer(UploadFileRequest.class) - .add("contents", contents) - .add("filePath", filePath) - .add("overwrite", overwrite) - .toString(); - } -}