diff --git a/.codegen/_last_sha b/.codegen/_last_sha index d583f8ce5..c30e448de 100644 --- a/.codegen/_last_sha +++ b/.codegen/_last_sha @@ -1 +1 @@ -ced34d63e64d234affc3213758ac687edbf6f3c3 \ No newline at end of file +7346efba99de661d9327d805d92dc67f461933c1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4893cd768..acfce4843 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Version changelog +## Release v0.177.0 (2026-11-09) + +### API Changes +* Add `com.databricks.sdk.service.softwareartifacts` package. +* Add `workspaceClient.serverlessComputeService()` service. +* Add `workspaceClient.softwareArtifacts()` service. +* Add `triggerMaterializationSet()` method for `workspaceClient.featureEngineering()` service. +* Add `acknowledgeAssessmentWarnings()`, `assessMigration()`, `createMigration()`, `deleteMigration()`, `getAssessment()`, `getMigration()`, `listAssessments()`, `listMigrations()`, `startMigration()`, `undeleteMigration()` and `updateMigration()` methods for `workspaceClient.postgres()` service. +* Add `delayedReason`, `estimatedCompletionTime`, `indexInitializationPercentage`, `phase` and `targetQpsChangeAllowedAfterTime` fields for `com.databricks.sdk.service.aisearch.EndpointScalingInfo`. +* Add `deltaTable` field for `com.databricks.sdk.service.jobs.ResolvedValuesAiFunctionTaskResolvedValues`. +* Add `paused` field for `com.databricks.sdk.service.ml.CronSchedule`. +* Add `externalTrigger` field for `com.databricks.sdk.service.ml.MaterializedFeature`. +* Add `paused` field for `com.databricks.sdk.service.ml.TableTrigger`. +* Add `effectiveWorkspaceDashboardTheme` and `workspaceDashboardTheme` fields for `com.databricks.sdk.service.settingsv2.Setting`. +* Add `delayedReason`, `estimatedCompletionTimestamp`, `indexInitializationPercentage`, `phase` and `targetQpsChangeAllowedAfterTimestamp` fields for `com.databricks.sdk.service.vectorsearch.EndpointScalingInfo`. +* [Breaking] Change `warehouseId` field for `com.databricks.sdk.service.lakewatch.Datasource` to no longer be required. +* Change `warehouseId` field for `com.databricks.sdk.service.lakewatch.Datasource` to no longer be required. + ## Release v0.176.0 (2026-11-05) ### API Changes diff --git a/databricks-sdk-java/lockfile.json b/databricks-sdk-java/lockfile.json index ead6f1f84..f09b313c3 100644 --- a/databricks-sdk-java/lockfile.json +++ b/databricks-sdk-java/lockfile.json @@ -1,7 +1,7 @@ { "artifactId": "databricks-sdk-java", "groupId": "com.databricks", - "version": "0.176.0", + "version": "0.177.0", "lockFileVersion": 1, "dependencies": [ { diff --git a/databricks-sdk-java/pom.xml b/databricks-sdk-java/pom.xml index af2e1e178..e35abbdf0 100644 --- a/databricks-sdk-java/pom.xml +++ b/databricks-sdk-java/pom.xml @@ -5,7 +5,7 @@ com.databricks databricks-sdk-parent - 0.176.0 + 0.177.0 databricks-sdk-java Databricks SDK for Java diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java index 36e5aff18..7ec94ac06 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java @@ -109,6 +109,8 @@ import com.databricks.sdk.service.compute.PolicyComplianceForClustersService; import com.databricks.sdk.service.compute.PolicyFamiliesAPI; import com.databricks.sdk.service.compute.PolicyFamiliesService; +import com.databricks.sdk.service.compute.ServerlessComputeServiceAPI; +import com.databricks.sdk.service.compute.ServerlessComputeServiceService; import com.databricks.sdk.service.computemigrations.ComputeMigrationsAPI; import com.databricks.sdk.service.computemigrations.ComputeMigrationsService; import com.databricks.sdk.service.dashboards.GenieAPI; @@ -240,6 +242,8 @@ import com.databricks.sdk.service.sharing.RecipientsService; import com.databricks.sdk.service.sharing.SharesAPI; import com.databricks.sdk.service.sharing.SharesService; +import com.databricks.sdk.service.softwareartifacts.SoftwareArtifactsAPI; +import com.databricks.sdk.service.softwareartifacts.SoftwareArtifactsService; import com.databricks.sdk.service.sql.AlertsAPI; import com.databricks.sdk.service.sql.AlertsLegacyAPI; import com.databricks.sdk.service.sql.AlertsLegacyService; @@ -404,12 +408,14 @@ public class WorkspaceClient { private SchemasAPI schemasAPI; private SecretsExt secretsAPI; private SecretsUcAPI secretsUcAPI; + private ServerlessComputeServiceAPI serverlessComputeServiceAPI; private ServicePrincipalSecretsProxyAPI servicePrincipalSecretsProxyAPI; private ServicePrincipalsV2API servicePrincipalsV2API; private ServingEndpointsAPI servingEndpointsAPI; private ServingEndpointsDataPlaneAPI servingEndpointsDataPlaneAPI; private SettingsAPI settingsAPI; private SharesAPI sharesAPI; + private SoftwareArtifactsAPI softwareArtifactsAPI; private StatementExecutionAPI statementExecutionAPI; private StorageCredentialsAPI storageCredentialsAPI; private SupervisorAgentsAPI supervisorAgentsAPI; @@ -553,6 +559,7 @@ public WorkspaceClient(DatabricksConfig config) { schemasAPI = new SchemasAPI(apiClient); secretsAPI = new SecretsExt(apiClient); secretsUcAPI = new SecretsUcAPI(apiClient); + serverlessComputeServiceAPI = new ServerlessComputeServiceAPI(apiClient); servicePrincipalSecretsProxyAPI = new ServicePrincipalSecretsProxyAPI(apiClient); servicePrincipalsV2API = new ServicePrincipalsV2API(apiClient); servingEndpointsAPI = new ServingEndpointsAPI(apiClient); @@ -560,6 +567,7 @@ public WorkspaceClient(DatabricksConfig config) { new ServingEndpointsDataPlaneAPI(apiClient, config, servingEndpointsAPI); settingsAPI = new SettingsAPI(apiClient); sharesAPI = new SharesAPI(apiClient); + softwareArtifactsAPI = new SoftwareArtifactsAPI(apiClient); statementExecutionAPI = new StatementExecutionAPI(apiClient); storageCredentialsAPI = new StorageCredentialsAPI(apiClient); supervisorAgentsAPI = new SupervisorAgentsAPI(apiClient); @@ -1850,6 +1858,11 @@ public SecretsUcAPI secretsUc() { return secretsUcAPI; } + /** ServerlessCompute Service API. */ + public ServerlessComputeServiceAPI serverlessComputeService() { + return serverlessComputeServiceAPI; + } + /** * These APIs enable administrators to manage service principal secrets at the workspace level. To * use these APIs, the service principal must be first added to the current workspace. @@ -1921,6 +1934,11 @@ public SharesAPI shares() { return sharesAPI; } + /** Manage software artifacts and their versions in Unity Catalog. */ + public SoftwareArtifactsAPI softwareArtifacts() { + return softwareArtifactsAPI; + } + /** * The Databricks SQL Statement Execution API can be used to execute SQL statements on a SQL * warehouse and fetch the result. @@ -3578,6 +3596,20 @@ public WorkspaceClient withSecretsUcAPI(SecretsUcAPI secretsUc) { return this; } + /** Replace the default ServerlessComputeServiceService with a custom implementation. */ + public WorkspaceClient withServerlessComputeServiceImpl( + ServerlessComputeServiceService serverlessComputeService) { + return this.withServerlessComputeServiceAPI( + new ServerlessComputeServiceAPI(serverlessComputeService)); + } + + /** Replace the default ServerlessComputeServiceAPI with a custom implementation. */ + public WorkspaceClient withServerlessComputeServiceAPI( + ServerlessComputeServiceAPI serverlessComputeService) { + this.serverlessComputeServiceAPI = serverlessComputeService; + return this; + } + /** Replace the default ServicePrincipalSecretsProxyService with a custom implementation. */ public WorkspaceClient withServicePrincipalSecretsProxyImpl( ServicePrincipalSecretsProxyService servicePrincipalSecretsProxy) { @@ -3651,6 +3683,17 @@ public WorkspaceClient withSharesAPI(SharesAPI shares) { return this; } + /** Replace the default SoftwareArtifactsService with a custom implementation. */ + public WorkspaceClient withSoftwareArtifactsImpl(SoftwareArtifactsService softwareArtifacts) { + return this.withSoftwareArtifactsAPI(new SoftwareArtifactsAPI(softwareArtifacts)); + } + + /** Replace the default SoftwareArtifactsAPI with a custom implementation. */ + public WorkspaceClient withSoftwareArtifactsAPI(SoftwareArtifactsAPI softwareArtifacts) { + this.softwareArtifactsAPI = softwareArtifacts; + return this; + } + /** Replace the default StatementExecutionService with a custom implementation. */ public WorkspaceClient withStatementExecutionImpl(StatementExecutionService statementExecution) { return this.withStatementExecutionAPI(new StatementExecutionAPI(statementExecution)); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java index 7a952641b..216490d6a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java @@ -36,7 +36,7 @@ public String getValue() { // TODO: check if reading from // /META-INF/maven/com.databricks/databrics-sdk-java/pom.properties // or getClass().getPackage().getImplementationVersion() is enough. - private static final String version = "0.176.0"; + private static final String version = "0.177.0"; public static void withProduct(String product, String productVersion) { UserAgent.product = product; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/agentkit/ManagedMemoryEntry.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/agentkit/ManagedMemoryEntry.java index 67d9e4c82..45f1a23d8 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/agentkit/ManagedMemoryEntry.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/agentkit/ManagedMemoryEntry.java @@ -49,7 +49,11 @@ public class ManagedMemoryEntry { @JsonProperty("session_id") private String sessionId; - /** Which writer created this entry. Caller sets this on Create; immutable after creation. */ + /** + * Which writer created this entry. Caller sets this on Create; immutable after creation. While + * the workspace's default-source-type rollout flag is on, omitted or UNSPECIFIED is stored as + * AGENT. While it is off, omitted is stored unset and UNSPECIFIED as UNSPECIFIED. + */ @JsonProperty("source_type") private ManagedMemoryEntrySourceType sourceType; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/AiSearchAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/AiSearchAPI.java index 472cfafe3..cf64d580d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/AiSearchAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/AiSearchAPI.java @@ -136,9 +136,9 @@ public SyncIndexResponse syncIndex(SyncIndexRequest request) { /** * Update an existing AI Search endpoint. Multi-bucket masks are supported and dispatched in - * deterministic bucket order: budget policy, custom tags, throughput, then scaling/replicas. - * Per-bucket dispatch is not atomic across buckets — if a later bucket fails, earlier buckets may - * already have been applied. + * deterministic bucket order: budget policy, custom tags, throughput, scaling/replicas, then + * metrics export. Per-bucket dispatch is not atomic across buckets — if a later bucket fails, + * earlier buckets may already have been applied. */ public Endpoint updateEndpoint(UpdateEndpointRequest request) { return impl.updateEndpoint(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/AiSearchService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/AiSearchService.java index b58328f7b..3b5a9fc67 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/AiSearchService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/AiSearchService.java @@ -54,9 +54,9 @@ public interface AiSearchService { /** * Update an existing AI Search endpoint. Multi-bucket masks are supported and dispatched in - * deterministic bucket order: budget policy, custom tags, throughput, then scaling/replicas. - * Per-bucket dispatch is not atomic across buckets — if a later bucket fails, earlier buckets may - * already have been applied. + * deterministic bucket order: budget policy, custom tags, throughput, scaling/replicas, then + * metrics export. Per-bucket dispatch is not atomic across buckets — if a later bucket fails, + * earlier buckets may already have been applied. */ Endpoint updateEndpoint(UpdateEndpointRequest updateEndpointRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfo.java index 0ade39f25..2af850620 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfo.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfo.java @@ -5,6 +5,7 @@ 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; /** @@ -13,6 +14,35 @@ */ @Generated public class EndpointScalingInfo { + /** + * Reason the in-progress scaling change is delayed. When set, `estimated_completion_time` is + * unset. Unset when the change is not delayed or no scaling change is in progress. + */ + @JsonProperty("delayed_reason") + private EndpointScalingInfoDelayReason delayedReason; + + /** + * Estimated time at which the in-progress scaling change will complete. The estimate may change + * as the scaling change progresses. Unset when no scaling change is in progress, when no estimate + * is available, or when the change is delayed (see `delayed_reason`). + */ + @JsonProperty("estimated_completion_time") + private Timestamp estimatedCompletionTime; + + /** + * Percentage of index initialization completed, from 0 to 100. Set only during the + * `INITIALIZING_INDEX` phase; unset in other phases or when progress is not available. + */ + @JsonProperty("index_initialization_percentage") + private Long indexInitializationPercentage; + + /** + * Current phase of the in-progress scaling change. Unset when no scaling change is in progress or + * the phase is not available. + */ + @JsonProperty("phase") + private EndpointScalingInfoPhase phase; + /** * The requested QPS target for the endpoint. Best-effort; the system does not guarantee this QPS * will be achieved. @@ -24,6 +54,50 @@ public class EndpointScalingInfo { @JsonProperty("state") private ScalingChangeState state; + /** + * Earliest time a new Target QPS change is accepted. Set only while a scaling change is in + * progress, the change lock is on, and the endpoint has a recorded last throughput change; may be + * in the past once the lock has expired. + */ + @JsonProperty("target_qps_change_allowed_after_time") + private Timestamp targetQpsChangeAllowedAfterTime; + + public EndpointScalingInfo setDelayedReason(EndpointScalingInfoDelayReason delayedReason) { + this.delayedReason = delayedReason; + return this; + } + + public EndpointScalingInfoDelayReason getDelayedReason() { + return delayedReason; + } + + public EndpointScalingInfo setEstimatedCompletionTime(Timestamp estimatedCompletionTime) { + this.estimatedCompletionTime = estimatedCompletionTime; + return this; + } + + public Timestamp getEstimatedCompletionTime() { + return estimatedCompletionTime; + } + + public EndpointScalingInfo setIndexInitializationPercentage(Long indexInitializationPercentage) { + this.indexInitializationPercentage = indexInitializationPercentage; + return this; + } + + public Long getIndexInitializationPercentage() { + return indexInitializationPercentage; + } + + public EndpointScalingInfo setPhase(EndpointScalingInfoPhase phase) { + this.phase = phase; + return this; + } + + public EndpointScalingInfoPhase getPhase() { + return phase; + } + public EndpointScalingInfo setRequestedTargetQps(Long requestedTargetQps) { this.requestedTargetQps = requestedTargetQps; return this; @@ -42,25 +116,52 @@ public ScalingChangeState getState() { return state; } + public EndpointScalingInfo setTargetQpsChangeAllowedAfterTime( + Timestamp targetQpsChangeAllowedAfterTime) { + this.targetQpsChangeAllowedAfterTime = targetQpsChangeAllowedAfterTime; + return this; + } + + public Timestamp getTargetQpsChangeAllowedAfterTime() { + return targetQpsChangeAllowedAfterTime; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; EndpointScalingInfo that = (EndpointScalingInfo) o; - return Objects.equals(requestedTargetQps, that.requestedTargetQps) - && Objects.equals(state, that.state); + return Objects.equals(delayedReason, that.delayedReason) + && Objects.equals(estimatedCompletionTime, that.estimatedCompletionTime) + && Objects.equals(indexInitializationPercentage, that.indexInitializationPercentage) + && Objects.equals(phase, that.phase) + && Objects.equals(requestedTargetQps, that.requestedTargetQps) + && Objects.equals(state, that.state) + && Objects.equals(targetQpsChangeAllowedAfterTime, that.targetQpsChangeAllowedAfterTime); } @Override public int hashCode() { - return Objects.hash(requestedTargetQps, state); + return Objects.hash( + delayedReason, + estimatedCompletionTime, + indexInitializationPercentage, + phase, + requestedTargetQps, + state, + targetQpsChangeAllowedAfterTime); } @Override public String toString() { return new ToStringer(EndpointScalingInfo.class) + .add("delayedReason", delayedReason) + .add("estimatedCompletionTime", estimatedCompletionTime) + .add("indexInitializationPercentage", indexInitializationPercentage) + .add("phase", phase) .add("requestedTargetQps", requestedTargetQps) .add("state", state) + .add("targetQpsChangeAllowedAfterTime", targetQpsChangeAllowedAfterTime) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfoDelayReason.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfoDelayReason.java new file mode 100644 index 000000000..4ff0d8cbf --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfoDelayReason.java @@ -0,0 +1,13 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.aisearch; + +import com.databricks.sdk.support.Generated; + +/** Reason an in-progress scaling change is delayed. */ +@Generated +public enum EndpointScalingInfoDelayReason { + CAPACITY_UNAVAILABLE, + SCALE_DOWN_BLOCKED, + TAKING_LONGER_THAN_EXPECTED, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfoPhase.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfoPhase.java new file mode 100644 index 000000000..0428cde23 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aisearch/EndpointScalingInfoPhase.java @@ -0,0 +1,13 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.aisearch; + +import com.databricks.sdk.support.Generated; + +/** Phase of an in-progress scaling change. */ +@Generated +public enum EndpointScalingInfoPhase { + ADJUSTING_CAPACITY, + ESTIMATING, + INITIALIZING_INDEX, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ModelServiceConfigExternalModelConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ModelServiceConfigExternalModelConfig.java index e8f71a0dc..4da7e753a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ModelServiceConfigExternalModelConfig.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ModelServiceConfigExternalModelConfig.java @@ -16,8 +16,7 @@ public class ModelServiceConfigExternalModelConfig { /** * Resource name of the governed ModelProviderService that owns provider auth and - * provider-specific configuration. The referenced ModelProviderService also carries the provider - * type, so this message does not surface it directly. Format: + * provider-specific configuration. Format: * `model-provider-services/{catalog}.{schema}.{model_provider_service}`. Each `{...}` component * is capped at 255 characters individually. */ diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/AllowedComputeProducts.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/AllowedComputeProducts.java new file mode 100644 index 000000000..b6dbf356b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/AllowedComputeProducts.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Compute products allowed by a policy and their product-specific constraints. At least one product + * must be set. + */ +@Generated +public class AllowedComputeProducts { + /** Constraints for serverless automated compute. Absence disallows automated compute. */ + @JsonProperty("automated") + private AutomatedConstraints automated; + + /** Constraints for Lakebase instances. Absence disallows Lakebase. */ + @JsonProperty("lakebase") + private LakebaseConstraints lakebase; + + public AllowedComputeProducts setAutomated(AutomatedConstraints automated) { + this.automated = automated; + return this; + } + + public AutomatedConstraints getAutomated() { + return automated; + } + + public AllowedComputeProducts setLakebase(LakebaseConstraints lakebase) { + this.lakebase = lakebase; + return this; + } + + public LakebaseConstraints getLakebase() { + return lakebase; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AllowedComputeProducts that = (AllowedComputeProducts) o; + return Objects.equals(automated, that.automated) && Objects.equals(lakebase, that.lakebase); + } + + @Override + public int hashCode() { + return Objects.hash(automated, lakebase); + } + + @Override + public String toString() { + return new ToStringer(AllowedComputeProducts.class) + .add("automated", automated) + .add("lakebase", lakebase) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/AutomatedConstraints.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/AutomatedConstraints.java new file mode 100644 index 000000000..beea0cb56 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/AutomatedConstraints.java @@ -0,0 +1,45 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Constraints applied to serverless automated workloads by a compute policy. */ +@Generated +public class AutomatedConstraints { + /** Maximum per-workload Spark executor allocation. Absence imposes no limit. */ + @JsonProperty("per_workload_max") + private RateLimitConfig perWorkloadMax; + + public AutomatedConstraints setPerWorkloadMax(RateLimitConfig perWorkloadMax) { + this.perWorkloadMax = perWorkloadMax; + return this; + } + + public RateLimitConfig getPerWorkloadMax() { + return perWorkloadMax; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutomatedConstraints that = (AutomatedConstraints) o; + return Objects.equals(perWorkloadMax, that.perWorkloadMax); + } + + @Override + public int hashCode() { + return Objects.hash(perWorkloadMax); + } + + @Override + public String toString() { + return new ToStringer(AutomatedConstraints.class) + .add("perWorkloadMax", perWorkloadMax) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ComputePolicy.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ComputePolicy.java new file mode 100644 index 000000000..260740f96 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ComputePolicy.java @@ -0,0 +1,175 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +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.Map; +import java.util.Objects; + +/** + * A compute policy resource. A workspace-scoped policy that allows one or more compute products, + * each with product-specific constraints. + */ +@Generated +public class ComputePolicy { + /** + * The compute products allowed by this policy and their constraints. At least one product must be + * set. + */ + @JsonProperty("allowed_compute_products") + private AllowedComputeProducts allowedComputeProducts; + + /** + * Whether the calling user has manage permission on this compute policy. Manage includes use, so + * can_use is also true whenever this is true. + */ + @JsonProperty("can_manage") + private Boolean canManage; + + /** Whether the calling user has use permission on this compute policy. */ + @JsonProperty("can_use") + private Boolean canUse; + + /** The unique identifier of the compute policy (UUID). Server-assigned on create. */ + @JsonProperty("compute_policy_id") + private String computePolicyId; + + /** The creation timestamp. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** The display name of the compute policy. */ + @JsonProperty("display_name") + private String displayName; + + /** + * Whether this is the workspace default policy for its single allowed compute product. Default + * policies are system-provisioned and cannot be deleted or renamed. + */ + @JsonProperty("is_default") + private Boolean isDefault; + + /** + * User-defined key/value tags on the compute policy, provided at creation and validated. + * unified-tagging is the system of record for tag assignments. + */ + @JsonProperty("tags") + private Map tags; + + public ComputePolicy setAllowedComputeProducts(AllowedComputeProducts allowedComputeProducts) { + this.allowedComputeProducts = allowedComputeProducts; + return this; + } + + public AllowedComputeProducts getAllowedComputeProducts() { + return allowedComputeProducts; + } + + public ComputePolicy setCanManage(Boolean canManage) { + this.canManage = canManage; + return this; + } + + public Boolean getCanManage() { + return canManage; + } + + public ComputePolicy setCanUse(Boolean canUse) { + this.canUse = canUse; + return this; + } + + public Boolean getCanUse() { + return canUse; + } + + public ComputePolicy setComputePolicyId(String computePolicyId) { + this.computePolicyId = computePolicyId; + return this; + } + + public String getComputePolicyId() { + return computePolicyId; + } + + public ComputePolicy setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public ComputePolicy setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public ComputePolicy setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + public Boolean getIsDefault() { + return isDefault; + } + + public ComputePolicy setTags(Map tags) { + this.tags = tags; + return this; + } + + public Map getTags() { + return tags; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ComputePolicy that = (ComputePolicy) o; + return Objects.equals(allowedComputeProducts, that.allowedComputeProducts) + && Objects.equals(canManage, that.canManage) + && Objects.equals(canUse, that.canUse) + && Objects.equals(computePolicyId, that.computePolicyId) + && Objects.equals(createTime, that.createTime) + && Objects.equals(displayName, that.displayName) + && Objects.equals(isDefault, that.isDefault) + && Objects.equals(tags, that.tags); + } + + @Override + public int hashCode() { + return Objects.hash( + allowedComputeProducts, + canManage, + canUse, + computePolicyId, + createTime, + displayName, + isDefault, + tags); + } + + @Override + public String toString() { + return new ToStringer(ComputePolicy.class) + .add("allowedComputeProducts", allowedComputeProducts) + .add("canManage", canManage) + .add("canUse", canUse) + .add("computePolicyId", computePolicyId) + .add("createTime", createTime) + .add("displayName", displayName) + .add("isDefault", isDefault) + .add("tags", tags) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LakebaseConstraints.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LakebaseConstraints.java new file mode 100644 index 000000000..8691f4a45 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/LakebaseConstraints.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Constraints applied to Lakebase instances by a compute policy. */ +@Generated +public class LakebaseConstraints { + /** Maximum capacity units permitted per instance. Absence imposes no limit. */ + @JsonProperty("max_capacity_units_per_instance") + private Long maxCapacityUnitsPerInstance; + + /** Maximum idle time in minutes before scale-to-zero. Absence imposes no requirement. */ + @JsonProperty("max_idle_minutes_before_scale_to_zero") + private Long maxIdleMinutesBeforeScaleToZero; + + public LakebaseConstraints setMaxCapacityUnitsPerInstance(Long maxCapacityUnitsPerInstance) { + this.maxCapacityUnitsPerInstance = maxCapacityUnitsPerInstance; + return this; + } + + public Long getMaxCapacityUnitsPerInstance() { + return maxCapacityUnitsPerInstance; + } + + public LakebaseConstraints setMaxIdleMinutesBeforeScaleToZero( + Long maxIdleMinutesBeforeScaleToZero) { + this.maxIdleMinutesBeforeScaleToZero = maxIdleMinutesBeforeScaleToZero; + return this; + } + + public Long getMaxIdleMinutesBeforeScaleToZero() { + return maxIdleMinutesBeforeScaleToZero; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LakebaseConstraints that = (LakebaseConstraints) o; + return Objects.equals(maxCapacityUnitsPerInstance, that.maxCapacityUnitsPerInstance) + && Objects.equals(maxIdleMinutesBeforeScaleToZero, that.maxIdleMinutesBeforeScaleToZero); + } + + @Override + public int hashCode() { + return Objects.hash(maxCapacityUnitsPerInstance, maxIdleMinutesBeforeScaleToZero); + } + + @Override + public String toString() { + return new ToStringer(LakebaseConstraints.class) + .add("maxCapacityUnitsPerInstance", maxCapacityUnitsPerInstance) + .add("maxIdleMinutesBeforeScaleToZero", maxIdleMinutesBeforeScaleToZero) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListComputePoliciesRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListComputePoliciesRequest.java new file mode 100644 index 000000000..352ae1512 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListComputePoliciesRequest.java @@ -0,0 +1,64 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +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 ListComputePoliciesRequest { + /** + * Maximum number of policies to return per response. Unset or zero defaults to 100. The server + * caps requests above 150. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** Token for cursor-based pagination. */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + public ListComputePoliciesRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListComputePoliciesRequest 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; + ListComputePoliciesRequest that = (ListComputePoliciesRequest) 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(ListComputePoliciesRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListComputePoliciesResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListComputePoliciesResponse.java new file mode 100644 index 000000000..5c2090fc2 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListComputePoliciesResponse.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +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 listing compute policies. */ +@Generated +public class ListComputePoliciesResponse { + /** The list of compute policies. */ + @JsonProperty("compute_policies") + private Collection computePolicies; + + /** Token for the next page of results. Empty if no more results. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + public ListComputePoliciesResponse setComputePolicies(Collection computePolicies) { + this.computePolicies = computePolicies; + return this; + } + + public Collection getComputePolicies() { + return computePolicies; + } + + public ListComputePoliciesResponse 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; + ListComputePoliciesResponse that = (ListComputePoliciesResponse) o; + return Objects.equals(computePolicies, that.computePolicies) + && Objects.equals(nextPageToken, that.nextPageToken); + } + + @Override + public int hashCode() { + return Objects.hash(computePolicies, nextPageToken); + } + + @Override + public String toString() { + return new ToStringer(ListComputePoliciesResponse.class) + .add("computePolicies", computePolicies) + .add("nextPageToken", nextPageToken) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListServerlessComputesRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListServerlessComputesRequest.java new file mode 100644 index 000000000..186a9fb91 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListServerlessComputesRequest.java @@ -0,0 +1,64 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +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 ListServerlessComputesRequest { + /** + * Maximum number of computes to return per response. Unset or zero defaults to 100. The server + * caps requests above 150 to bound per-request RBAC fan-out. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** Token for cursor-based pagination. */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + public ListServerlessComputesRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListServerlessComputesRequest 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; + ListServerlessComputesRequest that = (ListServerlessComputesRequest) 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(ListServerlessComputesRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListServerlessComputesResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListServerlessComputesResponse.java new file mode 100644 index 000000000..3e4ec01c6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ListServerlessComputesResponse.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +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 listing serverless computes. */ +@Generated +public class ListServerlessComputesResponse { + /** Token for the next page of results. Empty if no more results. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + /** The list of serverless computes. */ + @JsonProperty("serverless_computes") + private Collection serverlessComputes; + + public ListServerlessComputesResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public ListServerlessComputesResponse setServerlessComputes( + Collection serverlessComputes) { + this.serverlessComputes = serverlessComputes; + return this; + } + + public Collection getServerlessComputes() { + return serverlessComputes; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListServerlessComputesResponse that = (ListServerlessComputesResponse) o; + return Objects.equals(nextPageToken, that.nextPageToken) + && Objects.equals(serverlessComputes, that.serverlessComputes); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, serverlessComputes); + } + + @Override + public String toString() { + return new ToStringer(ListServerlessComputesResponse.class) + .add("nextPageToken", nextPageToken) + .add("serverlessComputes", serverlessComputes) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/RateLimitConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/RateLimitConfig.java new file mode 100644 index 000000000..3e4bff347 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/RateLimitConfig.java @@ -0,0 +1,64 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Rate-limit configuration for serverless compute workloads. */ +@Generated +public class RateLimitConfig { + /** */ + @JsonProperty("t_shirt_size") + private TshirtSize tShirtSize; + + /** + * Proto enum name of t_shirt_size (e.g. T_SHIRT_SIZE_SMALL). Output-only; derived on read so a + * minting client that does not know a new enum value can still put the name on the cost-control + * token. + */ + @JsonProperty("t_shirt_size_name") + private String tShirtSizeName; + + public RateLimitConfig setTShirtSize(TshirtSize tShirtSize) { + this.tShirtSize = tShirtSize; + return this; + } + + public TshirtSize getTShirtSize() { + return tShirtSize; + } + + public RateLimitConfig setTShirtSizeName(String tShirtSizeName) { + this.tShirtSizeName = tShirtSizeName; + return this; + } + + public String getTShirtSizeName() { + return tShirtSizeName; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RateLimitConfig that = (RateLimitConfig) o; + return Objects.equals(tShirtSize, that.tShirtSize) + && Objects.equals(tShirtSizeName, that.tShirtSizeName); + } + + @Override + public int hashCode() { + return Objects.hash(tShirtSize, tShirtSizeName); + } + + @Override + public String toString() { + return new ToStringer(RateLimitConfig.class) + .add("tShirtSize", tShirtSize) + .add("tShirtSizeName", tShirtSizeName) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessCompute.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessCompute.java new file mode 100644 index 000000000..ed35d1230 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessCompute.java @@ -0,0 +1,124 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +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 serverless compute resource. */ +@Generated +public class ServerlessCompute { + /** Whether the calling user has ManageServerlessComputePermission on this compute. */ + @JsonProperty("can_manage") + private Boolean canManage; + + /** Whether the calling user has UseServerlessComputePermission on this compute. */ + @JsonProperty("can_use") + private Boolean canUse; + + /** The creation timestamp. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** + * Whether this is the workspace default compute for its compute_type. Default computes are + * system-provisioned and cannot be deleted or renamed. + */ + @JsonProperty("is_default") + private Boolean isDefault; + + /** The display name of the serverless compute. */ + @JsonProperty("name") + private String name; + + /** The unique identifier of the serverless compute (UUID). */ + @JsonProperty("serverless_compute_id") + private String serverlessComputeId; + + public ServerlessCompute setCanManage(Boolean canManage) { + this.canManage = canManage; + return this; + } + + public Boolean getCanManage() { + return canManage; + } + + public ServerlessCompute setCanUse(Boolean canUse) { + this.canUse = canUse; + return this; + } + + public Boolean getCanUse() { + return canUse; + } + + public ServerlessCompute setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public ServerlessCompute setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + public Boolean getIsDefault() { + return isDefault; + } + + public ServerlessCompute setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public ServerlessCompute setServerlessComputeId(String serverlessComputeId) { + this.serverlessComputeId = serverlessComputeId; + return this; + } + + public String getServerlessComputeId() { + return serverlessComputeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ServerlessCompute that = (ServerlessCompute) o; + return Objects.equals(canManage, that.canManage) + && Objects.equals(canUse, that.canUse) + && Objects.equals(createTime, that.createTime) + && Objects.equals(isDefault, that.isDefault) + && Objects.equals(name, that.name) + && Objects.equals(serverlessComputeId, that.serverlessComputeId); + } + + @Override + public int hashCode() { + return Objects.hash(canManage, canUse, createTime, isDefault, name, serverlessComputeId); + } + + @Override + public String toString() { + return new ToStringer(ServerlessCompute.class) + .add("canManage", canManage) + .add("canUse", canUse) + .add("createTime", createTime) + .add("isDefault", isDefault) + .add("name", name) + .add("serverlessComputeId", serverlessComputeId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessComputeServiceAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessComputeServiceAPI.java new file mode 100644 index 000000000..b9a09d92a --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessComputeServiceAPI.java @@ -0,0 +1,66 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.compute; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.Paginator; + +/** ServerlessCompute Service API. */ +@Generated +public class ServerlessComputeServiceAPI { + private static final Logger LOG = LoggerFactory.getLogger(ServerlessComputeServiceAPI.class); + + private final ServerlessComputeServiceService impl; + + /** Regular-use constructor */ + public ServerlessComputeServiceAPI(ApiClient apiClient) { + impl = new ServerlessComputeServiceImpl(apiClient); + } + + /** Constructor for mocks */ + public ServerlessComputeServiceAPI(ServerlessComputeServiceService mock) { + impl = mock; + } + + /** + * Lists Interactive serverless computes that the caller can use or manage. Results are returned + * in an unspecified order. + */ + public Iterable list(ListServerlessComputesRequest request) { + return Paginator.newTokenPagination( + request, + impl::list, + ListServerlessComputesResponse::getServerlessComputes, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + /** + * Lists compute policies in the workspace. Results are returned in an unspecified order; callers + * should sort client-side if a specific order is needed. + */ + public Iterable listComputePolicies(ListComputePoliciesRequest request) { + return Paginator.newTokenPagination( + request, + impl::listComputePolicies, + ListComputePoliciesResponse::getComputePolicies, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + public ServerlessComputeServiceService impl() { + return impl; + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessComputeServiceImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessComputeServiceImpl.java new file mode 100644 index 000000000..c056b67ab --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessComputeServiceImpl.java @@ -0,0 +1,52 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.compute; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.http.Request; +import com.databricks.sdk.support.Generated; +import java.io.IOException; + +/** Package-local implementation of ServerlessComputeService */ +@Generated +class ServerlessComputeServiceImpl implements ServerlessComputeServiceService { + private final ApiClient apiClient; + + public ServerlessComputeServiceImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public ListServerlessComputesResponse list(ListServerlessComputesRequest request) { + String path = "/api/2.0/serverless-compute"; + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListServerlessComputesResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ListComputePoliciesResponse listComputePolicies(ListComputePoliciesRequest request) { + String path = "/api/2.0/policies/compute"; + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListComputePoliciesResponse.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/compute/ServerlessComputeServiceService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessComputeServiceService.java new file mode 100644 index 000000000..38f98adda --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ServerlessComputeServiceService.java @@ -0,0 +1,27 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.compute; + +import com.databricks.sdk.support.Generated; + +/** + * ServerlessCompute Service API. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface ServerlessComputeServiceService { + /** + * Lists Interactive serverless computes that the caller can use or manage. Results are returned + * in an unspecified order. + */ + ListServerlessComputesResponse list(ListServerlessComputesRequest listServerlessComputesRequest); + + /** + * Lists compute policies in the workspace. Results are returned in an unspecified order; callers + * should sort client-side if a specific order is needed. + */ + ListComputePoliciesResponse listComputePolicies( + ListComputePoliciesRequest listComputePoliciesRequest); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/TshirtSize.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/TshirtSize.java new file mode 100644 index 000000000..edfcef767 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/TshirtSize.java @@ -0,0 +1,18 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.compute; + +import com.databricks.sdk.support.Generated; + +/** T-shirt size for per-workload Spark executor limits. */ +@Generated +public enum TshirtSize { + T_SHIRT_SIZE_2X_LARGE, + T_SHIRT_SIZE_3X_LARGE, + T_SHIRT_SIZE_4X_LARGE, + T_SHIRT_SIZE_LARGE, + T_SHIRT_SIZE_MEDIUM, + T_SHIRT_SIZE_SMALL, + T_SHIRT_SIZE_UNSPECIFIED, + T_SHIRT_SIZE_X_LARGE, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/TextAttachment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/TextAttachment.java index f938cf4cc..e6dc3678d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/TextAttachment.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/TextAttachment.java @@ -25,7 +25,8 @@ public class TextAttachment { * Purpose of this text attachment. A completed message may contain more than one text attachment * (for example a clarifying follow-up question alongside the final answer); use this field to * tell them apart. `TEXT_ATTACHMENT_PURPOSE_ANSWER` marks the final answer/summary and - * `FOLLOW_UP_QUESTION` marks a clarifying question. + * `FOLLOW_UP_QUESTION` marks a clarifying question. Agent-mode messages return the answer as + * their only text attachment. */ @JsonProperty("purpose") private TextAttachmentPurpose purpose; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2API.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2API.java index a60341768..d5745383d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2API.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2API.java @@ -28,35 +28,33 @@ public AccountIamV2API(AccountIamV2Service mock) { } /** - * Creates a group membership (assigns a principal to a group). + * Adds a user, service principal, or group as a direct member of a group. * - *

Authorization: the caller must be an account admin or a manager of the group (holds the - * `roles/group.manager` role on it). + *

If automatic identity management is on and the group has an `external_id`, its members come + * from your identity provider and can't be changed in Databricks. */ public DirectGroupMember createDirectGroupMember(CreateDirectGroupMemberRequest request) { return impl.createDirectGroupMember(request); } /** - * Creates a local group in the Databricks account and returns the created group. A local group is - * one that is not synced from the customer's identity provider, and can be created whether or not - * Account Identity Management (AIM) is enabled. + * Creates a local group, which is a group that isn't synced from your identity provider (IdP). + * You become a manager of the new group. * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveGroup; to read an - * existing external identity, use the ExternalGroup resource. + *

If automatic identity management is on, you can't set `external_id`. To add a group from + * your IdP, get it as an external group instead. */ public Group createGroup(CreateGroupRequest request) { return impl.createGroup(request); } /** - * Creates a group visibility filter in the account. Requires account admin privileges. Set - * `principal_type` to `GROUP` and specify exactly one of `exact` (external ID), `prefix` - * (display-name starts with), or `regex` (full RE2 display-name match). The filter applies across - * all workspaces in the account. A duplicate filter ID or an existing rule with the same type and - * match value returns `ALREADY_EXISTS`. Filters are immutable; to change a rule, delete it and - * create a new one. + * Creates a group visibility filter. It applies to every workspace in the account. + * + *

Returns `ALREADY_EXISTS` if a filter with the same ID, or the same type and match value, + * already exists. Returns `RESOURCE_EXHAUSTED` if the account already has the maximum number of + * filters of that type. You can't change a filter: to change a rule, delete it and create a new + * one. */ public IdentityVisibilityFilter createIdentityVisibilityFilter( CreateIdentityVisibilityFilterRequest request) { @@ -64,36 +62,33 @@ public IdentityVisibilityFilter createIdentityVisibilityFilter( } /** - * Creates a local service principal in the Databricks account and returns the created service - * principal. A local service principal is one that is not synced from the customer's identity - * provider, and can be created whether or not Account Identity Management (AIM) is enabled. + * Creates a local service principal, which is a service principal that isn't synced from your + * identity provider (IdP). * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveServicePrincipal; to - * read an existing external identity, use the ExternalServicePrincipal resource. + *

If automatic identity management is on, you can't set `external_id`. To add a service + * principal from your IdP, get it as an external service principal instead. */ public ServicePrincipal createServicePrincipal(CreateServicePrincipalRequest request) { return impl.createServicePrincipal(request); } /** - * Creates a local user in the Databricks account and returns the created user. A local user is - * one that is not synced from the customer's identity provider, and can be created whether or not - * Account Identity Management (AIM) is enabled. + * Creates a local user, which is a user that isn't synced from your identity provider (IdP). * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveUser; to read an - * existing external identity, use the ExternalUser resource. + *

If automatic identity management is on, you can't set `external_id`. To add a user from your + * IdP, get them as an external user instead. */ public User createUser(CreateUserRequest request) { return impl.createUser(request); } /** - * Creates a workspace assignment for a principal. Entitlements are granted one at a time rather - * than atomically. If the request fails partway through, the principal stays assigned to the - * workspace with only some of the requested entitlements. Get the assignment afterwards to - * confirm which entitlements were granted. + * Assigns a user, service principal, or group directly to a workspace with the given + * entitlements. Returns an error if the principal is already assigned directly. + * + *

Entitlements are granted one at a time. If the request fails partway through, the principal + * stays assigned with only some of the entitlements. Get the assignment afterwards to check which + * were granted. */ public WorkspaceAssignment createWorkspaceAssignment(CreateWorkspaceAssignmentRequest request) { return impl.createWorkspaceAssignment(request); @@ -110,10 +105,10 @@ public void deleteDirectGroupMember(String name) { } /** - * Deletes a group membership (unassigns a principal from a group). + * Removes a direct member from a group. * - *

Authorization: the caller must be an account admin or a manager of the group (holds the - * `roles/group.manager` role on it). + *

If automatic identity management is on and the group has an `external_id`, its members come + * from your identity provider and can't be changed in Databricks. */ public void deleteDirectGroupMember(DeleteDirectGroupMemberRequest request) { impl.deleteDirectGroupMember(request); @@ -123,12 +118,7 @@ public void deleteGroup(String name) { deleteGroup(new DeleteGroupRequest().setName(name)); } - /** - * Deletes a group from the Databricks account by its internal ID. - * - *

Authorization: the caller must be an account admin or a manager of the group (holds the - * `roles/group.manager` role on it). - */ + /** Deletes a group from your account and removes it from the workspaces it's assigned to. */ public void deleteGroup(DeleteGroupRequest request) { impl.deleteGroup(request); } @@ -138,11 +128,10 @@ public void deleteIdentityVisibilityFilter(String name) { } /** - * Deletes a group visibility filter by its resource name. Requires account admin privileges. - * Deleting a filter does not delete groups or revoke access. Groups covered only by this rule - * stop being discoverable unless they or a transitive parent are already provisioned in the - * account. If no group filters remain, all groups become visible again. Deleting a filter that - * does not exist succeeds without making any changes. + * Deletes a group visibility filter. Deleting a filter doesn't delete groups or remove access. + * Groups that only this filter matched stop being visible, unless they or a parent group are + * already in your account. If no group filters remain, all groups become visible again. Deleting + * a filter that doesn't exist succeeds. */ public void deleteIdentityVisibilityFilter(DeleteIdentityVisibilityFilterRequest request) { impl.deleteIdentityVisibilityFilter(request); @@ -152,7 +141,10 @@ public void deleteServicePrincipal(String name) { deleteServicePrincipal(new DeleteServicePrincipalRequest().setName(name)); } - /** Deletes a service principal from the Databricks account by its internal ID. */ + /** + * Deletes a service principal from your account and removes it from the workspaces it's assigned + * to. You can't delete service principals that Databricks manages. + */ public void deleteServicePrincipal(DeleteServicePrincipalRequest request) { impl.deleteServicePrincipal(request); } @@ -161,7 +153,7 @@ public void deleteUser(String name) { deleteUser(new DeleteUserRequest().setName(name)); } - /** Deletes a user from the Databricks account by its internal ID. */ + /** Deletes a user from your account and removes them from the workspaces they're assigned to. */ public void deleteUser(DeleteUserRequest request) { impl.deleteUser(request); } @@ -171,9 +163,11 @@ public void deleteWorkspaceAssignment(String name) { } /** - * Deletes a workspace assignment for a principal, revoking all of its entitlements. Entitlements - * are revoked one at a time rather than atomically. If the request fails partway through, the - * principal stays assigned with some of its original entitlements. Retrying is safe. + * Removes a principal's direct assignment to a workspace and revokes the entitlements it granted. + * The principal keeps any access it gets through groups. + * + *

Entitlements are revoked one at a time. If the request fails partway through, the principal + * stays assigned with some of its entitlements. You can retry the request. */ public void deleteWorkspaceAssignment(DeleteWorkspaceAssignmentRequest request) { impl.deleteWorkspaceAssignment(request); @@ -199,7 +193,10 @@ public DirectGroupMember getDirectGroupMember(String name) { return getDirectGroupMember(new GetDirectGroupMemberRequest().setName(name)); } - /** Gets a provisioned direct member of a group. */ + /** + * Gets a direct member of a group, including where the membership comes from. Returns an error if + * the principal isn't a direct member. + */ public DirectGroupMember getDirectGroupMember(GetDirectGroupMemberRequest request) { return impl.getDirectGroupMember(request); } @@ -209,9 +206,9 @@ public ExternalGroup getExternalGroup(String name) { } /** - * Retrieves an external group with the given external ID from the customer's IdP. If the group - * does not exist, it will be created in the account. If the customer is not onboarded onto - * Automatic Identity Management (AIM), this will return an error. + * Gets a group by its ID in your identity provider (IdP) and syncs its name and parent groups + * from your IdP. If the group isn't in your account yet, it's added. Requires automatic identity + * management. If your account has group visibility filters, the group must match them. */ public ExternalGroup getExternalGroup(GetExternalGroupRequest request) { return impl.getExternalGroup(request); @@ -222,9 +219,9 @@ public ExternalServicePrincipal getExternalServicePrincipal(String name) { } /** - * Retrieves an external service principal with the given external ID from the customer's IdP. If - * the service principal does not exist, it will be created. If the customer is not onboarded onto - * Automatic Identity Management (AIM), this will return an error. + * Gets a service principal by its ID in your identity provider (IdP) and syncs its details and + * group memberships from your IdP. If the service principal isn't in your account yet, it's + * added. Requires automatic identity management with Microsoft Entra ID as your IdP. */ public ExternalServicePrincipal getExternalServicePrincipal( GetExternalServicePrincipalRequest request) { @@ -236,9 +233,9 @@ public ExternalUser getExternalUser(String name) { } /** - * Retrieves an external user with the given external ID from the customer's IdP. If the user does - * not exist, it will be created. If the customer is not onboarded onto Automatic Identity - * Management (AIM), this will return an error. + * Gets a user by their ID in your identity provider (IdP) and syncs their details and group + * memberships from your IdP. If the user isn't in your account yet, they're added. Requires + * automatic identity management. */ public ExternalUser getExternalUser(GetExternalUserRequest request) { return impl.getExternalUser(request); @@ -248,7 +245,7 @@ public Group getGroup(String name) { return getGroup(new GetGroupRequest().setName(name)); } - /** Fetches a group from the Databricks account by its internal ID. */ + /** Gets a group by its Databricks ID. */ public Group getGroup(GetGroupRequest request) { return impl.getGroup(request); } @@ -257,10 +254,7 @@ public IdentityVisibilityFilter getIdentityVisibilityFilter(String name) { return getIdentityVisibilityFilter(new GetIdentityVisibilityFilterRequest().setName(name)); } - /** - * Gets a group visibility filter by its resource name. Requires account admin privileges. Returns - * the filter rule, not the groups matched by the rule. - */ + /** Gets a group visibility filter. It returns the rule, not the groups it matches. */ public IdentityVisibilityFilter getIdentityVisibilityFilter( GetIdentityVisibilityFilterRequest request) { return impl.getIdentityVisibilityFilter(request); @@ -270,7 +264,7 @@ public ServicePrincipal getServicePrincipal(String name) { return getServicePrincipal(new GetServicePrincipalRequest().setName(name)); } - /** Fetches a service principal from the Databricks account by its internal ID. */ + /** Gets a service principal by its Databricks ID. */ public ServicePrincipal getServicePrincipal(GetServicePrincipalRequest request) { return impl.getServicePrincipal(request); } @@ -279,7 +273,7 @@ public User getUser(String name) { return getUser(new GetUserRequest().setName(name)); } - /** Fetches a user from the Databricks account by its internal ID. */ + /** Gets a user by their Databricks ID. */ public User getUser(GetUserRequest request) { return impl.getUser(request); } @@ -303,7 +297,10 @@ public WorkspaceAssignment getWorkspaceAssignment(String name) { return getWorkspaceAssignment(new GetWorkspaceAssignmentRequest().setName(name)); } - /** Returns the assignment for a principal in a workspace. */ + /** + * Gets a principal's direct assignment to a workspace, including its effective entitlements. + * Returns an error if the principal isn't assigned directly. + */ public WorkspaceAssignment getWorkspaceAssignment(GetWorkspaceAssignmentRequest request) { return impl.getWorkspaceAssignment(request); } @@ -327,8 +324,8 @@ public Iterable listDirectGroupMembers(String parent) { } /** - * Lists provisioned direct members of a group with their membership source (internal or from - * identity provider). + * Lists the direct members of a group, sorted by display name, with where each membership comes + * from. Members in your identity provider who haven't been added to Databricks aren't included. */ public Iterable listDirectGroupMembers(ListDirectGroupMembersRequest request) { return Paginator.newTokenPagination( @@ -349,8 +346,8 @@ public Iterable listGroups(String parent) { } /** - * Lists the groups in the Databricks account, returning one page per call. Supports filtering by - * group name or external ID. + * Lists the groups in your account, sorted by Databricks ID. Groups in your identity provider + * that haven't been added to Databricks aren't included. */ public Iterable listGroups(ListGroupsRequest request) { return Paginator.newTokenPagination( @@ -372,10 +369,8 @@ public Iterable listIdentityVisibilityFilters(String p } /** - * Lists group visibility filters in the account, returning one page per call. Requires account - * admin privileges. Returns filter rules, not the groups matched by those rules. To retrieve the - * next page, pass the response's `next_page_token` as `page_token` in the next request. If - * `next_page_token` is omitted, there are no more pages. + * Lists the group visibility filters in an account. It returns the rules, not the groups they + * match. */ public Iterable listIdentityVisibilityFilters( ListIdentityVisibilityFiltersRequest request) { @@ -397,8 +392,8 @@ public Iterable listServicePrincipals(String parent) { } /** - * Lists the service principals in the Databricks account, returning one page per call. Supports - * filtering by application ID or external ID. + * Lists the service principals in your account, sorted by Databricks ID. Service principals in + * your identity provider that haven't been added to Databricks aren't included. */ public Iterable listServicePrincipals(ListServicePrincipalsRequest request) { return Paginator.newTokenPagination( @@ -418,7 +413,11 @@ public ListTransitiveParentGroupsResponse listTransitiveParentGroups(String pare return listTransitiveParentGroups(new ListTransitiveParentGroupsRequest().setParent(parent)); } - /** Lists all transitive parent groups of a principal. */ + /** + * Lists every group that a user, service principal, or group belongs to, directly or through + * other groups, sorted by Databricks ID. If automatic identity management is on, the principal's + * group memberships are synced from your identity provider first. + */ public ListTransitiveParentGroupsResponse listTransitiveParentGroups( ListTransitiveParentGroupsRequest request) { return impl.listTransitiveParentGroups(request); @@ -429,8 +428,8 @@ public Iterable listUsers(String parent) { } /** - * Lists the users in the Databricks account, returning one page per call. Supports filtering by - * username or external ID. + * Lists the users in your account, sorted by Databricks ID. Users in your identity provider who + * haven't been added to Databricks aren't included. */ public Iterable listUsers(ListUsersRequest request) { return Paginator.newTokenPagination( @@ -476,9 +475,8 @@ public Iterable listWorkspaceAssignments(String parent) { } /** - * Lists workspace assignments for a workspace. The response omits the per-principal entitlement - * fields (`entitlements` and `effective_entitlements`). To read the entitlements for a single - * principal, get that principal's assignment. + * Lists the principals assigned directly to a workspace. The response leaves `entitlements` and + * `effective_entitlements` empty. To read a principal's entitlements, get its assignment. */ public Iterable listWorkspaceAssignments( ListWorkspaceAssignmentsRequest request) { @@ -496,18 +494,18 @@ public Iterable listWorkspaceAssignments( } /** - * Resolves a group with the given external ID from the customer's IdP. If the group does not - * exist, it will be created in the account. If the customer is not onboarded onto Automatic - * Identity Management (AIM), this will return an error. + * Gets a group by its ID in your identity provider (IdP) and syncs its name and parent groups + * from your IdP. If the group isn't in your account yet, it's added. Requires automatic identity + * management. If your account has group visibility filters, the group must match them. */ public ResolveGroupResponse resolveGroup(ResolveGroupRequest request) { return impl.resolveGroup(request); } /** - * Resolves a service principal with the given external ID from the customer's IdP. If the service - * principal does not exist, it will be created. If the customer is not onboarded onto Automatic - * Identity Management (AIM), this will return an error. + * Gets a service principal by its ID in your identity provider (IdP) and syncs its details and + * group memberships from your IdP. If the service principal isn't in your account yet, it's + * added. Requires automatic identity management with Microsoft Entra ID as your IdP. */ public ResolveServicePrincipalResponse resolveServicePrincipal( ResolveServicePrincipalRequest request) { @@ -515,61 +513,55 @@ public ResolveServicePrincipalResponse resolveServicePrincipal( } /** - * Resolves a user with the given external ID from the customer's IdP. If the user does not exist, - * it will be created. If the customer is not onboarded onto Automatic Identity Management (AIM), - * this will return an error. + * Gets a user by their ID in your identity provider (IdP) and syncs their details and group + * memberships from your IdP. If the user isn't in your account yet, they're added. Requires + * automatic identity management. */ public ResolveUserResponse resolveUser(ResolveUserRequest request) { return impl.resolveUser(request); } /** - * Updates an existing group in the Databricks account. Only the fields named in the update mask - * are modified. Returns the updated Group resource. + * Updates a group. Only the fields in `update_mask` change. * - *

When AIM is enabled and the group is an external identity (its external_id is set), only - * external_id can be updated; its other fields are sourced from your identity provider. With AIM - * and group visibility filters, a new nonempty external_id must identify a visible group. - * Clearing external_id is allowed. - * - *

Authorization: the caller must be an account admin or a manager of the group (holds the - * `roles/group.manager` role on it). + *

If automatic identity management is on and the group has an `external_id`, you can only + * update `external_id`. The group's other fields come from your identity provider. If your + * account also has group visibility filters, a new `external_id` must match them. You can always + * clear `external_id`. */ public Group updateGroup(UpdateGroupRequest request) { return impl.updateGroup(request); } /** - * Updates an existing service principal in the Databricks account. Only the fields named in the - * update mask are modified. Returns the updated ServicePrincipal resource. - * - *

To change is_agent on a locally managed service principal, set it to true or false. Naming - * is_agent in the update mask without a value leaves it unchanged. + * Updates a service principal. Only the fields in `update_mask` change. * - *

When AIM is enabled and the service principal is an external identity (its external_id is - * set), only external_id can be updated; its other fields are sourced from your identity - * provider. + *

If automatic identity management is on and the service principal has an `external_id`, you + * can only update `external_id`. Its other fields come from your identity provider. A service + * principal can't deactivate itself, and you can't update service principals that Databricks + * manages. */ public ServicePrincipal updateServicePrincipal(UpdateServicePrincipalRequest request) { return impl.updateServicePrincipal(request); } /** - * Updates an existing user in the Databricks account and returns the updated user. Only the - * fields named in the update mask are modified. The updatable fields are fullName.givenName, - * fullName.familyName, status, and externalId. + * Updates a user. Only the fields in `update_mask` change. * - *

When AIM is enabled and the user is an external identity (its external_id is set), only - * external_id can be updated; its other fields are sourced from your identity provider. + *

If automatic identity management is on and the user has an `external_id`, you can only + * update `external_id`. The user's other fields come from your identity provider. You can't + * deactivate yourself or change the status of the account owner. */ public User updateUser(UpdateUserRequest request) { return impl.updateUser(request); } /** - * Updates the entitlements of a directly assigned principal in a workspace. Changes are applied - * one at a time rather than atomically. If the request fails partway through, only some of the - * requested changes take effect. Get the assignment afterwards to confirm the final state. + * Replaces the entitlements of a principal's direct assignment to a workspace. The new list can't + * be empty. + * + *

Entitlements are changed one at a time. If the request fails partway through, only some of + * the changes take effect. Get the assignment afterwards to check the result. */ public WorkspaceAssignment updateWorkspaceAssignment(UpdateWorkspaceAssignmentRequest request) { return impl.updateWorkspaceAssignment(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Service.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Service.java index e441a8821..dec796c59 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Service.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Service.java @@ -14,64 +14,59 @@ @Generated public interface AccountIamV2Service { /** - * Creates a group membership (assigns a principal to a group). + * Adds a user, service principal, or group as a direct member of a group. * - *

Authorization: the caller must be an account admin or a manager of the group (holds the - * `roles/group.manager` role on it). + *

If automatic identity management is on and the group has an `external_id`, its members come + * from your identity provider and can't be changed in Databricks. */ DirectGroupMember createDirectGroupMember( CreateDirectGroupMemberRequest createDirectGroupMemberRequest); /** - * Creates a local group in the Databricks account and returns the created group. A local group is - * one that is not synced from the customer's identity provider, and can be created whether or not - * Account Identity Management (AIM) is enabled. + * Creates a local group, which is a group that isn't synced from your identity provider (IdP). + * You become a manager of the new group. * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveGroup; to read an - * existing external identity, use the ExternalGroup resource. + *

If automatic identity management is on, you can't set `external_id`. To add a group from + * your IdP, get it as an external group instead. */ Group createGroup(CreateGroupRequest createGroupRequest); /** - * Creates a group visibility filter in the account. Requires account admin privileges. Set - * `principal_type` to `GROUP` and specify exactly one of `exact` (external ID), `prefix` - * (display-name starts with), or `regex` (full RE2 display-name match). The filter applies across - * all workspaces in the account. A duplicate filter ID or an existing rule with the same type and - * match value returns `ALREADY_EXISTS`. Filters are immutable; to change a rule, delete it and - * create a new one. + * Creates a group visibility filter. It applies to every workspace in the account. + * + *

Returns `ALREADY_EXISTS` if a filter with the same ID, or the same type and match value, + * already exists. Returns `RESOURCE_EXHAUSTED` if the account already has the maximum number of + * filters of that type. You can't change a filter: to change a rule, delete it and create a new + * one. */ IdentityVisibilityFilter createIdentityVisibilityFilter( CreateIdentityVisibilityFilterRequest createIdentityVisibilityFilterRequest); /** - * Creates a local service principal in the Databricks account and returns the created service - * principal. A local service principal is one that is not synced from the customer's identity - * provider, and can be created whether or not Account Identity Management (AIM) is enabled. + * Creates a local service principal, which is a service principal that isn't synced from your + * identity provider (IdP). * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveServicePrincipal; to - * read an existing external identity, use the ExternalServicePrincipal resource. + *

If automatic identity management is on, you can't set `external_id`. To add a service + * principal from your IdP, get it as an external service principal instead. */ ServicePrincipal createServicePrincipal( CreateServicePrincipalRequest createServicePrincipalRequest); /** - * Creates a local user in the Databricks account and returns the created user. A local user is - * one that is not synced from the customer's identity provider, and can be created whether or not - * Account Identity Management (AIM) is enabled. + * Creates a local user, which is a user that isn't synced from your identity provider (IdP). * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveUser; to read an - * existing external identity, use the ExternalUser resource. + *

If automatic identity management is on, you can't set `external_id`. To add a user from your + * IdP, get them as an external user instead. */ User createUser(CreateUserRequest createUserRequest); /** - * Creates a workspace assignment for a principal. Entitlements are granted one at a time rather - * than atomically. If the request fails partway through, the principal stays assigned to the - * workspace with only some of the requested entitlements. Get the assignment afterwards to - * confirm which entitlements were granted. + * Assigns a user, service principal, or group directly to a workspace with the given + * entitlements. Returns an error if the principal is already assigned directly. + * + *

Entitlements are granted one at a time. If the request fails partway through, the principal + * stays assigned with only some of the entitlements. Get the assignment afterwards to check which + * were granted. */ WorkspaceAssignment createWorkspaceAssignment( CreateWorkspaceAssignmentRequest createWorkspaceAssignmentRequest); @@ -81,41 +76,40 @@ WorkspaceAssignmentDetail createWorkspaceAssignmentDetail( CreateWorkspaceAssignmentDetailRequest createWorkspaceAssignmentDetailRequest); /** - * Deletes a group membership (unassigns a principal from a group). + * Removes a direct member from a group. * - *

Authorization: the caller must be an account admin or a manager of the group (holds the - * `roles/group.manager` role on it). + *

If automatic identity management is on and the group has an `external_id`, its members come + * from your identity provider and can't be changed in Databricks. */ void deleteDirectGroupMember(DeleteDirectGroupMemberRequest deleteDirectGroupMemberRequest); - /** - * Deletes a group from the Databricks account by its internal ID. - * - *

Authorization: the caller must be an account admin or a manager of the group (holds the - * `roles/group.manager` role on it). - */ + /** Deletes a group from your account and removes it from the workspaces it's assigned to. */ void deleteGroup(DeleteGroupRequest deleteGroupRequest); /** - * Deletes a group visibility filter by its resource name. Requires account admin privileges. - * Deleting a filter does not delete groups or revoke access. Groups covered only by this rule - * stop being discoverable unless they or a transitive parent are already provisioned in the - * account. If no group filters remain, all groups become visible again. Deleting a filter that - * does not exist succeeds without making any changes. + * Deletes a group visibility filter. Deleting a filter doesn't delete groups or remove access. + * Groups that only this filter matched stop being visible, unless they or a parent group are + * already in your account. If no group filters remain, all groups become visible again. Deleting + * a filter that doesn't exist succeeds. */ void deleteIdentityVisibilityFilter( DeleteIdentityVisibilityFilterRequest deleteIdentityVisibilityFilterRequest); - /** Deletes a service principal from the Databricks account by its internal ID. */ + /** + * Deletes a service principal from your account and removes it from the workspaces it's assigned + * to. You can't delete service principals that Databricks manages. + */ void deleteServicePrincipal(DeleteServicePrincipalRequest deleteServicePrincipalRequest); - /** Deletes a user from the Databricks account by its internal ID. */ + /** Deletes a user from your account and removes them from the workspaces they're assigned to. */ void deleteUser(DeleteUserRequest deleteUserRequest); /** - * Deletes a workspace assignment for a principal, revoking all of its entitlements. Entitlements - * are revoked one at a time rather than atomically. If the request fails partway through, the - * principal stays assigned with some of its original entitlements. Retrying is safe. + * Removes a principal's direct assignment to a workspace and revokes the entitlements it granted. + * The principal keeps any access it gets through groups. + * + *

Entitlements are revoked one at a time. If the request fails partway through, the principal + * stays assigned with some of its entitlements. You can retry the request. */ void deleteWorkspaceAssignment(DeleteWorkspaceAssignmentRequest deleteWorkspaceAssignmentRequest); @@ -127,45 +121,45 @@ void deleteIdentityVisibilityFilter( void deleteWorkspaceAssignmentDetail( DeleteWorkspaceAssignmentDetailRequest deleteWorkspaceAssignmentDetailRequest); - /** Gets a provisioned direct member of a group. */ + /** + * Gets a direct member of a group, including where the membership comes from. Returns an error if + * the principal isn't a direct member. + */ DirectGroupMember getDirectGroupMember(GetDirectGroupMemberRequest getDirectGroupMemberRequest); /** - * Retrieves an external group with the given external ID from the customer's IdP. If the group - * does not exist, it will be created in the account. If the customer is not onboarded onto - * Automatic Identity Management (AIM), this will return an error. + * Gets a group by its ID in your identity provider (IdP) and syncs its name and parent groups + * from your IdP. If the group isn't in your account yet, it's added. Requires automatic identity + * management. If your account has group visibility filters, the group must match them. */ ExternalGroup getExternalGroup(GetExternalGroupRequest getExternalGroupRequest); /** - * Retrieves an external service principal with the given external ID from the customer's IdP. If - * the service principal does not exist, it will be created. If the customer is not onboarded onto - * Automatic Identity Management (AIM), this will return an error. + * Gets a service principal by its ID in your identity provider (IdP) and syncs its details and + * group memberships from your IdP. If the service principal isn't in your account yet, it's + * added. Requires automatic identity management with Microsoft Entra ID as your IdP. */ ExternalServicePrincipal getExternalServicePrincipal( GetExternalServicePrincipalRequest getExternalServicePrincipalRequest); /** - * Retrieves an external user with the given external ID from the customer's IdP. If the user does - * not exist, it will be created. If the customer is not onboarded onto Automatic Identity - * Management (AIM), this will return an error. + * Gets a user by their ID in your identity provider (IdP) and syncs their details and group + * memberships from your IdP. If the user isn't in your account yet, they're added. Requires + * automatic identity management. */ ExternalUser getExternalUser(GetExternalUserRequest getExternalUserRequest); - /** Fetches a group from the Databricks account by its internal ID. */ + /** Gets a group by its Databricks ID. */ Group getGroup(GetGroupRequest getGroupRequest); - /** - * Gets a group visibility filter by its resource name. Requires account admin privileges. Returns - * the filter rule, not the groups matched by the rule. - */ + /** Gets a group visibility filter. It returns the rule, not the groups it matches. */ IdentityVisibilityFilter getIdentityVisibilityFilter( GetIdentityVisibilityFilterRequest getIdentityVisibilityFilterRequest); - /** Fetches a service principal from the Databricks account by its internal ID. */ + /** Gets a service principal by its Databricks ID. */ ServicePrincipal getServicePrincipal(GetServicePrincipalRequest getServicePrincipalRequest); - /** Fetches a user from the Databricks account by its internal ID. */ + /** Gets a user by their Databricks ID. */ User getUser(GetUserRequest getUserRequest); /** @@ -178,7 +172,10 @@ IdentityVisibilityFilter getIdentityVisibilityFilter( WorkspaceAccessDetail getWorkspaceAccessDetail( GetWorkspaceAccessDetailRequest getWorkspaceAccessDetailRequest); - /** Returns the assignment for a principal in a workspace. */ + /** + * Gets a principal's direct assignment to a workspace, including its effective entitlements. + * Returns an error if the principal isn't assigned directly. + */ WorkspaceAssignment getWorkspaceAssignment( GetWorkspaceAssignmentRequest getWorkspaceAssignmentRequest); @@ -187,41 +184,43 @@ WorkspaceAssignmentDetail getWorkspaceAssignmentDetail( GetWorkspaceAssignmentDetailRequest getWorkspaceAssignmentDetailRequest); /** - * Lists provisioned direct members of a group with their membership source (internal or from - * identity provider). + * Lists the direct members of a group, sorted by display name, with where each membership comes + * from. Members in your identity provider who haven't been added to Databricks aren't included. */ ListDirectGroupMembersResponse listDirectGroupMembers( ListDirectGroupMembersRequest listDirectGroupMembersRequest); /** - * Lists the groups in the Databricks account, returning one page per call. Supports filtering by - * group name or external ID. + * Lists the groups in your account, sorted by Databricks ID. Groups in your identity provider + * that haven't been added to Databricks aren't included. */ ListGroupsResponse listGroups(ListGroupsRequest listGroupsRequest); /** - * Lists group visibility filters in the account, returning one page per call. Requires account - * admin privileges. Returns filter rules, not the groups matched by those rules. To retrieve the - * next page, pass the response's `next_page_token` as `page_token` in the next request. If - * `next_page_token` is omitted, there are no more pages. + * Lists the group visibility filters in an account. It returns the rules, not the groups they + * match. */ ListIdentityVisibilityFiltersResponse listIdentityVisibilityFilters( ListIdentityVisibilityFiltersRequest listIdentityVisibilityFiltersRequest); /** - * Lists the service principals in the Databricks account, returning one page per call. Supports - * filtering by application ID or external ID. + * Lists the service principals in your account, sorted by Databricks ID. Service principals in + * your identity provider that haven't been added to Databricks aren't included. */ ListServicePrincipalsResponse listServicePrincipals( ListServicePrincipalsRequest listServicePrincipalsRequest); - /** Lists all transitive parent groups of a principal. */ + /** + * Lists every group that a user, service principal, or group belongs to, directly or through + * other groups, sorted by Databricks ID. If automatic identity management is on, the principal's + * group memberships are synced from your identity provider first. + */ ListTransitiveParentGroupsResponse listTransitiveParentGroups( ListTransitiveParentGroupsRequest listTransitiveParentGroupsRequest); /** - * Lists the users in the Databricks account, returning one page per call. Supports filtering by - * username or external ID. + * Lists the users in your account, sorted by Databricks ID. Users in your identity provider who + * haven't been added to Databricks aren't included. */ ListUsersResponse listUsers(ListUsersRequest listUsersRequest); @@ -234,77 +233,70 @@ ListWorkspaceAssignmentDetailsResponse listWorkspaceAssignmentDetails( ListWorkspaceAssignmentDetailsRequest listWorkspaceAssignmentDetailsRequest); /** - * Lists workspace assignments for a workspace. The response omits the per-principal entitlement - * fields (`entitlements` and `effective_entitlements`). To read the entitlements for a single - * principal, get that principal's assignment. + * Lists the principals assigned directly to a workspace. The response leaves `entitlements` and + * `effective_entitlements` empty. To read a principal's entitlements, get its assignment. */ ListWorkspaceAssignmentsResponse listWorkspaceAssignments( ListWorkspaceAssignmentsRequest listWorkspaceAssignmentsRequest); /** - * Resolves a group with the given external ID from the customer's IdP. If the group does not - * exist, it will be created in the account. If the customer is not onboarded onto Automatic - * Identity Management (AIM), this will return an error. + * Gets a group by its ID in your identity provider (IdP) and syncs its name and parent groups + * from your IdP. If the group isn't in your account yet, it's added. Requires automatic identity + * management. If your account has group visibility filters, the group must match them. */ ResolveGroupResponse resolveGroup(ResolveGroupRequest resolveGroupRequest); /** - * Resolves a service principal with the given external ID from the customer's IdP. If the service - * principal does not exist, it will be created. If the customer is not onboarded onto Automatic - * Identity Management (AIM), this will return an error. + * Gets a service principal by its ID in your identity provider (IdP) and syncs its details and + * group memberships from your IdP. If the service principal isn't in your account yet, it's + * added. Requires automatic identity management with Microsoft Entra ID as your IdP. */ ResolveServicePrincipalResponse resolveServicePrincipal( ResolveServicePrincipalRequest resolveServicePrincipalRequest); /** - * Resolves a user with the given external ID from the customer's IdP. If the user does not exist, - * it will be created. If the customer is not onboarded onto Automatic Identity Management (AIM), - * this will return an error. + * Gets a user by their ID in your identity provider (IdP) and syncs their details and group + * memberships from your IdP. If the user isn't in your account yet, they're added. Requires + * automatic identity management. */ ResolveUserResponse resolveUser(ResolveUserRequest resolveUserRequest); /** - * Updates an existing group in the Databricks account. Only the fields named in the update mask - * are modified. Returns the updated Group resource. + * Updates a group. Only the fields in `update_mask` change. * - *

When AIM is enabled and the group is an external identity (its external_id is set), only - * external_id can be updated; its other fields are sourced from your identity provider. With AIM - * and group visibility filters, a new nonempty external_id must identify a visible group. - * Clearing external_id is allowed. - * - *

Authorization: the caller must be an account admin or a manager of the group (holds the - * `roles/group.manager` role on it). + *

If automatic identity management is on and the group has an `external_id`, you can only + * update `external_id`. The group's other fields come from your identity provider. If your + * account also has group visibility filters, a new `external_id` must match them. You can always + * clear `external_id`. */ Group updateGroup(UpdateGroupRequest updateGroupRequest); /** - * Updates an existing service principal in the Databricks account. Only the fields named in the - * update mask are modified. Returns the updated ServicePrincipal resource. - * - *

To change is_agent on a locally managed service principal, set it to true or false. Naming - * is_agent in the update mask without a value leaves it unchanged. + * Updates a service principal. Only the fields in `update_mask` change. * - *

When AIM is enabled and the service principal is an external identity (its external_id is - * set), only external_id can be updated; its other fields are sourced from your identity - * provider. + *

If automatic identity management is on and the service principal has an `external_id`, you + * can only update `external_id`. Its other fields come from your identity provider. A service + * principal can't deactivate itself, and you can't update service principals that Databricks + * manages. */ ServicePrincipal updateServicePrincipal( UpdateServicePrincipalRequest updateServicePrincipalRequest); /** - * Updates an existing user in the Databricks account and returns the updated user. Only the - * fields named in the update mask are modified. The updatable fields are fullName.givenName, - * fullName.familyName, status, and externalId. + * Updates a user. Only the fields in `update_mask` change. * - *

When AIM is enabled and the user is an external identity (its external_id is set), only - * external_id can be updated; its other fields are sourced from your identity provider. + *

If automatic identity management is on and the user has an `external_id`, you can only + * update `external_id`. The user's other fields come from your identity provider. You can't + * deactivate yourself or change the status of the account owner. */ User updateUser(UpdateUserRequest updateUserRequest); /** - * Updates the entitlements of a directly assigned principal in a workspace. Changes are applied - * one at a time rather than atomically. If the request fails partway through, only some of the - * requested changes take effect. Get the assignment afterwards to confirm the final state. + * Replaces the entitlements of a principal's direct assignment to a workspace. The new list can't + * be empty. + * + *

Entitlements are changed one at a time. If the request fails partway through, only some of + * the changes take effect. Get the assignment afterwards to check the result. */ WorkspaceAssignment updateWorkspaceAssignment( UpdateWorkspaceAssignmentRequest updateWorkspaceAssignmentRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateDirectGroupMemberProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateDirectGroupMemberProxyRequest.java index 88336efec..9a27bdf1a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateDirectGroupMemberProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateDirectGroupMemberProxyRequest.java @@ -10,11 +10,11 @@ @Generated public class CreateDirectGroupMemberProxyRequest { - /** Required. The group membership to create. */ + /** The member to add. Set its `principal_id`. */ @JsonProperty("direct_group_member") private DirectGroupMember directGroupMember; - /** The parent resource name of the group to add the member to. Format: groups/{group_id} */ + /** The resource name of the group to add the member to, in the format `groups/{group_id}`. */ @JsonIgnore private String parent; public CreateDirectGroupMemberProxyRequest setDirectGroupMember( diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateDirectGroupMemberRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateDirectGroupMemberRequest.java index 404fe73f5..64d60e264 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateDirectGroupMemberRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateDirectGroupMemberRequest.java @@ -10,13 +10,13 @@ @Generated public class CreateDirectGroupMemberRequest { - /** Required. The direct group member to be added to the group. */ + /** The member to add. Set its `principal_id`. */ @JsonProperty("direct_group_member") private DirectGroupMember directGroupMember; /** - * The parent resource name of the group to add the member to. Format: - * accounts/{account_id}/groups/{group_id} + * The resource name of the group to add the member to, in the format + * `accounts/{account_id}/groups/{group_id}`. */ @JsonIgnore private String parent; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateGroupProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateGroupProxyRequest.java index 2e2033f3f..17df27aee 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateGroupProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateGroupProxyRequest.java @@ -11,13 +11,13 @@ @Generated public class CreateGroupProxyRequest { - /** Required. Group to be created in Databricks */ + /** The group to create. */ @JsonProperty("group") private Group group; /** - * The resource name of the account to create the group in, `accounts/{account_id}`. Optional: - * defaults to the account of the calling workspace, and any other account is rejected. + * The resource name of the account to create the group in, in the format `accounts/{account_id}`. + * Defaults to the account that contains this workspace. Any other account is rejected. */ @JsonIgnore @QueryParam("parent") diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateGroupRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateGroupRequest.java index 98d344b7b..8a9948697 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateGroupRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateGroupRequest.java @@ -10,13 +10,12 @@ @Generated public class CreateGroupRequest { - /** Required. Group to be created in Databricks */ + /** The group to create. */ @JsonProperty("group") private Group group; /** - * The parent resource name of the account in which to create the group. Format: - * accounts/{account_id} + * The resource name of the account to create the group in, in the format `accounts/{account_id}`. */ @JsonIgnore private String parent; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateIdentityVisibilityFilterRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateIdentityVisibilityFilterRequest.java index 8753a385b..1f221cb24 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateIdentityVisibilityFilterRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateIdentityVisibilityFilterRequest.java @@ -12,22 +12,21 @@ @Generated public class CreateIdentityVisibilityFilterRequest { /** - * Required. The filter to create. Set `principal_type` to `GROUP` and specify exactly one of - * `exact`, `prefix`, or `regex`. The server assigns the resource name; any supplied `name` is - * ignored. + * The filter to create. Set `principal_type` to `GROUP` and exactly one of `exact`, `prefix`, or + * `regex`. Databricks sets `name`, so any value you set is ignored. */ @JsonProperty("identity_visibility_filter") private IdentityVisibilityFilter identityVisibilityFilter; /** - * Optional. The ID to use for the filter, which becomes the final component of its resource name. - * If not specified or empty, the server generates one. Must not contain `/`. + * The ID to give the filter, which becomes the last part of its resource name. If you leave it + * empty, Databricks generates one. It can't contain `/`. */ @JsonIgnore @QueryParam("identity_visibility_filter_id") private String identityVisibilityFilterId; - /** Required. The parent account. Format: accounts/{account_id} */ + /** The resource name of the account, in the format `accounts/{account_id}`. */ @JsonIgnore private String parent; public CreateIdentityVisibilityFilterRequest setIdentityVisibilityFilter( diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateServicePrincipalProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateServicePrincipalProxyRequest.java index a6d95d9d1..31c9a882f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateServicePrincipalProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateServicePrincipalProxyRequest.java @@ -12,14 +12,15 @@ @Generated public class CreateServicePrincipalProxyRequest { /** - * The resource name of the account to create the service principal in, `accounts/{account_id}`. - * Optional: defaults to the account of the calling workspace, and any other account is rejected. + * The resource name of the account to create the service principal in, in the format + * `accounts/{account_id}`. Defaults to the account that contains this workspace. Any other + * account is rejected. */ @JsonIgnore @QueryParam("parent") private String parent; - /** Required. Service principal to be created in Databricks */ + /** The service principal to create. */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateServicePrincipalRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateServicePrincipalRequest.java index a732b478b..a2c4b7f98 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateServicePrincipalRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateServicePrincipalRequest.java @@ -11,12 +11,12 @@ @Generated public class CreateServicePrincipalRequest { /** - * The parent resource name of the account in which to create the service principal. Format: - * accounts/{account_id} + * The resource name of the account to create the service principal in, in the format + * `accounts/{account_id}`. */ @JsonIgnore private String parent; - /** Required. Service principal to be created in Databricks */ + /** The service principal to create. */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateUserProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateUserProxyRequest.java index ed91c8f3e..60a5b8e78 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateUserProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateUserProxyRequest.java @@ -12,14 +12,14 @@ @Generated public class CreateUserProxyRequest { /** - * The resource name of the account to create the user in, `accounts/{account_id}`. Optional: - * defaults to the account of the calling workspace, and any other account is rejected. + * The resource name of the account to create the user in, in the format `accounts/{account_id}`. + * Defaults to the account that contains this workspace. Any other account is rejected. */ @JsonIgnore @QueryParam("parent") private String parent; - /** Required. User to be created in Databricks */ + /** The user to create. */ @JsonProperty("user") private User user; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateUserRequest.java index fae5f44f0..8ccf436f2 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateUserRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateUserRequest.java @@ -11,12 +11,11 @@ @Generated public class CreateUserRequest { /** - * The parent resource name of the account in which to create the user. Format: - * accounts/{account_id} + * The resource name of the account to create the user in, in the format `accounts/{account_id}`. */ @JsonIgnore private String parent; - /** Required. User to be created in Databricks */ + /** The user to create. */ @JsonProperty("user") private User user; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateWorkspaceAssignmentProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateWorkspaceAssignmentProxyRequest.java index f58c04620..fa6c2baf0 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateWorkspaceAssignmentProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateWorkspaceAssignmentProxyRequest.java @@ -12,15 +12,15 @@ @Generated public class CreateWorkspaceAssignmentProxyRequest { /** - * The resource name of the workspace to assign the principal to, - * `accounts/{account_id}/workspaces/{workspace_id}`. Optional: defaults to the calling workspace, - * and any other workspace is rejected. + * The resource name of the workspace, in the format + * `accounts/{account_id}/workspaces/{workspace_id}`. Defaults to this workspace. Any other + * workspace is rejected. */ @JsonIgnore @QueryParam("parent") private String parent; - /** Required. Workspace assignment to be created in Databricks. */ + /** The assignment to create. Set its `principal_id` and `entitlements`. */ @JsonProperty("workspace_assignment") private WorkspaceAssignment workspaceAssignment; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateWorkspaceAssignmentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateWorkspaceAssignmentRequest.java index 704d37b5a..e9a027d69 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateWorkspaceAssignmentRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/CreateWorkspaceAssignmentRequest.java @@ -11,12 +11,12 @@ @Generated public class CreateWorkspaceAssignmentRequest { /** - * The parent resource name of the workspace to assign the principal to. Format: - * accounts/{account_id}/workspaces/{workspace_id} + * The resource name of the workspace, in the format + * `accounts/{account_id}/workspaces/{workspace_id}`. */ @JsonIgnore private String parent; - /** Required. Workspace assignment to be created in Databricks. */ + /** The assignment to create. Set its `principal_id` and `entitlements`. */ @JsonProperty("workspace_assignment") private WorkspaceAssignment workspaceAssignment; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteDirectGroupMemberProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteDirectGroupMemberProxyRequest.java index 168fa1b18..0333d2f1c 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteDirectGroupMemberProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteDirectGroupMemberProxyRequest.java @@ -10,8 +10,8 @@ @Generated public class DeleteDirectGroupMemberProxyRequest { /** - * The resource name of the group membership. Format: - * groups/{group_id}/direct-members/{principal_id} + * The resource name of the membership, in the format + * `groups/{group_id}/direct-members/{principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteDirectGroupMemberRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteDirectGroupMemberRequest.java index da9d07b40..1ac209c59 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteDirectGroupMemberRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteDirectGroupMemberRequest.java @@ -10,8 +10,8 @@ @Generated public class DeleteDirectGroupMemberRequest { /** - * The resource name of the group membership. Format: - * accounts/{account_id}/groups/{group_id}/direct-members/{principal_id} + * The resource name of the membership, in the format + * `accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteGroupProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteGroupProxyRequest.java index 941ba0fac..57cea3912 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteGroupProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteGroupProxyRequest.java @@ -9,7 +9,7 @@ @Generated public class DeleteGroupProxyRequest { - /** The resource name of the group. Format: groups/{group_id} */ + /** The resource name of the group, in the format `groups/{group_id}`. */ @JsonIgnore private String name; public DeleteGroupProxyRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteGroupRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteGroupRequest.java index 6cd8b5e37..c9d160bdf 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteGroupRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteGroupRequest.java @@ -9,7 +9,7 @@ @Generated public class DeleteGroupRequest { - /** The resource name of the group. Format: accounts/{account_id}/groups/{group_id} */ + /** The resource name of the group, in the format `accounts/{account_id}/groups/{group_id}`. */ @JsonIgnore private String name; public DeleteGroupRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteIdentityVisibilityFilterRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteIdentityVisibilityFilterRequest.java index fc1c1cbd7..dad86c6d1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteIdentityVisibilityFilterRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteIdentityVisibilityFilterRequest.java @@ -10,8 +10,8 @@ @Generated public class DeleteIdentityVisibilityFilterRequest { /** - * Required. The resource name of the filter. Format: - * accounts/{account_id}/identity-visibility-filters/{identity_visibility_filter_id} + * The resource name of the filter, in the format + * `accounts/{account_id}/identity-visibility-filters/{identity_visibility_filter_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteServicePrincipalProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteServicePrincipalProxyRequest.java index ad0ced620..4a7e9bb91 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteServicePrincipalProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteServicePrincipalProxyRequest.java @@ -10,7 +10,8 @@ @Generated public class DeleteServicePrincipalProxyRequest { /** - * The resource name of the service principal. Format: service-principals/{service_principal_id} + * The resource name of the service principal, in the format + * `service-principals/{service_principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteServicePrincipalRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteServicePrincipalRequest.java index 752142396..980f7abc9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteServicePrincipalRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteServicePrincipalRequest.java @@ -10,8 +10,8 @@ @Generated public class DeleteServicePrincipalRequest { /** - * The resource name of the service principal. Format: - * accounts/{account_id}/service-principals/{service_principal_id} + * The resource name of the service principal, in the format + * `accounts/{account_id}/service-principals/{service_principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteUserProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteUserProxyRequest.java index a33cf5da5..6a09ffb91 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteUserProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteUserProxyRequest.java @@ -9,7 +9,7 @@ @Generated public class DeleteUserProxyRequest { - /** The resource name of the user. Format: users/{user_id} */ + /** The resource name of the user, in the format `users/{user_id}`. */ @JsonIgnore private String name; public DeleteUserProxyRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteUserRequest.java index 130e85431..06de06014 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteUserRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteUserRequest.java @@ -9,7 +9,7 @@ @Generated public class DeleteUserRequest { - /** The resource name of the user. Format: accounts/{account_id}/users/{user_id} */ + /** The resource name of the user, in the format `accounts/{account_id}/users/{user_id}`. */ @JsonIgnore private String name; public DeleteUserRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentProxyRequest.java index ba2b993fd..e109026b6 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentProxyRequest.java @@ -9,7 +9,7 @@ @Generated public class DeleteWorkspaceAssignmentProxyRequest { - /** The resource name of the workspace assignment. Format: workspace-assignments/{principal_id} */ + /** The resource name of the assignment, in the format `workspace-assignments/{principal_id}`. */ @JsonIgnore private String name; public DeleteWorkspaceAssignmentProxyRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentRequest.java index 2553a1ed5..0baf82f47 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentRequest.java @@ -10,8 +10,8 @@ @Generated public class DeleteWorkspaceAssignmentRequest { /** - * The resource name of the workspace assignment. Format: - * accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id} + * The resource name of the assignment, in the format + * `accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DirectGroupMember.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DirectGroupMember.java index 34814a29d..2d6cf33dd 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DirectGroupMember.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DirectGroupMember.java @@ -7,46 +7,45 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** Represents a principal that is a direct member of a group, with its source of membership. */ +/** A user, service principal, or group that's a direct member of a group. */ @Generated public class DirectGroupMember { - /** Display name of the principal. */ + /** The member's display name. */ @JsonProperty("display_name") private String displayName; - /** The external ID of the principal in the customer's IdP. */ + /** The ID of the member in your identity provider (IdP). */ @JsonProperty("external_id") private String externalId; - /** The internal ID of the group this member belongs to. */ + /** The Databricks ID of the group. */ @JsonProperty("group_id") private Long groupId; - /** The source of group membership (internal or from identity provider). */ + /** Where the membership comes from. */ @JsonProperty("membership_source") private GroupMembershipSource membershipSource; /** - * The resource name of the group membership. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/groups/{group_id}/direct-members/{principal_id} - - * Workspace-scoped: groups/{group_id}/direct-members/{principal_id} + * The resource name of the membership, in one of these formats: - Account APIs: + * `accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}` - Workspace APIs: + * `groups/{group_id}/direct-members/{principal_id}` */ @JsonProperty("name") private String name; /** - * The resource name of the group that contains the membership. The format depends on the API that - * returned it: - Account-scoped: accounts/{account_id}/groups/{group_id} - Workspace-scoped: - * groups/{group_id} + * The resource name of the group, in one of these formats: - Account APIs: + * `accounts/{account_id}/groups/{group_id}` - Workspace APIs: `groups/{group_id}` */ @JsonProperty("parent") private String parent; - /** Internal ID of the principal in Databricks. */ + /** The Databricks ID of the member. */ @JsonProperty("principal_id") private Long principalId; - /** The type of the principal (user/service principal/group). */ + /** Whether the member is a user, service principal, or group. */ @JsonProperty("principal_type") private PrincipalType principalType; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Entitlement.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Entitlement.java index b59918cdb..07485d683 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Entitlement.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Entitlement.java @@ -4,6 +4,7 @@ import com.databricks.sdk.support.Generated; +/** A permission to use part of a Databricks workspace. */ @Generated public enum Entitlement { ALLOW_CLUSTER_CREATE, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExactMatchRule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExactMatchRule.java index b93249b02..7c6ddebfb 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExactMatchRule.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExactMatchRule.java @@ -7,12 +7,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** An exact-match rule that matches a group's external ID from the identity provider. */ +/** A rule that matches a group by its ID in your identity provider (IdP). */ @Generated public class ExactMatchRule { /** - * The identity provider's external ID for the group to match. This is not the Databricks group - * ID. The value must be non-empty and is matched exactly, including case. + * The ID of the group in your IdP, not its Databricks ID. It's matched exactly, including case. */ @JsonProperty("external_id") private String externalId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java index ca963356a..f50cf2eb9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java @@ -8,32 +8,33 @@ import java.util.Objects; /** - * An external group from the customer's Identity Provider, resolved into Databricks. This is a - * read-only resource keyed by the IdP external ID. The Get method may trigger an idempotent sync - * from the customer's IdP to provision or refresh the group's data in Databricks. + * A group from your identity provider (IdP), identified by its ID in your IdP. This resource is + * read-only. Getting an external group syncs its name and parent groups from your IdP, and adds it + * to your account if it isn't already there. If your account has group visibility filters, the + * group must match them. */ @Generated public class ExternalGroup { - /** The parent account ID, from Databricks. */ + /** The ID of the account that contains the group. */ @JsonProperty("account_id") private String accountId; - /** Display name of the group from the customer's IdP. */ + /** The name of the group, from your IdP. It's the same as the group's `group_name`. */ @JsonProperty("display_name") private String displayName; - /** The external ID of the group in the customer's IdP. */ + /** The ID of the group in your IdP. */ @JsonProperty("external_group_id") private String externalGroupId; - /** Internal groupId of the group in Databricks. */ + /** The Databricks ID of the group. Use it as the `group_id` in the group APIs. */ @JsonProperty("internal_id") private String internalId; /** - * The resource name of the external group. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/external-groups/{external_group_id} - Workspace-scoped: - * external-groups/{external_group_id} + * The resource name of the external group, in one of these formats: - Account APIs: + * `accounts/{account_id}/external-groups/{external_group_id}` - Workspace APIs: + * `external-groups/{external_group_id}` */ @JsonProperty("name") private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java index be26cb901..c54123429 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java @@ -8,42 +8,44 @@ import java.util.Objects; /** - * An external service principal from the customer's Identity Provider, resolved into Databricks. - * This is a read-only resource keyed by the IdP external ID. The Get method may trigger an - * idempotent sync from the customer's IdP to provision or refresh the service principal's data in - * Databricks. + * A service principal from your identity provider (IdP), identified by its ID in your IdP. This + * resource is read-only and requires Microsoft Entra ID as your IdP. Getting an external service + * principal syncs its details and group memberships from your IdP, and adds it to your account if + * it isn't already there. */ @Generated public class ExternalServicePrincipal { - /** The parent account ID, from Databricks. */ + /** The ID of the account that contains the service principal. */ @JsonProperty("account_id") private String accountId; - /** The activity status of the service principal in the Databricks account. */ + /** Whether the service principal is active in the account. */ @JsonProperty("account_sp_status") private State accountSpStatus; - /** Application ID of the service principal, from the customer's IdP. */ + /** The service principal's application ID, from your IdP. */ @JsonProperty("application_id") private String applicationId; - /** Display name of the service principal, from the customer's IdP. */ + /** The service principal's display name, from your IdP. */ @JsonProperty("display_name") private String displayName; - /** The external ID of the service principal in the customer's IdP. */ + /** The ID of the service principal in your IdP. */ @JsonProperty("external_service_principal_id") private String externalServicePrincipalId; - /** Internal servicePrincipalId of the service principal in Databricks. */ + /** + * The Databricks ID of the service principal. Use it as the `service_principal_id` in the service + * principal APIs. + */ @JsonProperty("internal_id") private String internalId; /** - * The resource name of the external service principal. The format depends on the API that - * returned it: - Account-scoped: - * accounts/{account_id}/external-service-principals/{external_service_principal_id} - - * Workspace-scoped: external-service-principals/{external_service_principal_id} + * The resource name of the external service principal, in one of these formats: - Account APIs: + * `accounts/{account_id}/external-service-principals/{external_service_principal_id}` - Workspace + * APIs: `external-service-principals/{external_service_principal_id}` */ @JsonProperty("name") private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java index cac74938a..180628056 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java @@ -8,47 +8,45 @@ import java.util.Objects; /** - * An external user from the customer's Identity Provider, resolved into Databricks. This is a - * read-only resource that allows customers to look up external user identities by their IdP - * external ID and retrieve the corresponding Databricks internal ID and metadata. The Get method - * may trigger an idempotent sync from the customer's IdP to provision or refresh the user's data in - * Databricks. + * A user from your identity provider (IdP), identified by their ID in your IdP. This resource is + * read-only. Getting an external user syncs the user's details and group memberships from your IdP, + * and adds the user to your account if they aren't already there. */ @Generated public class ExternalUser { - /** The parent account ID, from Databricks. */ + /** The ID of the account that contains the user. */ @JsonProperty("account_id") private String accountId; - /** The activity status of the user in the Databricks account. */ + /** Whether the user is active in the account. */ @JsonProperty("account_user_status") private State accountUserStatus; - /** Display name of the user from the customer's IdP. */ + /** The user's given and family names from your IdP, separated by a space. */ @JsonProperty("display_name") private String displayName; - /** The external ID of the user in the customer's IdP. */ + /** The ID of the user in your IdP. */ @JsonProperty("external_user_id") private String externalUserId; - /** The full name of the user, from the customer's IdP. */ + /** The user's name, from your IdP. */ @JsonProperty("full_name") private FullName fullName; - /** Internal userId of the user in Databricks. */ + /** The Databricks ID of the user. Use it as the `user_id` in the user APIs. */ @JsonProperty("internal_id") private String internalId; /** - * The resource name of the external user. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/external-users/{external_user_id} - Workspace-scoped: - * external-users/{external_user_id} + * The resource name of the external user, in one of these formats: - Account APIs: + * `accounts/{account_id}/external-users/{external_user_id}` - Workspace APIs: + * `external-users/{external_user_id}` */ @JsonProperty("name") private String name; - /** Username/email of the user, from Databricks. */ + /** The user's username, which is their email address. */ @JsonProperty("username") private String username; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java index 8fc137b7e..d78a74562 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java @@ -7,14 +7,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** The full name of a user. */ +/** A user's name, from your identity provider (IdP). */ @Generated public class FullName { - /** The family (last) name of the user, from the customer's IdP. */ + /** The user's family (last) name. */ @JsonProperty("family_name") private String familyName; - /** The given (first) name of the user, from the customer's IdP. */ + /** The user's given (first) name. */ @JsonProperty("given_name") private String givenName; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberProxyRequest.java index da84e46ee..d4b07e0da 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberProxyRequest.java @@ -10,8 +10,8 @@ @Generated public class GetDirectGroupMemberProxyRequest { /** - * The resource name of the group membership. Format: - * groups/{group_id}/direct-members/{principal_id} + * The resource name of the membership, in the format + * `groups/{group_id}/direct-members/{principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberRequest.java index 3fa170bc1..ca3ff9d8d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberRequest.java @@ -10,8 +10,8 @@ @Generated public class GetDirectGroupMemberRequest { /** - * The resource name of the group membership. Format: - * accounts/{account_id}/groups/{group_id}/direct-members/{principal_id} + * The resource name of the membership, in the format + * `accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java index 719ccfcc7..8db7ad73a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java @@ -10,7 +10,7 @@ @Generated public class GetExternalGroupProxyRequest { /** - * Required. The resource name of the external group. Format: external-groups/{external_group_id} + * The resource name of the external group, in the format `external-groups/{external_group_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java index 9ae1a5244..9599ef27e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java @@ -10,8 +10,8 @@ @Generated public class GetExternalGroupRequest { /** - * Required. The resource name of the external group. Format: - * accounts/{account_id}/external-groups/{external_group_id} + * The resource name of the external group, in the format + * `accounts/{account_id}/external-groups/{external_group_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java index 3c3c996bd..5cf6c448b 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java @@ -10,8 +10,8 @@ @Generated public class GetExternalServicePrincipalProxyRequest { /** - * Required. The resource name of the external service principal. Format: - * external-service-principals/{external_service_principal_id} + * The resource name of the external service principal, in the format + * `external-service-principals/{external_service_principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java index c9f8f1d3c..08879293d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java @@ -10,8 +10,8 @@ @Generated public class GetExternalServicePrincipalRequest { /** - * Required. The resource name of the external service principal. Format: - * accounts/{account_id}/external-service-principals/{external_service_principal_id} + * The resource name of the external service principal, in the format + * `accounts/{account_id}/external-service-principals/{external_service_principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java index fd3035fe2..5f18c5adb 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java @@ -9,7 +9,7 @@ @Generated public class GetExternalUserProxyRequest { - /** Required. The resource name of the external user. Format: external-users/{external_user_id} */ + /** The resource name of the external user, in the format `external-users/{external_user_id}`. */ @JsonIgnore private String name; public GetExternalUserProxyRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java index 0fc51e6d4..cc7908053 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java @@ -10,8 +10,8 @@ @Generated public class GetExternalUserRequest { /** - * Required. The resource name of the external user. Format: - * accounts/{account_id}/external-users/{external_user_id} + * The resource name of the external user, in the format + * `accounts/{account_id}/external-users/{external_user_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupProxyRequest.java index d81daa96b..1c09a6733 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupProxyRequest.java @@ -9,7 +9,7 @@ @Generated public class GetGroupProxyRequest { - /** The resource name of the group. Format: groups/{group_id} */ + /** The resource name of the group, in the format `groups/{group_id}`. */ @JsonIgnore private String name; public GetGroupProxyRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupRequest.java index 46d4aa326..15abfa1f6 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupRequest.java @@ -9,7 +9,7 @@ @Generated public class GetGroupRequest { - /** The resource name of the group. Format: accounts/{account_id}/groups/{group_id} */ + /** The resource name of the group, in the format `accounts/{account_id}/groups/{group_id}`. */ @JsonIgnore private String name; public GetGroupRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetIdentityVisibilityFilterRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetIdentityVisibilityFilterRequest.java index de5c6e900..42f4f8817 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetIdentityVisibilityFilterRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetIdentityVisibilityFilterRequest.java @@ -10,8 +10,8 @@ @Generated public class GetIdentityVisibilityFilterRequest { /** - * Required. The resource name of the filter. Format: - * accounts/{account_id}/identity-visibility-filters/{identity_visibility_filter_id} + * The resource name of the filter, in the format + * `accounts/{account_id}/identity-visibility-filters/{identity_visibility_filter_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalProxyRequest.java index 5a8c46828..b23a1dac3 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalProxyRequest.java @@ -10,7 +10,8 @@ @Generated public class GetServicePrincipalProxyRequest { /** - * The resource name of the service principal. Format: service-principals/{service_principal_id} + * The resource name of the service principal, in the format + * `service-principals/{service_principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalRequest.java index 8c7b13968..eaaca52b8 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalRequest.java @@ -10,8 +10,8 @@ @Generated public class GetServicePrincipalRequest { /** - * The resource name of the service principal. Format: - * accounts/{account_id}/service-principals/{service_principal_id} + * The resource name of the service principal, in the format + * `accounts/{account_id}/service-principals/{service_principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetUserProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetUserProxyRequest.java index 967dd3520..2d19ea368 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetUserProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetUserProxyRequest.java @@ -9,7 +9,7 @@ @Generated public class GetUserProxyRequest { - /** The resource name of the user. Format: users/{user_id} */ + /** The resource name of the user, in the format `users/{user_id}`. */ @JsonIgnore private String name; public GetUserProxyRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetUserRequest.java index 0bfed4e30..3e36e5f05 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetUserRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetUserRequest.java @@ -9,7 +9,7 @@ @Generated public class GetUserRequest { - /** The resource name of the user. Format: accounts/{account_id}/users/{user_id} */ + /** The resource name of the user, in the format `accounts/{account_id}/users/{user_id}`. */ @JsonIgnore private String name; public GetUserRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAssignmentProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAssignmentProxyRequest.java index 9dc275ef6..f4625dc94 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAssignmentProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAssignmentProxyRequest.java @@ -9,7 +9,7 @@ @Generated public class GetWorkspaceAssignmentProxyRequest { - /** The resource name of the workspace assignment. Format: workspace-assignments/{principal_id} */ + /** The resource name of the assignment, in the format `workspace-assignments/{principal_id}`. */ @JsonIgnore private String name; public GetWorkspaceAssignmentProxyRequest setName(String name) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAssignmentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAssignmentRequest.java index 17edc48c1..be765e10c 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAssignmentRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAssignmentRequest.java @@ -10,8 +10,8 @@ @Generated public class GetWorkspaceAssignmentRequest { /** - * The resource name of the workspace assignment. Format: - * accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id} + * The resource name of the assignment, in the format + * `accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id}`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceIdentityDetailRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceIdentityDetailRequest.java index 6735c9cec..0d742010e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceIdentityDetailRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceIdentityDetailRequest.java @@ -10,8 +10,8 @@ @Generated public class GetWorkspaceIdentityDetailRequest { /** - * The resource name of the workspace identity detail. Format: - * principals/{principal_id}/workspace-identity-detail + * The resource name of the workspace identity detail, in the format + * `principals/{principal_id}/workspace-identity-detail`. */ @JsonIgnore private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Group.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Group.java index 4c46d8787..6ca93f838 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Group.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Group.java @@ -7,35 +7,35 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** The details of a Group resource. */ +/** A group in your Databricks account. */ @Generated public class Group { - /** The parent account ID for group in Databricks. */ + /** The ID of the account that contains the group. */ @JsonProperty("account_id") private String accountId; - /** ExternalId of the group in the customer's IdP. */ + /** The ID of the group in your identity provider (IdP). */ @JsonProperty("external_id") private String externalId; - /** Internal group ID of the group in Databricks. */ + /** The Databricks ID of the group. */ @JsonProperty("group_id") private String groupId; - /** Display name of the group. */ + /** The name of the group. */ @JsonProperty("group_name") private String groupName; /** - * The resource name of the group. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/groups/{group_id} - Workspace-scoped: groups/{group_id} + * The resource name of the group, in one of these formats: - Account APIs: + * `accounts/{account_id}/groups/{group_id}` - Workspace APIs: `groups/{group_id}` */ @JsonProperty("name") private String name; /** - * The resource name of the account that contains the group, `accounts/{account_id}`. Both the - * account-scoped and workspace-scoped APIs return it. + * The resource name of the account that contains the group, in the format + * `accounts/{account_id}`. Workspace APIs return the same format. */ @JsonProperty("parent") private String parent; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GroupMembershipSource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GroupMembershipSource.java index 6bf0eab3c..c5e2b327a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GroupMembershipSource.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GroupMembershipSource.java @@ -4,7 +4,7 @@ import com.databricks.sdk.support.Generated; -/** The source of the group membership (internal or from identity provider). */ +/** Where a group membership comes from. */ @Generated public enum GroupMembershipSource { IDENTITY_PROVIDER, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/IdentityVisibilityFilter.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/IdentityVisibilityFilter.java index 3a7aac3df..9ab8361b9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/IdentityVisibilityFilter.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/IdentityVisibilityFilter.java @@ -8,43 +8,41 @@ import java.util.Objects; /** - * An account-level rule that controls which identity provider groups are discoverable in directory - * search and group pickers when automatic identity management is enabled. Filters apply across all - * workspaces in the account. + * An account-level rule that controls which groups from your identity provider (IdP) can be found + * in directory search and group pickers when automatic identity management is on. Filters apply to + * every workspace in the account. * - *

If no group filters are configured, all groups are visible. Otherwise, a group is visible if - * it or any of its transitive parent groups matches at least one rule. A group is also visible if - * it or any transitive parent group is already provisioned in the account. Local Databricks groups - * remain visible regardless of the filters. + *

If you have no group filters, all groups are visible. Otherwise, a group is visible if it or + * any of its parent groups matches at least one filter. A group is also visible if it or any of its + * parent groups is already in your account. Local Databricks groups are always visible. * - *

Only group filters can be created. Filters do not change provisioning or sign-in for users and - * service principals. Filters are immutable: to change a rule, delete it and create a new one. + *

You can only create group filters. Filters don't affect provisioning or sign-in for users and + * service principals. You can't change a filter: to change a rule, delete it and create a new one. */ @Generated public class IdentityVisibilityFilter { - /** Exact match on the group's external ID from the identity provider. */ + /** Matches a group by its ID in your IdP. */ @JsonProperty("exact") private ExactMatchRule exact; /** - * The resource name of the identity-visibility filter. Format: - * accounts/{account_id}/identity-visibility-filters/{identity_visibility_filter_id} + * The resource name of the filter, in the format + * `accounts/{account_id}/identity-visibility-filters/{identity_visibility_filter_id}`. */ @JsonProperty("name") private String name; - /** Case-sensitive starts-with match on the group's display name. */ + /** Matches groups whose display name starts with a prefix. */ @JsonProperty("prefix") private PrefixMatchRule prefix; /** - * The type of principal this rule applies to. Set to `GROUP` when creating a filter. Other - * principal types are not supported for creation. + * The type of principal the filter applies to. Set it to `GROUP`. Other types aren't supported. */ @JsonProperty("principal_type") private PrincipalType principalType; - /** Full, case-sensitive RE2 match on the identity's display name. */ + /** Matches groups whose display name matches a regular expression. */ @JsonProperty("regex") private RegexMatchRule regex; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersProxyRequest.java index 834315274..700b90fcb 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersProxyRequest.java @@ -11,22 +11,19 @@ @Generated public class ListDirectGroupMembersProxyRequest { /** - * The maximum number of members to return. The service may return fewer than this value. If not - * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of members to return, up to 1000. The default is 1000. A page can contain + * fewer members. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** A page token from a previous list call. Provide this to retrieve the subsequent page. */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; - /** - * The parent resource name of the group whose direct members to list. Format: groups/{group_id} - */ + /** The resource name of the group, in the format `groups/{group_id}`. */ @JsonIgnore private String parent; public ListDirectGroupMembersProxyRequest setPageSize(Long pageSize) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersRequest.java index e50474c1d..4f5cbd49e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersRequest.java @@ -11,26 +11,19 @@ @Generated public class ListDirectGroupMembersRequest { /** - * The maximum number of members to return. The service may return fewer than this value. If not - * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of members to return, up to 1000. The default is 1000. A page can contain + * fewer members. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListDirectGroupMembers call. Provide this to retrieve - * the subsequent page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; - /** - * The parent resource name of the group whose direct members to list. Format: - * accounts/{account_id}/groups/{group_id} - */ + /** The resource name of the group, in the format `accounts/{account_id}/groups/{group_id}`. */ @JsonIgnore private String parent; public ListDirectGroupMembersRequest setPageSize(Long pageSize) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersResponse.java index 41519aa94..47a295636 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListDirectGroupMembersResponse.java @@ -8,17 +8,14 @@ import java.util.Collection; import java.util.Objects; -/** Response message for listing direct group members. */ +/** A page of direct members of a group. */ @Generated public class ListDirectGroupMembersResponse { - /** The list of direct group members with their membership source type. */ + /** The members on this page. */ @JsonProperty("direct_group_members") private Collection directGroupMembers; - /** - * A token, which can be sent as page_token to retrieve the next page. If this field is omitted, - * there are no subsequent pages. - */ + /** The token for the next page. Not set on the last page. */ @JsonProperty("next_page_token") private String nextPageToken; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsProxyRequest.java index 90f4b9b26..1c0f23c53 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsProxyRequest.java @@ -10,31 +10,30 @@ @Generated public class ListGroupsProxyRequest { - /** Optional. Allows filtering groups by group name or external id. */ + /** + * Filters groups by `group_name` or `external_id`, for example `group_name eq "Data engineers"`. + * Put the value in quotes. + */ @JsonIgnore @QueryParam("filter") private String filter; /** - * The maximum number of groups to return. The service may return fewer than this value. If not - * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of groups to return, up to 1000. The default is 1000. A page can contain + * fewer groups. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListGroups call. Provide this to retrieve the subsequent - * page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; /** - * The resource name of the account to list groups in, `accounts/{account_id}`. Optional: defaults - * to the account of the calling workspace, and any other account is rejected. + * The resource name of the account to list groups in, in the format `accounts/{account_id}`. + * Defaults to the account that contains this workspace. Any other account is rejected. */ @JsonIgnore @QueryParam("parent") diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsRequest.java index 51c923146..970bd83bd 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsRequest.java @@ -10,29 +10,28 @@ @Generated public class ListGroupsRequest { - /** Optional. Allows filtering groups by group name or external id. */ + /** + * Filters groups by `group_name` or `external_id`, for example `group_name eq "Data engineers"`. + * Put the value in quotes. + */ @JsonIgnore @QueryParam("filter") private String filter; /** - * The maximum number of groups to return. The service may return fewer than this value. If not - * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of groups to return, up to 1000. The default is 1000. A page can contain + * fewer groups. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListGroups call. Provide this to retrieve the subsequent - * page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; - /** The parent resource name of the account whose groups to list. Format: accounts/{account_id} */ + /** The resource name of the account to list groups in, in the format `accounts/{account_id}`. */ @JsonIgnore private String parent; public ListGroupsRequest setFilter(String filter) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsResponse.java index e1e15930e..b3dbe865f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListGroupsResponse.java @@ -8,17 +8,14 @@ import java.util.Collection; import java.util.Objects; -/** Response message containing a page of groups in the account. */ +/** A page of groups. */ @Generated public class ListGroupsResponse { - /** */ + /** The groups on this page. */ @JsonProperty("groups") private Collection groups; - /** - * A token, which can be sent as page_token to retrieve the next page. If this field is omitted, - * there are no subsequent pages. - */ + /** The token for the next page. Not set on the last page. */ @JsonProperty("next_page_token") private String nextPageToken; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListIdentityVisibilityFiltersRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListIdentityVisibilityFiltersRequest.java index da07f9dd1..7d6cf13c3 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListIdentityVisibilityFiltersRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListIdentityVisibilityFiltersRequest.java @@ -11,22 +11,19 @@ @Generated public class ListIdentityVisibilityFiltersRequest { /** - * The maximum number of filters to return. The service may return fewer than this value. If - * omitted or non-positive, defaults to 100. Values above 1000 are reduced to 1000. + * The maximum number of filters to return, up to 1000. The default is 100. A page can contain + * fewer filters. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListIdentityVisibilityFilters call. Provide this to - * retrieve the subsequent page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; - /** Required. The parent account. Format: accounts/{account_id} */ + /** The resource name of the account, in the format `accounts/{account_id}`. */ @JsonIgnore private String parent; public ListIdentityVisibilityFiltersRequest setPageSize(Long pageSize) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListIdentityVisibilityFiltersResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListIdentityVisibilityFiltersResponse.java index 330d3ec01..f5a0bcc33 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListIdentityVisibilityFiltersResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListIdentityVisibilityFiltersResponse.java @@ -8,17 +8,14 @@ import java.util.Collection; import java.util.Objects; -/** Response message containing a page of identity-visibility filters in the account. */ +/** A page of group visibility filters. */ @Generated public class ListIdentityVisibilityFiltersResponse { - /** The filters in this page. These are filter rules, not the groups matched by the rules. */ + /** The filters on this page. These are the rules, not the groups they match. */ @JsonProperty("identity_visibility_filters") private Collection identityVisibilityFilters; - /** - * A token, which can be sent as page_token to retrieve the next page. If omitted, there are no - * subsequent pages. - */ + /** The token for the next page. Not set on the last page. */ @JsonProperty("next_page_token") private String nextPageToken; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsProxyRequest.java index 192c874ca..94afe7e22 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsProxyRequest.java @@ -10,31 +10,31 @@ @Generated public class ListServicePrincipalsProxyRequest { - /** Optional. Allows filtering service principals by application id or external id. */ + /** + * Filters service principals by `application_id` or `external_id`, for example `application_id eq + * ""`. Put the value in quotes. + */ @JsonIgnore @QueryParam("filter") private String filter; /** - * The maximum number of SPs to return. The service may return fewer than this value. If not - * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of service principals to return, up to 1000. The default is 1000. A page can + * contain fewer service principals. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListServicePrincipals call. Provide this to retrieve the - * subsequent page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; /** - * The resource name of the account to list service principals in, `accounts/{account_id}`. - * Optional: defaults to the account of the calling workspace, and any other account is rejected. + * The resource name of the account to list service principals in, in the format + * `accounts/{account_id}`. Defaults to the account that contains this workspace. Any other + * account is rejected. */ @JsonIgnore @QueryParam("parent") diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsRequest.java index 5b9974d1a..db19a33c5 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsRequest.java @@ -10,31 +10,30 @@ @Generated public class ListServicePrincipalsRequest { - /** Optional. Allows filtering service principals by application id or external id. */ + /** + * Filters service principals by `application_id` or `external_id`, for example `application_id eq + * ""`. Put the value in quotes. + */ @JsonIgnore @QueryParam("filter") private String filter; /** - * The maximum number of service principals to return. The service may return fewer than this - * value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more - * than the maximum are clamped to 1000. + * The maximum number of service principals to return, up to 1000. The default is 1000. A page can + * contain fewer service principals. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListServicePrincipals call. Provide this to retrieve the - * subsequent page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; /** - * The parent resource name of the account whose service principals to list. Format: - * accounts/{account_id} + * The resource name of the account to list service principals in, in the format + * `accounts/{account_id}`. */ @JsonIgnore private String parent; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsResponse.java index 39d78b8de..a3058285a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListServicePrincipalsResponse.java @@ -8,17 +8,14 @@ import java.util.Collection; import java.util.Objects; -/** Response message containing a page of service principals in the account. */ +/** A page of service principals. */ @Generated public class ListServicePrincipalsResponse { - /** - * A token, which can be sent as page_token to retrieve the next page. If this field is omitted, - * there are no subsequent pages. - */ + /** The token for the next page. Not set on the last page. */ @JsonProperty("next_page_token") private String nextPageToken; - /** */ + /** The service principals on this page. */ @JsonProperty("service_principals") private Collection servicePrincipals; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsProxyRequest.java index 566753b41..5411d8c5b 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsProxyRequest.java @@ -11,25 +11,21 @@ @Generated public class ListTransitiveParentGroupsProxyRequest { /** - * The maximum number of parent groups to return. The service may return fewer than this value. If - * not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of groups to return, up to 1000. The default is 1000. A page can contain + * fewer groups. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListTransitiveParentGroups call. Provide this to - * retrieve the subsequent page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; /** - * The parent resource name of the principal whose transitive parent groups to list. Format: - * principals/{principal_id} + * The user, service principal, or group whose parent groups to list, in the format + * `principals/{principal_id}`. */ @JsonIgnore private String parent; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsRequest.java index e004c52ec..a735abf08 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsRequest.java @@ -11,25 +11,21 @@ @Generated public class ListTransitiveParentGroupsRequest { /** - * The maximum number of parent groups to return. The service may return fewer than this value. If - * not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of groups to return, up to 1000. The default is 1000. A page can contain + * fewer groups. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListTransitiveParentGroups call. Provide this to - * retrieve the subsequent page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; /** - * The parent resource name of the principal whose transitive parent groups to list. Format: - * accounts/{account_id}/principals/{principal_id} + * The user, service principal, or group whose parent groups to list, in the format + * `accounts/{account_id}/principals/{principal_id}`. */ @JsonIgnore private String parent; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsResponse.java index c173b5e0f..e0e522b05 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListTransitiveParentGroupsResponse.java @@ -8,17 +8,14 @@ import java.util.Collection; import java.util.Objects; -/** Response message for listing all transitive parent groups of a principal. */ +/** A page of the groups a principal belongs to. */ @Generated public class ListTransitiveParentGroupsResponse { - /** - * A token, which can be sent as page_token to retrieve the next page. If this field is omitted, - * there are no subsequent pages. - */ + /** The token for the next page. Not set on the last page. */ @JsonProperty("next_page_token") private String nextPageToken; - /** The list of transitive parent groups. */ + /** The groups on this page. */ @JsonProperty("transitive_parent_groups") private Collection transitiveParentGroups; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersProxyRequest.java index 35f0617ba..e6dc91c3e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersProxyRequest.java @@ -10,31 +10,30 @@ @Generated public class ListUsersProxyRequest { - /** Optional. Allows filtering users by username or external id. */ + /** + * Filters users by `username` or `external_id`, for example `username eq "someone@example.com"`. + * Put the value in quotes. + */ @JsonIgnore @QueryParam("filter") private String filter; /** - * The maximum number of users to return. The service may return fewer than this value. If not - * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of users to return, up to 1000. The default is 1000. A page can contain + * fewer users. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListUsers call. Provide this to retrieve the subsequent - * page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; /** - * The resource name of the account to list users in, `accounts/{account_id}`. Optional: defaults - * to the account of the calling workspace, and any other account is rejected. + * The resource name of the account to list users in, in the format `accounts/{account_id}`. + * Defaults to the account that contains this workspace. Any other account is rejected. */ @JsonIgnore @QueryParam("parent") diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersRequest.java index 6acc18b62..306930fb4 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersRequest.java @@ -10,29 +10,28 @@ @Generated public class ListUsersRequest { - /** Optional. Allows filtering users by username or external id. */ + /** + * Filters users by `username` or `external_id`, for example `username eq "someone@example.com"`. + * Put the value in quotes. + */ @JsonIgnore @QueryParam("filter") private String filter; /** - * The maximum number of users to return. The service may return fewer than this value. If not - * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the - * maximum are clamped to 1000. + * The maximum number of users to return, up to 1000. The default is 1000. A page can contain + * fewer users. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListUsers call. Provide this to retrieve the subsequent - * page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; - /** The parent resource name of the account whose users to list. Format: accounts/{account_id} */ + /** The resource name of the account to list users in, in the format `accounts/{account_id}`. */ @JsonIgnore private String parent; public ListUsersRequest setFilter(String filter) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersResponse.java index 08033fc3d..12b31f8ae 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListUsersResponse.java @@ -8,16 +8,14 @@ import java.util.Collection; import java.util.Objects; +/** A page of users. */ @Generated public class ListUsersResponse { - /** - * A token, which can be sent as page_token to retrieve the next page. If this field is omitted, - * there are no subsequent pages. - */ + /** The token for the next page. Not set on the last page. */ @JsonProperty("next_page_token") private String nextPageToken; - /** */ + /** The users on this page. */ @JsonProperty("users") private Collection users; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsProxyRequest.java index ecc9a0092..e725bead3 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsProxyRequest.java @@ -11,23 +11,22 @@ @Generated public class ListWorkspaceAssignmentsProxyRequest { /** - * The maximum number of workspace assignments to return. The service may return fewer than this - * value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more - * than the maximum are clamped to 1000. + * The maximum number of assignments to return, up to 1000. The default is 1000. A page can + * contain fewer assignments. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** A page token from a previous list call. Provide this to retrieve the subsequent page. */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; /** - * The resource name of the workspace to list assignments of, - * `accounts/{account_id}/workspaces/{workspace_id}`. Optional: defaults to the calling workspace, - * and any other workspace is rejected. + * The resource name of the workspace, in the format + * `accounts/{account_id}/workspaces/{workspace_id}`. Defaults to this workspace. Any other + * workspace is rejected. */ @JsonIgnore @QueryParam("parent") diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsRequest.java index 1c0d63ed9..d9816fb85 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsRequest.java @@ -11,25 +11,21 @@ @Generated public class ListWorkspaceAssignmentsRequest { /** - * The maximum number of workspace assignments to return. The service may return fewer than this - * value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more - * than the maximum are clamped to 1000. + * The maximum number of assignments to return, up to 1000. The default is 1000. A page can + * contain fewer assignments. */ @JsonIgnore @QueryParam("page_size") private Long pageSize; - /** - * A page token, received from a previous ListWorkspaceAssignments call. Provide this to retrieve - * the subsequent page. - */ + /** The `next_page_token` from a previous response, to get the next page. */ @JsonIgnore @QueryParam("page_token") private String pageToken; /** - * The parent resource name of the workspace whose assignments to list. Format: - * accounts/{account_id}/workspaces/{workspace_id} + * The resource name of the workspace, in the format + * `accounts/{account_id}/workspaces/{workspace_id}`. */ @JsonIgnore private String parent; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsResponse.java index b94568e51..23cc68b16 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentsResponse.java @@ -8,17 +8,14 @@ import java.util.Collection; import java.util.Objects; -/** Response message for listing workspace assignments. */ +/** A page of workspace assignments. */ @Generated public class ListWorkspaceAssignmentsResponse { - /** - * A token, which can be sent as page_token to retrieve the next page. If this field is omitted, - * there are no subsequent pages. - */ + /** The token for the next page. Not set on the last page. */ @JsonProperty("next_page_token") private String nextPageToken; - /** */ + /** The assignments on this page. */ @JsonProperty("workspace_assignments") private Collection workspaceAssignments; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/PrefixMatchRule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/PrefixMatchRule.java index 0de1e380a..b1aa57c61 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/PrefixMatchRule.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/PrefixMatchRule.java @@ -8,14 +8,14 @@ import java.util.Objects; /** - * A starts-with rule that matches groups whose display name begins with a specified prefix. - * Matching is case-sensitive. For example, the prefix `data-` matches `data-platform`. + * A rule that matches groups whose display name starts with a prefix. Matching is case-sensitive. + * For example, the prefix `data-` matches `data-platform`. */ @Generated public class PrefixMatchRule { /** - * The display-name prefix to match. Must contain at least one non-whitespace character. Leading - * and trailing whitespace are preserved, and matching is case-sensitive. + * The prefix to match. It must contain at least one non-whitespace character. Leading and + * trailing spaces are kept. */ @JsonProperty("display_name_prefix") private String displayNamePrefix; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/PrincipalType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/PrincipalType.java index 35bda5ab4..f21e7776a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/PrincipalType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/PrincipalType.java @@ -4,7 +4,7 @@ import com.databricks.sdk.support.Generated; -/** The type of the principal (user/sp/group). */ +/** The type of a principal. */ @Generated public enum PrincipalType { GROUP, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/RegexMatchRule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/RegexMatchRule.java index 929eeedfc..948c6d8f9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/RegexMatchRule.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/RegexMatchRule.java @@ -8,12 +8,12 @@ import java.util.Objects; /** - * A rule that matches an identity whose complete display name matches an RE2 regular expression. - * Matching is case-sensitive. Use .* explicitly when substring matching is desired. + * A rule that matches groups whose whole display name matches an RE2 regular expression. Matching + * is case-sensitive. To match part of a name, add `.*`, for example `.*-admins`. */ @Generated public class RegexMatchRule { - /** The RE2 regular expression matched against the complete display name. */ + /** The RE2 regular expression to match against the whole display name. At most 255 characters. */ @JsonProperty("display_name_regex") private String displayNameRegex; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupProxyRequest.java index f65165035..dcbf0af6a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupProxyRequest.java @@ -7,13 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** - * Request message for resolving a group with the given external ID from the customer's IdP into - * Databricks. Will resolve metadata such as the group's name and inherited parent groups. - */ +/** Request to resolve a group by its ID in your identity provider (IdP). */ @Generated public class ResolveGroupProxyRequest { - /** Required. The external ID of the group in the customer's IdP. */ + /** The ID of the group in your IdP. */ @JsonProperty("external_id") private String externalId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupRequest.java index fc8759e96..c6a6391a3 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupRequest.java @@ -7,13 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** - * Request message for resolving a group with the given external ID from the customer's IdP into - * Databricks. Will resolve metadata such as the group's name and inherited parent groups. - */ +/** Request to resolve a group by its ID in your identity provider (IdP). */ @Generated public class ResolveGroupRequest { - /** Required. The external ID of the group in the customer's IdP. */ + /** The ID of the group in your IdP. */ @JsonProperty("external_id") private String externalId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupResponse.java index d93829753..ce3e00261 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveGroupResponse.java @@ -7,9 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; +/** The response to resolving a group. */ @Generated public class ResolveGroupResponse { - /** The group that was resolved. */ + /** The resolved group. */ @JsonProperty("group") private Group group; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalProxyRequest.java index ff144b787..36db3dfc1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalProxyRequest.java @@ -7,14 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** - * Request message for resolving a service principal with the given external ID from the customer's - * IdP into Databricks. Will resolve metadata such as the service principal's display name, status, - * and inherited parent groups. - */ +/** Request to resolve a service principal by its ID in your identity provider (IdP). */ @Generated public class ResolveServicePrincipalProxyRequest { - /** Required. The external ID of the service principal in the customer's IdP. */ + /** The ID of the service principal in your IdP. */ @JsonProperty("external_id") private String externalId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalRequest.java index cd6ea6920..a28208e5c 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalRequest.java @@ -7,14 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** - * Request message for resolving a service principal with the given external ID from the customer's - * IdP into Databricks. Will resolve metadata such as the service principal's display name, status, - * and inherited parent groups. - */ +/** Request to resolve a service principal by its ID in your identity provider (IdP). */ @Generated public class ResolveServicePrincipalRequest { - /** Required. The external ID of the service principal in the customer's IdP. */ + /** The ID of the service principal in your IdP. */ @JsonProperty("external_id") private String externalId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalResponse.java index 037ed6bd0..b64a437b4 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveServicePrincipalResponse.java @@ -7,9 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; +/** The response to resolving a service principal. */ @Generated public class ResolveServicePrincipalResponse { - /** The service principal that was resolved. */ + /** The resolved service principal. */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserProxyRequest.java index 7c9f24442..0de2b9f52 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserProxyRequest.java @@ -7,14 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** - * Request message for resolving a user with the given external ID from the customer's IdP into - * Databricks. Will resolve metadata such as the user's display name, status, and inherited parent - * groups. - */ +/** Request to resolve a user by their ID in your identity provider (IdP). */ @Generated public class ResolveUserProxyRequest { - /** Required. The external ID of the user in the customer's IdP. */ + /** The ID of the user in your IdP. */ @JsonProperty("external_id") private String externalId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserRequest.java index 4d51b4c98..387c7ef06 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserRequest.java @@ -7,14 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** - * Request message for resolving a user with the given external ID from the customer's IdP into - * Databricks. Will resolve metadata such as the user's display name, status, and inherited parent - * groups. - */ +/** Request to resolve a user by their ID in your identity provider (IdP). */ @Generated public class ResolveUserRequest { - /** Required. The external ID of the user in the customer's IdP. */ + /** The ID of the user in your IdP. */ @JsonProperty("external_id") private String externalId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserResponse.java index 471f37854..752f4a3a1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ResolveUserResponse.java @@ -7,9 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; +/** The response to resolving a user. */ @Generated public class ResolveUserResponse { - /** The user that was resolved. */ + /** The resolved user. */ @JsonProperty("user") private User user; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ServicePrincipal.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ServicePrincipal.java index 330cba9c4..345e67195 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ServicePrincipal.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ServicePrincipal.java @@ -7,48 +7,48 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** The details of a ServicePrincipal resource. */ +/** A service principal in your Databricks account. */ @Generated public class ServicePrincipal { - /** The parent account ID for the service principal in Databricks. */ + /** The ID of the account that contains the service principal. */ @JsonProperty("account_id") private String accountId; - /** The activity status of a service principal in a Databricks account. */ + /** Whether the service principal is active in the account. */ @JsonProperty("account_sp_status") private State accountSpStatus; /** - * Application ID of the service principal. Set at creation time and cannot be changed afterwards; - * when omitted, the server generates one. + * The service principal's application ID, a UUID. If you don't set it when you create the service + * principal, Databricks generates one. It must be unique in the account and can't be changed. */ @JsonProperty("application_id") private String applicationId; - /** Display name of the service principal. */ + /** The service principal's display name. */ @JsonProperty("display_name") private String displayName; - /** ExternalId of the service principal in the customer's IdP. */ + /** The ID of the service principal in your identity provider (IdP). */ @JsonProperty("external_id") private String externalId; /** - * The resource name of the service principal. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/service-principals/{service_principal_id} - - * Workspace-scoped: service-principals/{service_principal_id} + * The resource name of the service principal, in one of these formats: - Account APIs: + * `accounts/{account_id}/service-principals/{service_principal_id}` - Workspace APIs: + * `service-principals/{service_principal_id}` */ @JsonProperty("name") private String name; /** - * The resource name of the account that contains the service principal, `accounts/{account_id}`. - * Both the account-scoped and workspace-scoped APIs return it. + * The resource name of the account that contains the service principal, in the format + * `accounts/{account_id}`. Workspace APIs return the same format. */ @JsonProperty("parent") private String parent; - /** Internal service principal ID of the service principal in Databricks. */ + /** The Databricks ID of the service principal. */ @JsonProperty("service_principal_id") private String servicePrincipalId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/State.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/State.java index b385fb00c..bd59b7d27 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/State.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/State.java @@ -4,7 +4,7 @@ import com.databricks.sdk.support.Generated; -/** The activity status of a user or service principal in a Databricks account or workspace. */ +/** Whether a user or service principal is active in an account or workspace. */ @Generated public enum State { ACTIVE, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/TransitiveParentGroup.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/TransitiveParentGroup.java index 663cb29b6..117c6bd10 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/TransitiveParentGroup.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/TransitiveParentGroup.java @@ -7,26 +7,25 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** Represents a group that is a transitive parent of a principal. */ +/** A group that a principal belongs to, either directly or through another group. */ @Generated public class TransitiveParentGroup { - /** The parent account ID for group in Databricks. */ + /** The ID of the account that contains the group. */ @JsonProperty("account_id") private String accountId; - /** ExternalId of the group in the customer's IdP. */ + /** The ID of the group in your identity provider (IdP). */ @JsonProperty("external_id") private String externalId; - /** Internal group ID of the group in Databricks. */ + /** The Databricks ID of the group. */ @JsonProperty("group_id") private String groupId; /** - * The resource name of the transitive parent group. The format depends on the API that returned - * it: - Account-scoped: - * accounts/{account_id}/principals/{principal_id}/transitive-parent-groups/{group_id} - - * Workspace-scoped: principals/{principal_id}/transitive-parent-groups/{group_id} + * The resource name of the parent group, in one of these formats: - Account APIs: + * `accounts/{account_id}/principals/{principal_id}/transitive-parent-groups/{group_id}` - + * Workspace APIs: `principals/{principal_id}/transitive-parent-groups/{group_id}` */ @JsonProperty("name") private String name; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateGroupProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateGroupProxyRequest.java index cc0fb6c06..d55b046c8 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateGroupProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateGroupProxyRequest.java @@ -11,17 +11,17 @@ @Generated public class UpdateGroupProxyRequest { - /** Required. Group to be updated in Databricks */ + /** The group to update. Its `name` identifies the group. */ @JsonProperty("group") private Group group; /** - * The resource name of the group. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/groups/{group_id} - Workspace-scoped: groups/{group_id} + * The resource name of the group, in one of these formats: - Account APIs: + * `accounts/{account_id}/groups/{group_id}` - Workspace APIs: `groups/{group_id}` */ @JsonIgnore private String name; - /** Required. The list of fields to update. */ + /** The fields to update, separated by commas. You can update `group_name` and `external_id`. */ @JsonIgnore @QueryParam("update_mask") private String updateMask; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateGroupRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateGroupRequest.java index 14702dfec..703e9fb75 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateGroupRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateGroupRequest.java @@ -11,17 +11,17 @@ @Generated public class UpdateGroupRequest { - /** Required. Group to be updated in Databricks */ + /** The group to update. Its `name` identifies the group. */ @JsonProperty("group") private Group group; /** - * The resource name of the group. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/groups/{group_id} - Workspace-scoped: groups/{group_id} + * The resource name of the group, in one of these formats: - Account APIs: + * `accounts/{account_id}/groups/{group_id}` - Workspace APIs: `groups/{group_id}` */ @JsonIgnore private String name; - /** Required. The list of fields to update. */ + /** The fields to update, separated by commas. You can update `group_name` and `external_id`. */ @JsonIgnore @QueryParam("update_mask") private String updateMask; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateServicePrincipalProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateServicePrincipalProxyRequest.java index 103f42868..d65a84108 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateServicePrincipalProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateServicePrincipalProxyRequest.java @@ -12,17 +12,20 @@ @Generated public class UpdateServicePrincipalProxyRequest { /** - * The resource name of the service principal. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/service-principals/{service_principal_id} - - * Workspace-scoped: service-principals/{service_principal_id} + * The resource name of the service principal, in one of these formats: - Account APIs: + * `accounts/{account_id}/service-principals/{service_principal_id}` - Workspace APIs: + * `service-principals/{service_principal_id}` */ @JsonIgnore private String name; - /** Required. Service principal to be updated in Databricks */ + /** The service principal to update. Its `name` identifies the service principal. */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; - /** Required. The list of fields to update. */ + /** + * The fields to update, separated by commas. You can update `display_name`, `account_sp_status`, + * and `external_id`. + */ @JsonIgnore @QueryParam("update_mask") private String updateMask; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateServicePrincipalRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateServicePrincipalRequest.java index 29907a022..9b936a814 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateServicePrincipalRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateServicePrincipalRequest.java @@ -12,17 +12,20 @@ @Generated public class UpdateServicePrincipalRequest { /** - * The resource name of the service principal. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/service-principals/{service_principal_id} - - * Workspace-scoped: service-principals/{service_principal_id} + * The resource name of the service principal, in one of these formats: - Account APIs: + * `accounts/{account_id}/service-principals/{service_principal_id}` - Workspace APIs: + * `service-principals/{service_principal_id}` */ @JsonIgnore private String name; - /** Required. Service Principal to be updated in Databricks */ + /** The service principal to update. Its `name` identifies the service principal. */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; - /** Required. The list of fields to update. */ + /** + * The fields to update, separated by commas. You can update `display_name`, `account_sp_status`, + * and `external_id`. + */ @JsonIgnore @QueryParam("update_mask") private String updateMask; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateUserProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateUserProxyRequest.java index 5d63405e2..f31bbd35d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateUserProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateUserProxyRequest.java @@ -12,17 +12,20 @@ @Generated public class UpdateUserProxyRequest { /** - * The resource name of the user. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/users/{user_id} - Workspace-scoped: users/{user_id} + * The resource name of the user, in one of these formats: - Account APIs: + * `accounts/{account_id}/users/{user_id}` - Workspace APIs: `users/{user_id}` */ @JsonIgnore private String name; - /** Required. The list of fields to update. */ + /** + * The fields to update, separated by commas. You can update `full_name.given_name`, + * `full_name.family_name`, `account_user_status`, and `external_id`. + */ @JsonIgnore @QueryParam("update_mask") private String updateMask; - /** Required. User to be updated in Databricks */ + /** The user to update. Its `name` identifies the user. */ @JsonProperty("user") private User user; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateUserRequest.java index b7e8f1340..8f50f7c1f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateUserRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateUserRequest.java @@ -12,17 +12,20 @@ @Generated public class UpdateUserRequest { /** - * The resource name of the user. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/users/{user_id} - Workspace-scoped: users/{user_id} + * The resource name of the user, in one of these formats: - Account APIs: + * `accounts/{account_id}/users/{user_id}` - Workspace APIs: `users/{user_id}` */ @JsonIgnore private String name; - /** Required. The list of fields to update. */ + /** + * The fields to update, separated by commas. You can update `full_name.given_name`, + * `full_name.family_name`, `account_user_status`, and `external_id`. + */ @JsonIgnore @QueryParam("update_mask") private String updateMask; - /** Required. User to be updated in Databricks */ + /** The user to update. Its `name` identifies the user. */ @JsonProperty("user") private User user; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceAssignmentProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceAssignmentProxyRequest.java index 7f14be640..314e7e45c 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceAssignmentProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceAssignmentProxyRequest.java @@ -13,19 +13,18 @@ @Generated public class UpdateWorkspaceAssignmentProxyRequest { /** - * The resource name of the workspace assignment. The format depends on the API that returned it: - * - Account-scoped: - * accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id} - - * Workspace-scoped: workspace-assignments/{principal_id} + * The resource name of the assignment, in one of these formats: - Account APIs: + * `accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id}` - + * Workspace APIs: `workspace-assignments/{principal_id}` */ @JsonIgnore private String name; - /** Required. The list of fields to update. */ + /** The fields to update. The only supported field is `entitlements`. */ @JsonIgnore @QueryParam("update_mask") private FieldMask updateMask; - /** Required. Workspace assignment to be updated in Databricks. */ + /** The assignment to update. Its `name` identifies the assignment. */ @JsonProperty("workspace_assignment") private WorkspaceAssignment workspaceAssignment; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceAssignmentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceAssignmentRequest.java index 626bada5d..d17539a52 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceAssignmentRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceAssignmentRequest.java @@ -13,19 +13,18 @@ @Generated public class UpdateWorkspaceAssignmentRequest { /** - * The resource name of the workspace assignment. The format depends on the API that returned it: - * - Account-scoped: - * accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id} - - * Workspace-scoped: workspace-assignments/{principal_id} + * The resource name of the assignment, in one of these formats: - Account APIs: + * `accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id}` - + * Workspace APIs: `workspace-assignments/{principal_id}` */ @JsonIgnore private String name; - /** Required. The list of fields to update. */ + /** The fields to update. The only supported field is `entitlements`. */ @JsonIgnore @QueryParam("update_mask") private FieldMask updateMask; - /** Required. Workspace assignment to be updated in Databricks. */ + /** The assignment to update. Its `name` identifies the assignment. */ @JsonProperty("workspace_assignment") private WorkspaceAssignment workspaceAssignment; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceIdentityDetailRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceIdentityDetailRequest.java index 37e7a7400..e0684ff38 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceIdentityDetailRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UpdateWorkspaceIdentityDetailRequest.java @@ -13,17 +13,17 @@ @Generated public class UpdateWorkspaceIdentityDetailRequest { /** - * The resource name of the workspace identity detail. Format: - * principals/{principal_id}/workspace-identity-detail + * The resource name of the workspace identity detail, in the format + * `principals/{principal_id}/workspace-identity-detail`. */ @JsonIgnore private String name; - /** Required. The list of fields to update. */ + /** The fields to update. The only supported field is `workspace_identity_status`. */ @JsonIgnore @QueryParam("update_mask") private FieldMask updateMask; - /** Required. Workspace identity detail to be updated in Databricks. */ + /** The workspace identity detail to update. Its `name` identifies the principal. */ @JsonProperty("workspace_identity_detail") private WorkspaceIdentityDetail workspaceIdentityDetail; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/User.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/User.java index 308d2fb2b..60b3b0990 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/User.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/User.java @@ -7,44 +7,50 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** The details of a User resource. */ +/** A user in your Databricks account. */ @Generated public class User { - /** The accountId parent of the user in Databricks. */ + /** The ID of the account that contains the user. */ @JsonProperty("account_id") private String accountId; - /** The activity status of a user in a Databricks account. */ + /** + * Whether the user is active in the account. New users are active unless you set this to + * `INACTIVE`. + */ @JsonProperty("account_user_status") private State accountUserStatus; - /** ExternalId of the user in the customer's IdP. */ + /** The ID of the user in your identity provider (IdP). */ @JsonProperty("external_id") private String externalId; - /** */ + /** The user's name. */ @JsonProperty("full_name") private UserFullName fullName; /** - * The resource name of the user. The format depends on the API that returned it: - - * Account-scoped: accounts/{account_id}/users/{user_id} - Workspace-scoped: users/{user_id} + * The resource name of the user, in one of these formats: - Account APIs: + * `accounts/{account_id}/users/{user_id}` - Workspace APIs: `users/{user_id}` */ @JsonProperty("name") private String name; /** - * The resource name of the account that contains the user, `accounts/{account_id}`. Both the - * account-scoped and workspace-scoped APIs return it. + * The resource name of the account that contains the user, in the format `accounts/{account_id}`. + * Workspace APIs return the same format. */ @JsonProperty("parent") private String parent; - /** Internal userId of the user in Databricks. */ + /** The Databricks ID of the user. */ @JsonProperty("user_id") private String userId; - /** Username/email of the user. */ + /** + * The user's username, which is their email address. It can't be changed after the user is + * created. + */ @JsonProperty("username") private String username; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UserFullName.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UserFullName.java index 225c61a21..fd6c7a749 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UserFullName.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/UserFullName.java @@ -7,13 +7,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; +/** A user's name. */ @Generated public class UserFullName { - /** */ + /** The user's family (last) name. */ @JsonProperty("family_name") private String familyName; - /** */ + /** The user's given (first) name. */ @JsonProperty("given_name") private String givenName; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceAssignment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceAssignment.java index f545c3c33..1b3896b38 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceAssignment.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceAssignment.java @@ -9,78 +9,67 @@ import java.util.Objects; /** - * The direct assignment of a provisioned account-level principal (user, service principal, or - * group) to a workspace, together with the entitlements that assignment grants in the workspace. + * A principal's direct assignment to a workspace, and the entitlements it grants there. * - *

This resource covers only principals assigned directly to the workspace. Principals that - * inherit workspace access through a group are not represented here. See WorkspaceAccessDetail and - * WorkspaceIdentityDetail for the effective, direct-or-indirect view. Creating the resource assigns - * the principal to the workspace, and deleting it removes the assignment. + *

Only principals assigned directly to the workspace have an assignment. A principal that gets + * access only through a group doesn't. Creating an assignment gives the principal access to the + * workspace, and deleting it removes that direct access. These APIs replace managing workspace + * assignments through SCIM and the permission assignment APIs. They require a workspace with + * identity federation enabled. You can't assign, change, or unassign principals that Databricks + * manages. * - *

`entitlements` is the only client-settable field. It holds the entitlements granted directly - * on this assignment, including any the principal also holds through a group. - * `effective_entitlements` is the read-only union of those and any granted through group - * membership. - * - *

A direct assignment always carries at least one directly-assigned entitlement, because the - * assignment is what grants it. Create and update both reject an empty `entitlements` set. To - * remove a principal's assignment entirely, delete the resource. - * - *

This resource replaces workspace assignment previously managed through the workspace SCIM and - * permission-assignment APIs, and is intended for account and workspace admins. + *

`entitlements` is the only field you set. `effective_entitlements` also includes the + * entitlements the principal gets through its groups. An assignment must grant at least one + * entitlement. To remove a principal's direct access, delete the assignment. */ @Generated public class WorkspaceAssignment { - /** The account ID parent of the workspace where the principal is assigned */ + /** The ID of the account that contains the workspace. */ @JsonProperty("account_id") private String accountId; /** - * Every entitlement the principal holds in this workspace, whether granted directly or through - * group membership. Get responses populate this field. List responses leave it empty. + * Every entitlement the principal has in the workspace, granted directly or through a group. List + * responses leave it empty. */ @JsonProperty("effective_entitlements") private Collection effectiveEntitlements; /** - * Entitlements granted directly to the principal on this workspace. This is the only - * client-settable field. Create and update manage exactly this set, including entitlements the - * principal also holds through a group. List responses leave this field empty. Get a single - * principal to read its entitlements. + * The entitlements granted directly by this assignment. Create and update set exactly this list, + * even if the principal also gets some of these entitlements through a group. List responses + * leave it empty. */ @JsonProperty("entitlements") private Collection entitlements; /** - * The resource name of the workspace assignment. The format depends on the API that returned it: - * - Account-scoped: - * accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id} - - * Workspace-scoped: workspace-assignments/{principal_id} + * The resource name of the assignment, in one of these formats: - Account APIs: + * `accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id}` - + * Workspace APIs: `workspace-assignments/{principal_id}` */ @JsonProperty("name") private String name; /** - * The resource name of the workspace that contains the assignment, - * `accounts/{account_id}/workspaces/{workspace_id}`. Both the account-scoped and workspace-scoped - * APIs return it. + * The resource name of the workspace, in the format + * `accounts/{account_id}/workspaces/{workspace_id}`. Workspace APIs return the same format. */ @JsonProperty("parent") private String parent; /** - * The internal ID of the principal (user/sp/group) in Databricks. Set when the assignment is - * created and cannot be changed afterwards; to assign a different principal, create a new - * assignment. + * The Databricks ID of the assigned user, service principal, or group. It can't be changed after + * the assignment is created. */ @JsonProperty("principal_id") private Long principalId; - /** The type of the principal (user/service principal/group) that is assigned. */ + /** Whether the assigned principal is a user, service principal, or group. */ @JsonProperty("principal_type") private PrincipalType principalType; - /** The workspace ID where the principal is assigned. */ + /** The ID of the workspace. */ @JsonProperty("workspace_id") private Long workspaceId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2API.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2API.java index 81b37435c..9334546c5 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2API.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2API.java @@ -27,47 +27,46 @@ public WorkspaceIamV2API(WorkspaceIamV2Service mock) { impl = mock; } - /** Creates a group membership (assigns a principal to a group). */ + /** + * Adds a user, service principal, or group as a direct member of a group in the account that + * contains this workspace. + * + *

If automatic identity management is on and the group has an `external_id`, its members come + * from your identity provider and can't be changed in Databricks. + */ public DirectGroupMember createDirectGroupMemberProxy( CreateDirectGroupMemberProxyRequest request) { return impl.createDirectGroupMemberProxy(request); } /** - * Creates a local group in the Databricks account that parents the calling workspace and returns - * the created group. A local group is one that is not synced from the customer's identity - * provider, and can be created whether or not Account Identity Management (AIM) is enabled. + * Creates a local group in the account that contains this workspace. A local group is a group + * that isn't synced from your identity provider (IdP). You become a manager of the new group. * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveGroup; to read an - * existing external identity, use the ExternalGroup resource. + *

If automatic identity management is on, you can't set `external_id`. To add a group from + * your IdP, get it as an external group instead. */ public Group createGroupProxy(CreateGroupProxyRequest request) { return impl.createGroupProxy(request); } /** - * Creates a local service principal in the Databricks account that parents the calling workspace - * and returns the created service principal. A local service principal is one that is not synced - * from the customer's identity provider, and can be created whether or not Account Identity - * Management (AIM) is enabled. + * Creates a local service principal in the account that contains this workspace. A local service + * principal is one that isn't synced from your identity provider (IdP). * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveServicePrincipal; to - * read an existing external identity, use the ExternalServicePrincipal resource. + *

If automatic identity management is on, you can't set `external_id`. To add a service + * principal from your IdP, get it as an external service principal instead. */ public ServicePrincipal createServicePrincipalProxy(CreateServicePrincipalProxyRequest request) { return impl.createServicePrincipalProxy(request); } /** - * Creates a local user in the Databricks account that parents the calling workspace and returns - * the created user. A local user is one that is not synced from the customer's identity provider, - * and can be created whether or not Account Identity Management (AIM) is enabled. + * Creates a local user in the account that contains this workspace. A local user is a user that + * isn't synced from your identity provider (IdP). * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveUser; to read an - * existing external identity, use the ExternalUser resource. + *

If automatic identity management is on, you can't set `external_id`. To add a user from your + * IdP, get them as an external user instead. */ public User createUserProxy(CreateUserProxyRequest request) { return impl.createUserProxy(request); @@ -80,10 +79,12 @@ public WorkspaceAssignmentDetail createWorkspaceAssignmentDetailProxy( } /** - * Creates a workspace assignment for a principal in the calling workspace. Entitlements are - * granted one at a time rather than atomically. If the request fails partway through, the - * principal stays assigned to the workspace with only some of the requested entitlements. Get the - * assignment afterwards to confirm which entitlements were granted. + * Assigns a user, service principal, or group directly to this workspace with the given + * entitlements. Returns an error if the principal is already assigned directly. + * + *

Entitlements are granted one at a time. If the request fails partway through, the principal + * stays assigned with only some of the entitlements. Get the assignment afterwards to check which + * were granted. */ public WorkspaceAssignment createWorkspaceAssignmentProxy( CreateWorkspaceAssignmentProxyRequest request) { @@ -94,7 +95,12 @@ public void deleteDirectGroupMemberProxy(String name) { deleteDirectGroupMemberProxy(new DeleteDirectGroupMemberProxyRequest().setName(name)); } - /** Deletes a group membership (unassigns a principal from a group). */ + /** + * Removes a direct member from a group in the account that contains this workspace. + * + *

If automatic identity management is on and the group has an `external_id`, its members come + * from your identity provider and can't be changed in Databricks. + */ public void deleteDirectGroupMemberProxy(DeleteDirectGroupMemberProxyRequest request) { impl.deleteDirectGroupMemberProxy(request); } @@ -104,8 +110,8 @@ public void deleteGroupProxy(String name) { } /** - * Deletes a group by its internal ID from the Databricks account that parents the calling - * workspace. + * Deletes a group from the account that contains this workspace and removes it from the + * workspaces it's assigned to. */ public void deleteGroupProxy(DeleteGroupProxyRequest request) { impl.deleteGroupProxy(request); @@ -116,8 +122,8 @@ public void deleteServicePrincipalProxy(String name) { } /** - * Deletes a service principal by its internal ID from the Databricks account that parents the - * calling workspace. + * Deletes a service principal from the account that contains this workspace and removes it from + * the workspaces it's assigned to. You can't delete service principals that Databricks manages. */ public void deleteServicePrincipalProxy(DeleteServicePrincipalProxyRequest request) { impl.deleteServicePrincipalProxy(request); @@ -128,8 +134,8 @@ public void deleteUserProxy(String name) { } /** - * Deletes a user by its internal ID from the Databricks account that parents the calling - * workspace. + * Deletes a user from the account that contains this workspace and removes them from the + * workspaces they're assigned to. */ public void deleteUserProxy(DeleteUserProxyRequest request) { impl.deleteUserProxy(request); @@ -156,10 +162,11 @@ public void deleteWorkspaceAssignmentProxy(String name) { } /** - * Deletes a workspace assignment for a principal in the calling workspace, revoking all of its - * entitlements. Entitlements are revoked one at a time rather than atomically. If the request - * fails partway through, the principal stays assigned with some of its original entitlements. - * Retrying is safe. + * Removes a principal's direct assignment to this workspace and revokes the entitlements it + * granted. The principal keeps any access it gets through groups. + * + *

Entitlements are revoked one at a time. If the request fails partway through, the principal + * stays assigned with some of its entitlements. You can retry the request. */ public void deleteWorkspaceAssignmentProxy(DeleteWorkspaceAssignmentProxyRequest request) { impl.deleteWorkspaceAssignmentProxy(request); @@ -169,7 +176,10 @@ public DirectGroupMember getDirectGroupMemberProxy(String name) { return getDirectGroupMemberProxy(new GetDirectGroupMemberProxyRequest().setName(name)); } - /** Gets a provisioned direct member of a group. */ + /** + * Gets a direct member of a group in the account that contains this workspace, including where + * the membership comes from. Returns an error if the principal isn't a direct member. + */ public DirectGroupMember getDirectGroupMemberProxy(GetDirectGroupMemberProxyRequest request) { return impl.getDirectGroupMemberProxy(request); } @@ -179,10 +189,10 @@ public ExternalGroup getExternalGroupProxy(String name) { } /** - * Retrieves an external group with the given external ID from the customer's IdP. If the group - * does not exist, it will be created in the account. If the customer is not onboarded onto - * Automatic Identity Management (AIM), this will return an error. Workspace-scoped variant for - * workspace-authenticated callers. + * Gets a group by its ID in your identity provider (IdP) and syncs its name and parent groups + * from your IdP. If the group isn't in the account that contains this workspace yet, it's added. + * Requires automatic identity management. If your account has group visibility filters, the group + * must match them. */ public ExternalGroup getExternalGroupProxy(GetExternalGroupProxyRequest request) { return impl.getExternalGroupProxy(request); @@ -194,10 +204,10 @@ public ExternalServicePrincipal getExternalServicePrincipalProxy(String name) { } /** - * Retrieves an external service principal with the given external ID from the customer's IdP. If - * the service principal does not exist, it will be created. If the customer is not onboarded onto - * Automatic Identity Management (AIM), this will return an error. Workspace-scoped variant for - * workspace-authenticated callers. + * Gets a service principal by its ID in your identity provider (IdP) and syncs its details and + * group memberships from your IdP. If the service principal isn't in the account that contains + * this workspace yet, it's added. Requires automatic identity management with Microsoft Entra ID + * as your IdP. */ public ExternalServicePrincipal getExternalServicePrincipalProxy( GetExternalServicePrincipalProxyRequest request) { @@ -209,10 +219,9 @@ public ExternalUser getExternalUserProxy(String name) { } /** - * Retrieves an external user with the given external ID from the customer's IdP. If the user does - * not exist, it will be created. If the customer is not onboarded onto Automatic Identity - * Management (AIM), this will return an error. Workspace-scoped variant for - * workspace-authenticated callers. + * Gets a user by their ID in your identity provider (IdP) and syncs their details and group + * memberships from your IdP. If the user isn't in the account that contains this workspace yet, + * they're added. Requires automatic identity management. */ public ExternalUser getExternalUserProxy(GetExternalUserProxyRequest request) { return impl.getExternalUserProxy(request); @@ -222,10 +231,7 @@ public Group getGroupProxy(String name) { return getGroupProxy(new GetGroupProxyRequest().setName(name)); } - /** - * Fetches a group by its internal ID from the Databricks account that parents the calling - * workspace. - */ + /** Gets a group in the account that contains this workspace by its Databricks ID. */ public Group getGroupProxy(GetGroupProxyRequest request) { return impl.getGroupProxy(request); } @@ -234,10 +240,7 @@ public ServicePrincipal getServicePrincipalProxy(String name) { return getServicePrincipalProxy(new GetServicePrincipalProxyRequest().setName(name)); } - /** - * Fetches a service principal by its internal ID from the Databricks account that parents the - * calling workspace. - */ + /** Gets a service principal in the account that contains this workspace by its Databricks ID. */ public ServicePrincipal getServicePrincipalProxy(GetServicePrincipalProxyRequest request) { return impl.getServicePrincipalProxy(request); } @@ -246,10 +249,7 @@ public User getUserProxy(String name) { return getUserProxy(new GetUserProxyRequest().setName(name)); } - /** - * Fetches a user by its internal ID from the Databricks account that parents the calling - * workspace. - */ + /** Gets a user in the account that contains this workspace by their Databricks ID. */ public User getUserProxy(GetUserProxyRequest request) { return impl.getUserProxy(request); } @@ -285,7 +285,10 @@ public WorkspaceAssignment getWorkspaceAssignmentProxy(String name) { return getWorkspaceAssignmentProxy(new GetWorkspaceAssignmentProxyRequest().setName(name)); } - /** Returns the assignment for a principal in the calling workspace. */ + /** + * Gets a principal's direct assignment to this workspace, including its effective entitlements. + * Returns an error if the principal isn't assigned directly. + */ public WorkspaceAssignment getWorkspaceAssignmentProxy( GetWorkspaceAssignmentProxyRequest request) { return impl.getWorkspaceAssignmentProxy(request); @@ -295,7 +298,10 @@ public WorkspaceIdentityDetail getWorkspaceIdentityDetail(String name) { return getWorkspaceIdentityDetail(new GetWorkspaceIdentityDetailRequest().setName(name)); } - /** Returns the identity details for a principal in a workspace. */ + /** + * Gets a principal's status in this workspace and whether it has access directly or through a + * group. Returns an error if the principal doesn't have access to the workspace. + */ public WorkspaceIdentityDetail getWorkspaceIdentityDetail( GetWorkspaceIdentityDetailRequest request) { return impl.getWorkspaceIdentityDetail(request); @@ -306,8 +312,9 @@ public Iterable listDirectGroupMembersProxy(String parent) { } /** - * Lists provisioned direct members of a group with their membership source (internal or from - * identity provider). + * Lists the direct members of a group in the account that contains this workspace, sorted by + * display name, with where each membership comes from. Members in your identity provider who + * haven't been added to Databricks aren't included. */ public Iterable listDirectGroupMembersProxy( ListDirectGroupMembersProxyRequest request) { @@ -325,8 +332,8 @@ public Iterable listDirectGroupMembersProxy( } /** - * Lists the groups in the Databricks account that parents the calling workspace, returning one - * page per call. Supports filtering by group name or external ID. + * Lists the groups in the account that contains this workspace, sorted by Databricks ID. Groups + * in your identity provider that haven't been added to Databricks aren't included. */ public Iterable listGroupsProxy(ListGroupsProxyRequest request) { return Paginator.newTokenPagination( @@ -343,8 +350,9 @@ public Iterable listGroupsProxy(ListGroupsProxyRequest request) { } /** - * Lists the service principals in the Databricks account that parents the calling workspace, - * returning one page per call. Supports filtering by application ID or external ID. + * Lists the service principals in the account that contains this workspace, sorted by Databricks + * ID. Service principals in your identity provider that haven't been added to Databricks aren't + * included. */ public Iterable listServicePrincipalsProxy( ListServicePrincipalsProxyRequest request) { @@ -366,15 +374,20 @@ public ListTransitiveParentGroupsResponse listTransitiveParentGroupsProxy(String new ListTransitiveParentGroupsProxyRequest().setParent(parent)); } - /** Lists all transitive parent groups of a principal. */ + /** + * Lists every group that a user, service principal, or group belongs to, directly or through + * other groups, in the account that contains this workspace. Results are sorted by Databricks ID. + * If automatic identity management is on, the principal's group memberships are synced from your + * identity provider first. + */ public ListTransitiveParentGroupsResponse listTransitiveParentGroupsProxy( ListTransitiveParentGroupsProxyRequest request) { return impl.listTransitiveParentGroupsProxy(request); } /** - * Lists the users in the Databricks account that parents the calling workspace, returning one - * page per call. Supports filtering by username or external ID. + * Lists the users in the account that contains this workspace, sorted by Databricks ID. Users in + * your identity provider who haven't been added to Databricks aren't included. */ public Iterable listUsersProxy(ListUsersProxyRequest request) { return Paginator.newTokenPagination( @@ -411,9 +424,8 @@ public Iterable listWorkspaceAssignmentDetailsProxy( } /** - * Lists workspace assignments for the calling workspace. The response omits the per-principal - * entitlement fields (`entitlements` and `effective_entitlements`). To read the entitlements for - * a single principal, get that principal's assignment. + * Lists the principals assigned directly to this workspace. The response leaves `entitlements` + * and `effective_entitlements` empty. To read a principal's entitlements, get its assignment. */ public Iterable listWorkspaceAssignmentsProxy( ListWorkspaceAssignmentsProxyRequest request) { @@ -431,18 +443,20 @@ public Iterable listWorkspaceAssignmentsProxy( } /** - * Resolves a group with the given external ID from the customer's IdP. If the group does not - * exist, it will be created in the account. If the customer is not onboarded onto Automatic - * Identity Management (AIM), this will return an error. + * Gets a group by its ID in your identity provider (IdP) and syncs its name and parent groups + * from your IdP. If the group isn't in the account that contains this workspace yet, it's added. + * Requires automatic identity management. If your account has group visibility filters, the group + * must match them. */ public ResolveGroupResponse resolveGroupProxy(ResolveGroupProxyRequest request) { return impl.resolveGroupProxy(request); } /** - * Resolves a service principal with the given external ID from the customer's IdP. If the service - * principal does not exist, it will be created. If the customer is not onboarded onto Automatic - * Identity Management (AIM), this will return an error. + * Gets a service principal by its ID in your identity provider (IdP) and syncs its details and + * group memberships from your IdP. If the service principal isn't in the account that contains + * this workspace yet, it's added. Requires automatic identity management with Microsoft Entra ID + * as your IdP. */ public ResolveServicePrincipalResponse resolveServicePrincipalProxy( ResolveServicePrincipalProxyRequest request) { @@ -450,50 +464,47 @@ public ResolveServicePrincipalResponse resolveServicePrincipalProxy( } /** - * Resolves a user with the given external ID from the customer's IdP. If the user does not exist, - * it will be created. If the customer is not onboarded onto Automatic Identity Management (AIM), - * this will return an error. + * Gets a user by their ID in your identity provider (IdP) and syncs their details and group + * memberships from your IdP. If the user isn't in the account that contains this workspace yet, + * they're added. Requires automatic identity management. */ public ResolveUserResponse resolveUserProxy(ResolveUserProxyRequest request) { return impl.resolveUserProxy(request); } /** - * Updates an existing group in the Databricks account that parents the calling workspace. Only - * the fields named in the update mask are modified. Returns the updated Group resource. + * Updates a group in the account that contains this workspace. Only the fields in `update_mask` + * change. * - *

When AIM is enabled and the group is an external identity (its external_id is set), only - * external_id can be updated; its other fields are sourced from your identity provider. With AIM - * and group visibility filters, a new nonempty external_id must identify a visible group. - * Clearing external_id is allowed. + *

If automatic identity management is on and the group has an `external_id`, you can only + * update `external_id`. The group's other fields come from your identity provider. If your + * account also has group visibility filters, a new `external_id` must match them. You can always + * clear `external_id`. */ public Group updateGroupProxy(UpdateGroupProxyRequest request) { return impl.updateGroupProxy(request); } /** - * Updates an existing service principal in the Databricks account that parents the calling - * workspace. Only the fields named in the update mask are modified. Returns the updated - * ServicePrincipal resource. - * - *

To change is_agent on a locally managed service principal, set it to true or false. Naming - * is_agent in the update mask without a value leaves it unchanged. + * Updates a service principal in the account that contains this workspace. Only the fields in + * `update_mask` change. * - *

When AIM is enabled and the service principal is an external identity (its external_id is - * set), only external_id can be updated; its other fields are sourced from your identity - * provider. + *

If automatic identity management is on and the service principal has an `external_id`, you + * can only update `external_id`. Its other fields come from your identity provider. A service + * principal can't deactivate itself, and you can't update service principals that Databricks + * manages. */ public ServicePrincipal updateServicePrincipalProxy(UpdateServicePrincipalProxyRequest request) { return impl.updateServicePrincipalProxy(request); } /** - * Updates an existing user in the Databricks account that parents the calling workspace and - * returns the updated user. Only the fields named in the update mask are modified. The updatable - * fields are fullName.givenName, fullName.familyName, status, and externalId. + * Updates a user in the account that contains this workspace. Only the fields in `update_mask` + * change. * - *

When AIM is enabled and the user is an external identity (its external_id is set), only - * external_id can be updated; its other fields are sourced from your identity provider. + *

If automatic identity management is on and the user has an `external_id`, you can only + * update `external_id`. The user's other fields come from your identity provider. You can't + * deactivate yourself or change the status of the account owner. */ public User updateUserProxy(UpdateUserProxyRequest request) { return impl.updateUserProxy(request); @@ -511,16 +522,21 @@ public WorkspaceAssignmentDetail updateWorkspaceAssignmentDetailProxy( } /** - * Updates the entitlements of a directly assigned principal in the calling workspace. Changes are - * applied one at a time rather than atomically. If the request fails partway through, only some - * of the requested changes take effect. Get the assignment afterwards to confirm the final state. + * Replaces the entitlements of a principal's direct assignment to this workspace. The new list + * can't be empty. + * + *

Entitlements are changed one at a time. If the request fails partway through, only some of + * the changes take effect. Get the assignment afterwards to check the result. */ public WorkspaceAssignment updateWorkspaceAssignmentProxy( UpdateWorkspaceAssignmentProxyRequest request) { return impl.updateWorkspaceAssignmentProxy(request); } - /** Updates a workspace identity detail for a principal. */ + /** + * Activates or deactivates a user or service principal in this workspace. You can only update + * `workspace_identity_status`. You can't change your own status or the status of a group. + */ public WorkspaceIdentityDetail updateWorkspaceIdentityDetail( UpdateWorkspaceIdentityDetailRequest request) { return impl.updateWorkspaceIdentityDetail(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Service.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Service.java index 603542a5b..c613fd90a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Service.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Service.java @@ -13,42 +13,41 @@ */ @Generated public interface WorkspaceIamV2Service { - /** Creates a group membership (assigns a principal to a group). */ + /** + * Adds a user, service principal, or group as a direct member of a group in the account that + * contains this workspace. + * + *

If automatic identity management is on and the group has an `external_id`, its members come + * from your identity provider and can't be changed in Databricks. + */ DirectGroupMember createDirectGroupMemberProxy( CreateDirectGroupMemberProxyRequest createDirectGroupMemberProxyRequest); /** - * Creates a local group in the Databricks account that parents the calling workspace and returns - * the created group. A local group is one that is not synced from the customer's identity - * provider, and can be created whether or not Account Identity Management (AIM) is enabled. + * Creates a local group in the account that contains this workspace. A local group is a group + * that isn't synced from your identity provider (IdP). You become a manager of the new group. * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveGroup; to read an - * existing external identity, use the ExternalGroup resource. + *

If automatic identity management is on, you can't set `external_id`. To add a group from + * your IdP, get it as an external group instead. */ Group createGroupProxy(CreateGroupProxyRequest createGroupProxyRequest); /** - * Creates a local service principal in the Databricks account that parents the calling workspace - * and returns the created service principal. A local service principal is one that is not synced - * from the customer's identity provider, and can be created whether or not Account Identity - * Management (AIM) is enabled. + * Creates a local service principal in the account that contains this workspace. A local service + * principal is one that isn't synced from your identity provider (IdP). * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveServicePrincipal; to - * read an existing external identity, use the ExternalServicePrincipal resource. + *

If automatic identity management is on, you can't set `external_id`. To add a service + * principal from your IdP, get it as an external service principal instead. */ ServicePrincipal createServicePrincipalProxy( CreateServicePrincipalProxyRequest createServicePrincipalProxyRequest); /** - * Creates a local user in the Databricks account that parents the calling workspace and returns - * the created user. A local user is one that is not synced from the customer's identity provider, - * and can be created whether or not Account Identity Management (AIM) is enabled. + * Creates a local user in the account that contains this workspace. A local user is a user that + * isn't synced from your identity provider (IdP). * - *

When AIM is enabled, supplying an external ID returns an error. To provision the identity - * from your identity provider, resolve it by its external ID with ResolveUser; to read an - * existing external identity, use the ExternalUser resource. + *

If automatic identity management is on, you can't set `external_id`. To add a user from your + * IdP, get them as an external user instead. */ User createUserProxy(CreateUserProxyRequest createUserProxyRequest); @@ -57,34 +56,41 @@ WorkspaceAssignmentDetail createWorkspaceAssignmentDetailProxy( CreateWorkspaceAssignmentDetailProxyRequest createWorkspaceAssignmentDetailProxyRequest); /** - * Creates a workspace assignment for a principal in the calling workspace. Entitlements are - * granted one at a time rather than atomically. If the request fails partway through, the - * principal stays assigned to the workspace with only some of the requested entitlements. Get the - * assignment afterwards to confirm which entitlements were granted. + * Assigns a user, service principal, or group directly to this workspace with the given + * entitlements. Returns an error if the principal is already assigned directly. + * + *

Entitlements are granted one at a time. If the request fails partway through, the principal + * stays assigned with only some of the entitlements. Get the assignment afterwards to check which + * were granted. */ WorkspaceAssignment createWorkspaceAssignmentProxy( CreateWorkspaceAssignmentProxyRequest createWorkspaceAssignmentProxyRequest); - /** Deletes a group membership (unassigns a principal from a group). */ + /** + * Removes a direct member from a group in the account that contains this workspace. + * + *

If automatic identity management is on and the group has an `external_id`, its members come + * from your identity provider and can't be changed in Databricks. + */ void deleteDirectGroupMemberProxy( DeleteDirectGroupMemberProxyRequest deleteDirectGroupMemberProxyRequest); /** - * Deletes a group by its internal ID from the Databricks account that parents the calling - * workspace. + * Deletes a group from the account that contains this workspace and removes it from the + * workspaces it's assigned to. */ void deleteGroupProxy(DeleteGroupProxyRequest deleteGroupProxyRequest); /** - * Deletes a service principal by its internal ID from the Databricks account that parents the - * calling workspace. + * Deletes a service principal from the account that contains this workspace and removes it from + * the workspaces it's assigned to. You can't delete service principals that Databricks manages. */ void deleteServicePrincipalProxy( DeleteServicePrincipalProxyRequest deleteServicePrincipalProxyRequest); /** - * Deletes a user by its internal ID from the Databricks account that parents the calling - * workspace. + * Deletes a user from the account that contains this workspace and removes them from the + * workspaces they're assigned to. */ void deleteUserProxy(DeleteUserProxyRequest deleteUserProxyRequest); @@ -98,60 +104,54 @@ void deleteWorkspaceAssignmentDetailProxy( DeleteWorkspaceAssignmentDetailProxyRequest deleteWorkspaceAssignmentDetailProxyRequest); /** - * Deletes a workspace assignment for a principal in the calling workspace, revoking all of its - * entitlements. Entitlements are revoked one at a time rather than atomically. If the request - * fails partway through, the principal stays assigned with some of its original entitlements. - * Retrying is safe. + * Removes a principal's direct assignment to this workspace and revokes the entitlements it + * granted. The principal keeps any access it gets through groups. + * + *

Entitlements are revoked one at a time. If the request fails partway through, the principal + * stays assigned with some of its entitlements. You can retry the request. */ void deleteWorkspaceAssignmentProxy( DeleteWorkspaceAssignmentProxyRequest deleteWorkspaceAssignmentProxyRequest); - /** Gets a provisioned direct member of a group. */ + /** + * Gets a direct member of a group in the account that contains this workspace, including where + * the membership comes from. Returns an error if the principal isn't a direct member. + */ DirectGroupMember getDirectGroupMemberProxy( GetDirectGroupMemberProxyRequest getDirectGroupMemberProxyRequest); /** - * Retrieves an external group with the given external ID from the customer's IdP. If the group - * does not exist, it will be created in the account. If the customer is not onboarded onto - * Automatic Identity Management (AIM), this will return an error. Workspace-scoped variant for - * workspace-authenticated callers. + * Gets a group by its ID in your identity provider (IdP) and syncs its name and parent groups + * from your IdP. If the group isn't in the account that contains this workspace yet, it's added. + * Requires automatic identity management. If your account has group visibility filters, the group + * must match them. */ ExternalGroup getExternalGroupProxy(GetExternalGroupProxyRequest getExternalGroupProxyRequest); /** - * Retrieves an external service principal with the given external ID from the customer's IdP. If - * the service principal does not exist, it will be created. If the customer is not onboarded onto - * Automatic Identity Management (AIM), this will return an error. Workspace-scoped variant for - * workspace-authenticated callers. + * Gets a service principal by its ID in your identity provider (IdP) and syncs its details and + * group memberships from your IdP. If the service principal isn't in the account that contains + * this workspace yet, it's added. Requires automatic identity management with Microsoft Entra ID + * as your IdP. */ ExternalServicePrincipal getExternalServicePrincipalProxy( GetExternalServicePrincipalProxyRequest getExternalServicePrincipalProxyRequest); /** - * Retrieves an external user with the given external ID from the customer's IdP. If the user does - * not exist, it will be created. If the customer is not onboarded onto Automatic Identity - * Management (AIM), this will return an error. Workspace-scoped variant for - * workspace-authenticated callers. + * Gets a user by their ID in your identity provider (IdP) and syncs their details and group + * memberships from your IdP. If the user isn't in the account that contains this workspace yet, + * they're added. Requires automatic identity management. */ ExternalUser getExternalUserProxy(GetExternalUserProxyRequest getExternalUserProxyRequest); - /** - * Fetches a group by its internal ID from the Databricks account that parents the calling - * workspace. - */ + /** Gets a group in the account that contains this workspace by its Databricks ID. */ Group getGroupProxy(GetGroupProxyRequest getGroupProxyRequest); - /** - * Fetches a service principal by its internal ID from the Databricks account that parents the - * calling workspace. - */ + /** Gets a service principal in the account that contains this workspace by its Databricks ID. */ ServicePrincipal getServicePrincipalProxy( GetServicePrincipalProxyRequest getServicePrincipalProxyRequest); - /** - * Fetches a user by its internal ID from the Databricks account that parents the calling - * workspace. - */ + /** Gets a user in the account that contains this workspace by their Databricks ID. */ User getUserProxy(GetUserProxyRequest getUserProxyRequest); /** @@ -168,41 +168,54 @@ WorkspaceAccessDetail getWorkspaceAccessDetailLocal( WorkspaceAssignmentDetail getWorkspaceAssignmentDetailProxy( GetWorkspaceAssignmentDetailProxyRequest getWorkspaceAssignmentDetailProxyRequest); - /** Returns the assignment for a principal in the calling workspace. */ + /** + * Gets a principal's direct assignment to this workspace, including its effective entitlements. + * Returns an error if the principal isn't assigned directly. + */ WorkspaceAssignment getWorkspaceAssignmentProxy( GetWorkspaceAssignmentProxyRequest getWorkspaceAssignmentProxyRequest); - /** Returns the identity details for a principal in a workspace. */ + /** + * Gets a principal's status in this workspace and whether it has access directly or through a + * group. Returns an error if the principal doesn't have access to the workspace. + */ WorkspaceIdentityDetail getWorkspaceIdentityDetail( GetWorkspaceIdentityDetailRequest getWorkspaceIdentityDetailRequest); /** - * Lists provisioned direct members of a group with their membership source (internal or from - * identity provider). + * Lists the direct members of a group in the account that contains this workspace, sorted by + * display name, with where each membership comes from. Members in your identity provider who + * haven't been added to Databricks aren't included. */ ListDirectGroupMembersResponse listDirectGroupMembersProxy( ListDirectGroupMembersProxyRequest listDirectGroupMembersProxyRequest); /** - * Lists the groups in the Databricks account that parents the calling workspace, returning one - * page per call. Supports filtering by group name or external ID. + * Lists the groups in the account that contains this workspace, sorted by Databricks ID. Groups + * in your identity provider that haven't been added to Databricks aren't included. */ ListGroupsResponse listGroupsProxy(ListGroupsProxyRequest listGroupsProxyRequest); /** - * Lists the service principals in the Databricks account that parents the calling workspace, - * returning one page per call. Supports filtering by application ID or external ID. + * Lists the service principals in the account that contains this workspace, sorted by Databricks + * ID. Service principals in your identity provider that haven't been added to Databricks aren't + * included. */ ListServicePrincipalsResponse listServicePrincipalsProxy( ListServicePrincipalsProxyRequest listServicePrincipalsProxyRequest); - /** Lists all transitive parent groups of a principal. */ + /** + * Lists every group that a user, service principal, or group belongs to, directly or through + * other groups, in the account that contains this workspace. Results are sorted by Databricks ID. + * If automatic identity management is on, the principal's group memberships are synced from your + * identity provider first. + */ ListTransitiveParentGroupsResponse listTransitiveParentGroupsProxy( ListTransitiveParentGroupsProxyRequest listTransitiveParentGroupsProxyRequest); /** - * Lists the users in the Databricks account that parents the calling workspace, returning one - * page per call. Supports filtering by username or external ID. + * Lists the users in the account that contains this workspace, sorted by Databricks ID. Users in + * your identity provider who haven't been added to Databricks aren't included. */ ListUsersResponse listUsersProxy(ListUsersProxyRequest listUsersProxyRequest); @@ -215,68 +228,66 @@ ListWorkspaceAssignmentDetailsResponse listWorkspaceAssignmentDetailsProxy( ListWorkspaceAssignmentDetailsProxyRequest listWorkspaceAssignmentDetailsProxyRequest); /** - * Lists workspace assignments for the calling workspace. The response omits the per-principal - * entitlement fields (`entitlements` and `effective_entitlements`). To read the entitlements for - * a single principal, get that principal's assignment. + * Lists the principals assigned directly to this workspace. The response leaves `entitlements` + * and `effective_entitlements` empty. To read a principal's entitlements, get its assignment. */ ListWorkspaceAssignmentsResponse listWorkspaceAssignmentsProxy( ListWorkspaceAssignmentsProxyRequest listWorkspaceAssignmentsProxyRequest); /** - * Resolves a group with the given external ID from the customer's IdP. If the group does not - * exist, it will be created in the account. If the customer is not onboarded onto Automatic - * Identity Management (AIM), this will return an error. + * Gets a group by its ID in your identity provider (IdP) and syncs its name and parent groups + * from your IdP. If the group isn't in the account that contains this workspace yet, it's added. + * Requires automatic identity management. If your account has group visibility filters, the group + * must match them. */ ResolveGroupResponse resolveGroupProxy(ResolveGroupProxyRequest resolveGroupProxyRequest); /** - * Resolves a service principal with the given external ID from the customer's IdP. If the service - * principal does not exist, it will be created. If the customer is not onboarded onto Automatic - * Identity Management (AIM), this will return an error. + * Gets a service principal by its ID in your identity provider (IdP) and syncs its details and + * group memberships from your IdP. If the service principal isn't in the account that contains + * this workspace yet, it's added. Requires automatic identity management with Microsoft Entra ID + * as your IdP. */ ResolveServicePrincipalResponse resolveServicePrincipalProxy( ResolveServicePrincipalProxyRequest resolveServicePrincipalProxyRequest); /** - * Resolves a user with the given external ID from the customer's IdP. If the user does not exist, - * it will be created. If the customer is not onboarded onto Automatic Identity Management (AIM), - * this will return an error. + * Gets a user by their ID in your identity provider (IdP) and syncs their details and group + * memberships from your IdP. If the user isn't in the account that contains this workspace yet, + * they're added. Requires automatic identity management. */ ResolveUserResponse resolveUserProxy(ResolveUserProxyRequest resolveUserProxyRequest); /** - * Updates an existing group in the Databricks account that parents the calling workspace. Only - * the fields named in the update mask are modified. Returns the updated Group resource. + * Updates a group in the account that contains this workspace. Only the fields in `update_mask` + * change. * - *

When AIM is enabled and the group is an external identity (its external_id is set), only - * external_id can be updated; its other fields are sourced from your identity provider. With AIM - * and group visibility filters, a new nonempty external_id must identify a visible group. - * Clearing external_id is allowed. + *

If automatic identity management is on and the group has an `external_id`, you can only + * update `external_id`. The group's other fields come from your identity provider. If your + * account also has group visibility filters, a new `external_id` must match them. You can always + * clear `external_id`. */ Group updateGroupProxy(UpdateGroupProxyRequest updateGroupProxyRequest); /** - * Updates an existing service principal in the Databricks account that parents the calling - * workspace. Only the fields named in the update mask are modified. Returns the updated - * ServicePrincipal resource. - * - *

To change is_agent on a locally managed service principal, set it to true or false. Naming - * is_agent in the update mask without a value leaves it unchanged. + * Updates a service principal in the account that contains this workspace. Only the fields in + * `update_mask` change. * - *

When AIM is enabled and the service principal is an external identity (its external_id is - * set), only external_id can be updated; its other fields are sourced from your identity - * provider. + *

If automatic identity management is on and the service principal has an `external_id`, you + * can only update `external_id`. Its other fields come from your identity provider. A service + * principal can't deactivate itself, and you can't update service principals that Databricks + * manages. */ ServicePrincipal updateServicePrincipalProxy( UpdateServicePrincipalProxyRequest updateServicePrincipalProxyRequest); /** - * Updates an existing user in the Databricks account that parents the calling workspace and - * returns the updated user. Only the fields named in the update mask are modified. The updatable - * fields are fullName.givenName, fullName.familyName, status, and externalId. + * Updates a user in the account that contains this workspace. Only the fields in `update_mask` + * change. * - *

When AIM is enabled and the user is an external identity (its external_id is set), only - * external_id can be updated; its other fields are sourced from your identity provider. + *

If automatic identity management is on and the user has an `external_id`, you can only + * update `external_id`. The user's other fields come from your identity provider. You can't + * deactivate yourself or change the status of the account owner. */ User updateUserProxy(UpdateUserProxyRequest updateUserProxyRequest); @@ -290,14 +301,19 @@ WorkspaceAssignmentDetail updateWorkspaceAssignmentDetailProxy( UpdateWorkspaceAssignmentDetailProxyRequest updateWorkspaceAssignmentDetailProxyRequest); /** - * Updates the entitlements of a directly assigned principal in the calling workspace. Changes are - * applied one at a time rather than atomically. If the request fails partway through, only some - * of the requested changes take effect. Get the assignment afterwards to confirm the final state. + * Replaces the entitlements of a principal's direct assignment to this workspace. The new list + * can't be empty. + * + *

Entitlements are changed one at a time. If the request fails partway through, only some of + * the changes take effect. Get the assignment afterwards to check the result. */ WorkspaceAssignment updateWorkspaceAssignmentProxy( UpdateWorkspaceAssignmentProxyRequest updateWorkspaceAssignmentProxyRequest); - /** Updates a workspace identity detail for a principal. */ + /** + * Activates or deactivates a user or service principal in this workspace. You can only update + * `workspace_identity_status`. You can't change your own status or the status of a group. + */ WorkspaceIdentityDetail updateWorkspaceIdentityDetail( UpdateWorkspaceIdentityDetailRequest updateWorkspaceIdentityDetailRequest); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIdentityDetail.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIdentityDetail.java index d0b29caa8..3990202b7 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIdentityDetail.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIdentityDetail.java @@ -7,29 +7,33 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** The details of a directly or indirectly assigned principal's details in a workspace. */ +/** + * A user, service principal, or group's status in a workspace, and whether it has access to the + * workspace directly or through a group. Update it to activate or deactivate a user or service + * principal in the workspace. + */ @Generated public class WorkspaceIdentityDetail { - /** The type of assignment the principal has to the workspace (direct or indirect). */ + /** Whether the principal is assigned to the workspace directly or has access through a group. */ @JsonProperty("assignment_type") private WorkspaceIdentityDetailAssignmentType assignmentType; /** - * The resource name of the workspace identity detail. Format: - * principals/{principal_id}/workspace-identity-detail + * The resource name of the workspace identity detail, in the format + * `principals/{principal_id}/workspace-identity-detail`. */ @JsonProperty("name") private String name; - /** The internal ID of the principal (user/sp/group) in Databricks. */ + /** The Databricks ID of the user, service principal, or group. */ @JsonProperty("principal_id") private Long principalId; - /** The type of the principal (user/service principal/group). */ + /** Whether the principal is a user, service principal, or group. */ @JsonProperty("principal_type") private PrincipalType principalType; - /** The activity status of an identity in a Databricks workspace. */ + /** Whether the principal is active in the workspace. Groups are always `ACTIVE`. */ @JsonProperty("workspace_identity_status") private State workspaceIdentityStatus; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIdentityDetailAssignmentType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIdentityDetailAssignmentType.java index 5f7e43f15..6cf181647 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIdentityDetailAssignmentType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIdentityDetailAssignmentType.java @@ -4,7 +4,7 @@ import com.databricks.sdk.support.Generated; -/** The type of assignment the principal has to the workspace. */ +/** How a principal has access to a workspace. */ @Generated public enum WorkspaceIdentityDetailAssignmentType { DIRECT, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ResolvedValuesAiFunctionTaskResolvedValues.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ResolvedValuesAiFunctionTaskResolvedValues.java index af7d62cf0..09311be75 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ResolvedValuesAiFunctionTaskResolvedValues.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ResolvedValuesAiFunctionTaskResolvedValues.java @@ -4,26 +4,47 @@ import com.databricks.sdk.support.Generated; import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; /** Resolved values for an AI Function task's Delta table input. */ @Generated public class ResolvedValuesAiFunctionTaskResolvedValues { + /** + * The Delta table source with any upstream-task references (such as + * `{{tasks..values.output_table_name}}`) in the table name replaced by concrete values + * before the run. + */ + @JsonProperty("delta_table") + private DeltaTableSource deltaTable; + + public ResolvedValuesAiFunctionTaskResolvedValues setDeltaTable(DeltaTableSource deltaTable) { + this.deltaTable = deltaTable; + return this; + } + + public DeltaTableSource getDeltaTable() { + return deltaTable; + } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - return true; + ResolvedValuesAiFunctionTaskResolvedValues that = + (ResolvedValuesAiFunctionTaskResolvedValues) o; + return Objects.equals(deltaTable, that.deltaTable); } @Override public int hashCode() { - return Objects.hash(); + return Objects.hash(deltaTable); } @Override public String toString() { - return new ToStringer(ResolvedValuesAiFunctionTaskResolvedValues.class).toString(); + return new ToStringer(ResolvedValuesAiFunctionTaskResolvedValues.class) + .add("deltaTable", deltaTable) + .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionRunInfoDetails.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionRunInfoDetails.java index 642aae3f3..51bf7026a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionRunInfoDetails.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionRunInfoDetails.java @@ -10,21 +10,23 @@ /** SQL condition evaluation details captured at the time the run was triggered */ @Generated public class SqlConditionRunInfoDetails { - /** Whether the last condition evaluation was satisfied (query returned truthy result). */ + /** + * Whether the last condition evaluation was satisfied. For QUERY_RETURNS_ROWS, the query returned + * at least one row. For RESULT_VALUE_CHANGES, the result value changed. + */ @JsonProperty("condition_evaluation_satisfied") private Boolean conditionEvaluationSatisfied; /** - * The ID of the SQL session, used by the UI to track session context. Set for the - * QUERY_RETURNS_ROWS trigger mode. + * The ID of the SQL session of the condition evaluation. Not set by current evaluations. Use + * condition_evaluation_sql_statement_id instead. */ @JsonProperty("condition_evaluation_sql_session_id") private String conditionEvaluationSqlSessionId; /** - * The SQL statement ID of the condition evaluation, set when the condition is evaluated by - * running a single SQL statement (the RESULT_VALUE_CHANGES trigger mode). The UI uses it to link - * to the query execution details. + * The SQL statement ID of the condition evaluation. Set for both the QUERY_RETURNS_ROWS and + * RESULT_VALUE_CHANGES trigger modes. */ @JsonProperty("condition_evaluation_sql_statement_id") private String conditionEvaluationSqlStatementId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionState.java index 6d797b003..77430cc0d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionState.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionState.java @@ -9,20 +9,23 @@ @Generated public class SqlConditionState { - /** Whether the last condition evaluation was satisfied (query returned truthy result). */ + /** + * Whether the last condition evaluation was satisfied. For QUERY_RETURNS_ROWS, the query returned + * at least one row. For RESULT_VALUE_CHANGES, the result value changed. + */ @JsonProperty("latest_condition_evaluation_satisfied") private Boolean latestConditionEvaluationSatisfied; /** - * The ID of the SQL session, used by UI to track session context. Populated for - * QUERY_RETURNS_ROWS, which executes the query through Redash. + * The ID of the SQL session of the latest condition evaluation. Not set by current evaluations. + * Use latest_condition_evaluation_sql_statement_id instead. */ @JsonProperty("latest_condition_evaluation_sql_session_id") private String latestConditionEvaluationSqlSessionId; /** - * The SEA statement ID of the SQL statement executed for the latest condition evaluation. - * Populated for RESULT_VALUE_CHANGES, which executes the query through the SQL execution API. + * The ID of the SQL statement executed for the latest condition evaluation. Populated for both + * QUERY_RETURNS_ROWS and RESULT_VALUE_CHANGES. */ @JsonProperty("latest_condition_evaluation_sql_statement_id") private String latestConditionEvaluationSqlStatementId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionTriggerMode.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionTriggerMode.java index bc35d242e..65faceed0 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionTriggerMode.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SqlConditionTriggerMode.java @@ -12,8 +12,8 @@ * reading legacy data that predates this field. * `QUERY_RETURNS_ROWS`: Fires whenever the result * set has at least one row. Zero rows means the condition is not met. This is the original SQL * condition behavior. * `RESULT_VALUE_CHANGES`: Fires whenever the query's single result value - * differs from the previous evaluation. The first evaluation always fires. Queries must return - * exactly one cell (one row, one column). + * differs from the previous evaluation. The first evaluation stores the result as a baseline and + * does not fire. Queries must return exactly one cell (one row, one column). */ @Generated public enum SqlConditionTriggerMode { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/lakewatch/Datasource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/lakewatch/Datasource.java index 87de50e32..245934834 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/lakewatch/Datasource.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/lakewatch/Datasource.java @@ -67,9 +67,9 @@ public class Datasource { private String datasourceId; /** - * Name of the datasource in Unity Catalog, unique within its schema. Required on create and - * cannot be changed afterward. Reads return the value as supplied; the datasource's current Unity - * Catalog name, which reflects renames, is reported in `effective_datasource_name`. + * Name of the datasource in Unity Catalog, unique within its schema. Required on create and can + * be updated within the same catalog and schema. Get synchronizes this field with the current + * Unity Catalog name, also reported in `effective_datasource_name`. */ @JsonProperty("datasource_name") private String datasourceName; @@ -199,8 +199,8 @@ public class Datasource { /** * ID of the SQL warehouse that runs the checks Lakewatch performs to validate a create or update * request, such as source and destination access checks. Required and non-blank on every create - * and update request; there is no default warehouse. The requester must be able to use the - * warehouse. Used only for those checks: it is not stored, is not returned on reads, and does not + * and update request except a rename-only PATCH; there is no default warehouse. The requester + * must be able to use the warehouse. It is not stored, is not returned on reads, and does not * affect the compute that runs the ingestion job. */ @JsonProperty("warehouse_id") diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/lakewatch/Rule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/lakewatch/Rule.java index dae1247c2..d03b57116 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/lakewatch/Rule.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/lakewatch/Rule.java @@ -152,8 +152,9 @@ public class Rule { private String ruleId; /** - * Name of the rule within its Unity Catalog schema. Required. Cannot be changed after creation. - * Reads return the value as supplied; the current UC name is reported in `effective_rule_name`. + * Name of the rule within its Unity Catalog schema. Required on create; can be updated within the + * same catalog and schema. Get synchronizes this field with the current Unity Catalog name, also + * reported in `effective_rule_name`. */ @JsonProperty("rule_name") private String ruleName; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CronSchedule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CronSchedule.java index 9aaeba5c5..b143e6e89 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CronSchedule.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CronSchedule.java @@ -23,6 +23,18 @@ public class CronSchedule { @JsonProperty("mode") private CronScheduleMode mode; + /** + * Whether automatic materialization is paused. Defaults to `false`. Supported only for + * materializations in a materialization set. Use the `UpdateMaterializationSet` API to pause or + * resume the set. + * + *

Pausing does not cancel running or queued runs. Runs can still be triggered through the + * `TriggerMaterializationSet` API. Resuming does not submit a run. Creating a paused + * materialization skips its initial run. + */ + @JsonProperty("paused") + private Boolean paused; + /** * A Java timezone ID. The schedule is resolved with respect to this timezone. Defaults to UTC * when omitted. Can only be configured for MANUAL schedules; DERIVED schedules are always aligned @@ -49,6 +61,15 @@ public CronScheduleMode getMode() { return mode; } + public CronSchedule setPaused(Boolean paused) { + this.paused = paused; + return this; + } + + public Boolean getPaused() { + return paused; + } + public CronSchedule setTimezoneId(String timezoneId) { this.timezoneId = timezoneId; return this; @@ -65,12 +86,13 @@ public boolean equals(Object o) { CronSchedule that = (CronSchedule) o; return Objects.equals(cronExpression, that.cronExpression) && Objects.equals(mode, that.mode) + && Objects.equals(paused, that.paused) && Objects.equals(timezoneId, that.timezoneId); } @Override public int hashCode() { - return Objects.hash(cronExpression, mode, timezoneId); + return Objects.hash(cronExpression, mode, paused, timezoneId); } @Override @@ -78,6 +100,7 @@ public String toString() { return new ToStringer(CronSchedule.class) .add("cronExpression", cronExpression) .add("mode", mode) + .add("paused", paused) .add("timezoneId", timezoneId) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExternalTrigger.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExternalTrigger.java new file mode 100644 index 000000000..9d07ae849 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ExternalTrigger.java @@ -0,0 +1,33 @@ +// 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 java.util.Objects; + +/** + * A trigger that disables automatic materialization, including the initial run at creation. Runs + * are instead triggered through the `TriggerMaterializationSet` API. Supported only for batch + * materializations in a materialization set. + */ +@Generated +public class ExternalTrigger { + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + return new ToStringer(ExternalTrigger.class).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java index 2b9fd07c9..822922892 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java @@ -286,6 +286,27 @@ public PurgeFeatureEntitiesOperation purgeFeatureEntities(PurgeFeatureEntitiesRe return new PurgeFeatureEntitiesOperation(impl, operation); } + /** + * Requests materialization of all members of the set. The set must be nonempty and contain only + * batch materializations. Runs are allowed while automatic scheduling is paused. Requested runs + * may wait in a queue, subject to queue limits and expiry. + * + *

Returns a long-running operation that completes when every requested run reaches a terminal + * state. Success requires all runs and any required online synchronization to succeed. Individual + * outcomes are available in `MaterializationSetTriggerProgress`. + * + *

Use `CancelOperation` to request cancellation of this operation's unfinished work. + * Cancellation is best effort and does not undo completed writes. Online synchronization already + * in progress may continue. + * + *

Runs use the features' configured windows and settling delay. + */ + public TriggerMaterializationSetOperation triggerMaterializationSet( + TriggerMaterializationSetRequest request) { + Operation operation = impl.triggerMaterializationSet(request); + return new TriggerMaterializationSetOperation(impl, operation); + } + /** Update a Feature. */ public Feature updateFeature(UpdateFeatureRequest request) { return impl.updateFeature(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java index c41ec2303..37413f625 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java @@ -515,6 +515,30 @@ public Operation purgeFeatureEntities(PurgeFeatureEntitiesRequest request) { } } + @Override + public Operation triggerMaterializationSet(TriggerMaterializationSetRequest request) { + String path = + String.format( + "/api/2.0/feature-engineering/materialization-sets/%s/trigger", + request.getMaterializationSetId()); + try { + Request req = new Request("POST", path, apiClient.serialize(request)); + + if (request.getRequestId() == null || request.getRequestId().isEmpty()) { + request.setRequestId(UUID.randomUUID().toString()); + } + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Feature updateFeature(UpdateFeatureRequest request) { String path = String.format("/api/2.0/feature-engineering/features/%s", request.getFullName()); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringService.java index 8a8fdfc5c..0c9559861 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringService.java @@ -118,6 +118,24 @@ ListMaterializedFeaturesResponse listMaterializedFeatures( /** Purge materialized feature values for specified entities. */ Operation purgeFeatureEntities(PurgeFeatureEntitiesRequest purgeFeatureEntitiesRequest); + /** + * Requests materialization of all members of the set. The set must be nonempty and contain only + * batch materializations. Runs are allowed while automatic scheduling is paused. Requested runs + * may wait in a queue, subject to queue limits and expiry. + * + *

Returns a long-running operation that completes when every requested run reaches a terminal + * state. Success requires all runs and any required online synchronization to succeed. Individual + * outcomes are available in `MaterializationSetTriggerProgress`. + * + *

Use `CancelOperation` to request cancellation of this operation's unfinished work. + * Cancellation is best effort and does not undo completed writes. Online synchronization already + * in progress may continue. + * + *

Runs use the features' configured windows and settling delay. + */ + Operation triggerMaterializationSet( + TriggerMaterializationSetRequest triggerMaterializationSetRequest); + /** Update a Feature. */ Feature updateFeature(UpdateFeatureRequest updateFeatureRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationRunProgress.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationRunProgress.java new file mode 100644 index 000000000..66ef62f9d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationRunProgress.java @@ -0,0 +1,77 @@ +// 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.Collection; +import java.util.Objects; + +/** Progress of a requested run, which may materialize multiple members of the set. */ +@Generated +public class MaterializationRunProgress { + /** The failure, including a failure to submit the run. Present when `state` is `FAILED`. */ + @JsonProperty("error") + private DatabricksServiceExceptionWithDetailsProto error; + + /** IDs of the materialized features assigned to this run when the operation was created. */ + @JsonProperty("materialized_feature_ids") + private Collection materializedFeatureIds; + + /** Current state of the requested run. */ + @JsonProperty("state") + private MaterializationRunProgressState state; + + public MaterializationRunProgress setError(DatabricksServiceExceptionWithDetailsProto error) { + this.error = error; + return this; + } + + public DatabricksServiceExceptionWithDetailsProto getError() { + return error; + } + + public MaterializationRunProgress setMaterializedFeatureIds( + Collection materializedFeatureIds) { + this.materializedFeatureIds = materializedFeatureIds; + return this; + } + + public Collection getMaterializedFeatureIds() { + return materializedFeatureIds; + } + + public MaterializationRunProgress setState(MaterializationRunProgressState state) { + this.state = state; + return this; + } + + public MaterializationRunProgressState getState() { + return state; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MaterializationRunProgress that = (MaterializationRunProgress) o; + return Objects.equals(error, that.error) + && Objects.equals(materializedFeatureIds, that.materializedFeatureIds) + && Objects.equals(state, that.state); + } + + @Override + public int hashCode() { + return Objects.hash(error, materializedFeatureIds, state); + } + + @Override + public String toString() { + return new ToStringer(MaterializationRunProgress.class) + .add("error", error) + .add("materializedFeatureIds", materializedFeatureIds) + .add("state", state) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationRunProgressState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationRunProgressState.java new file mode 100644 index 000000000..dd3710638 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationRunProgressState.java @@ -0,0 +1,15 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.ml; + +import com.databricks.sdk.support.Generated; + +/** Lifecycle state of a requested materialization run. */ +@Generated +public enum MaterializationRunProgressState { + CANCELLED, + FAILED, + PENDING, + RUNNING, + SUCCEEDED, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationSetOperationMetadata.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationSetOperationMetadata.java index d38737f02..4443fbe32 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationSetOperationMetadata.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationSetOperationMetadata.java @@ -32,6 +32,10 @@ public class MaterializationSetOperationMetadata { @JsonProperty("state") private MaterializationSetOperationMetadataState state; + /** Set by a `TriggerMaterializationSet` operation. */ + @JsonProperty("trigger_progress") + private MaterializationSetTriggerProgress triggerProgress; + /** Set by an `UpdateMaterializationSet` operation. */ @JsonProperty("update_progress") private MaterializationSetUpdateProgress updateProgress; @@ -84,6 +88,16 @@ public MaterializationSetOperationMetadataState getState() { return state; } + public MaterializationSetOperationMetadata setTriggerProgress( + MaterializationSetTriggerProgress triggerProgress) { + this.triggerProgress = triggerProgress; + return this; + } + + public MaterializationSetTriggerProgress getTriggerProgress() { + return triggerProgress; + } + public MaterializationSetOperationMetadata setUpdateProgress( MaterializationSetUpdateProgress updateProgress) { this.updateProgress = updateProgress; @@ -104,6 +118,7 @@ public boolean equals(Object o) { && Objects.equals(featureFullNames, that.featureFullNames) && Objects.equals(materializationSetId, that.materializationSetId) && Objects.equals(state, that.state) + && Objects.equals(triggerProgress, that.triggerProgress) && Objects.equals(updateProgress, that.updateProgress); } @@ -115,6 +130,7 @@ public int hashCode() { featureFullNames, materializationSetId, state, + triggerProgress, updateProgress); } @@ -126,6 +142,7 @@ public String toString() { .add("featureFullNames", featureFullNames) .add("materializationSetId", materializationSetId) .add("state", state) + .add("triggerProgress", triggerProgress) .add("updateProgress", updateProgress) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationSetTriggerProgress.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationSetTriggerProgress.java new file mode 100644 index 000000000..3e687542e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationSetTriggerProgress.java @@ -0,0 +1,50 @@ +// 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.Collection; +import java.util.Objects; + +/** + * Progress and outcomes of the runs requested by `TriggerMaterializationSet`. Entries remain + * available after the operation finishes. + * + *

Once all requested runs have finished, the operation fails if any run failed. Otherwise, it is + * cancelled if any run was cancelled, and succeeds if all runs succeeded. + */ +@Generated +public class MaterializationSetTriggerProgress { + /** One entry per requested run, including runs that fail or are cancelled before submission. */ + @JsonProperty("runs") + private Collection runs; + + public MaterializationSetTriggerProgress setRuns(Collection runs) { + this.runs = runs; + return this; + } + + public Collection getRuns() { + return runs; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MaterializationSetTriggerProgress that = (MaterializationSetTriggerProgress) o; + return Objects.equals(runs, that.runs); + } + + @Override + public int hashCode() { + return Objects.hash(runs); + } + + @Override + public String toString() { + return new ToStringer(MaterializationSetTriggerProgress.class).add("runs", runs).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java index 1d4e89dae..debcc5014 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java @@ -26,6 +26,14 @@ public class MaterializedFeature { @JsonProperty("cron_schedule_trigger") private CronSchedule cronScheduleTrigger; + /** + * A trigger that disables automatic materialization, including the initial run at creation. Runs + * are instead triggered through the `TriggerMaterializationSet` API. Supported only for batch + * materializations in a materialization set. + */ + @JsonProperty("external_trigger") + private ExternalTrigger externalTrigger; + /** The full name of the feature in Unity Catalog. */ @JsonProperty("feature_name") private String featureName; @@ -155,6 +163,15 @@ public CronSchedule getCronScheduleTrigger() { return cronScheduleTrigger; } + public MaterializedFeature setExternalTrigger(ExternalTrigger externalTrigger) { + this.externalTrigger = externalTrigger; + return this; + } + + public ExternalTrigger getExternalTrigger() { + return externalTrigger; + } + public MaterializedFeature setFeatureName(String featureName) { this.featureName = featureName; return this; @@ -308,6 +325,7 @@ public boolean equals(Object o) { return Objects.equals(budgetPolicyId, that.budgetPolicyId) && Objects.equals(cronSchedule, that.cronSchedule) && Objects.equals(cronScheduleTrigger, that.cronScheduleTrigger) + && Objects.equals(externalTrigger, that.externalTrigger) && Objects.equals(featureName, that.featureName) && Objects.equals(isOnline, that.isOnline) && Objects.equals(jobId, that.jobId) @@ -332,6 +350,7 @@ public int hashCode() { budgetPolicyId, cronSchedule, cronScheduleTrigger, + externalTrigger, featureName, isOnline, jobId, @@ -356,6 +375,7 @@ public String toString() { .add("budgetPolicyId", budgetPolicyId) .add("cronSchedule", cronSchedule) .add("cronScheduleTrigger", cronScheduleTrigger) + .add("externalTrigger", externalTrigger) .add("featureName", featureName) .add("isOnline", isOnline) .add("jobId", jobId) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SdpSource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SdpSource.java index ac494d69a..c496f2166 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SdpSource.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SdpSource.java @@ -30,7 +30,7 @@ public class SdpSource { * The full three-part names of the tables the pipeline reads from. Required to materialize this * feature with a TableTrigger, which starts a run when these tables update. Each table must exist * when the feature is created. Feature Store doesn't confirm that the pipeline reads from these - * tables. At most 100 tables. + * tables. At most 25 tables. */ @JsonProperty("input_tables") private Collection inputTables; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TableTrigger.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TableTrigger.java index 534ad28ed..845ff41db 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TableTrigger.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TableTrigger.java @@ -30,6 +30,18 @@ public class TableTrigger { @JsonProperty("min_time_between_triggers") private Duration minTimeBetweenTriggers; + /** + * Whether automatic materialization is paused. Defaults to `false`. Supported only for + * materializations in a materialization set. Use the `UpdateMaterializationSet` API to pause or + * resume the set. + * + *

Pausing does not cancel running or queued runs. Runs can still be triggered through the + * `TriggerMaterializationSet` API. Resuming does not submit a run. Creating a paused + * materialization skips its initial run. + */ + @JsonProperty("paused") + private Boolean paused; + /** * How long the source table must go without updates before a run starts, so a series of updates * settles before the run. If not set, a run starts as soon as the source table updates. @@ -55,6 +67,15 @@ public Duration getMinTimeBetweenTriggers() { return minTimeBetweenTriggers; } + public TableTrigger setPaused(Boolean paused) { + this.paused = paused; + return this; + } + + public Boolean getPaused() { + return paused; + } + public TableTrigger setWaitAfterLastChange(Duration waitAfterLastChange) { this.waitAfterLastChange = waitAfterLastChange; return this; @@ -71,12 +92,13 @@ public boolean equals(Object o) { TableTrigger that = (TableTrigger) o; return Objects.equals(condition, that.condition) && Objects.equals(minTimeBetweenTriggers, that.minTimeBetweenTriggers) + && Objects.equals(paused, that.paused) && Objects.equals(waitAfterLastChange, that.waitAfterLastChange); } @Override public int hashCode() { - return Objects.hash(condition, minTimeBetweenTriggers, waitAfterLastChange); + return Objects.hash(condition, minTimeBetweenTriggers, paused, waitAfterLastChange); } @Override @@ -84,6 +106,7 @@ public String toString() { return new ToStringer(TableTrigger.class) .add("condition", condition) .add("minTimeBetweenTriggers", minTimeBetweenTriggers) + .add("paused", paused) .add("waitAfterLastChange", waitAfterLastChange) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetOperation.java new file mode 100644 index 000000000..225014a66 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetOperation.java @@ -0,0 +1,174 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.ml; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running triggerMaterializationSet operation. Provides methods + * to wait for completion, check status, cancel, and access metadata. + */ +@Generated +public class TriggerMaterializationSetOperation { + private static final Logger LOG = + LoggerFactory.getLogger(TriggerMaterializationSetOperation.class); + + private final FeatureEngineeringService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public TriggerMaterializationSetOperation(FeatureEngineeringService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting TriggerMaterializationSetResponse. + * Waits indefinitely if no timeout is specified. + * + * @return the created TriggerMaterializationSetResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public TriggerMaterializationSetResponse waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting TriggerMaterializationSetResponse. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created TriggerMaterializationSetResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public TriggerMaterializationSetResponse waitForCompletion(Optional options) + throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, TriggerMaterializationSetResponse.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal triggerMaterializationSetResponse response: " + e.getMessage(), + e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Cancel the operation. + * + * @throws DatabricksException if the cancellation fails + */ + public void cancel() { + impl.cancelOperation(new CancelOperationRequest().setName(operation.getName())); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public MaterializationSetOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, MaterializationSetOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetRequest.java new file mode 100644 index 000000000..a5330aff8 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetRequest.java @@ -0,0 +1,64 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Request to trigger materialization for a materialization set. */ +@Generated +public class TriggerMaterializationSetRequest { + /** The ID of the materialization set to trigger. */ + @JsonIgnore private String materializationSetId; + + /** + * Idempotency token in UUID format. Reusing it returns the original operation without starting + * additional runs, even if the request differs or the operation has finished. If omitted, each + * request triggers independently. + */ + @JsonProperty("request_id") + private String requestId; + + public TriggerMaterializationSetRequest setMaterializationSetId(String materializationSetId) { + this.materializationSetId = materializationSetId; + return this; + } + + public String getMaterializationSetId() { + return materializationSetId; + } + + public TriggerMaterializationSetRequest setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + public String getRequestId() { + return requestId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TriggerMaterializationSetRequest that = (TriggerMaterializationSetRequest) o; + return Objects.equals(materializationSetId, that.materializationSetId) + && Objects.equals(requestId, that.requestId); + } + + @Override + public int hashCode() { + return Objects.hash(materializationSetId, requestId); + } + + @Override + public String toString() { + return new ToStringer(TriggerMaterializationSetRequest.class) + .add("materializationSetId", materializationSetId) + .add("requestId", requestId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetResponse.java new file mode 100644 index 000000000..c63764e3f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TriggerMaterializationSetResponse.java @@ -0,0 +1,29 @@ +// 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 java.util.Objects; + +/** Result of a successful `TriggerMaterializationSet` operation. */ +@Generated +public class TriggerMaterializationSetResponse { + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + return new ToStringer(TriggerMaterializationSetResponse.class).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsOperation.java new file mode 100644 index 000000000..84c1e80ab --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsOperation.java @@ -0,0 +1,168 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running acknowledgeAssessmentWarnings operation. Provides + * methods to wait for completion, check status, cancel, and access metadata. + */ +@Generated +public class AcknowledgeAssessmentWarningsOperation { + private static final Logger LOG = + LoggerFactory.getLogger(AcknowledgeAssessmentWarningsOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public AcknowledgeAssessmentWarningsOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting + * AcknowledgeAssessmentWarningsResponse. Waits indefinitely if no timeout is specified. + * + * @return the created AcknowledgeAssessmentWarningsResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public AcknowledgeAssessmentWarningsResponse waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting + * AcknowledgeAssessmentWarningsResponse. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created AcknowledgeAssessmentWarningsResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public AcknowledgeAssessmentWarningsResponse waitForCompletion(Optional options) + throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue( + responseJson, AcknowledgeAssessmentWarningsResponse.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal acknowledgeAssessmentWarningsResponse response: " + + e.getMessage(), + e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public MigrationOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, MigrationOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsRequest.java new file mode 100644 index 000000000..7316ebe55 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsRequest.java @@ -0,0 +1,45 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +/** Request to acknowledge assessment warnings. */ +@Generated +public class AcknowledgeAssessmentWarningsRequest { + /** + * Required. The assessment resource name, in the format + * `migrations/{migration}/assessments/{assessment}`. + */ + @JsonIgnore private String name; + + public AcknowledgeAssessmentWarningsRequest 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; + AcknowledgeAssessmentWarningsRequest that = (AcknowledgeAssessmentWarningsRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(AcknowledgeAssessmentWarningsRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsResponse.java new file mode 100644 index 000000000..8310a61b4 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AcknowledgeAssessmentWarningsResponse.java @@ -0,0 +1,45 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Response produced after assessment warnings are acknowledged. */ +@Generated +public class AcknowledgeAssessmentWarningsResponse { + /** The assessment after its warnings are acknowledged. */ + @JsonProperty("assessment") + private Assessment assessment; + + public AcknowledgeAssessmentWarningsResponse setAssessment(Assessment assessment) { + this.assessment = assessment; + return this; + } + + public Assessment getAssessment() { + return assessment; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AcknowledgeAssessmentWarningsResponse that = (AcknowledgeAssessmentWarningsResponse) o; + return Objects.equals(assessment, that.assessment); + } + + @Override + public int hashCode() { + return Objects.hash(assessment); + } + + @Override + public String toString() { + return new ToStringer(AcknowledgeAssessmentWarningsResponse.class) + .add("assessment", assessment) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationOperation.java new file mode 100644 index 000000000..17a6547d6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationOperation.java @@ -0,0 +1,163 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running assessMigration operation. Provides methods to wait + * for completion, check status, cancel, and access metadata. + */ +@Generated +public class AssessMigrationOperation { + private static final Logger LOG = LoggerFactory.getLogger(AssessMigrationOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public AssessMigrationOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting AssessMigrationResponse. Waits + * indefinitely if no timeout is specified. + * + * @return the created AssessMigrationResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public AssessMigrationResponse waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting AssessMigrationResponse. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created AssessMigrationResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public AssessMigrationResponse waitForCompletion(Optional options) + throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, AssessMigrationResponse.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal assessMigrationResponse response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public MigrationOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, MigrationOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationRequest.java new file mode 100644 index 000000000..8af73c2ad --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationRequest.java @@ -0,0 +1,42 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +/** Request to assess a migration. */ +@Generated +public class AssessMigrationRequest { + /** Required. The migration resource name, in the format `migrations/{migration}`. */ + @JsonIgnore private String name; + + public AssessMigrationRequest 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; + AssessMigrationRequest that = (AssessMigrationRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(AssessMigrationRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationResponse.java new file mode 100644 index 000000000..a46be739b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessMigrationResponse.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Response produced after an assessment run is created. */ +@Generated +public class AssessMigrationResponse { + /** The assessment run created for the migration. */ + @JsonProperty("assessment") + private Assessment assessment; + + public AssessMigrationResponse setAssessment(Assessment assessment) { + this.assessment = assessment; + return this; + } + + public Assessment getAssessment() { + return assessment; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AssessMigrationResponse that = (AssessMigrationResponse) o; + return Objects.equals(assessment, that.assessment); + } + + @Override + public int hashCode() { + return Objects.hash(assessment); + } + + @Override + public String toString() { + return new ToStringer(AssessMigrationResponse.class).add("assessment", assessment).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Assessment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Assessment.java new file mode 100644 index 000000000..3e65b1b6c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Assessment.java @@ -0,0 +1,127 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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.Collection; +import java.util.Objects; + +/** + * A server-managed assessment of a migration's source configuration. Completed check results are + * immutable. + */ +@Generated +public class Assessment { + /** Output-only. Results of the checks performed by this assessment. */ + @JsonProperty("checks") + private Collection checks; + + /** Output-only. The time when the assessment completed. */ + @JsonProperty("complete_time") + private Timestamp completeTime; + + /** Output-only. The time when the assessment started. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** Output-only. The time when the assessment expires. */ + @JsonProperty("expire_time") + private Timestamp expireTime; + + /** + * The assessment resource name, in the format `migrations/{migration}/assessments/{assessment}`. + */ + @JsonProperty("name") + private String name; + + /** Output-only. The aggregate assessment state. */ + @JsonProperty("state") + private AssessmentState state; + + public Assessment setChecks(Collection checks) { + this.checks = checks; + return this; + } + + public Collection getChecks() { + return checks; + } + + public Assessment setCompleteTime(Timestamp completeTime) { + this.completeTime = completeTime; + return this; + } + + public Timestamp getCompleteTime() { + return completeTime; + } + + public Assessment setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public Assessment setExpireTime(Timestamp expireTime) { + this.expireTime = expireTime; + return this; + } + + public Timestamp getExpireTime() { + return expireTime; + } + + public Assessment setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public Assessment setState(AssessmentState state) { + this.state = state; + return this; + } + + public AssessmentState getState() { + return state; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Assessment that = (Assessment) o; + return Objects.equals(checks, that.checks) + && Objects.equals(completeTime, that.completeTime) + && Objects.equals(createTime, that.createTime) + && Objects.equals(expireTime, that.expireTime) + && Objects.equals(name, that.name) + && Objects.equals(state, that.state); + } + + @Override + public int hashCode() { + return Objects.hash(checks, completeTime, createTime, expireTime, name, state); + } + + @Override + public String toString() { + return new ToStringer(Assessment.class) + .add("checks", checks) + .add("completeTime", completeTime) + .add("createTime", createTime) + .add("expireTime", expireTime) + .add("name", name) + .add("state", state) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheck.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheck.java new file mode 100644 index 000000000..a42382584 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheck.java @@ -0,0 +1,123 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** The result of one assessment check. */ +@Generated +public class AssessmentCheck { + /** Output-only. Whether this result blocks migration from starting. */ + @JsonProperty("blocks_migration") + private Boolean blocksMigration; + + /** Output-only. Stable identifier of the check. */ + @JsonProperty("check_id") + private String checkId; + + /** + * Output-only. The source database the check evaluated. Unset for checks that assess the whole + * source server rather than a single database. + */ + @JsonProperty("database") + private String database; + + /** Output-only. Measurements observed by this check. Absent when unavailable. */ + @JsonProperty("details") + private AssessmentCheckDetails details; + + /** Output-only. Explanation of the result. */ + @JsonProperty("reason") + private String reason; + + /** Output-only. The check verdict. */ + @JsonProperty("verdict") + private AssessmentCheckVerdict verdict; + + public AssessmentCheck setBlocksMigration(Boolean blocksMigration) { + this.blocksMigration = blocksMigration; + return this; + } + + public Boolean getBlocksMigration() { + return blocksMigration; + } + + public AssessmentCheck setCheckId(String checkId) { + this.checkId = checkId; + return this; + } + + public String getCheckId() { + return checkId; + } + + public AssessmentCheck setDatabase(String database) { + this.database = database; + return this; + } + + public String getDatabase() { + return database; + } + + public AssessmentCheck setDetails(AssessmentCheckDetails details) { + this.details = details; + return this; + } + + public AssessmentCheckDetails getDetails() { + return details; + } + + public AssessmentCheck setReason(String reason) { + this.reason = reason; + return this; + } + + public String getReason() { + return reason; + } + + public AssessmentCheck setVerdict(AssessmentCheckVerdict verdict) { + this.verdict = verdict; + return this; + } + + public AssessmentCheckVerdict getVerdict() { + return verdict; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AssessmentCheck that = (AssessmentCheck) o; + return Objects.equals(blocksMigration, that.blocksMigration) + && Objects.equals(checkId, that.checkId) + && Objects.equals(database, that.database) + && Objects.equals(details, that.details) + && Objects.equals(reason, that.reason) + && Objects.equals(verdict, that.verdict); + } + + @Override + public int hashCode() { + return Objects.hash(blocksMigration, checkId, database, details, reason, verdict); + } + + @Override + public String toString() { + return new ToStringer(AssessmentCheck.class) + .add("blocksMigration", blocksMigration) + .add("checkId", checkId) + .add("database", database) + .add("details", details) + .add("reason", reason) + .add("verdict", verdict) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheckDetails.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheckDetails.java new file mode 100644 index 000000000..4f69916bf --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheckDetails.java @@ -0,0 +1,60 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Measurements observed when an assessment check ran. Unset for older assessments. */ +@Generated +public class AssessmentCheckDetails { + /** Output-only. Physical size of the source database observed by this check. */ + @JsonProperty("database_size") + private DatabaseSizeDetails databaseSize; + + /** Output-only. Age of the oldest source transaction observed by this check. */ + @JsonProperty("long_transaction") + private LongTransactionDetails longTransaction; + + public AssessmentCheckDetails setDatabaseSize(DatabaseSizeDetails databaseSize) { + this.databaseSize = databaseSize; + return this; + } + + public DatabaseSizeDetails getDatabaseSize() { + return databaseSize; + } + + public AssessmentCheckDetails setLongTransaction(LongTransactionDetails longTransaction) { + this.longTransaction = longTransaction; + return this; + } + + public LongTransactionDetails getLongTransaction() { + return longTransaction; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AssessmentCheckDetails that = (AssessmentCheckDetails) o; + return Objects.equals(databaseSize, that.databaseSize) + && Objects.equals(longTransaction, that.longTransaction); + } + + @Override + public int hashCode() { + return Objects.hash(databaseSize, longTransaction); + } + + @Override + public String toString() { + return new ToStringer(AssessmentCheckDetails.class) + .add("databaseSize", databaseSize) + .add("longTransaction", longTransaction) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheckVerdict.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheckVerdict.java new file mode 100644 index 000000000..0e1f93d9c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentCheckVerdict.java @@ -0,0 +1,15 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; + +/** The verdict of a single assessment check. */ +@Generated +public enum AssessmentCheckVerdict { + ASSESSMENT_CHECK_VERDICT_ACTION_REQUIRED, + ASSESSMENT_CHECK_VERDICT_ERROR, + ASSESSMENT_CHECK_VERDICT_PASS, + ASSESSMENT_CHECK_VERDICT_UNSUPPORTED, + ASSESSMENT_CHECK_VERDICT_WARNING, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentState.java new file mode 100644 index 000000000..bab3ee3bd --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/AssessmentState.java @@ -0,0 +1,17 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; + +/** The aggregate state of an assessment run. */ +@Generated +public enum AssessmentState { + ASSESSMENT_STATE_ASSESSING, + ASSESSMENT_STATE_AWAITING_ACK, + ASSESSMENT_STATE_BLOCKED, + ASSESSMENT_STATE_EXPIRED, + ASSESSMENT_STATE_FAILED, + ASSESSMENT_STATE_NEEDS_ACTION, + ASSESSMENT_STATE_READY, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateMigrationOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateMigrationOperation.java new file mode 100644 index 000000000..45ff9b560 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateMigrationOperation.java @@ -0,0 +1,162 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running createMigration operation. Provides methods to wait + * for completion, check status, cancel, and access metadata. + */ +@Generated +public class CreateMigrationOperation { + private static final Logger LOG = LoggerFactory.getLogger(CreateMigrationOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public CreateMigrationOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting Migration. Waits indefinitely if no + * timeout is specified. + * + * @return the created Migration + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public Migration waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting Migration. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created Migration + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public Migration waitForCompletion(Optional options) throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, Migration.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal migration response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public MigrationOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, MigrationOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateMigrationRequest.java new file mode 100644 index 000000000..7c35eb149 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateMigrationRequest.java @@ -0,0 +1,66 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 CreateMigrationRequest { + /** Required. The migration to create. */ + @JsonProperty("migration") + private Migration migration; + + /** + * Required. The ID to use for the migration. It becomes the final component of the resource name + * (`migrations/{migration_id}`). It must be 1-63 characters long, start with a lowercase letter, + * and contain only lowercase letters, numbers, and hyphens. + */ + @JsonIgnore + @QueryParam("migration_id") + private String migrationId; + + public CreateMigrationRequest setMigration(Migration migration) { + this.migration = migration; + return this; + } + + public Migration getMigration() { + return migration; + } + + public CreateMigrationRequest setMigrationId(String migrationId) { + this.migrationId = migrationId; + return this; + } + + public String getMigrationId() { + return migrationId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreateMigrationRequest that = (CreateMigrationRequest) o; + return Objects.equals(migration, that.migration) + && Objects.equals(migrationId, that.migrationId); + } + + @Override + public int hashCode() { + return Objects.hash(migration, migrationId); + } + + @Override + public String toString() { + return new ToStringer(CreateMigrationRequest.class) + .add("migration", migration) + .add("migrationId", migrationId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateRoleRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateRoleRequest.java index 45dc36472..41d80f4b9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateRoleRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateRoleRequest.java @@ -21,11 +21,12 @@ public class CreateRoleRequest { * *

When the role already exists, only mutable fields are updated. Attributes omitted from the * request retain their current values. Set an attribute explicitly to false to disable it. - * `identity_type`, `auth_method`, and `postgres_role` retain their existing values; supplied - * values for these fields are ignored. `membership_roles` is overwritten, not merged. Leaving - * `membership_roles` empty clears all of the role's existing memberships, including - * `DATABRICKS_SUPERUSER`. Always send the complete desired list of memberships when using this - * field. + * `identity_type`, `auth_method`, and `postgres_role` retain their existing values. Omit these + * fields or supply their current values. A differing supplied value returns + * INVALID_PARAMETER_VALUE and rejects the entire request, including changes to mutable fields. + * `membership_roles` is overwritten, not merged. Leaving `membership_roles` empty clears all of + * the role's existing memberships, including `DATABRICKS_SUPERUSER`. Always send the complete + * desired list of memberships when using this field. */ @JsonIgnore @QueryParam("replace_existing") diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseMapping.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseMapping.java new file mode 100644 index 000000000..e8b6aaf93 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseMapping.java @@ -0,0 +1,81 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A mapping between one source and target database. */ +@Generated +public class DatabaseMapping { + /** + * Output-only. The resolved target PostgreSQL database name. Equal to `target_database` when + * provided; otherwise equal to `source_database`. + */ + @JsonProperty("effective_target_database") + private String effectiveTargetDatabase; + + /** Required. The exact PostgreSQL database name on the source server. */ + @JsonProperty("source_database") + private String sourceDatabase; + + /** + * The PostgreSQL database name to create on the target branch. When omitted, the source database + * name is preserved. + */ + @JsonProperty("target_database") + private String targetDatabase; + + public DatabaseMapping setEffectiveTargetDatabase(String effectiveTargetDatabase) { + this.effectiveTargetDatabase = effectiveTargetDatabase; + return this; + } + + public String getEffectiveTargetDatabase() { + return effectiveTargetDatabase; + } + + public DatabaseMapping setSourceDatabase(String sourceDatabase) { + this.sourceDatabase = sourceDatabase; + return this; + } + + public String getSourceDatabase() { + return sourceDatabase; + } + + public DatabaseMapping setTargetDatabase(String targetDatabase) { + this.targetDatabase = targetDatabase; + return this; + } + + public String getTargetDatabase() { + return targetDatabase; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DatabaseMapping that = (DatabaseMapping) o; + return Objects.equals(effectiveTargetDatabase, that.effectiveTargetDatabase) + && Objects.equals(sourceDatabase, that.sourceDatabase) + && Objects.equals(targetDatabase, that.targetDatabase); + } + + @Override + public int hashCode() { + return Objects.hash(effectiveTargetDatabase, sourceDatabase, targetDatabase); + } + + @Override + public String toString() { + return new ToStringer(DatabaseMapping.class) + .add("effectiveTargetDatabase", effectiveTargetDatabase) + .add("sourceDatabase", sourceDatabase) + .add("targetDatabase", targetDatabase) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseSizeDetails.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseSizeDetails.java new file mode 100644 index 000000000..672d425d2 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseSizeDetails.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Physical database size, including indexes and bloat; not a dump archive size estimate. */ +@Generated +public class DatabaseSizeDetails { + /** Size reported by pg_database_size, in bytes. Zero is a measured empty size. */ + @JsonProperty("size_bytes") + private Long sizeBytes; + + public DatabaseSizeDetails setSizeBytes(Long sizeBytes) { + this.sizeBytes = sizeBytes; + return this; + } + + public Long getSizeBytes() { + return sizeBytes; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DatabaseSizeDetails that = (DatabaseSizeDetails) o; + return Objects.equals(sizeBytes, that.sizeBytes); + } + + @Override + public int hashCode() { + return Objects.hash(sizeBytes); + } + + @Override + public String toString() { + return new ToStringer(DatabaseSizeDetails.class).add("sizeBytes", sizeBytes).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteMigrationOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteMigrationOperation.java new file mode 100644 index 000000000..bb6b6fd32 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteMigrationOperation.java @@ -0,0 +1,162 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running deleteMigration operation. Provides methods to wait + * for completion, check status, cancel, and access metadata. + */ +@Generated +public class DeleteMigrationOperation { + private static final Logger LOG = LoggerFactory.getLogger(DeleteMigrationOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public DeleteMigrationOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting Migration. Waits indefinitely if no + * timeout is specified. + * + * @return the created Migration + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public Migration waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting Migration. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created Migration + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public Migration waitForCompletion(Optional options) throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, Migration.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal migration response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public MigrationOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, MigrationOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteMigrationRequest.java new file mode 100644 index 000000000..39abdbdcc --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteMigrationRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 DeleteMigrationRequest { + /** Required. The migration resource name, in the format `migrations/{migration}`. */ + @JsonIgnore private String name; + + public DeleteMigrationRequest 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; + DeleteMigrationRequest that = (DeleteMigrationRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(DeleteMigrationRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetAssessmentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetAssessmentRequest.java new file mode 100644 index 000000000..386c7b18f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetAssessmentRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 GetAssessmentRequest { + /** + * Required. The assessment resource name, in the format + * `migrations/{migration}/assessments/{assessment}`. + */ + @JsonIgnore private String name; + + public GetAssessmentRequest 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; + GetAssessmentRequest that = (GetAssessmentRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetAssessmentRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetMigrationRequest.java new file mode 100644 index 000000000..b581442b1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetMigrationRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 GetMigrationRequest { + /** Required. The migration resource name, in the format `migrations/{migration}`. */ + @JsonIgnore private String name; + + public GetMigrationRequest 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; + GetMigrationRequest that = (GetMigrationRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetMigrationRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListAssessmentsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListAssessmentsRequest.java new file mode 100644 index 000000000..8f0f82da5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListAssessmentsRequest.java @@ -0,0 +1,79 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 ListAssessmentsRequest { + /** + * The maximum number of assessments to return. The server default is 100; values above 1000 are + * capped to 1000. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** A page token from a previous call. */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** Required. The parent migration resource name, in the format `migrations/{migration}`. */ + @JsonIgnore private String parent; + + public ListAssessmentsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListAssessmentsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListAssessmentsRequest 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; + ListAssessmentsRequest that = (ListAssessmentsRequest) 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(ListAssessmentsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListAssessmentsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListAssessmentsResponse.java new file mode 100644 index 000000000..2f9a77ea9 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListAssessmentsResponse.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 to list assessments. */ +@Generated +public class ListAssessmentsResponse { + /** Assessment runs ordered from newest to oldest. */ + @JsonProperty("assessments") + private Collection assessments; + + /** A token for retrieving the next page. Empty when there are no more results. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + public ListAssessmentsResponse setAssessments(Collection assessments) { + this.assessments = assessments; + return this; + } + + public Collection getAssessments() { + return assessments; + } + + public ListAssessmentsResponse 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; + ListAssessmentsResponse that = (ListAssessmentsResponse) o; + return Objects.equals(assessments, that.assessments) + && Objects.equals(nextPageToken, that.nextPageToken); + } + + @Override + public int hashCode() { + return Objects.hash(assessments, nextPageToken); + } + + @Override + public String toString() { + return new ToStringer(ListAssessmentsResponse.class) + .add("assessments", assessments) + .add("nextPageToken", nextPageToken) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListMigrationsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListMigrationsRequest.java new file mode 100644 index 000000000..4e73cac74 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListMigrationsRequest.java @@ -0,0 +1,84 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 ListMigrationsRequest { + /** + * The maximum number of migrations to return. The server default is 100; values above 1000 are + * capped to 1000. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** A page token from a previous call. */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** + * Whether to include soft-deleted migrations in the response. Hard-deleted and already-purged + * migrations are never returned. + */ + @JsonIgnore + @QueryParam("show_deleted") + private Boolean showDeleted; + + public ListMigrationsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListMigrationsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListMigrationsRequest setShowDeleted(Boolean showDeleted) { + this.showDeleted = showDeleted; + return this; + } + + public Boolean getShowDeleted() { + return showDeleted; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListMigrationsRequest that = (ListMigrationsRequest) o; + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(showDeleted, that.showDeleted); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken, showDeleted); + } + + @Override + public String toString() { + return new ToStringer(ListMigrationsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("showDeleted", showDeleted) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListMigrationsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListMigrationsResponse.java new file mode 100644 index 000000000..8a0808a61 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListMigrationsResponse.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 to list migrations. */ +@Generated +public class ListMigrationsResponse { + /** Migrations visible to the caller. */ + @JsonProperty("migrations") + private Collection migrations; + + /** A token for retrieving the next page. Empty when there are no more results. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + public ListMigrationsResponse setMigrations(Collection migrations) { + this.migrations = migrations; + return this; + } + + public Collection getMigrations() { + return migrations; + } + + public ListMigrationsResponse 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; + ListMigrationsResponse that = (ListMigrationsResponse) o; + return Objects.equals(migrations, that.migrations) + && Objects.equals(nextPageToken, that.nextPageToken); + } + + @Override + public int hashCode() { + return Objects.hash(migrations, nextPageToken); + } + + @Override + public String toString() { + return new ToStringer(ListMigrationsResponse.class) + .add("migrations", migrations) + .add("nextPageToken", nextPageToken) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/LongTransactionDetails.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/LongTransactionDetails.java new file mode 100644 index 000000000..b5f50b4d9 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/LongTransactionDetails.java @@ -0,0 +1,46 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Duration; +import java.util.Objects; + +/** Oldest active source transaction at assessment time. */ +@Generated +public class LongTransactionDetails { + /** Age of the oldest active transaction when assessed. Zero when none is active. */ + @JsonProperty("oldest_transaction_age") + private Duration oldestTransactionAge; + + public LongTransactionDetails setOldestTransactionAge(Duration oldestTransactionAge) { + this.oldestTransactionAge = oldestTransactionAge; + return this; + } + + public Duration getOldestTransactionAge() { + return oldestTransactionAge; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LongTransactionDetails that = (LongTransactionDetails) o; + return Objects.equals(oldestTransactionAge, that.oldestTransactionAge); + } + + @Override + public int hashCode() { + return Objects.hash(oldestTransactionAge); + } + + @Override + public String toString() { + return new ToStringer(LongTransactionDetails.class) + .add("oldestTransactionAge", oldestTransactionAge) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Migration.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Migration.java new file mode 100644 index 000000000..7393ed759 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Migration.java @@ -0,0 +1,220 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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.Collection; +import java.util.Objects; + +/** A managed migration of PostgreSQL databases into a Lakebase branch. */ +@Generated +public class Migration { + /** Output-only. The time when the migration was created. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** Required. Mappings from source databases to target databases. */ + @JsonProperty("database_mappings") + private Collection databaseMappings; + + /** + * Output-only. The time when the migration was soft-deleted. Empty if the migration is active. + */ + @JsonProperty("delete_time") + private Timestamp deleteTime; + + /** Output-only. The current error preventing migration progress, if any. */ + @JsonProperty("error") + private MigrationError error; + + /** Required. Immutable. The intended migration mode, selected when the migration is created. */ + @JsonProperty("migration_type") + private MigrationType migrationType; + + /** The migration resource name, in the format `migrations/{migration}`. */ + @JsonProperty("name") + private String name; + + /** + * Output-only. The time when the soft-deleted migration is scheduled for permanent deletion. + * Empty if the migration is active or permanent deletion is not scheduled. + */ + @JsonProperty("purge_time") + private Timestamp purgeTime; + + /** + * Required. The name of the Unity Catalog connection (a UC securable name, such as + * `my_postgres_connection`) used to connect to the source PostgreSQL server. + */ + @JsonProperty("source_connection") + private String sourceConnection; + + /** Output-only. The authoritative migration lifecycle state. */ + @JsonProperty("state") + private MigrationState state; + + /** + * The Lakebase branch receiving the migrated databases, in the format + * `projects/{project_id}/branches/{branch_id}`. May be omitted during assessment, but must be set + * before the migration starts, and may be changed until then. + */ + @JsonProperty("target_branch") + private String targetBranch; + + /** Output-only. The time when the migration was last updated. */ + @JsonProperty("update_time") + private Timestamp updateTime; + + public Migration setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public Migration setDatabaseMappings(Collection databaseMappings) { + this.databaseMappings = databaseMappings; + return this; + } + + public Collection getDatabaseMappings() { + return databaseMappings; + } + + public Migration setDeleteTime(Timestamp deleteTime) { + this.deleteTime = deleteTime; + return this; + } + + public Timestamp getDeleteTime() { + return deleteTime; + } + + public Migration setError(MigrationError error) { + this.error = error; + return this; + } + + public MigrationError getError() { + return error; + } + + public Migration setMigrationType(MigrationType migrationType) { + this.migrationType = migrationType; + return this; + } + + public MigrationType getMigrationType() { + return migrationType; + } + + public Migration setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public Migration setPurgeTime(Timestamp purgeTime) { + this.purgeTime = purgeTime; + return this; + } + + public Timestamp getPurgeTime() { + return purgeTime; + } + + public Migration setSourceConnection(String sourceConnection) { + this.sourceConnection = sourceConnection; + return this; + } + + public String getSourceConnection() { + return sourceConnection; + } + + public Migration setState(MigrationState state) { + this.state = state; + return this; + } + + public MigrationState getState() { + return state; + } + + public Migration setTargetBranch(String targetBranch) { + this.targetBranch = targetBranch; + return this; + } + + public String getTargetBranch() { + return targetBranch; + } + + public Migration 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; + Migration that = (Migration) o; + return Objects.equals(createTime, that.createTime) + && Objects.equals(databaseMappings, that.databaseMappings) + && Objects.equals(deleteTime, that.deleteTime) + && Objects.equals(error, that.error) + && Objects.equals(migrationType, that.migrationType) + && Objects.equals(name, that.name) + && Objects.equals(purgeTime, that.purgeTime) + && Objects.equals(sourceConnection, that.sourceConnection) + && Objects.equals(state, that.state) + && Objects.equals(targetBranch, that.targetBranch) + && Objects.equals(updateTime, that.updateTime); + } + + @Override + public int hashCode() { + return Objects.hash( + createTime, + databaseMappings, + deleteTime, + error, + migrationType, + name, + purgeTime, + sourceConnection, + state, + targetBranch, + updateTime); + } + + @Override + public String toString() { + return new ToStringer(Migration.class) + .add("createTime", createTime) + .add("databaseMappings", databaseMappings) + .add("deleteTime", deleteTime) + .add("error", error) + .add("migrationType", migrationType) + .add("name", name) + .add("purgeTime", purgeTime) + .add("sourceConnection", sourceConnection) + .add("state", state) + .add("targetBranch", targetBranch) + .add("updateTime", updateTime) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationError.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationError.java new file mode 100644 index 000000000..1156a5239 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationError.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** An error that prevents migration progress. */ +@Generated +public class MigrationError { + /** A stable machine-readable error code. */ + @JsonProperty("code") + private String code; + + /** A concise explanation of the failure. */ + @JsonProperty("message") + private String message; + + public MigrationError setCode(String code) { + this.code = code; + return this; + } + + public String getCode() { + return code; + } + + public MigrationError setMessage(String message) { + this.message = message; + return this; + } + + public String getMessage() { + return message; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MigrationError that = (MigrationError) o; + return Objects.equals(code, that.code) && Objects.equals(message, that.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, message); + } + + @Override + public String toString() { + return new ToStringer(MigrationError.class) + .add("code", code) + .add("message", message) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationOperationMetadata.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationOperationMetadata.java new file mode 100644 index 000000000..ccbf65815 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationOperationMetadata.java @@ -0,0 +1,29 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Metadata for a long-running operation that applies an action to a migration. */ +@Generated +public class MigrationOperationMetadata { + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + return new ToStringer(MigrationOperationMetadata.class).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationState.java new file mode 100644 index 000000000..c68cbab3b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationState.java @@ -0,0 +1,18 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; + +/** The lifecycle state of a migration. */ +@Generated +public enum MigrationState { + MIGRATION_STATE_ASSESSING, + MIGRATION_STATE_ASSESSMENT_NEEDS_ACTION, + MIGRATION_STATE_COMPLETED, + MIGRATION_STATE_DRAFT, + MIGRATION_STATE_FAILED, + MIGRATION_STATE_INITIAL_DATA_LOAD, + MIGRATION_STATE_READY_TO_START, + MIGRATION_STATE_SCHEMA_LOAD, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationType.java new file mode 100644 index 000000000..455ccc028 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MigrationType.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; + +/** The intended data transfer mode of a migration. */ +@Generated +public enum MigrationType { + MIGRATION_TYPE_ONE_TIME_COPY, + MIGRATION_TYPE_ONLINE, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresAPI.java index 370990648..e880567fe 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresAPI.java @@ -37,6 +37,19 @@ public PostgresAPI(PostgresService mock) { impl = mock; } + /** Acknowledges non-blocking warnings on a specific assessment. */ + public AcknowledgeAssessmentWarningsOperation acknowledgeAssessmentWarnings( + AcknowledgeAssessmentWarningsRequest request) { + Operation operation = impl.acknowledgeAssessmentWarnings(request); + return new AcknowledgeAssessmentWarningsOperation(impl, operation); + } + + /** Creates an immutable assessment run for the migration's current source configuration. */ + public AssessMigrationOperation assessMigration(AssessMigrationRequest request) { + Operation operation = impl.assessMigration(request); + return new AssessMigrationOperation(impl, operation); + } + /** Creates a new database branch in the project. */ public CreateBranchOperation createBranch(CreateBranchRequest request) { Operation operation = impl.createBranch(request); @@ -81,6 +94,12 @@ public CreateEndpointOperation createEndpoint(CreateEndpointRequest request) { return new CreateEndpointOperation(impl, operation); } + /** Creates a migration. */ + public CreateMigrationOperation createMigration(CreateMigrationRequest request) { + Operation operation = impl.createMigration(request); + return new CreateMigrationOperation(impl, operation); + } + /** * Creates a new Lakebase Autoscaling Postgres database project, which contains branches and * compute endpoints. @@ -172,6 +191,16 @@ public DeleteEndpointOperation deleteEndpoint(DeleteEndpointRequest request) { return new DeleteEndpointOperation(impl, operation); } + public DeleteMigrationOperation deleteMigration(String name) { + return deleteMigration(new DeleteMigrationRequest().setName(name)); + } + + /** Soft-deletes a migration. */ + public DeleteMigrationOperation deleteMigration(DeleteMigrationRequest request) { + Operation operation = impl.deleteMigration(request); + return new DeleteMigrationOperation(impl, operation); + } + public DeleteProjectOperation deleteProject(String name) { return deleteProject(new DeleteProjectRequest().setName(name)); } @@ -217,6 +246,15 @@ public DatabaseCredential generateDatabaseCredential(GenerateDatabaseCredentialR return impl.generateDatabaseCredential(request); } + public Assessment getAssessment(String name) { + return getAssessment(new GetAssessmentRequest().setName(name)); + } + + /** Gets a migration assessment run. */ + public Assessment getAssessment(GetAssessmentRequest request) { + return impl.getAssessment(request); + } + public Branch getBranch(String name) { return getBranch(new GetBranchRequest().setName(name)); } @@ -289,6 +327,15 @@ public Endpoint getEndpoint(GetEndpointRequest request) { return impl.getEndpoint(request); } + public Migration getMigration(String name) { + return getMigration(new GetMigrationRequest().setName(name)); + } + + /** Gets a migration. */ + public Migration getMigration(GetMigrationRequest request) { + return impl.getMigration(request); + } + public Operation getOperation(String name) { return getOperation(new GetOperationRequest().setName(name)); } @@ -349,6 +396,25 @@ public SyncedTable getSyncedTable(GetSyncedTableRequest request) { return impl.getSyncedTable(request); } + public Iterable listAssessments(String parent) { + return listAssessments(new ListAssessmentsRequest().setParent(parent)); + } + + /** Lists assessment runs for a migration. */ + public Iterable listAssessments(ListAssessmentsRequest request) { + return Paginator.newTokenPagination( + request, + impl::listAssessments, + ListAssessmentsResponse::getAssessments, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + public Iterable listBranches(String parent) { return listBranches(new ListBranchesRequest().setParent(parent)); } @@ -450,6 +516,21 @@ public Iterable listEndpoints(ListEndpointsRequest request) { }); } + /** Lists migrations in the workspace. */ + public Iterable listMigrations(ListMigrationsRequest request) { + return Paginator.newTokenPagination( + request, + impl::listMigrations, + ListMigrationsResponse::getMigrations, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + /** * Returns a paginated list of database projects in the workspace that the user has permission to * access. @@ -511,12 +592,28 @@ public RevealRolePasswordResponse revealRolePassword(RevealRolePasswordRequest r return impl.revealRolePassword(request); } + /** + * Starts the assessed migration named in the request, moving it from READY_TO_START into + * execution. Its first phase, SCHEMA_LOAD, creates the target databases, roles, and schema on the + * migration's target Lakebase branch without copying any table data, ahead of INITIAL_DATA_LOAD. + */ + public StartMigrationOperation startMigration(StartMigrationRequest request) { + Operation operation = impl.startMigration(request); + return new StartMigrationOperation(impl, operation); + } + /** Undeletes the specified database branch. */ public UndeleteBranchOperation undeleteBranch(UndeleteBranchRequest request) { Operation operation = impl.undeleteBranch(request); return new UndeleteBranchOperation(impl, operation); } + /** Restores a soft-deleted migration before it is permanently purged. */ + public UndeleteMigrationOperation undeleteMigration(UndeleteMigrationRequest request) { + Operation operation = impl.undeleteMigration(request); + return new UndeleteMigrationOperation(impl, operation); + } + /** Undeletes a soft-deleted project. */ public UndeleteProjectOperation undeleteProject(UndeleteProjectRequest request) { Operation operation = impl.undeleteProject(request); @@ -553,6 +650,12 @@ public UpdateEndpointOperation updateEndpoint(UpdateEndpointRequest request) { return new UpdateEndpointOperation(impl, operation); } + /** Updates user-owned migration configuration. */ + public UpdateMigrationOperation updateMigration(UpdateMigrationRequest request) { + Operation operation = impl.updateMigration(request); + return new UpdateMigrationOperation(impl, operation); + } + /** Updates the specified database project. */ public UpdateProjectOperation updateProject(UpdateProjectRequest request) { Operation operation = impl.updateProject(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresImpl.java index 42dce3c5d..bbdf47bd0 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresImpl.java @@ -16,6 +16,42 @@ public PostgresImpl(ApiClient apiClient) { this.apiClient = apiClient; } + @Override + public Operation acknowledgeAssessmentWarnings(AcknowledgeAssessmentWarningsRequest request) { + String path = String.format("/api/2.0/postgres/%s/acknowledgeWarnings", 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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Operation assessMigration(AssessMigrationRequest request) { + String path = String.format("/api/2.0/postgres/%s/assess", 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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation createBranch(CreateBranchRequest request) { String path = String.format("/api/2.0/postgres/%s/branches", request.getParent()); @@ -124,6 +160,24 @@ public Operation createEndpoint(CreateEndpointRequest request) { } } + @Override + public Operation createMigration(CreateMigrationRequest request) { + String path = "/api/2.0/postgres/migrations"; + try { + Request req = new Request("POST", path, apiClient.serialize(request.getMigration())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation createProject(CreateProjectRequest request) { String path = "/api/2.0/postgres/projects"; @@ -298,6 +352,23 @@ public Operation deleteEndpoint(DeleteEndpointRequest request) { } } + @Override + public Operation deleteMigration(DeleteMigrationRequest request) { + String path = String.format("/api/2.0/postgres/%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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation deleteProject(DeleteProjectRequest request) { String path = String.format("/api/2.0/postgres/%s", request.getName()); @@ -384,6 +455,23 @@ public DatabaseCredential generateDatabaseCredential(GenerateDatabaseCredentialR } } + @Override + public Assessment getAssessment(GetAssessmentRequest request) { + String path = String.format("/api/2.0/postgres/%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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Assessment.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Branch getBranch(GetBranchRequest request) { String path = String.format("/api/2.0/postgres/%s", request.getName()); @@ -503,6 +591,23 @@ public Endpoint getEndpoint(GetEndpointRequest request) { } } + @Override + public Migration getMigration(GetMigrationRequest request) { + String path = String.format("/api/2.0/postgres/%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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Migration.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/postgres/%s", request.getName()); @@ -605,6 +710,23 @@ public SyncedTable getSyncedTable(GetSyncedTableRequest request) { } } + @Override + public ListAssessmentsResponse listAssessments(ListAssessmentsRequest request) { + String path = String.format("/api/2.0/postgres/%s/assessments", 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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListAssessmentsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public ListBranchesResponse listBranches(ListBranchesRequest request) { String path = String.format("/api/2.0/postgres/%s/branches", request.getParent()); @@ -690,6 +812,23 @@ public ListEndpointsResponse listEndpoints(ListEndpointsRequest request) { } } + @Override + public ListMigrationsResponse listMigrations(ListMigrationsRequest request) { + String path = "/api/2.0/postgres/migrations"; + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListMigrationsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public ListProjectsResponse listProjects(ListProjectsRequest request) { String path = "/api/2.0/postgres/projects"; @@ -759,6 +898,24 @@ public RevealRolePasswordResponse revealRolePassword(RevealRolePasswordRequest r } } + @Override + public Operation startMigration(StartMigrationRequest request) { + String path = String.format("/api/2.0/postgres/%s/start", 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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation undeleteBranch(UndeleteBranchRequest request) { String path = String.format("/api/2.0/postgres/%s/undelete", request.getName()); @@ -777,6 +934,24 @@ public Operation undeleteBranch(UndeleteBranchRequest request) { } } + @Override + public Operation undeleteMigration(UndeleteMigrationRequest request) { + String path = String.format("/api/2.0/postgres/%s/undelete", 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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation undeleteProject(UndeleteProjectRequest request) { String path = String.format("/api/2.0/postgres/%s/undelete", request.getName()); @@ -867,6 +1042,24 @@ public Operation updateEndpoint(UpdateEndpointRequest request) { } } + @Override + public Operation updateMigration(UpdateMigrationRequest request) { + String path = String.format("/api/2.0/postgres/%s", request.getName()); + try { + Request req = new Request("PATCH", path, apiClient.serialize(request.getMigration())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation updateProject(UpdateProjectRequest request) { String path = String.format("/api/2.0/postgres/%s", request.getName()); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresService.java index 8452ca9a5..aad3b3a1e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresService.java @@ -23,6 +23,13 @@ */ @Generated public interface PostgresService { + /** Acknowledges non-blocking warnings on a specific assessment. */ + Operation acknowledgeAssessmentWarnings( + AcknowledgeAssessmentWarningsRequest acknowledgeAssessmentWarningsRequest); + + /** Creates an immutable assessment run for the migration's current source configuration. */ + Operation assessMigration(AssessMigrationRequest assessMigrationRequest); + /** Creates a new database branch in the project. */ Operation createBranch(CreateBranchRequest createBranchRequest); @@ -49,6 +56,9 @@ public interface PostgresService { /** Creates a new compute endpoint in the branch. */ Operation createEndpoint(CreateEndpointRequest createEndpointRequest); + /** Creates a migration. */ + Operation createMigration(CreateMigrationRequest createMigrationRequest); + /** * Creates a new Lakebase Autoscaling Postgres database project, which contains branches and * compute endpoints. @@ -86,6 +96,9 @@ public interface PostgresService { /** Deletes the specified compute endpoint. */ Operation deleteEndpoint(DeleteEndpointRequest deleteEndpointRequest); + /** Soft-deletes a migration. */ + Operation deleteMigration(DeleteMigrationRequest deleteMigrationRequest); + /** Deletes the specified database project. */ Operation deleteProject(DeleteProjectRequest deleteProjectRequest); @@ -102,6 +115,9 @@ public interface PostgresService { DatabaseCredential generateDatabaseCredential( GenerateDatabaseCredentialRequest generateDatabaseCredentialRequest); + /** Gets a migration assessment run. */ + Assessment getAssessment(GetAssessmentRequest getAssessmentRequest); + /** Retrieves information about the specified database branch. */ Branch getBranch(GetBranchRequest getBranchRequest); @@ -132,6 +148,9 @@ DatabaseCredential generateDatabaseCredential( */ Endpoint getEndpoint(GetEndpointRequest getEndpointRequest); + /** Gets a migration. */ + Migration getMigration(GetMigrationRequest getMigrationRequest); + /** Retrieves the status of a long-running operation. */ Operation getOperation(GetOperationRequest getOperationRequest); @@ -156,6 +175,9 @@ DatabaseCredential generateDatabaseCredential( /** Get a Synced Table. */ SyncedTable getSyncedTable(GetSyncedTableRequest getSyncedTableRequest); + /** Lists assessment runs for a migration. */ + ListAssessmentsResponse listAssessments(ListAssessmentsRequest listAssessmentsRequest); + /** Returns a paginated list of database branches in the project. */ ListBranchesResponse listBranches(ListBranchesRequest listBranchesRequest); @@ -177,6 +199,9 @@ DatabaseCredential generateDatabaseCredential( /** Returns a paginated list of compute endpoints in the branch. */ ListEndpointsResponse listEndpoints(ListEndpointsRequest listEndpointsRequest); + /** Lists migrations in the workspace. */ + ListMigrationsResponse listMigrations(ListMigrationsRequest listMigrationsRequest); + /** * Returns a paginated list of database projects in the workspace that the user has permission to * access. @@ -193,9 +218,19 @@ DatabaseCredential generateDatabaseCredential( RevealRolePasswordResponse revealRolePassword( RevealRolePasswordRequest revealRolePasswordRequest); + /** + * Starts the assessed migration named in the request, moving it from READY_TO_START into + * execution. Its first phase, SCHEMA_LOAD, creates the target databases, roles, and schema on the + * migration's target Lakebase branch without copying any table data, ahead of INITIAL_DATA_LOAD. + */ + Operation startMigration(StartMigrationRequest startMigrationRequest); + /** Undeletes the specified database branch. */ Operation undeleteBranch(UndeleteBranchRequest undeleteBranchRequest); + /** Restores a soft-deleted migration before it is permanently purged. */ + Operation undeleteMigration(UndeleteMigrationRequest undeleteMigrationRequest); + /** Undeletes a soft-deleted project. */ Operation undeleteProject(UndeleteProjectRequest undeleteProjectRequest); @@ -217,6 +252,9 @@ RevealRolePasswordResponse revealRolePassword( */ Operation updateEndpoint(UpdateEndpointRequest updateEndpointRequest); + /** Updates user-owned migration configuration. */ + Operation updateMigration(UpdateMigrationRequest updateMigrationRequest); + /** Updates the specified database project. */ Operation updateProject(UpdateProjectRequest updateProjectRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/RoleRoleSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/RoleRoleSpec.java index 574afa7d1..ad0d9a207 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/RoleRoleSpec.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/RoleRoleSpec.java @@ -33,9 +33,11 @@ public class RoleRoleSpec { *

NOTE: for the Databricks identity type GROUP, LAKEBASE_OAUTH_V1 is the default auth method * (group can login as well). * - *

This field is set when the role is created and cannot be changed by UpdateRole. If provided - * in an UpdateRole request body, its value is ignored and the existing value is retained. Do not - * include this field as an explicit path in update_mask. + *

This field is set when the role is created and cannot be changed. When replacing an existing + * role with replace_existing=true, omit this field or supply its current value. A differing value + * returns INVALID_PARAMETER_VALUE and rejects the entire request, including changes to mutable + * fields. With `*` or masks containing only mutable fields, supplied values are ignored. + * Including this field as an explicit path in update_mask returns INVALID_PARAMETER_VALUE. */ @JsonProperty("auth_method") private RoleAuthMethod authMethod; @@ -45,9 +47,11 @@ public class RoleRoleSpec { * *

* application ID for SERVICE_PRINCIPAL * user email for USER * group name for GROUP * - *

This field is set when the role is created and cannot be changed by UpdateRole. If provided - * in an UpdateRole request body, its value is ignored and the existing value is retained. Do not - * include this field as an explicit path in update_mask. + *

This field is set when the role is created and cannot be changed. When replacing an existing + * role with replace_existing=true, omit this field or supply its current value. A differing value + * returns INVALID_PARAMETER_VALUE and rejects the entire request, including changes to mutable + * fields. With `*` or masks containing only mutable fields, supplied values are ignored. + * Including this field as an explicit path in update_mask returns INVALID_PARAMETER_VALUE. */ @JsonProperty("identity_type") private RoleIdentityType identityType; @@ -70,9 +74,11 @@ public class RoleRoleSpec { *

1. user email for IdentityType.USER 2. app ID for IdentityType.SERVICE_PRINCIPAL 2. group * name for IdentityType.GROUP * - *

This field is set when the role is created and cannot be changed by UpdateRole. If provided - * in an UpdateRole request body, its value is ignored and the existing value is retained. Do not - * include this field as an explicit path in update_mask. + *

This field is set when the role is created and cannot be changed. When replacing an existing + * role with replace_existing=true, omit this field or supply its current value. A differing value + * returns INVALID_PARAMETER_VALUE and rejects the entire request, including changes to mutable + * fields. With `*` or masks containing only mutable fields, supplied values are ignored. + * Including this field as an explicit path in update_mask returns INVALID_PARAMETER_VALUE. */ @JsonProperty("postgres_role") private String postgresRole; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationOperation.java new file mode 100644 index 000000000..4555c05d8 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationOperation.java @@ -0,0 +1,163 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running startMigration operation. Provides methods to wait + * for completion, check status, cancel, and access metadata. + */ +@Generated +public class StartMigrationOperation { + private static final Logger LOG = LoggerFactory.getLogger(StartMigrationOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public StartMigrationOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting StartMigrationResponse. Waits + * indefinitely if no timeout is specified. + * + * @return the created StartMigrationResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public StartMigrationResponse waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting StartMigrationResponse. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created StartMigrationResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public StartMigrationResponse waitForCompletion(Optional options) + throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, StartMigrationResponse.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal startMigrationResponse response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public MigrationOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, MigrationOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationRequest.java new file mode 100644 index 000000000..654385ba0 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationRequest.java @@ -0,0 +1,42 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +/** Request to start a migration. */ +@Generated +public class StartMigrationRequest { + /** Required. The migration resource name, in the format `migrations/{migration}`. */ + @JsonIgnore private String name; + + public StartMigrationRequest 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; + StartMigrationRequest that = (StartMigrationRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(StartMigrationRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationResponse.java new file mode 100644 index 000000000..f0769c458 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/StartMigrationResponse.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Response produced after migration preparation has started. */ +@Generated +public class StartMigrationResponse { + /** The migration after the start action is applied. */ + @JsonProperty("migration") + private Migration migration; + + public StartMigrationResponse setMigration(Migration migration) { + this.migration = migration; + return this; + } + + public Migration getMigration() { + return migration; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StartMigrationResponse that = (StartMigrationResponse) o; + return Objects.equals(migration, that.migration); + } + + @Override + public int hashCode() { + return Objects.hash(migration); + } + + @Override + public String toString() { + return new ToStringer(StartMigrationResponse.class).add("migration", migration).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationOperation.java new file mode 100644 index 000000000..6f007f21e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationOperation.java @@ -0,0 +1,163 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running undeleteMigration operation. Provides methods to wait + * for completion, check status, cancel, and access metadata. + */ +@Generated +public class UndeleteMigrationOperation { + private static final Logger LOG = LoggerFactory.getLogger(UndeleteMigrationOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public UndeleteMigrationOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting UndeleteMigrationResponse. Waits + * indefinitely if no timeout is specified. + * + * @return the created UndeleteMigrationResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public UndeleteMigrationResponse waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting UndeleteMigrationResponse. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created UndeleteMigrationResponse + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public UndeleteMigrationResponse waitForCompletion(Optional options) + throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, UndeleteMigrationResponse.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal undeleteMigrationResponse response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public MigrationOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, MigrationOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationRequest.java new file mode 100644 index 000000000..65fc9f06f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationRequest.java @@ -0,0 +1,42 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +/** Request to restore a soft-deleted migration before it is permanently purged. */ +@Generated +public class UndeleteMigrationRequest { + /** Required. The migration resource name, in the format `migrations/{migration}`. */ + @JsonIgnore private String name; + + public UndeleteMigrationRequest 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; + UndeleteMigrationRequest that = (UndeleteMigrationRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(UndeleteMigrationRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationResponse.java new file mode 100644 index 000000000..3e1eb0a03 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteMigrationResponse.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Response produced after a soft-deleted migration is restored. */ +@Generated +public class UndeleteMigrationResponse { + /** The restored migration. */ + @JsonProperty("migration") + private Migration migration; + + public UndeleteMigrationResponse setMigration(Migration migration) { + this.migration = migration; + return this; + } + + public Migration getMigration() { + return migration; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UndeleteMigrationResponse that = (UndeleteMigrationResponse) o; + return Objects.equals(migration, that.migration); + } + + @Override + public int hashCode() { + return Objects.hash(migration); + } + + @Override + public String toString() { + return new ToStringer(UndeleteMigrationResponse.class).add("migration", migration).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateMigrationOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateMigrationOperation.java new file mode 100644 index 000000000..0ed01725d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateMigrationOperation.java @@ -0,0 +1,162 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running updateMigration operation. Provides methods to wait + * for completion, check status, cancel, and access metadata. + */ +@Generated +public class UpdateMigrationOperation { + private static final Logger LOG = LoggerFactory.getLogger(UpdateMigrationOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public UpdateMigrationOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting Migration. Waits indefinitely if no + * timeout is specified. + * + * @return the created Migration + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public Migration waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting Migration. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created Migration + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public Migration waitForCompletion(Optional options) throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, Migration.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal migration response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public MigrationOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, MigrationOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateMigrationRequest.java new file mode 100644 index 000000000..222ae7aeb --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateMigrationRequest.java @@ -0,0 +1,77 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +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 com.google.protobuf.FieldMask; +import java.util.Objects; + +@Generated +public class UpdateMigrationRequest { + /** Required. The migration containing the user-owned fields to update. */ + @JsonProperty("migration") + private Migration migration; + + /** The migration resource name, in the format `migrations/{migration}`. */ + @JsonIgnore private String name; + + /** Required. The fields to update. */ + @JsonIgnore + @QueryParam("update_mask") + private FieldMask updateMask; + + public UpdateMigrationRequest setMigration(Migration migration) { + this.migration = migration; + return this; + } + + public Migration getMigration() { + return migration; + } + + public UpdateMigrationRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public UpdateMigrationRequest setUpdateMask(FieldMask updateMask) { + this.updateMask = updateMask; + return this; + } + + public FieldMask getUpdateMask() { + return updateMask; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UpdateMigrationRequest that = (UpdateMigrationRequest) o; + return Objects.equals(migration, that.migration) + && Objects.equals(name, that.name) + && Objects.equals(updateMask, that.updateMask); + } + + @Override + public int hashCode() { + return Objects.hash(migration, name, updateMask); + } + + @Override + public String toString() { + return new ToStringer(UpdateMigrationRequest.class) + .add("migration", migration) + .add("name", name) + .add("updateMask", updateMask) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateRoleRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateRoleRequest.java index 864f6f3d5..9e46afd83 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateRoleRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateRoleRequest.java @@ -31,14 +31,13 @@ public class UpdateRoleRequest { * The list of fields to update. Supported fields are `spec.membership_roles`, * `spec.attributes.createdb`, `spec.attributes.createrole`, and `spec.attributes.bypassrls`. * - *

`spec.identity_type`, `spec.auth_method`, and `spec.postgres_role` cannot be changed. Values - * supplied for these fields in the request body are ignored. Including one of these fields as an - * explicit path in update_mask returns an INVALID_PARAMETER_VALUE error. When `spec` is the only - * path in the mask, only the supplied mutable attributes are updated. `*` by itself, or `spec` - * combined with other supported paths, selects all supported mutable fields. For these masks, all - * three attributes (`createdb`, `createrole`, and `bypassrls`) must be supplied; omitting any - * returns an INVALID_PARAMETER_VALUE error. Each of these mask forms replaces `membership_roles`. - * Omitting it or supplying an empty list clears all memberships, including + *

`spec.identity_type`, `spec.auth_method`, and `spec.postgres_role` cannot be changed. + * Including an immutable field as an explicit path in update_mask returns + * INVALID_PARAMETER_VALUE. With `*` or masks containing only mutable fields, supplied values for + * these immutable fields are ignored. `*` by itself selects all supported mutable fields. For + * this mask, all three attributes (`createdb`, `createrole`, and `bypassrls`) must be supplied; + * omitting any returns an INVALID_PARAMETER_VALUE error. The `*` mask replaces + * `membership_roles`. Omitting it or supplying an empty list clears all memberships, including * `DATABRICKS_SUPERUSER`. */ @JsonIgnore diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxAPI.java index f5b989aea..af6394438 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxAPI.java @@ -183,16 +183,19 @@ public Sandbox updateSandbox(UpdateSandboxRequest request) { /** * Uploads an application/octet-stream body to a sandbox. The sandbox starts automatically if it - * is stopped. Filesystem access uses the sandbox user's permissions and follows symbolic links. + * is stopped. Filesystem access uses the sandbox user's permissions. Replacements follow symbolic + * links. * *

Creates the file or replaces its entire contents, creating parent directories if missing. * The completed upload becomes visible atomically. A failure before commit leaves an existing * destination unchanged; a lost response after commit does not undo the upload. Completion does * not guarantee crash durability. * - *

Returns 201 Created for a new file or 204 No Content for a replacement. Partial and - * conditional uploads are unsupported: Content-Range, If-Match, If-None-Match, and - * If-Unmodified-Since return 400. + *

Returns 201 Created for a new file or 204 No Content for a replacement. Set overwrite=false + * or supply If-None-Match: * to create a file only if the destination does not exist. An existing + * entry, including a symbolic link, returns 412 Precondition Failed. Conflicting options or + * repeated overwrite parameters return 400. Other If-None-Match values, Content-Range, If-Match, + * and If-Unmodified-Since are unsupported and return 400. */ public void uploadFile(UploadFileRequest request) { impl.uploadFile(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java index 3cc4d62e3..f5151215f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java @@ -96,16 +96,19 @@ ListDirectoryContentsResponse listDirectoryContents( /** * Uploads an application/octet-stream body to a sandbox. The sandbox starts automatically if it - * is stopped. Filesystem access uses the sandbox user's permissions and follows symbolic links. + * is stopped. Filesystem access uses the sandbox user's permissions. Replacements follow symbolic + * links. * *

Creates the file or replaces its entire contents, creating parent directories if missing. * The completed upload becomes visible atomically. A failure before commit leaves an existing * destination unchanged; a lost response after commit does not undo the upload. Completion does * not guarantee crash durability. * - *

Returns 201 Created for a new file or 204 No Content for a replacement. Partial and - * conditional uploads are unsupported: Content-Range, If-Match, If-None-Match, and - * If-Unmodified-Since return 400. + *

Returns 201 Created for a new file or 204 No Content for a replacement. Set overwrite=false + * or supply If-None-Match: * to create a file only if the destination does not exist. An existing + * entry, including a symbolic link, returns 412 Precondition Failed. Conflicting options or + * repeated overwrite parameters return 400. Other If-None-Match values, Content-Range, If-Match, + * and If-Unmodified-Since are unsupported and return 400. */ void uploadFile(UploadFileRequest uploadFileRequest); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardTheme.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardTheme.java new file mode 100644 index 000000000..dbd56fb5f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardTheme.java @@ -0,0 +1,663 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Theme settings for customizing AI/BI dashboard UI, including visualization colors, font colors, + * background colors, and more. + */ +@Generated +public class DashboardTheme { + /** Color of the zero-value grid line, making it visually distinct from other grid lines. */ + @JsonProperty("axis_line_color") + private DashboardThemeDashboardThemeColor axisLineColor; + + /** The background color of the dashboard canvas. */ + @JsonProperty("canvas_background_color") + private DashboardThemeDashboardThemeColor canvasBackgroundColor; + + /** The continuous gradient configuration for the dashboard. */ + @JsonProperty("continuous_gradient") + private DashboardThemeContinuousGradient continuousGradient; + + /** + * The default font color applied to all text in the dashboard. Superseded by + * font_settings.base.font_color when font_settings is set. More specific font settings in turn + * override base. + */ + @JsonProperty("font_color") + private DashboardThemeDashboardThemeColor fontColor; + + /** + * Font family to customize all text within the dashboard. Unsupported font names fall back to the + * default font. Superseded by font_settings.base.font_family when font_settings is set. + */ + @JsonProperty("font_family") + private String fontFamily; + + /** The per-category typography overrides for the dashboard. */ + @JsonProperty("font_settings") + private DashboardThemeFontSettings fontSettings; + + /** Color of chart grid lines in visualizations (horizontal and vertical guide lines). */ + @JsonProperty("grid_line_color") + private DashboardThemeDashboardThemeColor gridLineColor; + + /** + * The corner radius in pixels for rectangular marks in visualizations (bars, columns, histogram + * bins, etc.). + */ + @JsonProperty("mark_corner_radius") + private Long markCornerRadius; + + /** The highlight color for selected elements in widgets. */ + @JsonProperty("selection_color") + private DashboardThemeDashboardThemeColor selectionColor; + + /** The sentiment color palette for the dashboard. */ + @JsonProperty("sentiment_colors") + private DashboardThemeSentimentColors sentimentColors; + + /** + * The default vertical alignment for all text box widgets in the dashboard. Individual text box + * widgets can override this. + */ + @JsonProperty("text_box_vertical_align") + private DashboardThemeVerticalAlign textBoxVerticalAlign; + + /** + * Color palette for visualizations. Colors are applied in order (visualization_color_01, + * visualization_color_02, etc.). Invalid color values are preserved but ignored during rendering. + */ + @JsonProperty("visualization_color_01") + private String visualizationColor01; + + /** The color at position 2 in the visualization color palette. */ + @JsonProperty("visualization_color_02") + private String visualizationColor02; + + /** The color at position 3 in the visualization color palette. */ + @JsonProperty("visualization_color_03") + private String visualizationColor03; + + /** The color at position 4 in the visualization color palette. */ + @JsonProperty("visualization_color_04") + private String visualizationColor04; + + /** The color at position 5 in the visualization color palette. */ + @JsonProperty("visualization_color_05") + private String visualizationColor05; + + /** The color at position 6 in the visualization color palette. */ + @JsonProperty("visualization_color_06") + private String visualizationColor06; + + /** The color at position 7 in the visualization color palette. */ + @JsonProperty("visualization_color_07") + private String visualizationColor07; + + /** The color at position 8 in the visualization color palette. */ + @JsonProperty("visualization_color_08") + private String visualizationColor08; + + /** The color at position 9 in the visualization color palette. */ + @JsonProperty("visualization_color_09") + private String visualizationColor09; + + /** The color at position 10 in the visualization color palette. */ + @JsonProperty("visualization_color_10") + private String visualizationColor10; + + /** The color at position 11 in the visualization color palette. */ + @JsonProperty("visualization_color_11") + private String visualizationColor11; + + /** The color at position 12 in the visualization color palette. */ + @JsonProperty("visualization_color_12") + private String visualizationColor12; + + /** The color at position 13 in the visualization color palette. */ + @JsonProperty("visualization_color_13") + private String visualizationColor13; + + /** The color at position 14 in the visualization color palette. */ + @JsonProperty("visualization_color_14") + private String visualizationColor14; + + /** The color at position 15 in the visualization color palette. */ + @JsonProperty("visualization_color_15") + private String visualizationColor15; + + /** The color at position 16 in the visualization color palette. */ + @JsonProperty("visualization_color_16") + private String visualizationColor16; + + /** The color at position 17 in the visualization color palette. */ + @JsonProperty("visualization_color_17") + private String visualizationColor17; + + /** The color at position 18 in the visualization color palette. */ + @JsonProperty("visualization_color_18") + private String visualizationColor18; + + /** The color at position 19 in the visualization color palette. */ + @JsonProperty("visualization_color_19") + private String visualizationColor19; + + /** The color at position 20 in the visualization color palette. */ + @JsonProperty("visualization_color_20") + private String visualizationColor20; + + /** The background color of widgets. */ + @JsonProperty("widget_background_color") + private DashboardThemeDashboardThemeColor widgetBackgroundColor; + + /** The border color of widgets. */ + @JsonProperty("widget_border_color") + private DashboardThemeDashboardThemeColor widgetBorderColor; + + /** The widget border radius in pixels. */ + @JsonProperty("widget_corner_radius") + private Long widgetCornerRadius; + + /** Alignment setting for all widget titles and descriptions at the dashboard level. */ + @JsonProperty("widget_header_alignment") + private DashboardThemeAlignment widgetHeaderAlignment; + + /** The gap between widgets in pixels. */ + @JsonProperty("widget_margin") + private Long widgetMargin; + + /** The content padding inside each widget in pixels. */ + @JsonProperty("widget_padding") + private Long widgetPadding; + + /** + * The shadow intensity level applied to widgets (0 = no shadow, 100 = maximum). The actual CSS + * box-shadow is computed at render time from this value, factoring in background colors and color + * mode. + */ + @JsonProperty("widget_shadow") + private Long widgetShadow; + + public DashboardTheme setAxisLineColor(DashboardThemeDashboardThemeColor axisLineColor) { + this.axisLineColor = axisLineColor; + return this; + } + + public DashboardThemeDashboardThemeColor getAxisLineColor() { + return axisLineColor; + } + + public DashboardTheme setCanvasBackgroundColor( + DashboardThemeDashboardThemeColor canvasBackgroundColor) { + this.canvasBackgroundColor = canvasBackgroundColor; + return this; + } + + public DashboardThemeDashboardThemeColor getCanvasBackgroundColor() { + return canvasBackgroundColor; + } + + public DashboardTheme setContinuousGradient(DashboardThemeContinuousGradient continuousGradient) { + this.continuousGradient = continuousGradient; + return this; + } + + public DashboardThemeContinuousGradient getContinuousGradient() { + return continuousGradient; + } + + public DashboardTheme setFontColor(DashboardThemeDashboardThemeColor fontColor) { + this.fontColor = fontColor; + return this; + } + + public DashboardThemeDashboardThemeColor getFontColor() { + return fontColor; + } + + public DashboardTheme setFontFamily(String fontFamily) { + this.fontFamily = fontFamily; + return this; + } + + public String getFontFamily() { + return fontFamily; + } + + public DashboardTheme setFontSettings(DashboardThemeFontSettings fontSettings) { + this.fontSettings = fontSettings; + return this; + } + + public DashboardThemeFontSettings getFontSettings() { + return fontSettings; + } + + public DashboardTheme setGridLineColor(DashboardThemeDashboardThemeColor gridLineColor) { + this.gridLineColor = gridLineColor; + return this; + } + + public DashboardThemeDashboardThemeColor getGridLineColor() { + return gridLineColor; + } + + public DashboardTheme setMarkCornerRadius(Long markCornerRadius) { + this.markCornerRadius = markCornerRadius; + return this; + } + + public Long getMarkCornerRadius() { + return markCornerRadius; + } + + public DashboardTheme setSelectionColor(DashboardThemeDashboardThemeColor selectionColor) { + this.selectionColor = selectionColor; + return this; + } + + public DashboardThemeDashboardThemeColor getSelectionColor() { + return selectionColor; + } + + public DashboardTheme setSentimentColors(DashboardThemeSentimentColors sentimentColors) { + this.sentimentColors = sentimentColors; + return this; + } + + public DashboardThemeSentimentColors getSentimentColors() { + return sentimentColors; + } + + public DashboardTheme setTextBoxVerticalAlign(DashboardThemeVerticalAlign textBoxVerticalAlign) { + this.textBoxVerticalAlign = textBoxVerticalAlign; + return this; + } + + public DashboardThemeVerticalAlign getTextBoxVerticalAlign() { + return textBoxVerticalAlign; + } + + public DashboardTheme setVisualizationColor01(String visualizationColor01) { + this.visualizationColor01 = visualizationColor01; + return this; + } + + public String getVisualizationColor01() { + return visualizationColor01; + } + + public DashboardTheme setVisualizationColor02(String visualizationColor02) { + this.visualizationColor02 = visualizationColor02; + return this; + } + + public String getVisualizationColor02() { + return visualizationColor02; + } + + public DashboardTheme setVisualizationColor03(String visualizationColor03) { + this.visualizationColor03 = visualizationColor03; + return this; + } + + public String getVisualizationColor03() { + return visualizationColor03; + } + + public DashboardTheme setVisualizationColor04(String visualizationColor04) { + this.visualizationColor04 = visualizationColor04; + return this; + } + + public String getVisualizationColor04() { + return visualizationColor04; + } + + public DashboardTheme setVisualizationColor05(String visualizationColor05) { + this.visualizationColor05 = visualizationColor05; + return this; + } + + public String getVisualizationColor05() { + return visualizationColor05; + } + + public DashboardTheme setVisualizationColor06(String visualizationColor06) { + this.visualizationColor06 = visualizationColor06; + return this; + } + + public String getVisualizationColor06() { + return visualizationColor06; + } + + public DashboardTheme setVisualizationColor07(String visualizationColor07) { + this.visualizationColor07 = visualizationColor07; + return this; + } + + public String getVisualizationColor07() { + return visualizationColor07; + } + + public DashboardTheme setVisualizationColor08(String visualizationColor08) { + this.visualizationColor08 = visualizationColor08; + return this; + } + + public String getVisualizationColor08() { + return visualizationColor08; + } + + public DashboardTheme setVisualizationColor09(String visualizationColor09) { + this.visualizationColor09 = visualizationColor09; + return this; + } + + public String getVisualizationColor09() { + return visualizationColor09; + } + + public DashboardTheme setVisualizationColor10(String visualizationColor10) { + this.visualizationColor10 = visualizationColor10; + return this; + } + + public String getVisualizationColor10() { + return visualizationColor10; + } + + public DashboardTheme setVisualizationColor11(String visualizationColor11) { + this.visualizationColor11 = visualizationColor11; + return this; + } + + public String getVisualizationColor11() { + return visualizationColor11; + } + + public DashboardTheme setVisualizationColor12(String visualizationColor12) { + this.visualizationColor12 = visualizationColor12; + return this; + } + + public String getVisualizationColor12() { + return visualizationColor12; + } + + public DashboardTheme setVisualizationColor13(String visualizationColor13) { + this.visualizationColor13 = visualizationColor13; + return this; + } + + public String getVisualizationColor13() { + return visualizationColor13; + } + + public DashboardTheme setVisualizationColor14(String visualizationColor14) { + this.visualizationColor14 = visualizationColor14; + return this; + } + + public String getVisualizationColor14() { + return visualizationColor14; + } + + public DashboardTheme setVisualizationColor15(String visualizationColor15) { + this.visualizationColor15 = visualizationColor15; + return this; + } + + public String getVisualizationColor15() { + return visualizationColor15; + } + + public DashboardTheme setVisualizationColor16(String visualizationColor16) { + this.visualizationColor16 = visualizationColor16; + return this; + } + + public String getVisualizationColor16() { + return visualizationColor16; + } + + public DashboardTheme setVisualizationColor17(String visualizationColor17) { + this.visualizationColor17 = visualizationColor17; + return this; + } + + public String getVisualizationColor17() { + return visualizationColor17; + } + + public DashboardTheme setVisualizationColor18(String visualizationColor18) { + this.visualizationColor18 = visualizationColor18; + return this; + } + + public String getVisualizationColor18() { + return visualizationColor18; + } + + public DashboardTheme setVisualizationColor19(String visualizationColor19) { + this.visualizationColor19 = visualizationColor19; + return this; + } + + public String getVisualizationColor19() { + return visualizationColor19; + } + + public DashboardTheme setVisualizationColor20(String visualizationColor20) { + this.visualizationColor20 = visualizationColor20; + return this; + } + + public String getVisualizationColor20() { + return visualizationColor20; + } + + public DashboardTheme setWidgetBackgroundColor( + DashboardThemeDashboardThemeColor widgetBackgroundColor) { + this.widgetBackgroundColor = widgetBackgroundColor; + return this; + } + + public DashboardThemeDashboardThemeColor getWidgetBackgroundColor() { + return widgetBackgroundColor; + } + + public DashboardTheme setWidgetBorderColor(DashboardThemeDashboardThemeColor widgetBorderColor) { + this.widgetBorderColor = widgetBorderColor; + return this; + } + + public DashboardThemeDashboardThemeColor getWidgetBorderColor() { + return widgetBorderColor; + } + + public DashboardTheme setWidgetCornerRadius(Long widgetCornerRadius) { + this.widgetCornerRadius = widgetCornerRadius; + return this; + } + + public Long getWidgetCornerRadius() { + return widgetCornerRadius; + } + + public DashboardTheme setWidgetHeaderAlignment(DashboardThemeAlignment widgetHeaderAlignment) { + this.widgetHeaderAlignment = widgetHeaderAlignment; + return this; + } + + public DashboardThemeAlignment getWidgetHeaderAlignment() { + return widgetHeaderAlignment; + } + + public DashboardTheme setWidgetMargin(Long widgetMargin) { + this.widgetMargin = widgetMargin; + return this; + } + + public Long getWidgetMargin() { + return widgetMargin; + } + + public DashboardTheme setWidgetPadding(Long widgetPadding) { + this.widgetPadding = widgetPadding; + return this; + } + + public Long getWidgetPadding() { + return widgetPadding; + } + + public DashboardTheme setWidgetShadow(Long widgetShadow) { + this.widgetShadow = widgetShadow; + return this; + } + + public Long getWidgetShadow() { + return widgetShadow; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardTheme that = (DashboardTheme) o; + return Objects.equals(axisLineColor, that.axisLineColor) + && Objects.equals(canvasBackgroundColor, that.canvasBackgroundColor) + && Objects.equals(continuousGradient, that.continuousGradient) + && Objects.equals(fontColor, that.fontColor) + && Objects.equals(fontFamily, that.fontFamily) + && Objects.equals(fontSettings, that.fontSettings) + && Objects.equals(gridLineColor, that.gridLineColor) + && Objects.equals(markCornerRadius, that.markCornerRadius) + && Objects.equals(selectionColor, that.selectionColor) + && Objects.equals(sentimentColors, that.sentimentColors) + && Objects.equals(textBoxVerticalAlign, that.textBoxVerticalAlign) + && Objects.equals(visualizationColor01, that.visualizationColor01) + && Objects.equals(visualizationColor02, that.visualizationColor02) + && Objects.equals(visualizationColor03, that.visualizationColor03) + && Objects.equals(visualizationColor04, that.visualizationColor04) + && Objects.equals(visualizationColor05, that.visualizationColor05) + && Objects.equals(visualizationColor06, that.visualizationColor06) + && Objects.equals(visualizationColor07, that.visualizationColor07) + && Objects.equals(visualizationColor08, that.visualizationColor08) + && Objects.equals(visualizationColor09, that.visualizationColor09) + && Objects.equals(visualizationColor10, that.visualizationColor10) + && Objects.equals(visualizationColor11, that.visualizationColor11) + && Objects.equals(visualizationColor12, that.visualizationColor12) + && Objects.equals(visualizationColor13, that.visualizationColor13) + && Objects.equals(visualizationColor14, that.visualizationColor14) + && Objects.equals(visualizationColor15, that.visualizationColor15) + && Objects.equals(visualizationColor16, that.visualizationColor16) + && Objects.equals(visualizationColor17, that.visualizationColor17) + && Objects.equals(visualizationColor18, that.visualizationColor18) + && Objects.equals(visualizationColor19, that.visualizationColor19) + && Objects.equals(visualizationColor20, that.visualizationColor20) + && Objects.equals(widgetBackgroundColor, that.widgetBackgroundColor) + && Objects.equals(widgetBorderColor, that.widgetBorderColor) + && Objects.equals(widgetCornerRadius, that.widgetCornerRadius) + && Objects.equals(widgetHeaderAlignment, that.widgetHeaderAlignment) + && Objects.equals(widgetMargin, that.widgetMargin) + && Objects.equals(widgetPadding, that.widgetPadding) + && Objects.equals(widgetShadow, that.widgetShadow); + } + + @Override + public int hashCode() { + return Objects.hash( + axisLineColor, + canvasBackgroundColor, + continuousGradient, + fontColor, + fontFamily, + fontSettings, + gridLineColor, + markCornerRadius, + selectionColor, + sentimentColors, + textBoxVerticalAlign, + visualizationColor01, + visualizationColor02, + visualizationColor03, + visualizationColor04, + visualizationColor05, + visualizationColor06, + visualizationColor07, + visualizationColor08, + visualizationColor09, + visualizationColor10, + visualizationColor11, + visualizationColor12, + visualizationColor13, + visualizationColor14, + visualizationColor15, + visualizationColor16, + visualizationColor17, + visualizationColor18, + visualizationColor19, + visualizationColor20, + widgetBackgroundColor, + widgetBorderColor, + widgetCornerRadius, + widgetHeaderAlignment, + widgetMargin, + widgetPadding, + widgetShadow); + } + + @Override + public String toString() { + return new ToStringer(DashboardTheme.class) + .add("axisLineColor", axisLineColor) + .add("canvasBackgroundColor", canvasBackgroundColor) + .add("continuousGradient", continuousGradient) + .add("fontColor", fontColor) + .add("fontFamily", fontFamily) + .add("fontSettings", fontSettings) + .add("gridLineColor", gridLineColor) + .add("markCornerRadius", markCornerRadius) + .add("selectionColor", selectionColor) + .add("sentimentColors", sentimentColors) + .add("textBoxVerticalAlign", textBoxVerticalAlign) + .add("visualizationColor01", visualizationColor01) + .add("visualizationColor02", visualizationColor02) + .add("visualizationColor03", visualizationColor03) + .add("visualizationColor04", visualizationColor04) + .add("visualizationColor05", visualizationColor05) + .add("visualizationColor06", visualizationColor06) + .add("visualizationColor07", visualizationColor07) + .add("visualizationColor08", visualizationColor08) + .add("visualizationColor09", visualizationColor09) + .add("visualizationColor10", visualizationColor10) + .add("visualizationColor11", visualizationColor11) + .add("visualizationColor12", visualizationColor12) + .add("visualizationColor13", visualizationColor13) + .add("visualizationColor14", visualizationColor14) + .add("visualizationColor15", visualizationColor15) + .add("visualizationColor16", visualizationColor16) + .add("visualizationColor17", visualizationColor17) + .add("visualizationColor18", visualizationColor18) + .add("visualizationColor19", visualizationColor19) + .add("visualizationColor20", visualizationColor20) + .add("widgetBackgroundColor", widgetBackgroundColor) + .add("widgetBorderColor", widgetBorderColor) + .add("widgetCornerRadius", widgetCornerRadius) + .add("widgetHeaderAlignment", widgetHeaderAlignment) + .add("widgetMargin", widgetMargin) + .add("widgetPadding", widgetPadding) + .add("widgetShadow", widgetShadow) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeAlignment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeAlignment.java new file mode 100644 index 000000000..d1a20ec64 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeAlignment.java @@ -0,0 +1,13 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; + +/** Horizontal alignment options for widget titles and descriptions. */ +@Generated +public enum DashboardThemeAlignment { + CENTER, + LEFT, + RIGHT, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradient.java new file mode 100644 index 000000000..a0bcc8fcf --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradient.java @@ -0,0 +1,65 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Configuration for continuous color gradients, with separate values for light and dark mode. Each + * mode's gradient can reference the visualization color palette via from_categorical_index, use a + * named color scheme, or define a custom sequential or diverging ramp. + */ +@Generated +public class DashboardThemeContinuousGradient { + /** Gradient value used when the dashboard is rendered in dark mode. */ + @JsonProperty("dark_mode") + private DashboardThemeContinuousGradientGradientValue darkMode; + + /** Gradient value used when the dashboard is rendered in light mode. */ + @JsonProperty("light_mode") + private DashboardThemeContinuousGradientGradientValue lightMode; + + public DashboardThemeContinuousGradient setDarkMode( + DashboardThemeContinuousGradientGradientValue darkMode) { + this.darkMode = darkMode; + return this; + } + + public DashboardThemeContinuousGradientGradientValue getDarkMode() { + return darkMode; + } + + public DashboardThemeContinuousGradient setLightMode( + DashboardThemeContinuousGradientGradientValue lightMode) { + this.lightMode = lightMode; + return this; + } + + public DashboardThemeContinuousGradientGradientValue getLightMode() { + return lightMode; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardThemeContinuousGradient that = (DashboardThemeContinuousGradient) o; + return Objects.equals(darkMode, that.darkMode) && Objects.equals(lightMode, that.lightMode); + } + + @Override + public int hashCode() { + return Objects.hash(darkMode, lightMode); + } + + @Override + public String toString() { + return new ToStringer(DashboardThemeContinuousGradient.class) + .add("darkMode", darkMode) + .add("lightMode", lightMode) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientCustomDivergingRamp.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientCustomDivergingRamp.java new file mode 100644 index 000000000..3764c7401 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientCustomDivergingRamp.java @@ -0,0 +1,79 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A custom three-stop diverging gradient ramp. */ +@Generated +public class DashboardThemeContinuousGradientCustomDivergingRamp { + /** The color at the end of the gradient (highest value). */ + @JsonProperty("end") + private DashboardThemeDashboardThemeColor end; + + /** The color at the midpoint of the gradient. */ + @JsonProperty("mid") + private DashboardThemeDashboardThemeColor mid; + + /** The color at the start of the gradient (lowest value). */ + @JsonProperty("start") + private DashboardThemeDashboardThemeColor start; + + public DashboardThemeContinuousGradientCustomDivergingRamp setEnd( + DashboardThemeDashboardThemeColor end) { + this.end = end; + return this; + } + + public DashboardThemeDashboardThemeColor getEnd() { + return end; + } + + public DashboardThemeContinuousGradientCustomDivergingRamp setMid( + DashboardThemeDashboardThemeColor mid) { + this.mid = mid; + return this; + } + + public DashboardThemeDashboardThemeColor getMid() { + return mid; + } + + public DashboardThemeContinuousGradientCustomDivergingRamp setStart( + DashboardThemeDashboardThemeColor start) { + this.start = start; + return this; + } + + public DashboardThemeDashboardThemeColor getStart() { + return start; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardThemeContinuousGradientCustomDivergingRamp that = + (DashboardThemeContinuousGradientCustomDivergingRamp) o; + return Objects.equals(end, that.end) + && Objects.equals(mid, that.mid) + && Objects.equals(start, that.start); + } + + @Override + public int hashCode() { + return Objects.hash(end, mid, start); + } + + @Override + public String toString() { + return new ToStringer(DashboardThemeContinuousGradientCustomDivergingRamp.class) + .add("end", end) + .add("mid", mid) + .add("start", start) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientCustomSequentialRamp.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientCustomSequentialRamp.java new file mode 100644 index 000000000..c7270f23e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientCustomSequentialRamp.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A custom two-stop sequential gradient ramp. */ +@Generated +public class DashboardThemeContinuousGradientCustomSequentialRamp { + /** The color at the end of the gradient (highest value). */ + @JsonProperty("end") + private DashboardThemeDashboardThemeColor end; + + /** The color at the start of the gradient (lowest value). */ + @JsonProperty("start") + private DashboardThemeDashboardThemeColor start; + + public DashboardThemeContinuousGradientCustomSequentialRamp setEnd( + DashboardThemeDashboardThemeColor end) { + this.end = end; + return this; + } + + public DashboardThemeDashboardThemeColor getEnd() { + return end; + } + + public DashboardThemeContinuousGradientCustomSequentialRamp setStart( + DashboardThemeDashboardThemeColor start) { + this.start = start; + return this; + } + + public DashboardThemeDashboardThemeColor getStart() { + return start; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardThemeContinuousGradientCustomSequentialRamp that = + (DashboardThemeContinuousGradientCustomSequentialRamp) o; + return Objects.equals(end, that.end) && Objects.equals(start, that.start); + } + + @Override + public int hashCode() { + return Objects.hash(end, start); + } + + @Override + public String toString() { + return new ToStringer(DashboardThemeContinuousGradientCustomSequentialRamp.class) + .add("end", end) + .add("start", start) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientGradientValue.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientGradientValue.java new file mode 100644 index 000000000..96ecc383d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeContinuousGradientGradientValue.java @@ -0,0 +1,113 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** The gradient for one color mode. Set at most one field. */ +@Generated +public class DashboardThemeContinuousGradientGradientValue { + /** A static color string (for example, '#FF0000'). */ + @JsonProperty("color") + private String color; + + /** A named color scheme (for example, 'blues', 'viridis', 'spectral'). */ + @JsonProperty("color_scheme") + private String colorScheme; + + /** A custom three-stop diverging gradient. */ + @JsonProperty("custom_diverging") + private DashboardThemeContinuousGradientCustomDivergingRamp customDiverging; + + /** A custom two-stop sequential gradient. */ + @JsonProperty("custom_sequential") + private DashboardThemeContinuousGradientCustomSequentialRamp customSequential; + + /** + * A 0-based index into the visualization color palette, where 0 is visualization_color_01. Valid + * values are 0 to 19. + */ + @JsonProperty("from_categorical_index") + private Long fromCategoricalIndex; + + public DashboardThemeContinuousGradientGradientValue setColor(String color) { + this.color = color; + return this; + } + + public String getColor() { + return color; + } + + public DashboardThemeContinuousGradientGradientValue setColorScheme(String colorScheme) { + this.colorScheme = colorScheme; + return this; + } + + public String getColorScheme() { + return colorScheme; + } + + public DashboardThemeContinuousGradientGradientValue setCustomDiverging( + DashboardThemeContinuousGradientCustomDivergingRamp customDiverging) { + this.customDiverging = customDiverging; + return this; + } + + public DashboardThemeContinuousGradientCustomDivergingRamp getCustomDiverging() { + return customDiverging; + } + + public DashboardThemeContinuousGradientGradientValue setCustomSequential( + DashboardThemeContinuousGradientCustomSequentialRamp customSequential) { + this.customSequential = customSequential; + return this; + } + + public DashboardThemeContinuousGradientCustomSequentialRamp getCustomSequential() { + return customSequential; + } + + public DashboardThemeContinuousGradientGradientValue setFromCategoricalIndex( + Long fromCategoricalIndex) { + this.fromCategoricalIndex = fromCategoricalIndex; + return this; + } + + public Long getFromCategoricalIndex() { + return fromCategoricalIndex; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardThemeContinuousGradientGradientValue that = + (DashboardThemeContinuousGradientGradientValue) o; + return Objects.equals(color, that.color) + && Objects.equals(colorScheme, that.colorScheme) + && Objects.equals(customDiverging, that.customDiverging) + && Objects.equals(customSequential, that.customSequential) + && Objects.equals(fromCategoricalIndex, that.fromCategoricalIndex); + } + + @Override + public int hashCode() { + return Objects.hash( + color, colorScheme, customDiverging, customSequential, fromCategoricalIndex); + } + + @Override + public String toString() { + return new ToStringer(DashboardThemeContinuousGradientGradientValue.class) + .add("color", color) + .add("colorScheme", colorScheme) + .add("customDiverging", customDiverging) + .add("customSequential", customSequential) + .add("fromCategoricalIndex", fromCategoricalIndex) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeDashboardThemeColor.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeDashboardThemeColor.java new file mode 100644 index 000000000..104d24878 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeDashboardThemeColor.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Represents a color value with optional overrides for light and dark modes. Authors can customize + * colors separately to cater to each mode, based on the viewer's user-level theme preference. + */ +@Generated +public class DashboardThemeDashboardThemeColor { + /** The color used when the dashboard is rendered in dark mode (for example, '#FF0000'). */ + @JsonProperty("dark") + private String dark; + + /** The color used when the dashboard is rendered in light mode (for example, '#FF0000'). */ + @JsonProperty("light") + private String light; + + public DashboardThemeDashboardThemeColor setDark(String dark) { + this.dark = dark; + return this; + } + + public String getDark() { + return dark; + } + + public DashboardThemeDashboardThemeColor setLight(String light) { + this.light = light; + return this; + } + + public String getLight() { + return light; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardThemeDashboardThemeColor that = (DashboardThemeDashboardThemeColor) o; + return Objects.equals(dark, that.dark) && Objects.equals(light, that.light); + } + + @Override + public int hashCode() { + return Objects.hash(dark, light); + } + + @Override + public String toString() { + return new ToStringer(DashboardThemeDashboardThemeColor.class) + .add("dark", dark) + .add("light", light) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontConfig.java new file mode 100644 index 000000000..8fcfca80f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontConfig.java @@ -0,0 +1,136 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Defines the typography settings for a single text category. */ +@Generated +public class DashboardThemeFontConfig { + /** The font color applied to text in this category. */ + @JsonProperty("font_color") + private DashboardThemeDashboardThemeColor fontColor; + + /** The font family name used for text in this category. */ + @JsonProperty("font_family") + private String fontFamily; + + /** The font size in pixels. */ + @JsonProperty("font_size") + private Long fontSize; + + /** The font style (slant) applied to text in this category. */ + @JsonProperty("font_style") + private DashboardThemeFontStyle fontStyle; + + /** The font weight value (for example, 400 for normal, 700 for bold). */ + @JsonProperty("font_weight") + private Long fontWeight; + + /** The text case transformation applied to text in this category. */ + @JsonProperty("text_case") + private DashboardThemeTextCase textCase; + + /** The text decoration applied to text in this category. */ + @JsonProperty("text_decoration") + private DashboardThemeTextDecoration textDecoration; + + public DashboardThemeFontConfig setFontColor(DashboardThemeDashboardThemeColor fontColor) { + this.fontColor = fontColor; + return this; + } + + public DashboardThemeDashboardThemeColor getFontColor() { + return fontColor; + } + + public DashboardThemeFontConfig setFontFamily(String fontFamily) { + this.fontFamily = fontFamily; + return this; + } + + public String getFontFamily() { + return fontFamily; + } + + public DashboardThemeFontConfig setFontSize(Long fontSize) { + this.fontSize = fontSize; + return this; + } + + public Long getFontSize() { + return fontSize; + } + + public DashboardThemeFontConfig setFontStyle(DashboardThemeFontStyle fontStyle) { + this.fontStyle = fontStyle; + return this; + } + + public DashboardThemeFontStyle getFontStyle() { + return fontStyle; + } + + public DashboardThemeFontConfig setFontWeight(Long fontWeight) { + this.fontWeight = fontWeight; + return this; + } + + public Long getFontWeight() { + return fontWeight; + } + + public DashboardThemeFontConfig setTextCase(DashboardThemeTextCase textCase) { + this.textCase = textCase; + return this; + } + + public DashboardThemeTextCase getTextCase() { + return textCase; + } + + public DashboardThemeFontConfig setTextDecoration(DashboardThemeTextDecoration textDecoration) { + this.textDecoration = textDecoration; + return this; + } + + public DashboardThemeTextDecoration getTextDecoration() { + return textDecoration; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardThemeFontConfig that = (DashboardThemeFontConfig) o; + return Objects.equals(fontColor, that.fontColor) + && Objects.equals(fontFamily, that.fontFamily) + && Objects.equals(fontSize, that.fontSize) + && Objects.equals(fontStyle, that.fontStyle) + && Objects.equals(fontWeight, that.fontWeight) + && Objects.equals(textCase, that.textCase) + && Objects.equals(textDecoration, that.textDecoration); + } + + @Override + public int hashCode() { + return Objects.hash( + fontColor, fontFamily, fontSize, fontStyle, fontWeight, textCase, textDecoration); + } + + @Override + public String toString() { + return new ToStringer(DashboardThemeFontConfig.class) + .add("fontColor", fontColor) + .add("fontFamily", fontFamily) + .add("fontSize", fontSize) + .add("fontStyle", fontStyle) + .add("fontWeight", fontWeight) + .add("textCase", textCase) + .add("textDecoration", textDecoration) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontSettings.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontSettings.java new file mode 100644 index 000000000..19052be89 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontSettings.java @@ -0,0 +1,113 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Per-category typography overrides. When font_settings.base is set, it takes precedence over the + * top-level font_family and font_color. More specific categories (widget_title, widget_description, + * field_title, field_value) in turn override base. + */ +@Generated +public class DashboardThemeFontSettings { + /** The default font config applied to all text unless overridden by a more specific category. */ + @JsonProperty("base") + private DashboardThemeFontConfig base; + + /** The font config applied to field titles (for example, axis titles, table heading titles). */ + @JsonProperty("field_title") + private DashboardThemeFontConfig fieldTitle; + + /** + * The font config applied to field values (for example, axis tick labels, table cell values, + * tooltip values). + */ + @JsonProperty("field_value") + private DashboardThemeFontConfig fieldValue; + + /** The font config applied to widget descriptions. */ + @JsonProperty("widget_description") + private DashboardThemeFontConfig widgetDescription; + + /** The font config applied to widget titles. */ + @JsonProperty("widget_title") + private DashboardThemeFontConfig widgetTitle; + + public DashboardThemeFontSettings setBase(DashboardThemeFontConfig base) { + this.base = base; + return this; + } + + public DashboardThemeFontConfig getBase() { + return base; + } + + public DashboardThemeFontSettings setFieldTitle(DashboardThemeFontConfig fieldTitle) { + this.fieldTitle = fieldTitle; + return this; + } + + public DashboardThemeFontConfig getFieldTitle() { + return fieldTitle; + } + + public DashboardThemeFontSettings setFieldValue(DashboardThemeFontConfig fieldValue) { + this.fieldValue = fieldValue; + return this; + } + + public DashboardThemeFontConfig getFieldValue() { + return fieldValue; + } + + public DashboardThemeFontSettings setWidgetDescription( + DashboardThemeFontConfig widgetDescription) { + this.widgetDescription = widgetDescription; + return this; + } + + public DashboardThemeFontConfig getWidgetDescription() { + return widgetDescription; + } + + public DashboardThemeFontSettings setWidgetTitle(DashboardThemeFontConfig widgetTitle) { + this.widgetTitle = widgetTitle; + return this; + } + + public DashboardThemeFontConfig getWidgetTitle() { + return widgetTitle; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardThemeFontSettings that = (DashboardThemeFontSettings) o; + return Objects.equals(base, that.base) + && Objects.equals(fieldTitle, that.fieldTitle) + && Objects.equals(fieldValue, that.fieldValue) + && Objects.equals(widgetDescription, that.widgetDescription) + && Objects.equals(widgetTitle, that.widgetTitle); + } + + @Override + public int hashCode() { + return Objects.hash(base, fieldTitle, fieldValue, widgetDescription, widgetTitle); + } + + @Override + public String toString() { + return new ToStringer(DashboardThemeFontSettings.class) + .add("base", base) + .add("fieldTitle", fieldTitle) + .add("fieldValue", fieldValue) + .add("widgetDescription", widgetDescription) + .add("widgetTitle", widgetTitle) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontStyle.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontStyle.java new file mode 100644 index 000000000..7eae9258b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeFontStyle.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; + +/** Defines the font style (slant) applied to rendered text. */ +@Generated +public enum DashboardThemeFontStyle { + FONT_STYLE_ITALIC, + FONT_STYLE_NORMAL, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeSentimentColors.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeSentimentColors.java new file mode 100644 index 000000000..e421704b5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeSentimentColors.java @@ -0,0 +1,78 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * Shared sentiment colors reusable across visualizations, primarily for conditional formatting, + * ensuring consistent positive, negative, and neutral meaning throughout the dashboard. + */ +@Generated +public class DashboardThemeSentimentColors { + /** The color applied to negative sentiment values. */ + @JsonProperty("negative") + private DashboardThemeDashboardThemeColor negative; + + /** The color applied to neutral sentiment values. */ + @JsonProperty("neutral") + private DashboardThemeDashboardThemeColor neutral; + + /** The color applied to positive sentiment values. */ + @JsonProperty("positive") + private DashboardThemeDashboardThemeColor positive; + + public DashboardThemeSentimentColors setNegative(DashboardThemeDashboardThemeColor negative) { + this.negative = negative; + return this; + } + + public DashboardThemeDashboardThemeColor getNegative() { + return negative; + } + + public DashboardThemeSentimentColors setNeutral(DashboardThemeDashboardThemeColor neutral) { + this.neutral = neutral; + return this; + } + + public DashboardThemeDashboardThemeColor getNeutral() { + return neutral; + } + + public DashboardThemeSentimentColors setPositive(DashboardThemeDashboardThemeColor positive) { + this.positive = positive; + return this; + } + + public DashboardThemeDashboardThemeColor getPositive() { + return positive; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DashboardThemeSentimentColors that = (DashboardThemeSentimentColors) o; + return Objects.equals(negative, that.negative) + && Objects.equals(neutral, that.neutral) + && Objects.equals(positive, that.positive); + } + + @Override + public int hashCode() { + return Objects.hash(negative, neutral, positive); + } + + @Override + public String toString() { + return new ToStringer(DashboardThemeSentimentColors.class) + .add("negative", negative) + .add("neutral", neutral) + .add("positive", positive) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeTextCase.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeTextCase.java new file mode 100644 index 000000000..5e77c5b72 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeTextCase.java @@ -0,0 +1,13 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; + +/** Defines the text case transformation applied to rendered text. */ +@Generated +public enum DashboardThemeTextCase { + TEXT_CASE_CAPITALIZE, + TEXT_CASE_LOWERCASE, + TEXT_CASE_UPPERCASE, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeTextDecoration.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeTextDecoration.java new file mode 100644 index 000000000..45b3594f7 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeTextDecoration.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; + +/** Defines the decoration line applied to rendered text. */ +@Generated +public enum DashboardThemeTextDecoration { + TEXT_DECORATION_NONE, + TEXT_DECORATION_UNDERLINE, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeVerticalAlign.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeVerticalAlign.java new file mode 100644 index 000000000..eef183407 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/DashboardThemeVerticalAlign.java @@ -0,0 +1,13 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settingsv2; + +import com.databricks.sdk.support.Generated; + +/** Vertical alignment options for text box content. */ +@Generated +public enum DashboardThemeVerticalAlign { + VERTICAL_ALIGN_BOTTOM, + VERTICAL_ALIGN_CENTER, + VERTICAL_ALIGN_TOP, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/Setting.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/Setting.java index 0bebb3f58..7f954c711 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/Setting.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settingsv2/Setting.java @@ -129,6 +129,13 @@ public class Setting { @JsonProperty("effective_string_val") private StringMessage effectiveStringVal; + /** + * Effective setting value for the workspace_dashboard_theme setting. This is the final effective + * value of the setting. To set a value, use workspace_dashboard_theme. + */ + @JsonProperty("effective_workspace_dashboard_theme") + private DashboardTheme effectiveWorkspaceDashboardTheme; + /** * Effective setting value for workspace_label setting. This is the final effective value of * setting. To set a value use workspace_label. @@ -175,6 +182,13 @@ public class Setting { @JsonProperty("string_val") private StringMessage stringVal; + /** + * Setting value for the workspace_dashboard_theme setting. This is the setting value set by + * consumers. Check effective_workspace_dashboard_theme for the final setting value. + */ + @JsonProperty("workspace_dashboard_theme") + private DashboardTheme workspaceDashboardTheme; + /** * Setting value for workspace_label setting. This is the setting value set by consumers, check * effective_workspace_label for final setting value. @@ -348,6 +362,16 @@ public StringMessage getEffectiveStringVal() { return effectiveStringVal; } + public Setting setEffectiveWorkspaceDashboardTheme( + DashboardTheme effectiveWorkspaceDashboardTheme) { + this.effectiveWorkspaceDashboardTheme = effectiveWorkspaceDashboardTheme; + return this; + } + + public DashboardTheme getEffectiveWorkspaceDashboardTheme() { + return effectiveWorkspaceDashboardTheme; + } + public Setting setEffectiveWorkspaceLabel(WorkspaceLabelMessage effectiveWorkspaceLabel) { this.effectiveWorkspaceLabel = effectiveWorkspaceLabel; return this; @@ -413,6 +437,15 @@ public StringMessage getStringVal() { return stringVal; } + public Setting setWorkspaceDashboardTheme(DashboardTheme workspaceDashboardTheme) { + this.workspaceDashboardTheme = workspaceDashboardTheme; + return this; + } + + public DashboardTheme getWorkspaceDashboardTheme() { + return workspaceDashboardTheme; + } + public Setting setWorkspaceLabel(WorkspaceLabelMessage workspaceLabel) { this.workspaceLabel = workspaceLabel; return this; @@ -454,6 +487,7 @@ public boolean equals(Object o) { && Objects.equals(effectivePersonalCompute, that.effectivePersonalCompute) && Objects.equals(effectiveRestrictWorkspaceAdmins, that.effectiveRestrictWorkspaceAdmins) && Objects.equals(effectiveStringVal, that.effectiveStringVal) + && Objects.equals(effectiveWorkspaceDashboardTheme, that.effectiveWorkspaceDashboardTheme) && Objects.equals(effectiveWorkspaceLabel, that.effectiveWorkspaceLabel) && Objects.equals(integerVal, that.integerVal) && Objects.equals(name, that.name) @@ -461,6 +495,7 @@ public boolean equals(Object o) { && Objects.equals(personalCompute, that.personalCompute) && Objects.equals(restrictWorkspaceAdmins, that.restrictWorkspaceAdmins) && Objects.equals(stringVal, that.stringVal) + && Objects.equals(workspaceDashboardTheme, that.workspaceDashboardTheme) && Objects.equals(workspaceLabel, that.workspaceLabel); } @@ -484,6 +519,7 @@ public int hashCode() { effectivePersonalCompute, effectiveRestrictWorkspaceAdmins, effectiveStringVal, + effectiveWorkspaceDashboardTheme, effectiveWorkspaceLabel, integerVal, name, @@ -491,6 +527,7 @@ public int hashCode() { personalCompute, restrictWorkspaceAdmins, stringVal, + workspaceDashboardTheme, workspaceLabel); } @@ -520,6 +557,7 @@ public String toString() { .add("effectivePersonalCompute", effectivePersonalCompute) .add("effectiveRestrictWorkspaceAdmins", effectiveRestrictWorkspaceAdmins) .add("effectiveStringVal", effectiveStringVal) + .add("effectiveWorkspaceDashboardTheme", effectiveWorkspaceDashboardTheme) .add("effectiveWorkspaceLabel", effectiveWorkspaceLabel) .add("integerVal", integerVal) .add("name", name) @@ -527,6 +565,7 @@ public String toString() { .add("personalCompute", personalCompute) .add("restrictWorkspaceAdmins", restrictWorkspaceAdmins) .add("stringVal", stringVal) + .add("workspaceDashboardTheme", workspaceDashboardTheme) .add("workspaceLabel", workspaceLabel) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/GetSoftwareArtifactRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/GetSoftwareArtifactRequest.java new file mode 100644 index 000000000..b20ecf23c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/GetSoftwareArtifactRequest.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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 GetSoftwareArtifactRequest { + /** + * Resource name of the artifact, of the form `software-artifacts/{catalog}.{schema}.{artifact}`. + */ + @JsonIgnore private String name; + + public GetSoftwareArtifactRequest 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; + GetSoftwareArtifactRequest that = (GetSoftwareArtifactRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetSoftwareArtifactRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/GetSoftwareArtifactVersionRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/GetSoftwareArtifactVersionRequest.java new file mode 100644 index 000000000..5fda12ada --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/GetSoftwareArtifactVersionRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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 GetSoftwareArtifactVersionRequest { + /** + * Resource name of the version, of the form + * `software-artifacts/{catalog}.{schema}.{artifact}/versions/{version}`. + */ + @JsonIgnore private String name; + + public GetSoftwareArtifactVersionRequest 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; + GetSoftwareArtifactVersionRequest that = (GetSoftwareArtifactVersionRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetSoftwareArtifactVersionRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ImageAccelerationDetail.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ImageAccelerationDetail.java new file mode 100644 index 000000000..41a82a39d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ImageAccelerationDetail.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Image acceleration information for a software artifact version. */ +@Generated +public class ImageAccelerationDetail { + /** Image acceleration status for the version. */ + @JsonProperty("status") + private ImageAccelerationDetailStatus status; + + public ImageAccelerationDetail setStatus(ImageAccelerationDetailStatus status) { + this.status = status; + return this; + } + + public ImageAccelerationDetailStatus getStatus() { + return status; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ImageAccelerationDetail that = (ImageAccelerationDetail) o; + return Objects.equals(status, that.status); + } + + @Override + public int hashCode() { + return Objects.hash(status); + } + + @Override + public String toString() { + return new ToStringer(ImageAccelerationDetail.class).add("status", status).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ImageAccelerationDetailStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ImageAccelerationDetailStatus.java new file mode 100644 index 000000000..2235cac49 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ImageAccelerationDetailStatus.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +import com.databricks.sdk.support.Generated; + +/** Image acceleration status for a software artifact version. */ +@Generated +public enum ImageAccelerationDetailStatus { + SUCCESS, + UNSPECIFIED, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactVersionsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactVersionsRequest.java new file mode 100644 index 000000000..6304a03df --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactVersionsRequest.java @@ -0,0 +1,84 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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 ListSoftwareArtifactVersionsRequest { + /** + * Maximum number of versions to return. If omitted or set to 0, the page size defaults to 50. The + * maximum value is 50; values above 50 or below 0 are rejected. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * Opaque continuation token from a previous response's next_page_token. Omit for the first page. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** + * Resource name of the parent artifact, of the form + * `software-artifacts/{catalog}.{schema}.{artifact}`. + */ + @JsonIgnore private String parent; + + public ListSoftwareArtifactVersionsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListSoftwareArtifactVersionsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListSoftwareArtifactVersionsRequest 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; + ListSoftwareArtifactVersionsRequest that = (ListSoftwareArtifactVersionsRequest) 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(ListSoftwareArtifactVersionsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactVersionsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactVersionsResponse.java new file mode 100644 index 000000000..a1b988e3c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactVersionsResponse.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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 containing a page of software artifact versions. */ +@Generated +public class ListSoftwareArtifactVersionsResponse { + /** Opaque token to pass as the next request's page_token. Empty when there are no more pages. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + /** The versions of the requested software artifact. */ + @JsonProperty("software_artifact_versions") + private Collection softwareArtifactVersions; + + public ListSoftwareArtifactVersionsResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public ListSoftwareArtifactVersionsResponse setSoftwareArtifactVersions( + Collection softwareArtifactVersions) { + this.softwareArtifactVersions = softwareArtifactVersions; + return this; + } + + public Collection getSoftwareArtifactVersions() { + return softwareArtifactVersions; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListSoftwareArtifactVersionsResponse that = (ListSoftwareArtifactVersionsResponse) o; + return Objects.equals(nextPageToken, that.nextPageToken) + && Objects.equals(softwareArtifactVersions, that.softwareArtifactVersions); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, softwareArtifactVersions); + } + + @Override + public String toString() { + return new ToStringer(ListSoftwareArtifactVersionsResponse.class) + .add("nextPageToken", nextPageToken) + .add("softwareArtifactVersions", softwareArtifactVersions) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactsRequest.java new file mode 100644 index 000000000..8ba3ebd92 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactsRequest.java @@ -0,0 +1,83 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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 ListSoftwareArtifactsRequest { + /** + * Maximum number of software artifacts to return. If omitted or set to 0, the page size defaults + * to 50. The maximum value is 50; values above 50 or below 0 are rejected. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * Opaque continuation token from a previous response's next_page_token. Omit for the first page. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** Resource name of the parent schema, of the form `schemas/{catalog}.{schema}`. */ + @JsonIgnore + @QueryParam("parent") + private String parent; + + public ListSoftwareArtifactsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListSoftwareArtifactsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListSoftwareArtifactsRequest 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; + ListSoftwareArtifactsRequest that = (ListSoftwareArtifactsRequest) 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(ListSoftwareArtifactsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactsResponse.java new file mode 100644 index 000000000..399e900cd --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ListSoftwareArtifactsResponse.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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 containing a page of software artifacts. */ +@Generated +public class ListSoftwareArtifactsResponse { + /** Opaque token to pass as the next request's page_token. Empty when there are no more pages. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + /** The software artifacts under the requested schema. */ + @JsonProperty("software_artifacts") + private Collection softwareArtifacts; + + public ListSoftwareArtifactsResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public ListSoftwareArtifactsResponse setSoftwareArtifacts( + Collection softwareArtifacts) { + this.softwareArtifacts = softwareArtifacts; + return this; + } + + public Collection getSoftwareArtifacts() { + return softwareArtifacts; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListSoftwareArtifactsResponse that = (ListSoftwareArtifactsResponse) o; + return Objects.equals(nextPageToken, that.nextPageToken) + && Objects.equals(softwareArtifacts, that.softwareArtifacts); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, softwareArtifacts); + } + + @Override + public String toString() { + return new ToStringer(ListSoftwareArtifactsResponse.class) + .add("nextPageToken", nextPageToken) + .add("softwareArtifacts", softwareArtifacts) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ResolveSoftwareArtifactVersionRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ResolveSoftwareArtifactVersionRequest.java new file mode 100644 index 000000000..d14e6add5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ResolveSoftwareArtifactVersionRequest.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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; + +/** Request to resolve a software artifact version from its tag alias. */ +@Generated +public class ResolveSoftwareArtifactVersionRequest { + /** Image tag alias selecting the version. */ + @JsonProperty("alias") + private String alias; + + /** Resource name of the software artifact containing the alias. */ + @JsonIgnore private String parent; + + public ResolveSoftwareArtifactVersionRequest setAlias(String alias) { + this.alias = alias; + return this; + } + + public String getAlias() { + return alias; + } + + public ResolveSoftwareArtifactVersionRequest 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; + ResolveSoftwareArtifactVersionRequest that = (ResolveSoftwareArtifactVersionRequest) o; + return Objects.equals(alias, that.alias) && Objects.equals(parent, that.parent); + } + + @Override + public int hashCode() { + return Objects.hash(alias, parent); + } + + @Override + public String toString() { + return new ToStringer(ResolveSoftwareArtifactVersionRequest.class) + .add("alias", alias) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ResolveSoftwareArtifactVersionResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ResolveSoftwareArtifactVersionResponse.java new file mode 100644 index 000000000..97b0260d4 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/ResolveSoftwareArtifactVersionResponse.java @@ -0,0 +1,46 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Response containing the resolved software artifact version. */ +@Generated +public class ResolveSoftwareArtifactVersionResponse { + /** The software artifact version selected by the alias. */ + @JsonProperty("software_artifact_version") + private SoftwareArtifactVersion softwareArtifactVersion; + + public ResolveSoftwareArtifactVersionResponse setSoftwareArtifactVersion( + SoftwareArtifactVersion softwareArtifactVersion) { + this.softwareArtifactVersion = softwareArtifactVersion; + return this; + } + + public SoftwareArtifactVersion getSoftwareArtifactVersion() { + return softwareArtifactVersion; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ResolveSoftwareArtifactVersionResponse that = (ResolveSoftwareArtifactVersionResponse) o; + return Objects.equals(softwareArtifactVersion, that.softwareArtifactVersion); + } + + @Override + public int hashCode() { + return Objects.hash(softwareArtifactVersion); + } + + @Override + public String toString() { + return new ToStringer(ResolveSoftwareArtifactVersionResponse.class) + .add("softwareArtifactVersion", softwareArtifactVersion) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifact.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifact.java new file mode 100644 index 000000000..c80418fc5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifact.java @@ -0,0 +1,123 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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 software artifact in a Unity Catalog schema. */ +@Generated +public class SoftwareArtifact { + /** Time at which this software artifact was created. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** Principal name of the software artifact creator. */ + @JsonProperty("created_by") + private String createdBy; + + /** + * Resource name of the artifact, of the form `software-artifacts/{catalog}.{schema}.{artifact}`. + */ + @JsonProperty("name") + private String name; + + /** Principal name (a user, service principal, or group) that owns this artifact. */ + @JsonProperty("owner") + private String owner; + + /** Time at which this software artifact was last updated. */ + @JsonProperty("update_time") + private Timestamp updateTime; + + /** Principal name that last updated this software artifact. */ + @JsonProperty("updated_by") + private String updatedBy; + + public SoftwareArtifact setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public SoftwareArtifact setCreatedBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + public String getCreatedBy() { + return createdBy; + } + + public SoftwareArtifact setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public SoftwareArtifact setOwner(String owner) { + this.owner = owner; + return this; + } + + public String getOwner() { + return owner; + } + + public SoftwareArtifact setUpdateTime(Timestamp updateTime) { + this.updateTime = updateTime; + return this; + } + + public Timestamp getUpdateTime() { + return updateTime; + } + + public SoftwareArtifact setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + public String getUpdatedBy() { + return updatedBy; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SoftwareArtifact that = (SoftwareArtifact) o; + return Objects.equals(createTime, that.createTime) + && Objects.equals(createdBy, that.createdBy) + && Objects.equals(name, that.name) + && Objects.equals(owner, that.owner) + && Objects.equals(updateTime, that.updateTime) + && Objects.equals(updatedBy, that.updatedBy); + } + + @Override + public int hashCode() { + return Objects.hash(createTime, createdBy, name, owner, updateTime, updatedBy); + } + + @Override + public String toString() { + return new ToStringer(SoftwareArtifact.class) + .add("createTime", createTime) + .add("createdBy", createdBy) + .add("name", name) + .add("owner", owner) + .add("updateTime", updateTime) + .add("updatedBy", updatedBy) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactVersion.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactVersion.java new file mode 100644 index 000000000..d1ddc2922 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactVersion.java @@ -0,0 +1,160 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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.Collection; +import java.util.Objects; + +/** An immutable version of a software artifact, identified by its content digest. */ +@Generated +public class SoftwareArtifactVersion { + /** Time at which this software artifact version was created. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** Principal name of the software artifact version creator. */ + @JsonProperty("created_by") + private String createdBy; + + /** Content digest of the version, for example `sha256:...`. */ + @JsonProperty("digest") + private String digest; + + /** Image acceleration information for this version. */ + @JsonProperty("image_acceleration_details") + private ImageAccelerationDetail imageAccelerationDetails; + + /** + * Resource name of the version, of the form + * `software-artifacts/{catalog}.{schema}.{artifact}/versions/{version}`. + */ + @JsonProperty("name") + private String name; + + /** + * Tags (aliases) that currently point at this version, for example `latest` or `v1.2.3`. Bounded + * at 10 per version; a version pointed at by more tags returns an arbitrary 10 of them. + */ + @JsonProperty("tags") + private Collection tags; + + /** Time at which this software artifact version was last updated. */ + @JsonProperty("update_time") + private Timestamp updateTime; + + /** Principal name that last updated this software artifact version. */ + @JsonProperty("updated_by") + private String updatedBy; + + public SoftwareArtifactVersion setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public SoftwareArtifactVersion setCreatedBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + public String getCreatedBy() { + return createdBy; + } + + public SoftwareArtifactVersion setDigest(String digest) { + this.digest = digest; + return this; + } + + public String getDigest() { + return digest; + } + + public SoftwareArtifactVersion setImageAccelerationDetails( + ImageAccelerationDetail imageAccelerationDetails) { + this.imageAccelerationDetails = imageAccelerationDetails; + return this; + } + + public ImageAccelerationDetail getImageAccelerationDetails() { + return imageAccelerationDetails; + } + + public SoftwareArtifactVersion setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public SoftwareArtifactVersion setTags(Collection tags) { + this.tags = tags; + return this; + } + + public Collection getTags() { + return tags; + } + + public SoftwareArtifactVersion setUpdateTime(Timestamp updateTime) { + this.updateTime = updateTime; + return this; + } + + public Timestamp getUpdateTime() { + return updateTime; + } + + public SoftwareArtifactVersion setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + public String getUpdatedBy() { + return updatedBy; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SoftwareArtifactVersion that = (SoftwareArtifactVersion) o; + return Objects.equals(createTime, that.createTime) + && Objects.equals(createdBy, that.createdBy) + && Objects.equals(digest, that.digest) + && Objects.equals(imageAccelerationDetails, that.imageAccelerationDetails) + && Objects.equals(name, that.name) + && Objects.equals(tags, that.tags) + && Objects.equals(updateTime, that.updateTime) + && Objects.equals(updatedBy, that.updatedBy); + } + + @Override + public int hashCode() { + return Objects.hash( + createTime, createdBy, digest, imageAccelerationDetails, name, tags, updateTime, updatedBy); + } + + @Override + public String toString() { + return new ToStringer(SoftwareArtifactVersion.class) + .add("createTime", createTime) + .add("createdBy", createdBy) + .add("digest", digest) + .add("imageAccelerationDetails", imageAccelerationDetails) + .add("name", name) + .add("tags", tags) + .add("updateTime", updateTime) + .add("updatedBy", updatedBy) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactsAPI.java new file mode 100644 index 000000000..3ad479688 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactsAPI.java @@ -0,0 +1,104 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.softwareartifacts; + +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; + +/** Manage software artifacts and their versions in Unity Catalog. */ +@Generated +public class SoftwareArtifactsAPI { + private static final Logger LOG = LoggerFactory.getLogger(SoftwareArtifactsAPI.class); + + private final SoftwareArtifactsService impl; + + /** Regular-use constructor */ + public SoftwareArtifactsAPI(ApiClient apiClient) { + impl = new SoftwareArtifactsImpl(apiClient); + } + + /** Constructor for mocks */ + public SoftwareArtifactsAPI(SoftwareArtifactsService mock) { + impl = mock; + } + + public SoftwareArtifact getSoftwareArtifact(String name) { + return getSoftwareArtifact(new GetSoftwareArtifactRequest().setName(name)); + } + + /** Gets a software artifact. */ + public SoftwareArtifact getSoftwareArtifact(GetSoftwareArtifactRequest request) { + return impl.getSoftwareArtifact(request); + } + + public SoftwareArtifactVersion getSoftwareArtifactVersion(String name) { + return getSoftwareArtifactVersion(new GetSoftwareArtifactVersionRequest().setName(name)); + } + + /** Gets a software artifact version. */ + public SoftwareArtifactVersion getSoftwareArtifactVersion( + GetSoftwareArtifactVersionRequest request) { + return impl.getSoftwareArtifactVersion(request); + } + + public Iterable listSoftwareArtifactVersions(String parent) { + return listSoftwareArtifactVersions( + new ListSoftwareArtifactVersionsRequest().setParent(parent)); + } + + /** Lists the versions of a software artifact. */ + public Iterable listSoftwareArtifactVersions( + ListSoftwareArtifactVersionsRequest request) { + return Paginator.newTokenPagination( + request, + impl::listSoftwareArtifactVersions, + ListSoftwareArtifactVersionsResponse::getSoftwareArtifactVersions, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + public Iterable listSoftwareArtifacts(String parent) { + return listSoftwareArtifacts(new ListSoftwareArtifactsRequest().setParent(parent)); + } + + /** Lists software artifacts in a schema. */ + public Iterable listSoftwareArtifacts(ListSoftwareArtifactsRequest request) { + return Paginator.newTokenPagination( + request, + impl::listSoftwareArtifacts, + ListSoftwareArtifactsResponse::getSoftwareArtifacts, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + /** Resolves a software artifact version from its tag alias. */ + public ResolveSoftwareArtifactVersionResponse resolveSoftwareArtifactVersion( + ResolveSoftwareArtifactVersionRequest request) { + return impl.resolveSoftwareArtifactVersion(request); + } + + /** + * Updates a software artifact. The name is immutable; only the owner may be changed. The + * destination owner must exist in the account. The caller needs MANAGE_ACCESS_CONTROL on the + * artifact. The response contains its name and the requested owner; audit fields are omitted. + */ + public SoftwareArtifact updateSoftwareArtifact(UpdateSoftwareArtifactRequest request) { + return impl.updateSoftwareArtifact(request); + } + + public SoftwareArtifactsService impl() { + return impl; + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactsImpl.java new file mode 100644 index 000000000..4e0d49590 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactsImpl.java @@ -0,0 +1,125 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.softwareartifacts; + +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 SoftwareArtifacts */ +@Generated +class SoftwareArtifactsImpl implements SoftwareArtifactsService { + private final ApiClient apiClient; + + public SoftwareArtifactsImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public SoftwareArtifact getSoftwareArtifact(GetSoftwareArtifactRequest request) { + String path = String.format("/api/2.1/unity-catalog/%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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, SoftwareArtifact.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public SoftwareArtifactVersion getSoftwareArtifactVersion( + GetSoftwareArtifactVersionRequest request) { + String path = String.format("/api/2.1/unity-catalog/%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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, SoftwareArtifactVersion.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ListSoftwareArtifactVersionsResponse listSoftwareArtifactVersions( + ListSoftwareArtifactVersionsRequest request) { + String path = String.format("/api/2.1/unity-catalog/%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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListSoftwareArtifactVersionsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ListSoftwareArtifactsResponse listSoftwareArtifacts(ListSoftwareArtifactsRequest request) { + String path = "/api/2.1/unity-catalog/software-artifacts"; + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListSoftwareArtifactsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ResolveSoftwareArtifactVersionResponse resolveSoftwareArtifactVersion( + ResolveSoftwareArtifactVersionRequest request) { + String path = String.format("/api/2.1/unity-catalog/%s/versions:resolve", request.getParent()); + 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-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ResolveSoftwareArtifactVersionResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public SoftwareArtifact updateSoftwareArtifact(UpdateSoftwareArtifactRequest request) { + String path = String.format("/api/2.1/unity-catalog/%s", request.getName()); + try { + Request req = new Request("PATCH", path, apiClient.serialize(request.getSoftwareArtifact())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, SoftwareArtifact.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/softwareartifacts/SoftwareArtifactsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactsService.java new file mode 100644 index 000000000..e386956c4 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/SoftwareArtifactsService.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.softwareartifacts; + +import com.databricks.sdk.support.Generated; + +/** + * Manage software artifacts and their versions in Unity Catalog. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface SoftwareArtifactsService { + /** Gets a software artifact. */ + SoftwareArtifact getSoftwareArtifact(GetSoftwareArtifactRequest getSoftwareArtifactRequest); + + /** Gets a software artifact version. */ + SoftwareArtifactVersion getSoftwareArtifactVersion( + GetSoftwareArtifactVersionRequest getSoftwareArtifactVersionRequest); + + /** Lists the versions of a software artifact. */ + ListSoftwareArtifactVersionsResponse listSoftwareArtifactVersions( + ListSoftwareArtifactVersionsRequest listSoftwareArtifactVersionsRequest); + + /** Lists software artifacts in a schema. */ + ListSoftwareArtifactsResponse listSoftwareArtifacts( + ListSoftwareArtifactsRequest listSoftwareArtifactsRequest); + + /** Resolves a software artifact version from its tag alias. */ + ResolveSoftwareArtifactVersionResponse resolveSoftwareArtifactVersion( + ResolveSoftwareArtifactVersionRequest resolveSoftwareArtifactVersionRequest); + + /** + * Updates a software artifact. The name is immutable; only the owner may be changed. The + * destination owner must exist in the account. The caller needs MANAGE_ACCESS_CONTROL on the + * artifact. The response contains its name and the requested owner; audit fields are omitted. + */ + SoftwareArtifact updateSoftwareArtifact( + UpdateSoftwareArtifactRequest updateSoftwareArtifactRequest); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/UpdateSoftwareArtifactRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/UpdateSoftwareArtifactRequest.java new file mode 100644 index 000000000..efedce1ba --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/softwareartifacts/UpdateSoftwareArtifactRequest.java @@ -0,0 +1,85 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.softwareartifacts; + +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 com.google.protobuf.FieldMask; +import java.util.Objects; + +@Generated +public class UpdateSoftwareArtifactRequest { + /** + * Resource name of the artifact, of the form `software-artifacts/{catalog}.{schema}.{artifact}`. + */ + @JsonIgnore private String name; + + /** + * The software artifact to update. Its name identifies the existing artifact; only owner may be + * changed. + */ + @JsonProperty("software_artifact") + private SoftwareArtifact softwareArtifact; + + /** + * Fields to update, relative to `software_artifact`. Accepts `owner` or `*`; owner is the only + * mutable field, so both select the same update. Output-only values in the resource are ignored. + */ + @JsonIgnore + @QueryParam("update_mask") + private FieldMask updateMask; + + public UpdateSoftwareArtifactRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public UpdateSoftwareArtifactRequest setSoftwareArtifact(SoftwareArtifact softwareArtifact) { + this.softwareArtifact = softwareArtifact; + return this; + } + + public SoftwareArtifact getSoftwareArtifact() { + return softwareArtifact; + } + + public UpdateSoftwareArtifactRequest setUpdateMask(FieldMask updateMask) { + this.updateMask = updateMask; + return this; + } + + public FieldMask getUpdateMask() { + return updateMask; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UpdateSoftwareArtifactRequest that = (UpdateSoftwareArtifactRequest) o; + return Objects.equals(name, that.name) + && Objects.equals(softwareArtifact, that.softwareArtifact) + && Objects.equals(updateMask, that.updateMask); + } + + @Override + public int hashCode() { + return Objects.hash(name, softwareArtifact, updateMask); + } + + @Override + public String toString() { + return new ToStringer(UpdateSoftwareArtifactRequest.class) + .add("name", name) + .add("softwareArtifact", softwareArtifact) + .add("updateMask", updateMask) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfo.java index 537e7fe5e..c82aa46a7 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfo.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfo.java @@ -13,6 +13,36 @@ */ @Generated public class EndpointScalingInfo { + /** + * Reason the in-progress scaling change is delayed. When set, `estimated_completion_timestamp` is + * unset. Unset when the change is not delayed or no scaling change is in progress. + */ + @JsonProperty("delayed_reason") + private EndpointScalingInfoScalingDelayReason delayedReason; + + /** + * Estimated time at which the in-progress scaling change will complete, in milliseconds since the + * Unix epoch. The estimate may change as the scaling change progresses. Unset when no scaling + * change is in progress, when no estimate is available, or when the change is delayed (see + * `delayed_reason`). + */ + @JsonProperty("estimated_completion_timestamp") + private Long estimatedCompletionTimestamp; + + /** + * Percentage of index initialization completed, from 0 to 100. Set only during the + * `INITIALIZING_INDEX` phase; unset in other phases or when progress is not available. + */ + @JsonProperty("index_initialization_percentage") + private Long indexInitializationPercentage; + + /** + * Current phase of the in-progress scaling change. Unset when no scaling change is in progress or + * the phase is not available. + */ + @JsonProperty("phase") + private EndpointScalingInfoScalingPhase phase; + /** * The requested QPS target for the endpoint. Best-effort; the system does not guarantee this QPS * will be achieved. @@ -24,6 +54,50 @@ public class EndpointScalingInfo { @JsonProperty("state") private ScalingChangeState state; + /** + * Earliest time a new Target QPS change is accepted, in milliseconds since the Unix epoch. Set + * only while a scaling change is in progress, the change lock is on, and the endpoint has a + * recorded last throughput change; may be in the past once the lock has expired. + */ + @JsonProperty("target_qps_change_allowed_after_timestamp") + private Long targetQpsChangeAllowedAfterTimestamp; + + public EndpointScalingInfo setDelayedReason(EndpointScalingInfoScalingDelayReason delayedReason) { + this.delayedReason = delayedReason; + return this; + } + + public EndpointScalingInfoScalingDelayReason getDelayedReason() { + return delayedReason; + } + + public EndpointScalingInfo setEstimatedCompletionTimestamp(Long estimatedCompletionTimestamp) { + this.estimatedCompletionTimestamp = estimatedCompletionTimestamp; + return this; + } + + public Long getEstimatedCompletionTimestamp() { + return estimatedCompletionTimestamp; + } + + public EndpointScalingInfo setIndexInitializationPercentage(Long indexInitializationPercentage) { + this.indexInitializationPercentage = indexInitializationPercentage; + return this; + } + + public Long getIndexInitializationPercentage() { + return indexInitializationPercentage; + } + + public EndpointScalingInfo setPhase(EndpointScalingInfoScalingPhase phase) { + this.phase = phase; + return this; + } + + public EndpointScalingInfoScalingPhase getPhase() { + return phase; + } + public EndpointScalingInfo setRequestedTargetQps(Long requestedTargetQps) { this.requestedTargetQps = requestedTargetQps; return this; @@ -42,25 +116,53 @@ public ScalingChangeState getState() { return state; } + public EndpointScalingInfo setTargetQpsChangeAllowedAfterTimestamp( + Long targetQpsChangeAllowedAfterTimestamp) { + this.targetQpsChangeAllowedAfterTimestamp = targetQpsChangeAllowedAfterTimestamp; + return this; + } + + public Long getTargetQpsChangeAllowedAfterTimestamp() { + return targetQpsChangeAllowedAfterTimestamp; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; EndpointScalingInfo that = (EndpointScalingInfo) o; - return Objects.equals(requestedTargetQps, that.requestedTargetQps) - && Objects.equals(state, that.state); + return Objects.equals(delayedReason, that.delayedReason) + && Objects.equals(estimatedCompletionTimestamp, that.estimatedCompletionTimestamp) + && Objects.equals(indexInitializationPercentage, that.indexInitializationPercentage) + && Objects.equals(phase, that.phase) + && Objects.equals(requestedTargetQps, that.requestedTargetQps) + && Objects.equals(state, that.state) + && Objects.equals( + targetQpsChangeAllowedAfterTimestamp, that.targetQpsChangeAllowedAfterTimestamp); } @Override public int hashCode() { - return Objects.hash(requestedTargetQps, state); + return Objects.hash( + delayedReason, + estimatedCompletionTimestamp, + indexInitializationPercentage, + phase, + requestedTargetQps, + state, + targetQpsChangeAllowedAfterTimestamp); } @Override public String toString() { return new ToStringer(EndpointScalingInfo.class) + .add("delayedReason", delayedReason) + .add("estimatedCompletionTimestamp", estimatedCompletionTimestamp) + .add("indexInitializationPercentage", indexInitializationPercentage) + .add("phase", phase) .add("requestedTargetQps", requestedTargetQps) .add("state", state) + .add("targetQpsChangeAllowedAfterTimestamp", targetQpsChangeAllowedAfterTimestamp) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfoScalingDelayReason.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfoScalingDelayReason.java new file mode 100644 index 000000000..c26e01ae2 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfoScalingDelayReason.java @@ -0,0 +1,13 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.vectorsearch; + +import com.databricks.sdk.support.Generated; + +/** Reason an in-progress scaling change is delayed. */ +@Generated +public enum EndpointScalingInfoScalingDelayReason { + CAPACITY_UNAVAILABLE, + SCALE_DOWN_BLOCKED, + TAKING_LONGER_THAN_EXPECTED, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfoScalingPhase.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfoScalingPhase.java new file mode 100644 index 000000000..c6daa2b1e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfoScalingPhase.java @@ -0,0 +1,13 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.vectorsearch; + +import com.databricks.sdk.support.Generated; + +/** Phase of an in-progress scaling change. */ +@Generated +public enum EndpointScalingInfoScalingPhase { + ADJUSTING_CAPACITY, + ESTIMATING, + INITIALIZING_INDEX, +} diff --git a/examples/docs/pom.xml b/examples/docs/pom.xml index 0b878cbdb..d27ad4a73 100644 --- a/examples/docs/pom.xml +++ b/examples/docs/pom.xml @@ -24,7 +24,7 @@ com.databricks databricks-sdk-java - 0.176.0 + 0.177.0 diff --git a/examples/spring-boot-oauth-u2m-demo/pom.xml b/examples/spring-boot-oauth-u2m-demo/pom.xml index 4d32bff5f..6d4afe492 100644 --- a/examples/spring-boot-oauth-u2m-demo/pom.xml +++ b/examples/spring-boot-oauth-u2m-demo/pom.xml @@ -40,7 +40,7 @@ com.databricks databricks-sdk-java - 0.176.0 + 0.177.0 diff --git a/lockfile.json b/lockfile.json index 5a9c539d9..ac7d59776 100644 --- a/lockfile.json +++ b/lockfile.json @@ -1,7 +1,7 @@ { "artifactId": "databricks-sdk-parent", "groupId": "com.databricks", - "version": "0.176.0", + "version": "0.177.0", "lockFileVersion": 1, "dependencies": [], "mavenPlugins": [], diff --git a/pom.xml b/pom.xml index 099338c23..c1f6bee15 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.databricks databricks-sdk-parent - 0.176.0 + 0.177.0 pom Databricks SDK for Java The Databricks SDK for Java includes functionality to accelerate development with Java for diff --git a/shaded/pom.xml b/shaded/pom.xml index d6151f065..5c18c63ea 100644 --- a/shaded/pom.xml +++ b/shaded/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - 0.176.0 + 0.177.0 com.databricks