diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 6489fea7c..8af74cf44 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -b799a600ccf37b0776d99c315614f0d0f0f0ce54 \ No newline at end of file +beff621d7b3e1d59244e2e34fc53a496f310e130 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index b62f8e02f..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 diff --git a/CHANGELOG.md b/CHANGELOG.md index f2d8cf2d1..739d1a1eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,63 @@ # Version changelog +## 0.6.0 + +* Added support for `dbutils.secrets` ([#132](https://github.com/databricks/databricks-sdk-java/pull/132)). +* Added retry in `w.clusters().ensureClusterIsRunning(id)` when cluster is simultaneously started by two different processes ([#134](https://github.com/databricks/databricks-sdk-java/pull/134)). +* Set necessary headers when authenticating via Azure CLI ([#136](https://github.com/databricks/databricks-sdk-java/pull/136)). + +New Services: + + * Added `workspaceClient.artifactAllowlists()` service. + * Added `workspaceClient.securableTags()` service. + * Added `workspaceClient.subentityTags()` service. + * Added `com.databricks.sdk.service.catalog.ArtifactAllowlistInfo` class. + * Added `com.databricks.sdk.service.catalog.ArtifactMatcher` class. + * Added `com.databricks.sdk.service.catalog.ArtifactType` class. + * Added `com.databricks.sdk.service.catalog.GetArtifactAllowlistRequest` class. + * Added `com.databricks.sdk.service.catalog.ListSecurableTagsRequest` class. + * Added `com.databricks.sdk.service.catalog.ListSecurableType` class. + * Added `com.databricks.sdk.service.catalog.ListSubentityTagsRequest` class. + * Added `com.databricks.sdk.service.catalog.MatchType` class. + * Added `com.databricks.sdk.service.catalog.SetArtifactAllowlist` class. + * Added `com.databricks.sdk.service.catalog.TagChanges` class. + * Added `com.databricks.sdk.service.catalog.TagKeyValuePair` class. + * Added `com.databricks.sdk.service.catalog.TagSecurable` class. + * Added `com.databricks.sdk.service.catalog.TagSecurableAssignment` class. + * Added `com.databricks.sdk.service.catalog.TagSecurableAssignmentsList` class. + * Added `com.databricks.sdk.service.catalog.TagSubentity` class. + * Added `com.databricks.sdk.service.catalog.TagSubentityAssignmentsList` class. + * Added `com.databricks.sdk.service.catalog.TagsSubentityAssignment` class. + * Added `com.databricks.sdk.service.catalog.UpdateSecurableType` class. + * Added `com.databricks.sdk.service.catalog.UpdateTags` class. + +New APIs: + + * Added `deleteRuns()` method for `workspaceClient.experiments()` service. + * Added `restoreRuns()` method for `workspaceClient.experiments()` service. + * Added `com.databricks.sdk.service.ml.DeleteRuns` class. + * Added `com.databricks.sdk.service.ml.DeleteRunsResponse` class. + * Added `com.databricks.sdk.service.ml.RestoreRuns` class. + * Added `com.databricks.sdk.service.ml.RestoreRunsResponse` class. + * Added `getSecret()` method for `workspaceClient.secrets()` service. + * Added `com.databricks.sdk.service.workspace.GetSecretRequest` class. + * Added `com.databricks.sdk.service.workspace.GetSecretResponse` class. + +API Renames: + + * Renamed `effectiveAutoMaintenanceFlag` field to `effectivePredictiveOptimizationFlag` field for `com.databricks.sdk.service.catalog.CatalogInfo`. + * Renamed `enableAutoMaintenance` field to `enablePredictiveOptimization` field for `com.databricks.sdk.service.catalog.CatalogInfo`. + * Renamed `com.databricks.sdk.service.catalog.EffectiveAutoMaintenanceFlag` class to `com.databricks.sdk.service.catalog.EffectivePredictiveOptimizationFlag` class. + * Renamed `com.databricks.sdk.service.catalog.EffectiveAutoMaintenanceFlagInheritedFromType` class to `com.databricks.sdk.service.catalog.EffectivePredictiveOptimizationFlagInheritedFromType`. + * Renamed `com.databricks.sdk.service.catalog.EnableAutoMaintenance` class to `com.databricks.sdk.service.catalog.EnablePredictiveOptimization`. + * Renamed `effectiveAutoMaintenanceFlag` field to `effectivePredictiveOptimizationFlag` field for `com.databricks.sdk.service.catalog.SchemaInfo`. + * Renamed `enableAutoMaintenance` field to `enablePredictiveOptimization` field for `com.databricks.sdk.service.catalog.SchemaInfo`. + * Renamed `effectiveAutoMaintenanceFlag` field to `effectivePredictiveOptimizationFlag` field for `com.databricks.sdk.service.catalog.TableInfo`. + * Renamed `enableAutoMaintenance` field to `enablePredictiveOptimization` field for `com.databricks.sdk.service.catalog.TableInfo`. + +OpenAPI SHA: beff621d7b3e1d59244e2e34fc53a496f310e130, Date: 2023-08-17 + + ## 0.5.0 diff --git a/databricks-sdk-java/pom.xml b/databricks-sdk-java/pom.xml index 450d652a6..0299deb1a 100644 --- a/databricks-sdk-java/pom.xml +++ b/databricks-sdk-java/pom.xml @@ -5,7 +5,7 @@ com.databricks databricks-sdk-parent - 0.5.0 + 0.6.0 databricks-sdk-java 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 1fd2e48aa..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; @@ -162,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; @@ -226,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); @@ -847,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 @@ -1071,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 @@ -1426,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); @@ -1456,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/core/UserAgent.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java index 22dc24abe..1e97bc11f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java @@ -13,7 +13,7 @@ public class UserAgent { // TODO: check if reading from // /META-INF/maven/com.databricks/databrics-sdk-java/pom.properties // or getClass().getPackage().getImplementationVersion() is enough. - private static final String version = "0.5.0"; + private static final String version = "0.6.0"; public static void withProduct(String product, String productVersion) { UserAgent.product = product; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableTagsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableTagsRequest.java new file mode 100755 index 000000000..31cab5c97 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableTagsRequest.java @@ -0,0 +1,57 @@ +// 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 java.util.Objects; + +/** Get tags for a securable */ +@Generated +public class ListSecurableTagsRequest { + /** The fully qualified name of the unity catalog securable entity. */ + private String fullName; + + /** The type of the unity catalog securable entity. */ + private ListSecurableType securableType; + + public ListSecurableTagsRequest setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + public String getFullName() { + return fullName; + } + + public ListSecurableTagsRequest setSecurableType(ListSecurableType securableType) { + this.securableType = securableType; + return this; + } + + public ListSecurableType getSecurableType() { + return securableType; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListSecurableTagsRequest that = (ListSecurableTagsRequest) o; + return Objects.equals(fullName, that.fullName) + && Objects.equals(securableType, that.securableType); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, securableType); + } + + @Override + public String toString() { + return new ToStringer(ListSecurableTagsRequest.class) + .add("fullName", fullName) + .add("securableType", securableType) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableType.java new file mode 100755 index 000000000..07b05c0c5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSecurableType.java @@ -0,0 +1,18 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +@Generated +public enum ListSecurableType { + @JsonProperty("catalog") + CATALOG, + + @JsonProperty("schema") + SCHEMA, + + @JsonProperty("table") + TABLE, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSubentityTagsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSubentityTagsRequest.java new file mode 100755 index 000000000..b615df673 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ListSubentityTagsRequest.java @@ -0,0 +1,71 @@ +// 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 java.util.Objects; + +/** Get tags for a subentity */ +@Generated +public class ListSubentityTagsRequest { + /** The fully qualified name of the unity catalog securable entity. */ + private String fullName; + + /** The type of the unity catalog securable entity. */ + private ListSecurableType securableType; + + /** The name of subentity associated with the securable entity */ + private String subentityName; + + public ListSubentityTagsRequest setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + public String getFullName() { + return fullName; + } + + public ListSubentityTagsRequest setSecurableType(ListSecurableType securableType) { + this.securableType = securableType; + return this; + } + + public ListSecurableType getSecurableType() { + return securableType; + } + + public ListSubentityTagsRequest setSubentityName(String subentityName) { + this.subentityName = subentityName; + return this; + } + + public String getSubentityName() { + return subentityName; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListSubentityTagsRequest that = (ListSubentityTagsRequest) o; + return Objects.equals(fullName, that.fullName) + && Objects.equals(securableType, that.securableType) + && Objects.equals(subentityName, that.subentityName); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, securableType, subentityName); + } + + @Override + public String toString() { + return new ToStringer(ListSubentityTagsRequest.class) + .add("fullName", fullName) + .add("securableType", securableType) + .add("subentityName", subentityName) + .toString(); + } +} 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/catalog/SecurableTagsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsAPI.java new file mode 100755 index 000000000..71aad57f5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsAPI.java @@ -0,0 +1,65 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 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. + */ +@Generated +public class SecurableTagsAPI { + private static final Logger LOG = LoggerFactory.getLogger(SecurableTagsAPI.class); + + private final SecurableTagsService impl; + + /** Regular-use constructor */ + public SecurableTagsAPI(ApiClient apiClient) { + impl = new SecurableTagsImpl(apiClient); + } + + /** Constructor for mocks */ + public SecurableTagsAPI(SecurableTagsService mock) { + impl = mock; + } + + public Iterable list(ListSecurableType securableType, String fullName) { + return list( + new ListSecurableTagsRequest().setSecurableType(securableType).setFullName(fullName)); + } + + /** + * Get tags for a securable. + * + *

