diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index b867878f4..73633aa1e 100755 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -50a10950ac51e28984f99a85f0d4511e90d6ae94 \ No newline at end of file +bd6e15a1d13c8bf0fcaa1675bde0fd8fa37df2d0 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 2dde881ae..6c402aa3c 100755 --- a/.gitattributes +++ b/.gitattributes @@ -224,6 +224,39 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/UsageDashbo databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/WrappedCreateLogDeliveryConfiguration.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/WrappedLogDeliveryConfiguration.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/WrappedLogDeliveryConfigurations.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleAPI.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleImpl.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleService.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CompleteVersionRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateDeploymentRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateOperationRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateVersionRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeleteDeploymentRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Deployment.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeploymentResourceType.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeploymentStatus.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetDeploymentRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetOperationRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetResourceRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetVersionRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/HeartbeatRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/HeartbeatResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListDeploymentsRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListDeploymentsResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListOperationsRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListOperationsResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListResourcesRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListResourcesResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListVersionsRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListVersionsResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Operation.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/OperationActionType.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/OperationStatus.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Resource.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Version.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionComplete.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionStatus.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccessRequestDestinations.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsImpl.java linguist-generated=true @@ -2076,6 +2109,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelVersion.jav databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelVersionDatabricks.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelVersionStatus.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelVersionTag.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MtlsConfig.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/OfflineStoreConfig.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/OnlineStore.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/OnlineStoreConfig.java linguist-generated=true @@ -2127,6 +2161,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SearchModelsRequ databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SearchModelsResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SearchRuns.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SearchRunsResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SecretScopeReference.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SetExperimentTag.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SetLoggedModelTagsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SetModelTagRequest.java linguist-generated=true diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md old mode 100644 new mode 100755 index a5fe5821b..a8718252d --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -15,3 +15,6 @@ ### Internal Changes ### API Changes +* Add `com.databricks.sdk.service.bundle` package. +* Add `workspaceClient.bundle()` service. +* Add `mtlsConfig` field for `com.databricks.sdk.service.ml.AuthConfig`. \ No newline at end of file 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 6a33c1f53..3b09ae551 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 @@ -14,6 +14,8 @@ import com.databricks.sdk.service.apps.AppsService; import com.databricks.sdk.service.apps.AppsSettingsAPI; import com.databricks.sdk.service.apps.AppsSettingsService; +import com.databricks.sdk.service.bundle.BundleAPI; +import com.databricks.sdk.service.bundle.BundleService; import com.databricks.sdk.service.catalog.ArtifactAllowlistsAPI; import com.databricks.sdk.service.catalog.ArtifactAllowlistsService; import com.databricks.sdk.service.catalog.CatalogsAPI; @@ -284,6 +286,7 @@ public class WorkspaceClient { private AppsAPI appsAPI; private AppsSettingsAPI appsSettingsAPI; private ArtifactAllowlistsAPI artifactAllowlistsAPI; + private BundleAPI bundleAPI; private CatalogsAPI catalogsAPI; private CleanRoomAssetRevisionsAPI cleanRoomAssetRevisionsAPI; private CleanRoomAssetsAPI cleanRoomAssetsAPI; @@ -423,6 +426,7 @@ public WorkspaceClient(DatabricksConfig config) { appsAPI = new AppsAPI(apiClient); appsSettingsAPI = new AppsSettingsAPI(apiClient); artifactAllowlistsAPI = new ArtifactAllowlistsAPI(apiClient); + bundleAPI = new BundleAPI(apiClient); catalogsAPI = new CatalogsAPI(apiClient); cleanRoomAssetRevisionsAPI = new CleanRoomAssetRevisionsAPI(apiClient); cleanRoomAssetsAPI = new CleanRoomAssetsAPI(apiClient); @@ -630,6 +634,11 @@ public ArtifactAllowlistsAPI artifactAllowlists() { return artifactAllowlistsAPI; } + /** Service for managing bundle deployment metadata. */ + public BundleAPI bundle() { + return bundleAPI; + } + /** * 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 @@ -2312,6 +2321,17 @@ public WorkspaceClient withArtifactAllowlistsAPI(ArtifactAllowlistsAPI artifactA return this; } + /** Replace the default BundleService with a custom implementation. */ + public WorkspaceClient withBundleImpl(BundleService bundle) { + return this.withBundleAPI(new BundleAPI(bundle)); + } + + /** Replace the default BundleAPI with a custom implementation. */ + public WorkspaceClient withBundleAPI(BundleAPI bundle) { + this.bundleAPI = bundle; + return this; + } + /** Replace the default CatalogsService with a custom implementation. */ public WorkspaceClient withCatalogsImpl(CatalogsService catalogs) { return this.withCatalogsAPI(new CatalogsAPI(catalogs)); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleAPI.java new file mode 100755 index 000000000..66379d56f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleAPI.java @@ -0,0 +1,211 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.Paginator; + +/** Service for managing bundle deployment metadata. */ +@Generated +public class BundleAPI { + private static final Logger LOG = LoggerFactory.getLogger(BundleAPI.class); + + private final BundleService impl; + + /** Regular-use constructor */ + public BundleAPI(ApiClient apiClient) { + impl = new BundleImpl(apiClient); + } + + /** Constructor for mocks */ + public BundleAPI(BundleService mock) { + impl = mock; + } + + /** + * Marks a version as complete and releases the deployment lock. + * + *

The server atomically: 1. Sets the version status to the provided terminal status. 2. Sets + * `complete_time` to the current server timestamp. 3. Releases the lock on the parent deployment. + * 4. Updates the parent deployment's `status` and `last_version_id`. + */ + public Version completeVersion(CompleteVersionRequest request) { + return impl.completeVersion(request); + } + + /** + * Creates a new deployment in the workspace. + * + *

The caller must provide a `deployment_id` which becomes the final component of the + * deployment's resource name. If a deployment with the same ID already exists, the server returns + * `ALREADY_EXISTS`. + */ + public Deployment createDeployment(CreateDeploymentRequest request) { + return impl.createDeployment(request); + } + + /** + * Creates a resource operation under a version. + * + *

The caller must provide a `resource_key` which becomes the final component of the + * operation's name. If an operation with the same key already exists under the version, the + * server returns `ALREADY_EXISTS`. + * + *

On success the server also updates the corresponding deployment-level Resource (creating it + * if this is the first operation for that resource_key, or removing it if action_type is DELETE). + */ + public Operation createOperation(CreateOperationRequest request) { + return impl.createOperation(request); + } + + /** + * Creates a new version under a deployment. + * + *

Creating a version acquires an exclusive lock on the deployment, preventing concurrent + * deploys. The caller provides a `version_id` which the server validates equals `last_version_id + * + 1` on the deployment. + */ + public Version createVersion(CreateVersionRequest request) { + return impl.createVersion(request); + } + + public void deleteDeployment(String name) { + deleteDeployment(new DeleteDeploymentRequest().setName(name)); + } + + /** + * Deletes a deployment. + * + *

The deployment is marked as deleted. It and all its children (versions and their operations) + * will be permanently deleted after the retention policy expires. If the deployment has an + * in-progress version, the server returns `RESOURCE_CONFLICT`. + */ + public void deleteDeployment(DeleteDeploymentRequest request) { + impl.deleteDeployment(request); + } + + public Deployment getDeployment(String name) { + return getDeployment(new GetDeploymentRequest().setName(name)); + } + + /** Retrieves a deployment by its resource name. */ + public Deployment getDeployment(GetDeploymentRequest request) { + return impl.getDeployment(request); + } + + public Operation getOperation(String name) { + return getOperation(new GetOperationRequest().setName(name)); + } + + /** Retrieves a resource operation by its resource name. */ + public Operation getOperation(GetOperationRequest request) { + return impl.getOperation(request); + } + + public Resource getResource(String name) { + return getResource(new GetResourceRequest().setName(name)); + } + + /** Retrieves a deployment resource by its resource name. */ + public Resource getResource(GetResourceRequest request) { + return impl.getResource(request); + } + + public Version getVersion(String name) { + return getVersion(new GetVersionRequest().setName(name)); + } + + /** Retrieves a version by its resource name. */ + public Version getVersion(GetVersionRequest request) { + return impl.getVersion(request); + } + + /** + * Sends a heartbeat to renew the lock held by a version. + * + *

The server validates that the version is the active (non-terminal) version on the parent + * deployment and resets the lock expiry. If the lock has already expired or the version is no + * longer active, the server returns `ABORTED`. + */ + public HeartbeatResponse heartbeat(HeartbeatRequest request) { + return impl.heartbeat(request); + } + + /** Lists deployments in the workspace. */ + public Iterable listDeployments(ListDeploymentsRequest request) { + return new Paginator<>( + request, + impl::listDeployments, + ListDeploymentsResponse::getDeployments, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + public Iterable listOperations(String parent) { + return listOperations(new ListOperationsRequest().setParent(parent)); + } + + /** Lists resource operations under a version. */ + public Iterable listOperations(ListOperationsRequest request) { + return new Paginator<>( + request, + impl::listOperations, + ListOperationsResponse::getOperations, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + public Iterable listResources(String parent) { + return listResources(new ListResourcesRequest().setParent(parent)); + } + + /** Lists resources under a deployment. */ + public Iterable listResources(ListResourcesRequest request) { + return new Paginator<>( + request, + impl::listResources, + ListResourcesResponse::getResources, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + public Iterable listVersions(String parent) { + return listVersions(new ListVersionsRequest().setParent(parent)); + } + + /** Lists versions under a deployment, ordered by version_id descending (most recent first). */ + public Iterable listVersions(ListVersionsRequest request) { + return new Paginator<>( + request, + impl::listVersions, + ListVersionsResponse::getVersions, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + public BundleService impl() { + return impl; + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleImpl.java new file mode 100755 index 000000000..60d3a95c0 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleImpl.java @@ -0,0 +1,261 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.http.Request; +import com.databricks.sdk.support.Generated; +import java.io.IOException; + +/** Package-local implementation of Bundle */ +@Generated +class BundleImpl implements BundleService { + private final ApiClient apiClient; + + public BundleImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public Version completeVersion(CompleteVersionRequest request) { + String path = String.format("/api/2.0/bundle/%s/complete", request.getName()); + try { + Request req = new Request("POST", path, apiClient.serialize(request)); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Version.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Deployment createDeployment(CreateDeploymentRequest request) { + String path = "/api/2.0/bundle/deployments"; + try { + Request req = new Request("POST", path, apiClient.serialize(request.getDeployment())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Deployment.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Operation createOperation(CreateOperationRequest request) { + String path = String.format("/api/2.0/bundle/%s/operations", request.getParent()); + try { + Request req = new Request("POST", path, apiClient.serialize(request.getOperation())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Version createVersion(CreateVersionRequest request) { + String path = String.format("/api/2.0/bundle/%s/versions", request.getParent()); + try { + Request req = new Request("POST", path, apiClient.serialize(request.getVersion())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Version.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public void deleteDeployment(DeleteDeploymentRequest request) { + String path = String.format("/api/2.0/bundle/%s", request.getName()); + try { + Request req = new Request("DELETE", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + apiClient.execute(req, Void.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Deployment getDeployment(GetDeploymentRequest request) { + String path = String.format("/api/2.0/bundle/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Deployment.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Operation getOperation(GetOperationRequest request) { + String path = String.format("/api/2.0/bundle/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Resource getResource(GetResourceRequest request) { + String path = String.format("/api/2.0/bundle/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Resource.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Version getVersion(GetVersionRequest request) { + String path = String.format("/api/2.0/bundle/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Version.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public HeartbeatResponse heartbeat(HeartbeatRequest request) { + String path = String.format("/api/2.0/bundle/%s/heartbeat", request.getName()); + try { + Request req = new Request("POST", path, apiClient.serialize(request)); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, HeartbeatResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ListDeploymentsResponse listDeployments(ListDeploymentsRequest request) { + String path = "/api/2.0/bundle/deployments"; + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListDeploymentsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ListOperationsResponse listOperations(ListOperationsRequest request) { + String path = String.format("/api/2.0/bundle/%s/operations", request.getParent()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListOperationsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ListResourcesResponse listResources(ListResourcesRequest request) { + String path = String.format("/api/2.0/bundle/%s/resources", request.getParent()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListResourcesResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ListVersionsResponse listVersions(ListVersionsRequest request) { + String path = String.format("/api/2.0/bundle/%s/versions", request.getParent()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Org-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListVersionsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleService.java new file mode 100755 index 000000000..8026025ec --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleService.java @@ -0,0 +1,95 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; + +/** + * Service for managing bundle deployment metadata. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface BundleService { + /** + * Marks a version as complete and releases the deployment lock. + * + *

The server atomically: 1. Sets the version status to the provided terminal status. 2. Sets + * `complete_time` to the current server timestamp. 3. Releases the lock on the parent deployment. + * 4. Updates the parent deployment's `status` and `last_version_id`. + */ + Version completeVersion(CompleteVersionRequest completeVersionRequest); + + /** + * Creates a new deployment in the workspace. + * + *

The caller must provide a `deployment_id` which becomes the final component of the + * deployment's resource name. If a deployment with the same ID already exists, the server returns + * `ALREADY_EXISTS`. + */ + Deployment createDeployment(CreateDeploymentRequest createDeploymentRequest); + + /** + * Creates a resource operation under a version. + * + *

The caller must provide a `resource_key` which becomes the final component of the + * operation's name. If an operation with the same key already exists under the version, the + * server returns `ALREADY_EXISTS`. + * + *

On success the server also updates the corresponding deployment-level Resource (creating it + * if this is the first operation for that resource_key, or removing it if action_type is DELETE). + */ + Operation createOperation(CreateOperationRequest createOperationRequest); + + /** + * Creates a new version under a deployment. + * + *

Creating a version acquires an exclusive lock on the deployment, preventing concurrent + * deploys. The caller provides a `version_id` which the server validates equals `last_version_id + * + 1` on the deployment. + */ + Version createVersion(CreateVersionRequest createVersionRequest); + + /** + * Deletes a deployment. + * + *

The deployment is marked as deleted. It and all its children (versions and their operations) + * will be permanently deleted after the retention policy expires. If the deployment has an + * in-progress version, the server returns `RESOURCE_CONFLICT`. + */ + void deleteDeployment(DeleteDeploymentRequest deleteDeploymentRequest); + + /** Retrieves a deployment by its resource name. */ + Deployment getDeployment(GetDeploymentRequest getDeploymentRequest); + + /** Retrieves a resource operation by its resource name. */ + Operation getOperation(GetOperationRequest getOperationRequest); + + /** Retrieves a deployment resource by its resource name. */ + Resource getResource(GetResourceRequest getResourceRequest); + + /** Retrieves a version by its resource name. */ + Version getVersion(GetVersionRequest getVersionRequest); + + /** + * Sends a heartbeat to renew the lock held by a version. + * + *

The server validates that the version is the active (non-terminal) version on the parent + * deployment and resets the lock expiry. If the lock has already expired or the version is no + * longer active, the server returns `ABORTED`. + */ + HeartbeatResponse heartbeat(HeartbeatRequest heartbeatRequest); + + /** Lists deployments in the workspace. */ + ListDeploymentsResponse listDeployments(ListDeploymentsRequest listDeploymentsRequest); + + /** Lists resource operations under a version. */ + ListOperationsResponse listOperations(ListOperationsRequest listOperationsRequest); + + /** Lists resources under a deployment. */ + ListResourcesResponse listResources(ListResourcesRequest listResourcesRequest); + + /** Lists versions under a deployment, ordered by version_id descending (most recent first). */ + ListVersionsResponse listVersions(ListVersionsRequest listVersionsRequest); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CompleteVersionRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CompleteVersionRequest.java new file mode 100755 index 000000000..620e7b9c9 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CompleteVersionRequest.java @@ -0,0 +1,83 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A request to complete a Version. */ +@Generated +public class CompleteVersionRequest { + /** + * The reason for completing the version. Must be a terminal reason: VERSION_COMPLETE_SUCCESS, + * VERSION_COMPLETE_FAILURE, or VERSION_COMPLETE_FORCE_ABORT. + */ + @JsonProperty("completion_reason") + private VersionComplete completionReason; + + /** + * If true, force-completes the version even if the caller is not the original creator. The + * completion_reason must be VERSION_COMPLETE_FORCE_ABORT when force is true. + */ + @JsonProperty("force") + private Boolean force; + + /** + * The name of the version to complete. Format: deployments/{deployment_id}/versions/{version_id} + */ + @JsonIgnore private String name; + + public CompleteVersionRequest setCompletionReason(VersionComplete completionReason) { + this.completionReason = completionReason; + return this; + } + + public VersionComplete getCompletionReason() { + return completionReason; + } + + public CompleteVersionRequest setForce(Boolean force) { + this.force = force; + return this; + } + + public Boolean getForce() { + return force; + } + + public CompleteVersionRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CompleteVersionRequest that = (CompleteVersionRequest) o; + return Objects.equals(completionReason, that.completionReason) + && Objects.equals(force, that.force) + && Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(completionReason, force, name); + } + + @Override + public String toString() { + return new ToStringer(CompleteVersionRequest.class) + .add("completionReason", completionReason) + .add("force", force) + .add("name", name) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateDeploymentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateDeploymentRequest.java new file mode 100755 index 000000000..a3298d963 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateDeploymentRequest.java @@ -0,0 +1,65 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class CreateDeploymentRequest { + /** The deployment to create. */ + @JsonProperty("deployment") + private Deployment deployment; + + /** + * The ID to use for the deployment, which will become the final component of the deployment's + * resource name (i.e. `deployments/{deployment_id}`). + */ + @JsonIgnore + @QueryParam("deployment_id") + private String deploymentId; + + public CreateDeploymentRequest setDeployment(Deployment deployment) { + this.deployment = deployment; + return this; + } + + public Deployment getDeployment() { + return deployment; + } + + public CreateDeploymentRequest setDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; + return this; + } + + public String getDeploymentId() { + return deploymentId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreateDeploymentRequest that = (CreateDeploymentRequest) o; + return Objects.equals(deployment, that.deployment) + && Objects.equals(deploymentId, that.deploymentId); + } + + @Override + public int hashCode() { + return Objects.hash(deployment, deploymentId); + } + + @Override + public String toString() { + return new ToStringer(CreateDeploymentRequest.class) + .add("deployment", deployment) + .add("deploymentId", deploymentId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateOperationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateOperationRequest.java new file mode 100755 index 000000000..5f575fe58 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateOperationRequest.java @@ -0,0 +1,82 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class CreateOperationRequest { + /** The resource operation to create. */ + @JsonProperty("operation") + private Operation operation; + + /** + * The parent version where this operation will be recorded. Format: + * deployments/{deployment_id}/versions/{version_id} + */ + @JsonIgnore private String parent; + + /** + * The key identifying the resource this operation applies to. Becomes the final component of the + * operation's name. + */ + @JsonIgnore + @QueryParam("resource_key") + private String resourceKey; + + public CreateOperationRequest setOperation(Operation operation) { + this.operation = operation; + return this; + } + + public Operation getOperation() { + return operation; + } + + public CreateOperationRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + public CreateOperationRequest setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + public String getResourceKey() { + return resourceKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreateOperationRequest that = (CreateOperationRequest) o; + return Objects.equals(operation, that.operation) + && Objects.equals(parent, that.parent) + && Objects.equals(resourceKey, that.resourceKey); + } + + @Override + public int hashCode() { + return Objects.hash(operation, parent, resourceKey); + } + + @Override + public String toString() { + return new ToStringer(CreateOperationRequest.class) + .add("operation", operation) + .add("parent", parent) + .add("resourceKey", resourceKey) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateVersionRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateVersionRequest.java new file mode 100755 index 000000000..6932340aa --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/CreateVersionRequest.java @@ -0,0 +1,81 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class CreateVersionRequest { + /** + * The parent deployment where this version will be created. Format: deployments/{deployment_id} + */ + @JsonIgnore private String parent; + + /** The version to create. */ + @JsonProperty("version") + private Version version; + + /** + * The version ID the caller expects to create. The server validates this equals `last_version_id + * + 1` on the deployment. If it doesn't match, the server returns `ABORTED`. + */ + @JsonIgnore + @QueryParam("version_id") + private String versionId; + + public CreateVersionRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + public CreateVersionRequest setVersion(Version version) { + this.version = version; + return this; + } + + public Version getVersion() { + return version; + } + + public CreateVersionRequest setVersionId(String versionId) { + this.versionId = versionId; + return this; + } + + public String getVersionId() { + return versionId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreateVersionRequest that = (CreateVersionRequest) o; + return Objects.equals(parent, that.parent) + && Objects.equals(version, that.version) + && Objects.equals(versionId, that.versionId); + } + + @Override + public int hashCode() { + return Objects.hash(parent, version, versionId); + } + + @Override + public String toString() { + return new ToStringer(CreateVersionRequest.class) + .add("parent", parent) + .add("version", version) + .add("versionId", versionId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeleteDeploymentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeleteDeploymentRequest.java new file mode 100755 index 000000000..5fb5375d1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeleteDeploymentRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class DeleteDeploymentRequest { + /** Resource name of the deployment to delete. Format: deployments/{deployment_id} */ + @JsonIgnore private String name; + + public DeleteDeploymentRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeleteDeploymentRequest that = (DeleteDeploymentRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(DeleteDeploymentRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Deployment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Deployment.java new file mode 100755 index 000000000..e12c69cb3 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Deployment.java @@ -0,0 +1,198 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Timestamp; +import java.util.Objects; + +/** A bundle deployment registered with the control plane. */ +@Generated +public class Deployment { + /** When the deployment was created. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** The user who created the deployment (email or principal name). */ + @JsonProperty("created_by") + private String createdBy; + + /** + * When the deployment was destroyed (i.e. `bundle destroy` completed). Unset if the deployment + * has not been destroyed. Named destroy_time (not delete_time) because this tracks the + * `databricks bundle destroy` command, not the API-level deletion. + */ + @JsonProperty("destroy_time") + private Timestamp destroyTime; + + /** + * The user who destroyed the deployment (email or principal name). Unset if the deployment has + * not been destroyed. + */ + @JsonProperty("destroyed_by") + private String destroyedBy; + + /** Human-readable name for the deployment. */ + @JsonProperty("display_name") + private String displayName; + + /** The version_id of the most recent deployment version. */ + @JsonProperty("last_version_id") + private String lastVersionId; + + /** Resource name of the deployment. Format: deployments/{deployment_id} */ + @JsonProperty("name") + private String name; + + /** Current status of the deployment. */ + @JsonProperty("status") + private DeploymentStatus status; + + /** The bundle target name associated with this deployment. */ + @JsonProperty("target_name") + private String targetName; + + /** When the deployment was last updated. */ + @JsonProperty("update_time") + private Timestamp updateTime; + + public Deployment setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public Deployment setCreatedBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + public String getCreatedBy() { + return createdBy; + } + + public Deployment setDestroyTime(Timestamp destroyTime) { + this.destroyTime = destroyTime; + return this; + } + + public Timestamp getDestroyTime() { + return destroyTime; + } + + public Deployment setDestroyedBy(String destroyedBy) { + this.destroyedBy = destroyedBy; + return this; + } + + public String getDestroyedBy() { + return destroyedBy; + } + + public Deployment setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public Deployment setLastVersionId(String lastVersionId) { + this.lastVersionId = lastVersionId; + return this; + } + + public String getLastVersionId() { + return lastVersionId; + } + + public Deployment setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public Deployment setStatus(DeploymentStatus status) { + this.status = status; + return this; + } + + public DeploymentStatus getStatus() { + return status; + } + + public Deployment setTargetName(String targetName) { + this.targetName = targetName; + return this; + } + + public String getTargetName() { + return targetName; + } + + public Deployment setUpdateTime(Timestamp updateTime) { + this.updateTime = updateTime; + return this; + } + + public Timestamp getUpdateTime() { + return updateTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Deployment that = (Deployment) o; + return Objects.equals(createTime, that.createTime) + && Objects.equals(createdBy, that.createdBy) + && Objects.equals(destroyTime, that.destroyTime) + && Objects.equals(destroyedBy, that.destroyedBy) + && Objects.equals(displayName, that.displayName) + && Objects.equals(lastVersionId, that.lastVersionId) + && Objects.equals(name, that.name) + && Objects.equals(status, that.status) + && Objects.equals(targetName, that.targetName) + && Objects.equals(updateTime, that.updateTime); + } + + @Override + public int hashCode() { + return Objects.hash( + createTime, + createdBy, + destroyTime, + destroyedBy, + displayName, + lastVersionId, + name, + status, + targetName, + updateTime); + } + + @Override + public String toString() { + return new ToStringer(Deployment.class) + .add("createTime", createTime) + .add("createdBy", createdBy) + .add("destroyTime", destroyTime) + .add("destroyedBy", destroyedBy) + .add("displayName", displayName) + .add("lastVersionId", lastVersionId) + .add("name", name) + .add("status", status) + .add("targetName", targetName) + .add("updateTime", updateTime) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeploymentResourceType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeploymentResourceType.java new file mode 100755 index 000000000..34293b94b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeploymentResourceType.java @@ -0,0 +1,33 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; + +/** Type of a deployment resource. */ +@Generated +public enum DeploymentResourceType { + DEPLOYMENT_RESOURCE_TYPE_ALERT, + DEPLOYMENT_RESOURCE_TYPE_APP, + DEPLOYMENT_RESOURCE_TYPE_CATALOG, + DEPLOYMENT_RESOURCE_TYPE_CLUSTER, + DEPLOYMENT_RESOURCE_TYPE_DASHBOARD, + DEPLOYMENT_RESOURCE_TYPE_DATABASE_CATALOG, + DEPLOYMENT_RESOURCE_TYPE_DATABASE_INSTANCE, + DEPLOYMENT_RESOURCE_TYPE_EXPERIMENT, + DEPLOYMENT_RESOURCE_TYPE_EXTERNAL_LOCATION, + DEPLOYMENT_RESOURCE_TYPE_JOB, + DEPLOYMENT_RESOURCE_TYPE_MODEL, + DEPLOYMENT_RESOURCE_TYPE_MODEL_SERVING_ENDPOINT, + DEPLOYMENT_RESOURCE_TYPE_PIPELINE, + DEPLOYMENT_RESOURCE_TYPE_POSTGRES_BRANCH, + DEPLOYMENT_RESOURCE_TYPE_POSTGRES_ENDPOINT, + DEPLOYMENT_RESOURCE_TYPE_POSTGRES_PROJECT, + DEPLOYMENT_RESOURCE_TYPE_QUALITY_MONITOR, + DEPLOYMENT_RESOURCE_TYPE_REGISTERED_MODEL, + DEPLOYMENT_RESOURCE_TYPE_SCHEMA, + DEPLOYMENT_RESOURCE_TYPE_SECRET_SCOPE, + DEPLOYMENT_RESOURCE_TYPE_SQL_WAREHOUSE, + DEPLOYMENT_RESOURCE_TYPE_SYNCED_DATABASE_TABLE, + DEPLOYMENT_RESOURCE_TYPE_VOLUME, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeploymentStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeploymentStatus.java new file mode 100755 index 000000000..8c9f8bfc7 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/DeploymentStatus.java @@ -0,0 +1,14 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; + +/** Status of a deployment. */ +@Generated +public enum DeploymentStatus { + DEPLOYMENT_STATUS_ACTIVE, + DEPLOYMENT_STATUS_DELETED, + DEPLOYMENT_STATUS_FAILED, + DEPLOYMENT_STATUS_IN_PROGRESS, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetDeploymentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetDeploymentRequest.java new file mode 100755 index 000000000..70c891035 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetDeploymentRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class GetDeploymentRequest { + /** Resource name of the deployment to retrieve. Format: deployments/{deployment_id} */ + @JsonIgnore private String name; + + public GetDeploymentRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GetDeploymentRequest that = (GetDeploymentRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetDeploymentRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetOperationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetOperationRequest.java new file mode 100755 index 000000000..a0e41c681 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetOperationRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class GetOperationRequest { + /** + * The name of the resource operation to retrieve. Format: + * deployments/{deployment_id}/versions/{version_id}/operations/{resource_key} + */ + @JsonIgnore private String name; + + public GetOperationRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GetOperationRequest that = (GetOperationRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetOperationRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetResourceRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetResourceRequest.java new file mode 100755 index 000000000..df4c2ff0d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetResourceRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class GetResourceRequest { + /** + * The name of the resource to retrieve. Format: + * deployments/{deployment_id}/resources/{resource_key} + */ + @JsonIgnore private String name; + + public GetResourceRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GetResourceRequest that = (GetResourceRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetResourceRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetVersionRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetVersionRequest.java new file mode 100755 index 000000000..fd9b6f025 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/GetVersionRequest.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class GetVersionRequest { + /** + * The name of the version to retrieve. Format: deployments/{deployment_id}/versions/{version_id} + */ + @JsonIgnore private String name; + + public GetVersionRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GetVersionRequest that = (GetVersionRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetVersionRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/HeartbeatRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/HeartbeatRequest.java new file mode 100755 index 000000000..6facc1e4d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/HeartbeatRequest.java @@ -0,0 +1,42 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +/** A request to send a heartbeat for a Version. */ +@Generated +public class HeartbeatRequest { + /** The version whose lock to renew. Format: deployments/{deployment_id}/versions/{version_id} */ + @JsonIgnore private String name; + + public HeartbeatRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HeartbeatRequest that = (HeartbeatRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(HeartbeatRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/HeartbeatResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/HeartbeatResponse.java new file mode 100755 index 000000000..8b06e84e0 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/HeartbeatResponse.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Timestamp; +import java.util.Objects; + +/** Response for Heartbeat. */ +@Generated +public class HeartbeatResponse { + /** The new lock expiry time after renewal. */ + @JsonProperty("expire_time") + private Timestamp expireTime; + + public HeartbeatResponse setExpireTime(Timestamp expireTime) { + this.expireTime = expireTime; + return this; + } + + public Timestamp getExpireTime() { + return expireTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HeartbeatResponse that = (HeartbeatResponse) o; + return Objects.equals(expireTime, that.expireTime); + } + + @Override + public int hashCode() { + return Objects.hash(expireTime); + } + + @Override + public String toString() { + return new ToStringer(HeartbeatResponse.class).add("expireTime", expireTime).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListDeploymentsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListDeploymentsRequest.java new file mode 100755 index 000000000..d6448ed4d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListDeploymentsRequest.java @@ -0,0 +1,68 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class ListDeploymentsRequest { + /** + * The maximum number of deployments to return. The service may return fewer than this value. If + * unspecified, at most 50 deployments will be returned. The maximum value is 1000; values above + * 1000 will be coerced to 1000. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * A page token, received from a previous `ListDeployments` call. Provide this to retrieve the + * subsequent page. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + public ListDeploymentsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListDeploymentsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListDeploymentsRequest that = (ListDeploymentsRequest) o; + return Objects.equals(pageSize, that.pageSize) && Objects.equals(pageToken, that.pageToken); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken); + } + + @Override + public String toString() { + return new ToStringer(ListDeploymentsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListDeploymentsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListDeploymentsResponse.java new file mode 100755 index 000000000..c1c3cd7c2 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListDeploymentsResponse.java @@ -0,0 +1,64 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +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; + +/** Response for ListDeployments. */ +@Generated +public class ListDeploymentsResponse { + /** The deployments from the queried workspace. */ + @JsonProperty("deployments") + private Collection deployments; + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + */ + @JsonProperty("next_page_token") + private String nextPageToken; + + public ListDeploymentsResponse setDeployments(Collection deployments) { + this.deployments = deployments; + return this; + } + + public Collection getDeployments() { + return deployments; + } + + public ListDeploymentsResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListDeploymentsResponse that = (ListDeploymentsResponse) o; + return Objects.equals(deployments, that.deployments) + && Objects.equals(nextPageToken, that.nextPageToken); + } + + @Override + public int hashCode() { + return Objects.hash(deployments, nextPageToken); + } + + @Override + public String toString() { + return new ToStringer(ListDeploymentsResponse.class) + .add("deployments", deployments) + .add("nextPageToken", nextPageToken) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListOperationsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListOperationsRequest.java new file mode 100755 index 000000000..18b30e991 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListOperationsRequest.java @@ -0,0 +1,83 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class ListOperationsRequest { + /** + * The maximum number of operations to return. The service may return fewer than this value. If + * unspecified, at most 50 operations will be returned. The maximum value is 1000; values above + * 1000 will be coerced to 1000. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * A page token, received from a previous `ListOperations` call. Provide this to retrieve the + * subsequent page. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** The parent version. Format: deployments/{deployment_id}/versions/{version_id} */ + @JsonIgnore private String parent; + + public ListOperationsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListOperationsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListOperationsRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListOperationsRequest that = (ListOperationsRequest) o; + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken, parent); + } + + @Override + public String toString() { + return new ToStringer(ListOperationsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListOperationsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListOperationsResponse.java new file mode 100755 index 000000000..cce40b9de --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListOperationsResponse.java @@ -0,0 +1,64 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +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; + +/** Response for ListOperations. */ +@Generated +public class ListOperationsResponse { + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + */ + @JsonProperty("next_page_token") + private String nextPageToken; + + /** The resource operations under the specified version. */ + @JsonProperty("operations") + private Collection operations; + + public ListOperationsResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public ListOperationsResponse setOperations(Collection operations) { + this.operations = operations; + return this; + } + + public Collection getOperations() { + return operations; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListOperationsResponse that = (ListOperationsResponse) o; + return Objects.equals(nextPageToken, that.nextPageToken) + && Objects.equals(operations, that.operations); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, operations); + } + + @Override + public String toString() { + return new ToStringer(ListOperationsResponse.class) + .add("nextPageToken", nextPageToken) + .add("operations", operations) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListResourcesRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListResourcesRequest.java new file mode 100755 index 000000000..d80074544 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListResourcesRequest.java @@ -0,0 +1,83 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class ListResourcesRequest { + /** + * The maximum number of resources to return. The service may return fewer than this value. If + * unspecified, at most 50 resources will be returned. The maximum value is 1000; values above + * 1000 will be coerced to 1000. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * A page token, received from a previous `ListResources` call. Provide this to retrieve the + * subsequent page. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** The parent deployment. Format: deployments/{deployment_id} */ + @JsonIgnore private String parent; + + public ListResourcesRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListResourcesRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListResourcesRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListResourcesRequest that = (ListResourcesRequest) o; + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken, parent); + } + + @Override + public String toString() { + return new ToStringer(ListResourcesRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListResourcesResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListResourcesResponse.java new file mode 100755 index 000000000..1a509d2a7 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListResourcesResponse.java @@ -0,0 +1,64 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +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; + +/** Response for ListResources. */ +@Generated +public class ListResourcesResponse { + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + */ + @JsonProperty("next_page_token") + private String nextPageToken; + + /** The resources under the specified deployment. */ + @JsonProperty("resources") + private Collection resources; + + public ListResourcesResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public ListResourcesResponse setResources(Collection resources) { + this.resources = resources; + return this; + } + + public Collection getResources() { + return resources; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListResourcesResponse that = (ListResourcesResponse) o; + return Objects.equals(nextPageToken, that.nextPageToken) + && Objects.equals(resources, that.resources); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, resources); + } + + @Override + public String toString() { + return new ToStringer(ListResourcesResponse.class) + .add("nextPageToken", nextPageToken) + .add("resources", resources) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListVersionsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListVersionsRequest.java new file mode 100755 index 000000000..d6bab0e53 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListVersionsRequest.java @@ -0,0 +1,83 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class ListVersionsRequest { + /** + * The maximum number of versions to return. The service may return fewer than this value. If + * unspecified, at most 50 versions will be returned. The maximum value is 1000; values above 1000 + * will be coerced to 1000. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * A page token, received from a previous `ListVersions` call. Provide this to retrieve the + * subsequent page. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** The parent deployment. Format: deployments/{deployment_id} */ + @JsonIgnore private String parent; + + public ListVersionsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListVersionsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListVersionsRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListVersionsRequest that = (ListVersionsRequest) o; + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken, parent); + } + + @Override + public String toString() { + return new ToStringer(ListVersionsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListVersionsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListVersionsResponse.java new file mode 100755 index 000000000..f54cc3ada --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/ListVersionsResponse.java @@ -0,0 +1,64 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +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; + +/** Response for ListVersions. */ +@Generated +public class ListVersionsResponse { + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + */ + @JsonProperty("next_page_token") + private String nextPageToken; + + /** The versions under the specified deployment. */ + @JsonProperty("versions") + private Collection versions; + + public ListVersionsResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public ListVersionsResponse setVersions(Collection versions) { + this.versions = versions; + return this; + } + + public Collection getVersions() { + return versions; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListVersionsResponse that = (ListVersionsResponse) o; + return Objects.equals(nextPageToken, that.nextPageToken) + && Objects.equals(versions, that.versions); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, versions); + } + + @Override + public String toString() { + return new ToStringer(ListVersionsResponse.class) + .add("nextPageToken", nextPageToken) + .add("versions", versions) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Operation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Operation.java new file mode 100755 index 000000000..cb9298c97 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Operation.java @@ -0,0 +1,169 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import com.google.protobuf.Timestamp; +import java.util.Objects; + +/** + * An operation on a single resource performed during a version. Operations are append-only and + * record the result of applying a resource change to the workspace. + */ +@Generated +public class Operation { + /** The type of operation performed on this resource. */ + @JsonProperty("action_type") + private OperationActionType actionType; + + /** When the operation was recorded. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** + * Error message if the operation failed. Set when status is OPERATION_STATUS_FAILED. Captures the + * error encountered while applying the resource to the workspace. + */ + @JsonProperty("error_message") + private String errorMessage; + + /** + * Resource name of the operation. Format: + * deployments/{deployment_id}/versions/{version_id}/operations/{resource_key} + */ + @JsonProperty("name") + private String name; + + /** + * ID reference for the actual resource in the workspace (e.g. the job ID, pipeline ID). Should be + * unset for delete operations. + */ + @JsonProperty("resource_id") + private String resourceId; + + /** + * Resource identifier within the bundle (e.g. "jobs.foo", "pipelines.bar", + * "jobs.foo.permissions", "files."). Can be an arbitrary UTF-8 encoded string key. This + * key links the operation to the corresponding deployment-level Resource. + */ + @JsonProperty("resource_key") + private String resourceKey; + + /** Serialized local config state after the operation. Should be unset for delete operations. */ + @JsonProperty("state") + private JsonNode state; + + /** Whether the operation succeeded or failed. */ + @JsonProperty("status") + private OperationStatus status; + + public Operation setActionType(OperationActionType actionType) { + this.actionType = actionType; + return this; + } + + public OperationActionType getActionType() { + return actionType; + } + + public Operation setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public Operation setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + public String getErrorMessage() { + return errorMessage; + } + + public Operation setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public Operation setResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + public String getResourceId() { + return resourceId; + } + + public Operation setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + public String getResourceKey() { + return resourceKey; + } + + public Operation setState(JsonNode state) { + this.state = state; + return this; + } + + public JsonNode getState() { + return state; + } + + public Operation setStatus(OperationStatus status) { + this.status = status; + return this; + } + + public OperationStatus getStatus() { + return status; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Operation that = (Operation) o; + return Objects.equals(actionType, that.actionType) + && Objects.equals(createTime, that.createTime) + && Objects.equals(errorMessage, that.errorMessage) + && Objects.equals(name, that.name) + && Objects.equals(resourceId, that.resourceId) + && Objects.equals(resourceKey, that.resourceKey) + && Objects.equals(state, that.state) + && Objects.equals(status, that.status); + } + + @Override + public int hashCode() { + return Objects.hash( + actionType, createTime, errorMessage, name, resourceId, resourceKey, state, status); + } + + @Override + public String toString() { + return new ToStringer(Operation.class) + .add("actionType", actionType) + .add("createTime", createTime) + .add("errorMessage", errorMessage) + .add("name", name) + .add("resourceId", resourceId) + .add("resourceKey", resourceKey) + .add("state", state) + .add("status", status) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/OperationActionType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/OperationActionType.java new file mode 100755 index 000000000..e692cad63 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/OperationActionType.java @@ -0,0 +1,19 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; + +/** Type of action performed on a resource during a deployment. */ +@Generated +public enum OperationActionType { + OPERATION_ACTION_TYPE_BIND, + OPERATION_ACTION_TYPE_BIND_AND_UPDATE, + OPERATION_ACTION_TYPE_CREATE, + OPERATION_ACTION_TYPE_DELETE, + OPERATION_ACTION_TYPE_INITIAL_REGISTER, + OPERATION_ACTION_TYPE_RECREATE, + OPERATION_ACTION_TYPE_RESIZE, + OPERATION_ACTION_TYPE_UPDATE, + OPERATION_ACTION_TYPE_UPDATE_WITH_ID, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/OperationStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/OperationStatus.java new file mode 100755 index 000000000..39c8da33f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/OperationStatus.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; + +/** Status of a resource operation. */ +@Generated +public enum OperationStatus { + OPERATION_STATUS_FAILED, + OPERATION_STATUS_SUCCEEDED, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Resource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Resource.java new file mode 100755 index 000000000..f1479c145 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Resource.java @@ -0,0 +1,143 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import java.util.Objects; + +/** + * A resource managed by a deployment. Resources are implicitly created, updated, or deleted when + * operations are recorded on a version. + */ +@Generated +public class Resource { + /** The action performed on this resource during the last version. */ + @JsonProperty("last_action_type") + private OperationActionType lastActionType; + + /** The version_id of the last version where this resource was updated. */ + @JsonProperty("last_version_id") + private String lastVersionId; + + /** Resource name. Format: deployments/{deployment_id}/resources/{resource_key} */ + @JsonProperty("name") + private String name; + + /** ID that references the actual resource in the workspace (e.g. the job ID, pipeline ID). */ + @JsonProperty("resource_id") + private String resourceId; + + /** + * Resource identifier within the bundle (e.g. "jobs.foo", "pipelines.bar", + * "jobs.foo.permissions"). + */ + @JsonProperty("resource_key") + private String resourceKey; + + /** The type of the deployment resource. */ + @JsonProperty("resource_type") + private DeploymentResourceType resourceType; + + /** Serialized local config state (what the CLI deployed). */ + @JsonProperty("state") + private JsonNode state; + + public Resource setLastActionType(OperationActionType lastActionType) { + this.lastActionType = lastActionType; + return this; + } + + public OperationActionType getLastActionType() { + return lastActionType; + } + + public Resource setLastVersionId(String lastVersionId) { + this.lastVersionId = lastVersionId; + return this; + } + + public String getLastVersionId() { + return lastVersionId; + } + + public Resource setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public Resource setResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + public String getResourceId() { + return resourceId; + } + + public Resource setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + public String getResourceKey() { + return resourceKey; + } + + public Resource setResourceType(DeploymentResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + public DeploymentResourceType getResourceType() { + return resourceType; + } + + public Resource setState(JsonNode state) { + this.state = state; + return this; + } + + public JsonNode getState() { + return state; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Resource that = (Resource) o; + return Objects.equals(lastActionType, that.lastActionType) + && Objects.equals(lastVersionId, that.lastVersionId) + && Objects.equals(name, that.name) + && Objects.equals(resourceId, that.resourceId) + && Objects.equals(resourceKey, that.resourceKey) + && Objects.equals(resourceType, that.resourceType) + && Objects.equals(state, that.state); + } + + @Override + public int hashCode() { + return Objects.hash( + lastActionType, lastVersionId, name, resourceId, resourceKey, resourceType, state); + } + + @Override + public String toString() { + return new ToStringer(Resource.class) + .add("lastActionType", lastActionType) + .add("lastVersionId", lastVersionId) + .add("name", name) + .add("resourceId", resourceId) + .add("resourceKey", resourceKey) + .add("resourceType", resourceType) + .add("state", state) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Version.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Version.java new file mode 100755 index 000000000..1a9d56074 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/Version.java @@ -0,0 +1,235 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Timestamp; +import java.util.Objects; + +/** + * A single invocation of a deploy or destroy command against a deployment. Creating a version + * acquires an exclusive lock on the parent deployment. + */ +@Generated +public class Version { + /** CLI version used to initiate the version. */ + @JsonProperty("cli_version") + private String cliVersion; + + /** When the version completed. Unset while the version is in progress. */ + @JsonProperty("complete_time") + private Timestamp completeTime; + + /** + * The user who completed the version (email or principal name). May differ from `created_by` when + * another user force-completes the version. + */ + @JsonProperty("completed_by") + private String completedBy; + + /** + * Why the version was completed. Unset while in progress. Set when status transitions to + * COMPLETED. + */ + @JsonProperty("completion_reason") + private VersionComplete completionReason; + + /** When the version was created. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** The user who created the version (email or principal name). */ + @JsonProperty("created_by") + private String createdBy; + + /** Display name for the deployment, captured at the time of this version. */ + @JsonProperty("display_name") + private String displayName; + + /** Resource name of the version. Format: deployments/{deployment_id}/versions/{version_id} */ + @JsonProperty("name") + private String name; + + /** Status of the version: IN_PROGRESS or COMPLETED. */ + @JsonProperty("status") + private VersionStatus status; + + /** Target name of the deployment, captured at the time of this version. */ + @JsonProperty("target_name") + private String targetName; + + /** + * Monotonically increasing version identifier within the parent deployment. Assigned by the + * client on creation. + */ + @JsonProperty("version_id") + private String versionId; + + /** Type of version (deploy or destroy). */ + @JsonProperty("version_type") + private VersionType versionType; + + public Version setCliVersion(String cliVersion) { + this.cliVersion = cliVersion; + return this; + } + + public String getCliVersion() { + return cliVersion; + } + + public Version setCompleteTime(Timestamp completeTime) { + this.completeTime = completeTime; + return this; + } + + public Timestamp getCompleteTime() { + return completeTime; + } + + public Version setCompletedBy(String completedBy) { + this.completedBy = completedBy; + return this; + } + + public String getCompletedBy() { + return completedBy; + } + + public Version setCompletionReason(VersionComplete completionReason) { + this.completionReason = completionReason; + return this; + } + + public VersionComplete getCompletionReason() { + return completionReason; + } + + public Version setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public Version setCreatedBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + public String getCreatedBy() { + return createdBy; + } + + public Version setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public Version setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public Version setStatus(VersionStatus status) { + this.status = status; + return this; + } + + public VersionStatus getStatus() { + return status; + } + + public Version setTargetName(String targetName) { + this.targetName = targetName; + return this; + } + + public String getTargetName() { + return targetName; + } + + public Version setVersionId(String versionId) { + this.versionId = versionId; + return this; + } + + public String getVersionId() { + return versionId; + } + + public Version setVersionType(VersionType versionType) { + this.versionType = versionType; + return this; + } + + public VersionType getVersionType() { + return versionType; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Version that = (Version) o; + return Objects.equals(cliVersion, that.cliVersion) + && Objects.equals(completeTime, that.completeTime) + && Objects.equals(completedBy, that.completedBy) + && Objects.equals(completionReason, that.completionReason) + && Objects.equals(createTime, that.createTime) + && Objects.equals(createdBy, that.createdBy) + && Objects.equals(displayName, that.displayName) + && Objects.equals(name, that.name) + && Objects.equals(status, that.status) + && Objects.equals(targetName, that.targetName) + && Objects.equals(versionId, that.versionId) + && Objects.equals(versionType, that.versionType); + } + + @Override + public int hashCode() { + return Objects.hash( + cliVersion, + completeTime, + completedBy, + completionReason, + createTime, + createdBy, + displayName, + name, + status, + targetName, + versionId, + versionType); + } + + @Override + public String toString() { + return new ToStringer(Version.class) + .add("cliVersion", cliVersion) + .add("completeTime", completeTime) + .add("completedBy", completedBy) + .add("completionReason", completionReason) + .add("createTime", createTime) + .add("createdBy", createdBy) + .add("displayName", displayName) + .add("name", name) + .add("status", status) + .add("targetName", targetName) + .add("versionId", versionId) + .add("versionType", versionType) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionComplete.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionComplete.java new file mode 100755 index 000000000..81a24bfe9 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionComplete.java @@ -0,0 +1,14 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; + +/** Reason why a version was completed. */ +@Generated +public enum VersionComplete { + VERSION_COMPLETE_FAILURE, + VERSION_COMPLETE_FORCE_ABORT, + VERSION_COMPLETE_LEASE_EXPIRED, + VERSION_COMPLETE_SUCCESS, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionStatus.java new file mode 100755 index 000000000..dcdd32f83 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionStatus.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; + +/** Status of a version. */ +@Generated +public enum VersionStatus { + VERSION_STATUS_COMPLETED, + VERSION_STATUS_IN_PROGRESS, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionType.java new file mode 100755 index 000000000..0423b995c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/VersionType.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundle; + +import com.databricks.sdk.support.Generated; + +/** Type of version. */ +@Generated +public enum VersionType { + VERSION_TYPE_DEPLOY, + VERSION_TYPE_DESTROY, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableKind.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableKind.java index 8b53dea8b..e53628277 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableKind.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableKind.java @@ -4,7 +4,12 @@ import com.databricks.sdk.support.Generated; -/** Latest kind: CONNECTION_ONEDRIVE_OAUTH_U2M = 329; Next id: 330 */ +/** + * Specific variant of a SecurableType: identifies the concrete implementation or backing system for + * a UC securable (e.g. CATALOG_STANDARD vs CATALOG_DELTASHARING; MEMORY_STORE_STANDARD for + * Conversations-backed memory stores). Used to dispatch type-specific handling in the entity model. + * Latest kind: MEMORY_STORE_STANDARD = 330; Next id: 331 + */ @Generated public enum SecurableKind { TABLE_DB_STORAGE, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/AuthConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/AuthConfig.java index eb4fec399..a5a4922e1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/AuthConfig.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/AuthConfig.java @@ -9,6 +9,10 @@ @Generated public class AuthConfig { + /** Mutual-TLS authentication. See MtlsConfig. */ + @JsonProperty("mtls_config") + private MtlsConfig mtlsConfig; + /** * Name of the Unity Catalog service credential. This value will be set under the option * databricks.serviceCredential @@ -16,6 +20,15 @@ public class AuthConfig { @JsonProperty("uc_service_credential_name") private String ucServiceCredentialName; + public AuthConfig setMtlsConfig(MtlsConfig mtlsConfig) { + this.mtlsConfig = mtlsConfig; + return this; + } + + public MtlsConfig getMtlsConfig() { + return mtlsConfig; + } + public AuthConfig setUcServiceCredentialName(String ucServiceCredentialName) { this.ucServiceCredentialName = ucServiceCredentialName; return this; @@ -30,17 +43,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AuthConfig that = (AuthConfig) o; - return Objects.equals(ucServiceCredentialName, that.ucServiceCredentialName); + return Objects.equals(mtlsConfig, that.mtlsConfig) + && Objects.equals(ucServiceCredentialName, that.ucServiceCredentialName); } @Override public int hashCode() { - return Objects.hash(ucServiceCredentialName); + return Objects.hash(mtlsConfig, ucServiceCredentialName); } @Override public String toString() { return new ToStringer(AuthConfig.class) + .add("mtlsConfig", mtlsConfig) .add("ucServiceCredentialName", ucServiceCredentialName) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MtlsConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MtlsConfig.java new file mode 100755 index 000000000..19b8e6240 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MtlsConfig.java @@ -0,0 +1,159 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.ml; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Mutual-TLS (mTLS) authentication configuration. The keystore (client certificate + private key) + * and truststore (CAs trusted to verify the broker) live as JKS files on Unity Catalog volumes, + * with their passwords stored in Databricks secret scopes. This matches the SSL setup pattern + * documented at + * https://docs.databricks.com/en/connect/streaming/kafka/authentication#use-ssl-to-connect-databricks-to-kafka. + * + *

At materialization time, the generated PySpark code passes the JKS file paths and resolved + * passwords through to the Kafka SSL options (kafka.ssl.keystore.location, + * kafka.ssl.keystore.password, kafka.ssl.key.password, kafka.ssl.truststore.location, + * kafka.ssl.truststore.password). Passwords are resolved on the Spark cluster via + * dbutils.secrets.get; this message stores only references, never password values. + */ +@Generated +public class MtlsConfig { + /** + * Set to true only when the broker certificate's SAN intentionally does not match the connection + * endpoint — for example when reaching the cluster through a PrivateLink endpoint whose DNS name + * is not in the broker certificate. Skipping the hostname check removes a defense against + * man-in-the-middle attacks; do not enable casually. mTLS client authentication is unaffected by + * this option. + * + *

See the Apache Kafka SSL security guide for background on this check: + * https://kafka.apache.org/42/security/encryption-and-authentication-using-ssl/#host-name-verification + */ + @JsonProperty("disable_hostname_verification") + private Boolean disableHostnameVerification; + + /** + * Secret-scope reference for the private key password. Often the same value as the keystore + * password (keytool's default), but provided as a separate field because Apache Kafka requires it + * as a distinct option (kafka.ssl.key.password). + */ + @JsonProperty("key_password_ref") + private SecretScopeReference keyPasswordRef; + + /** + * Unity Catalog volume path to the JKS keystore file containing the client certificate and + * private key. e.g. "/Volumes////client.jks". The materialization + * compute must have read permission on this volume. + */ + @JsonProperty("keystore_location") + private String keystoreLocation; + + /** Secret-scope reference for the JKS keystore password. */ + @JsonProperty("keystore_password_ref") + private SecretScopeReference keystorePasswordRef; + + /** + * Unity Catalog volume path to the JKS truststore file containing the CA certificate(s) trusted + * to verify the Kafka broker's server certificate. e.g. + * "/Volumes////truststore.jks". + */ + @JsonProperty("truststore_location") + private String truststoreLocation; + + /** Secret-scope reference for the JKS truststore password. */ + @JsonProperty("truststore_password_ref") + private SecretScopeReference truststorePasswordRef; + + public MtlsConfig setDisableHostnameVerification(Boolean disableHostnameVerification) { + this.disableHostnameVerification = disableHostnameVerification; + return this; + } + + public Boolean getDisableHostnameVerification() { + return disableHostnameVerification; + } + + public MtlsConfig setKeyPasswordRef(SecretScopeReference keyPasswordRef) { + this.keyPasswordRef = keyPasswordRef; + return this; + } + + public SecretScopeReference getKeyPasswordRef() { + return keyPasswordRef; + } + + public MtlsConfig setKeystoreLocation(String keystoreLocation) { + this.keystoreLocation = keystoreLocation; + return this; + } + + public String getKeystoreLocation() { + return keystoreLocation; + } + + public MtlsConfig setKeystorePasswordRef(SecretScopeReference keystorePasswordRef) { + this.keystorePasswordRef = keystorePasswordRef; + return this; + } + + public SecretScopeReference getKeystorePasswordRef() { + return keystorePasswordRef; + } + + public MtlsConfig setTruststoreLocation(String truststoreLocation) { + this.truststoreLocation = truststoreLocation; + return this; + } + + public String getTruststoreLocation() { + return truststoreLocation; + } + + public MtlsConfig setTruststorePasswordRef(SecretScopeReference truststorePasswordRef) { + this.truststorePasswordRef = truststorePasswordRef; + return this; + } + + public SecretScopeReference getTruststorePasswordRef() { + return truststorePasswordRef; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MtlsConfig that = (MtlsConfig) o; + return Objects.equals(disableHostnameVerification, that.disableHostnameVerification) + && Objects.equals(keyPasswordRef, that.keyPasswordRef) + && Objects.equals(keystoreLocation, that.keystoreLocation) + && Objects.equals(keystorePasswordRef, that.keystorePasswordRef) + && Objects.equals(truststoreLocation, that.truststoreLocation) + && Objects.equals(truststorePasswordRef, that.truststorePasswordRef); + } + + @Override + public int hashCode() { + return Objects.hash( + disableHostnameVerification, + keyPasswordRef, + keystoreLocation, + keystorePasswordRef, + truststoreLocation, + truststorePasswordRef); + } + + @Override + public String toString() { + return new ToStringer(MtlsConfig.class) + .add("disableHostnameVerification", disableHostnameVerification) + .add("keyPasswordRef", keyPasswordRef) + .add("keystoreLocation", keystoreLocation) + .add("keystorePasswordRef", keystorePasswordRef) + .add("truststoreLocation", truststoreLocation) + .add("truststorePasswordRef", truststorePasswordRef) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SecretScopeReference.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SecretScopeReference.java new file mode 100755 index 000000000..0516f48e1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SecretScopeReference.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.ml; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Reference to an entry in a Databricks secret scope. The referenced value is fetched on the Spark + * cluster at materialization time via dbutils.secrets.get(scope, key). + */ +@Generated +public class SecretScopeReference { + /** The key within the scope. */ + @JsonProperty("key") + private String key; + + /** The Databricks secret scope name. */ + @JsonProperty("scope") + private String scope; + + public SecretScopeReference setKey(String key) { + this.key = key; + return this; + } + + public String getKey() { + return key; + } + + public SecretScopeReference setScope(String scope) { + this.scope = scope; + return this; + } + + public String getScope() { + return scope; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SecretScopeReference that = (SecretScopeReference) o; + return Objects.equals(key, that.key) && Objects.equals(scope, that.scope); + } + + @Override + public int hashCode() { + return Objects.hash(key, scope); + } + + @Override + public String toString() { + return new ToStringer(SecretScopeReference.class) + .add("key", key) + .add("scope", scope) + .toString(); + } +}