Gets tag assignments for an entity. The caller must be either the owner of the securable, or + * a metastore admin, or have at least USE / SELECT privilege on the associated securable. + */ + public Iterable list(ListSecurableTagsRequest request) { + return impl.list(request).getTagAssignments(); + } + + public TagSecurableAssignmentsList update( + TagChanges changes, UpdateSecurableType securableType, String fullName) { + return update( + new UpdateTags().setChanges(changes).setSecurableType(securableType).setFullName(fullName)); + } + + /** + * Update tags for a securable. + * + *

Update tag assignments for an entity The caller must be either the owner of the securable, + * or a metastore admin, or have at least USE / SELECT and APPLY_TAG privilege on the associated + * securable. + */ + public TagSecurableAssignmentsList update(UpdateTags request) { + return impl.update(request); + } + + public SecurableTagsService impl() { + return impl; + } +} 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 new file mode 100755 index 000000000..107152684 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsImpl.java @@ -0,0 +1,33 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; + +/** Package-local implementation of SecurableTags */ +@Generated +class SecurableTagsImpl implements SecurableTagsService { + private final ApiClient apiClient; + + public SecurableTagsImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public TagSecurableAssignmentsList list(ListSecurableTagsRequest request) { + String path = + String.format( + "/api/2.1/unity-catalog/securable-tags/%s/%s", + request.getSecurableType(), request.getFullName()); + return apiClient.GET(path, request, TagSecurableAssignmentsList.class); + } + + @Override + public TagSecurableAssignmentsList update(UpdateTags request) { + String path = + String.format( + "/api/2.1/unity-catalog/securable-tags/%s/%s", + request.getSecurableType(), request.getFullName()); + return apiClient.PATCH(path, request, TagSecurableAssignmentsList.class); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsService.java new file mode 100755 index 000000000..b019335da --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableTagsService.java @@ -0,0 +1,33 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.support.Generated; + +/** + * 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. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface SecurableTagsService { + /** + * Get tags for a securable. + * + *

Gets tag assignments for an entity. The caller must be either the owner of the securable, or + * a metastore admin, or have at least USE / SELECT privilege on the associated securable. + */ + TagSecurableAssignmentsList list(ListSecurableTagsRequest listSecurableTagsRequest); + + /** + * Update tags for a securable. + * + *

Update tag assignments for an entity The caller must be either the owner of the securable, + * or a metastore admin, or have at least USE / SELECT and APPLY_TAG privilege on the associated + * securable. + */ + TagSecurableAssignmentsList update(UpdateTags updateTags); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsAPI.java new file mode 100755 index 000000000..d578e726d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsAPI.java @@ -0,0 +1,77 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 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. + */ +@Generated +public class SubentityTagsAPI { + private static final Logger LOG = LoggerFactory.getLogger(SubentityTagsAPI.class); + + private final SubentityTagsService impl; + + /** Regular-use constructor */ + public SubentityTagsAPI(ApiClient apiClient) { + impl = new SubentityTagsImpl(apiClient); + } + + /** Constructor for mocks */ + public SubentityTagsAPI(SubentityTagsService mock) { + impl = mock; + } + + public Iterable list( + ListSecurableType securableType, String fullName, String subentityName) { + return list( + new ListSubentityTagsRequest() + .setSecurableType(securableType) + .setFullName(fullName) + .setSubentityName(subentityName)); + } + + /** + * Get tags for a subentity. + * + *

Gets tag assignments for a subentity associated with a securable entity. Eg. column of a + * table The caller must be either the owner of the securable, or a metastore admin, or have at + * least USE / SELECT privilege on the associated securable. + */ + public Iterable list(ListSubentityTagsRequest request) { + return impl.list(request).getTagAssignments(); + } + + public TagSubentityAssignmentsList update( + TagChanges changes, + UpdateSecurableType securableType, + String fullName, + String subentityName) { + return update( + new UpdateTags() + .setChanges(changes) + .setSecurableType(securableType) + .setFullName(fullName) + .setSubentityName(subentityName)); + } + + /** + * Update tags for a subentity. + * + *

Update tag assignments for a subentity associated with a securable entity. The caller must + * be either the owner of the securable, or a metastore admin, or have at least USE / SELECT and + * APPLY_TAG privilege on the associated securable. + */ + public TagSubentityAssignmentsList update(UpdateTags request) { + return impl.update(request); + } + + public SubentityTagsService impl() { + return impl; + } +} 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 new file mode 100755 index 000000000..3c569fef8 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsImpl.java @@ -0,0 +1,33 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; + +/** Package-local implementation of SubentityTags */ +@Generated +class SubentityTagsImpl implements SubentityTagsService { + private final ApiClient apiClient; + + public SubentityTagsImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public TagSubentityAssignmentsList list(ListSubentityTagsRequest request) { + String path = + 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); + } + + @Override + public TagSubentityAssignmentsList update(UpdateTags request) { + String path = + 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); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsService.java new file mode 100755 index 000000000..24fb36945 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SubentityTagsService.java @@ -0,0 +1,34 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.support.Generated; + +/** + * 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. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface SubentityTagsService { + /** + * Get tags for a subentity. + * + *

Gets tag assignments for a subentity associated with a securable entity. Eg. column of a + * table The caller must be either the owner of the securable, or a metastore admin, or have at + * least USE / SELECT privilege on the associated securable. + */ + TagSubentityAssignmentsList list(ListSubentityTagsRequest listSubentityTagsRequest); + + /** + * Update tags for a subentity. + * + *

Update tag assignments for a subentity associated with a securable entity. The caller must + * be either the owner of the securable, or a metastore admin, or have at least USE / SELECT and + * APPLY_TAG privilege on the associated securable. + */ + TagSubentityAssignmentsList update(UpdateTags updateTags); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagChanges.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagChanges.java new file mode 100755 index 000000000..eb6e8f0f0 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagChanges.java @@ -0,0 +1,59 @@ +// 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.Collection; +import java.util.Objects; + +@Generated +public class TagChanges { + /** Tags to add for the current entity */ + @JsonProperty("add_tags") + private Collection addTags; + + /** Tags to remove for the current entity */ + @JsonProperty("remove") + private Collection remove; + + public TagChanges setAddTags(Collection addTags) { + this.addTags = addTags; + return this; + } + + public Collection getAddTags() { + return addTags; + } + + public TagChanges setRemove(Collection remove) { + this.remove = remove; + return this; + } + + public Collection getRemove() { + return remove; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagChanges that = (TagChanges) o; + return Objects.equals(addTags, that.addTags) && Objects.equals(remove, that.remove); + } + + @Override + public int hashCode() { + return Objects.hash(addTags, remove); + } + + @Override + public String toString() { + return new ToStringer(TagChanges.class) + .add("addTags", addTags) + .add("remove", remove) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagKeyValuePair.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagKeyValuePair.java new file mode 100755 index 000000000..7b3878aff --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagKeyValuePair.java @@ -0,0 +1,55 @@ +// 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 TagKeyValuePair { + /** Tag key name */ + @JsonProperty("key") + private String key; + + /** Tag value */ + @JsonProperty("value") + private String value; + + public TagKeyValuePair setKey(String key) { + this.key = key; + return this; + } + + public String getKey() { + return key; + } + + public TagKeyValuePair setValue(String value) { + this.value = value; + return this; + } + + public String getValue() { + return value; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagKeyValuePair that = (TagKeyValuePair) o; + return Objects.equals(key, that.key) && Objects.equals(value, that.value); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + @Override + public String toString() { + return new ToStringer(TagKeyValuePair.class).add("key", key).add("value", value).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurable.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurable.java new file mode 100755 index 000000000..bc825c579 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurable.java @@ -0,0 +1,58 @@ +// 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 TagSecurable { + /** Name of the securable entity */ + @JsonProperty("full_name") + private String fullName; + + /** Type of the securable entity */ + @JsonProperty("type") + private String typeValue; + + public TagSecurable setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + public String getFullName() { + return fullName; + } + + public TagSecurable setType(String typeValue) { + this.typeValue = typeValue; + return this; + } + + public String getType() { + return typeValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagSecurable that = (TagSecurable) o; + return Objects.equals(fullName, that.fullName) && Objects.equals(typeValue, that.typeValue); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, typeValue); + } + + @Override + public String toString() { + return new ToStringer(TagSecurable.class) + .add("fullName", fullName) + .add("typeValue", typeValue) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignment.java new file mode 100755 index 000000000..7a9d64a4f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignment.java @@ -0,0 +1,60 @@ +// 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.Collection; +import java.util.Objects; + +@Generated +public class TagSecurableAssignment { + /** Securable entity associated with the tagging information */ + @JsonProperty("securable") + private TagSecurable securable; + + /** tag assignments containing keys and values for the securable entity */ + @JsonProperty("tag_key_value_pairs") + private Collection tagKeyValuePairs; + + public TagSecurableAssignment setSecurable(TagSecurable securable) { + this.securable = securable; + return this; + } + + public TagSecurable getSecurable() { + return securable; + } + + public TagSecurableAssignment setTagKeyValuePairs(Collection tagKeyValuePairs) { + this.tagKeyValuePairs = tagKeyValuePairs; + return this; + } + + public Collection getTagKeyValuePairs() { + return tagKeyValuePairs; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagSecurableAssignment that = (TagSecurableAssignment) o; + return Objects.equals(securable, that.securable) + && Objects.equals(tagKeyValuePairs, that.tagKeyValuePairs); + } + + @Override + public int hashCode() { + return Objects.hash(securable, tagKeyValuePairs); + } + + @Override + public String toString() { + return new ToStringer(TagSecurableAssignment.class) + .add("securable", securable) + .add("tagKeyValuePairs", tagKeyValuePairs) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignmentsList.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignmentsList.java new file mode 100755 index 000000000..b5f1e5ef6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSecurableAssignmentsList.java @@ -0,0 +1,46 @@ +// 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.Collection; +import java.util.Objects; + +@Generated +public class TagSecurableAssignmentsList { + /** An array of tag assignments on a securable */ + @JsonProperty("tag_assignments") + private Collection tagAssignments; + + public TagSecurableAssignmentsList setTagAssignments( + Collection tagAssignments) { + this.tagAssignments = tagAssignments; + return this; + } + + public Collection getTagAssignments() { + return tagAssignments; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagSecurableAssignmentsList that = (TagSecurableAssignmentsList) o; + return Objects.equals(tagAssignments, that.tagAssignments); + } + + @Override + public int hashCode() { + return Objects.hash(tagAssignments); + } + + @Override + public String toString() { + return new ToStringer(TagSecurableAssignmentsList.class) + .add("tagAssignments", tagAssignments) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentity.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentity.java new file mode 100755 index 000000000..b7fa1f797 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentity.java @@ -0,0 +1,74 @@ +// 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 TagSubentity { + /** Name of the securable entity */ + @JsonProperty("full_name") + private String fullName; + + /** Name of the subentity */ + @JsonProperty("subentity") + private String subentity; + + /** Type of the securable entity */ + @JsonProperty("type") + private String typeValue; + + public TagSubentity setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + public String getFullName() { + return fullName; + } + + public TagSubentity setSubentity(String subentity) { + this.subentity = subentity; + return this; + } + + public String getSubentity() { + return subentity; + } + + public TagSubentity setType(String typeValue) { + this.typeValue = typeValue; + return this; + } + + public String getType() { + return typeValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagSubentity that = (TagSubentity) o; + return Objects.equals(fullName, that.fullName) + && Objects.equals(subentity, that.subentity) + && Objects.equals(typeValue, that.typeValue); + } + + @Override + public int hashCode() { + return Objects.hash(fullName, subentity, typeValue); + } + + @Override + public String toString() { + return new ToStringer(TagSubentity.class) + .add("fullName", fullName) + .add("subentity", subentity) + .add("typeValue", typeValue) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentityAssignmentsList.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentityAssignmentsList.java new file mode 100755 index 000000000..fd1266d4d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagSubentityAssignmentsList.java @@ -0,0 +1,46 @@ +// 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.Collection; +import java.util.Objects; + +@Generated +public class TagSubentityAssignmentsList { + /** An array of subentity tag assignments on a subentity */ + @JsonProperty("tag_assignments") + private Collection tagAssignments; + + public TagSubentityAssignmentsList setTagAssignments( + Collection tagAssignments) { + this.tagAssignments = tagAssignments; + return this; + } + + public Collection getTagAssignments() { + return tagAssignments; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagSubentityAssignmentsList that = (TagSubentityAssignmentsList) o; + return Objects.equals(tagAssignments, that.tagAssignments); + } + + @Override + public int hashCode() { + return Objects.hash(tagAssignments); + } + + @Override + public String toString() { + return new ToStringer(TagSubentityAssignmentsList.class) + .add("tagAssignments", tagAssignments) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagsSubentityAssignment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagsSubentityAssignment.java new file mode 100755 index 000000000..60f23a34d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagsSubentityAssignment.java @@ -0,0 +1,75 @@ +// 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.Collection; +import java.util.Objects; + +@Generated +public class TagsSubentityAssignment { + /** Subentity associated with the tagging information */ + @JsonProperty("securable") + private TagSubentity securable; + + /** Name of the subentity */ + @JsonProperty("subentity") + private String subentity; + + /** tag assignments containing keys and values for the securable entity */ + @JsonProperty("tag_key_value_pairs") + private Collection tagKeyValuePairs; + + public TagsSubentityAssignment setSecurable(TagSubentity securable) { + this.securable = securable; + return this; + } + + public TagSubentity getSecurable() { + return securable; + } + + public TagsSubentityAssignment setSubentity(String subentity) { + this.subentity = subentity; + return this; + } + + public String getSubentity() { + return subentity; + } + + public TagsSubentityAssignment setTagKeyValuePairs(Collection tagKeyValuePairs) { + this.tagKeyValuePairs = tagKeyValuePairs; + return this; + } + + public Collection getTagKeyValuePairs() { + return tagKeyValuePairs; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagsSubentityAssignment that = (TagsSubentityAssignment) o; + return Objects.equals(securable, that.securable) + && Objects.equals(subentity, that.subentity) + && Objects.equals(tagKeyValuePairs, that.tagKeyValuePairs); + } + + @Override + public int hashCode() { + return Objects.hash(securable, subentity, tagKeyValuePairs); + } + + @Override + public String toString() { + return new ToStringer(TagsSubentityAssignment.class) + .add("securable", securable) + .add("subentity", subentity) + .add("tagKeyValuePairs", tagKeyValuePairs) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateSecurableType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateSecurableType.java new file mode 100755 index 000000000..68c5c2a68 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateSecurableType.java @@ -0,0 +1,18 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +@Generated +public enum UpdateSecurableType { + @JsonProperty("catalog") + CATALOG, + + @JsonProperty("schema") + SCHEMA, + + @JsonProperty("table") + TABLE, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateTags.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateTags.java new file mode 100755 index 000000000..57a1200ba --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateTags.java @@ -0,0 +1,86 @@ +// 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 UpdateTags { + /** Desired changes to be made to the tag assignments on the entity */ + @JsonProperty("changes") + private TagChanges changes; + + /** The fully qualified name of the unity catalog securable entity. */ + private String fullName; + + /** The type of the unity catalog securable entity. */ + private UpdateSecurableType securableType; + + /** The name of subentity associated with the securable entity */ + private String subentityName; + + public UpdateTags setChanges(TagChanges changes) { + this.changes = changes; + return this; + } + + public TagChanges getChanges() { + return changes; + } + + public UpdateTags setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + public String getFullName() { + return fullName; + } + + public UpdateTags setSecurableType(UpdateSecurableType securableType) { + this.securableType = securableType; + return this; + } + + public UpdateSecurableType getSecurableType() { + return securableType; + } + + public UpdateTags setSubentityName(String subentityName) { + this.subentityName = subentityName; + return this; + } + + public String getSubentityName() { + return subentityName; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UpdateTags that = (UpdateTags) o; + return Objects.equals(changes, that.changes) + && Objects.equals(fullName, that.fullName) + && Objects.equals(securableType, that.securableType) + && Objects.equals(subentityName, that.subentityName); + } + + @Override + public int hashCode() { + return Objects.hash(changes, fullName, securableType, subentityName); + } + + @Override + public String toString() { + return new ToStringer(UpdateTags.class) + .add("changes", changes) + .add("fullName", fullName) + .add("securableType", securableType) + .add("subentityName", subentityName) + .toString(); + } +} 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/pom.xml b/pom.xml index cd7a16289..315c5ab74 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.databricks databricks-sdk-parent - 0.5.0 + 0.6.0 pom Databricks SDK for Java The Databricks SDK for Java includes functionality to accelerate development with Java for