diff --git a/.codegen/_last_sha b/.codegen/_last_sha index b8fbe0174..249e78289 100644 --- a/.codegen/_last_sha +++ b/.codegen/_last_sha @@ -1 +1 @@ -da7fcfc1c46b1bf871f3a25bb82e5c2ea62cdac0 \ No newline at end of file +07bd11eefe3ed30eebcfa846546af8b56b655973 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f95013d8c..5a37ce949 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,136 @@ # Version changelog +## Release v0.173.0 (2026-11-02) + +### API Changes +* Add `com.databricks.sdk.service.computemigrations` and `com.databricks.sdk.service.genieagents` packages. +* Add `workspaceClient.computeMigrations()` service. +* Add `workspaceClient.genieAgents()` service. +* Add `downloadFile()` and `uploadFile()` methods for `workspaceClient.sandbox()` service. +* Add `updateNetworkConnectivityConfig()` method for `accountClient.networkConnectivity()` service. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.CreateDirectGroupMemberProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.CreateDirectGroupMemberRequest`. +* Add `parent` field for `com.databricks.sdk.service.iamv2.CreateGroupProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.CreateGroupRequest`. +* Add `parent` field for `com.databricks.sdk.service.iamv2.CreateServicePrincipalProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.CreateServicePrincipalRequest`. +* Add `parent` field for `com.databricks.sdk.service.iamv2.CreateUserProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.CreateUserRequest`. +* Add `parent` field for `com.databricks.sdk.service.iamv2.CreateWorkspaceAssignmentProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.CreateWorkspaceAssignmentRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteDirectGroupMemberProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteDirectGroupMemberRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteGroupProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteGroupRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteServicePrincipalProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteServicePrincipalRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteUserProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteUserRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteWorkspaceAssignmentProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.DeleteWorkspaceAssignmentRequest`. +* Add `name` and `parent` fields for `com.databricks.sdk.service.iamv2.DirectGroupMember`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetDirectGroupMemberProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetDirectGroupMemberRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetGroupProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetGroupRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetServicePrincipalProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetServicePrincipalRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetUserProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetUserRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetWorkspaceAccessDetailLocalRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetWorkspaceAccessDetailRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetWorkspaceAssignmentProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetWorkspaceAssignmentRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.GetWorkspaceIdentityDetailRequest`. +* Add `name` and `parent` fields for `com.databricks.sdk.service.iamv2.Group`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.ListDirectGroupMembersProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.ListDirectGroupMembersRequest`. +* Add `parent` field for `com.databricks.sdk.service.iamv2.ListGroupsProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.ListGroupsRequest`. +* Add `parent` field for `com.databricks.sdk.service.iamv2.ListServicePrincipalsProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.ListServicePrincipalsRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.ListTransitiveParentGroupsProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.ListTransitiveParentGroupsRequest`. +* Add `parent` field for `com.databricks.sdk.service.iamv2.ListUsersProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.ListUsersRequest`. +* Add `parent` field for `com.databricks.sdk.service.iamv2.ListWorkspaceAssignmentsProxyRequest`. +* [Breaking] Add `parent` field for `com.databricks.sdk.service.iamv2.ListWorkspaceAssignmentsRequest`. +* Add `name` and `parent` fields for `com.databricks.sdk.service.iamv2.ServicePrincipal`. +* Add `name` field for `com.databricks.sdk.service.iamv2.TransitiveParentGroup`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateGroupProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateGroupRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateServicePrincipalProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateServicePrincipalRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateUserProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateUserRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateWorkspaceAssignmentProxyRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateWorkspaceAssignmentRequest`. +* [Breaking] Add `name` field for `com.databricks.sdk.service.iamv2.UpdateWorkspaceIdentityDetailRequest`. +* Add `name` and `parent` fields for `com.databricks.sdk.service.iamv2.User`. +* Add `name` field for `com.databricks.sdk.service.iamv2.WorkspaceAccessDetail`. +* Add `name` and `parent` fields for `com.databricks.sdk.service.iamv2.WorkspaceAssignment`. +* Add `name` field for `com.databricks.sdk.service.iamv2.WorkspaceIdentityDetail`. +* Add `serverlessCompute` field for `com.databricks.sdk.service.jobs.JobCluster`. +* Add `jobCompletion` field for `com.databricks.sdk.service.jobs.PerTriggerState`. +* Add `jobCompletion` field for `com.databricks.sdk.service.jobs.TriggerConfiguration`. +* Add `jobCompletion` field for `com.databricks.sdk.service.jobs.TriggerInfo`. +* Add `jobCompletion` field for `com.databricks.sdk.service.jobs.TriggerSettings`. +* Add `jobCompletion` field for `com.databricks.sdk.service.jobs.TriggerStateProto`. +* Add `billingWorkspaceId` field for `com.databricks.sdk.service.settings.NetworkConnectivityConfiguration`. +* Add `CREATE_FEATURE` and `READ_FEATURE` enum values for `com.databricks.sdk.service.catalog.Privilege`. +* Add `FEATURE` enum value for `com.databricks.sdk.service.catalog.SecurableType`. +* Add `JOB_COMPLETION` enum value for `com.databricks.sdk.service.jobs.TriggerType`. +* [Breaking] Change `createDirectGroupMember()`, `createGroup()`, `createServicePrincipal()`, `createUser()`, `createWorkspaceAssignment()`, `deleteDirectGroupMember()`, `deleteGroup()`, `deleteServicePrincipal()`, `deleteUser()`, `deleteWorkspaceAssignment()`, `getDirectGroupMember()`, `getGroup()`, `getServicePrincipal()`, `getUser()`, `getWorkspaceAccessDetail()`, `getWorkspaceAssignment()`, `listDirectGroupMembers()`, `listGroups()`, `listServicePrincipals()`, `listTransitiveParentGroups()`, `listUsers()`, `listWorkspaceAssignments()`, `updateGroup()`, `updateServicePrincipal()`, `updateUser()` and `updateWorkspaceAssignment()` methods for `accountClient.accountIamV2()` service. Method path has changed. +* [Breaking] Change `createDirectGroupMember()`, `createGroup()`, `createServicePrincipal()`, `createUser()`, `createWorkspaceAssignment()`, `deleteDirectGroupMember()`, `deleteGroup()`, `deleteServicePrincipal()`, `deleteUser()`, `deleteWorkspaceAssignment()`, `getDirectGroupMember()`, `getGroup()`, `getServicePrincipal()`, `getUser()`, `getWorkspaceAccessDetail()`, `getWorkspaceAssignment()`, `listDirectGroupMembers()`, `listGroups()`, `listServicePrincipals()`, `listTransitiveParentGroups()`, `listUsers()`, `listWorkspaceAssignments()`, `updateGroup()`, `updateServicePrincipal()`, `updateUser()` and `updateWorkspaceAssignment()` methods for `accountClient.accountIamV2()` service with new required argument order. +* [Breaking] Change `createDirectGroupMemberProxy()`, `deleteDirectGroupMemberProxy()`, `deleteGroupProxy()`, `deleteServicePrincipalProxy()`, `deleteUserProxy()`, `deleteWorkspaceAssignmentProxy()`, `getDirectGroupMemberProxy()`, `getGroupProxy()`, `getServicePrincipalProxy()`, `getUserProxy()`, `getWorkspaceAccessDetailLocal()`, `getWorkspaceAssignmentProxy()`, `getWorkspaceIdentityDetail()`, `listDirectGroupMembersProxy()`, `listTransitiveParentGroupsProxy()`, `updateGroupProxy()`, `updateServicePrincipalProxy()`, `updateUserProxy()`, `updateWorkspaceAssignmentProxy()` and `updateWorkspaceIdentityDetail()` methods for `workspaceClient.workspaceIamV2()` service with new required argument order. +* [Breaking] Change `createDirectGroupMemberProxy()`, `deleteDirectGroupMemberProxy()`, `deleteGroupProxy()`, `deleteServicePrincipalProxy()`, `deleteUserProxy()`, `deleteWorkspaceAssignmentProxy()`, `getDirectGroupMemberProxy()`, `getGroupProxy()`, `getServicePrincipalProxy()`, `getUserProxy()`, `getWorkspaceAccessDetailLocal()`, `getWorkspaceAssignmentProxy()`, `getWorkspaceIdentityDetail()`, `listDirectGroupMembersProxy()`, `listTransitiveParentGroupsProxy()`, `updateGroupProxy()`, `updateServicePrincipalProxy()`, `updateUserProxy()`, `updateWorkspaceAssignmentProxy()` and `updateWorkspaceIdentityDetail()` methods for `workspaceClient.workspaceIamV2()` service. Method path has changed. +* [Breaking] Remove `groupId` field for `com.databricks.sdk.service.iamv2.CreateDirectGroupMemberProxyRequest`. +* [Breaking] Remove `accountId` and `groupId` fields for `com.databricks.sdk.service.iamv2.CreateDirectGroupMemberRequest`. +* [Breaking] Remove `accountId` field for `com.databricks.sdk.service.iamv2.CreateGroupRequest`. +* [Breaking] Remove `accountId` field for `com.databricks.sdk.service.iamv2.CreateServicePrincipalRequest`. +* [Breaking] Remove `accountId` field for `com.databricks.sdk.service.iamv2.CreateUserRequest`. +* [Breaking] Remove `accountId` and `workspaceId` fields for `com.databricks.sdk.service.iamv2.CreateWorkspaceAssignmentRequest`. +* [Breaking] Remove `groupId` and `principalId` fields for `com.databricks.sdk.service.iamv2.DeleteDirectGroupMemberProxyRequest`. +* [Breaking] Remove `accountId`, `groupId` and `principalId` fields for `com.databricks.sdk.service.iamv2.DeleteDirectGroupMemberRequest`. +* [Breaking] Remove `groupId` field for `com.databricks.sdk.service.iamv2.DeleteGroupProxyRequest`. +* [Breaking] Remove `accountId` and `groupId` fields for `com.databricks.sdk.service.iamv2.DeleteGroupRequest`. +* [Breaking] Remove `servicePrincipalId` field for `com.databricks.sdk.service.iamv2.DeleteServicePrincipalProxyRequest`. +* [Breaking] Remove `accountId` and `servicePrincipalId` fields for `com.databricks.sdk.service.iamv2.DeleteServicePrincipalRequest`. +* [Breaking] Remove `userId` field for `com.databricks.sdk.service.iamv2.DeleteUserProxyRequest`. +* [Breaking] Remove `accountId` and `userId` fields for `com.databricks.sdk.service.iamv2.DeleteUserRequest`. +* [Breaking] Remove `principalId` field for `com.databricks.sdk.service.iamv2.DeleteWorkspaceAssignmentProxyRequest`. +* [Breaking] Remove `accountId`, `workspaceId` and `principalId` fields for `com.databricks.sdk.service.iamv2.DeleteWorkspaceAssignmentRequest`. +* [Breaking] Remove `groupId` and `principalId` fields for `com.databricks.sdk.service.iamv2.GetDirectGroupMemberProxyRequest`. +* [Breaking] Remove `accountId`, `groupId` and `principalId` fields for `com.databricks.sdk.service.iamv2.GetDirectGroupMemberRequest`. +* [Breaking] Remove `groupId` field for `com.databricks.sdk.service.iamv2.GetGroupProxyRequest`. +* [Breaking] Remove `accountId` and `groupId` fields for `com.databricks.sdk.service.iamv2.GetGroupRequest`. +* [Breaking] Remove `servicePrincipalId` field for `com.databricks.sdk.service.iamv2.GetServicePrincipalProxyRequest`. +* [Breaking] Remove `accountId` and `servicePrincipalId` fields for `com.databricks.sdk.service.iamv2.GetServicePrincipalRequest`. +* [Breaking] Remove `userId` field for `com.databricks.sdk.service.iamv2.GetUserProxyRequest`. +* [Breaking] Remove `accountId` and `userId` fields for `com.databricks.sdk.service.iamv2.GetUserRequest`. +* [Breaking] Remove `principalId` field for `com.databricks.sdk.service.iamv2.GetWorkspaceAccessDetailLocalRequest`. +* [Breaking] Remove `accountId`, `workspaceId` and `principalId` fields for `com.databricks.sdk.service.iamv2.GetWorkspaceAccessDetailRequest`. +* [Breaking] Remove `principalId` field for `com.databricks.sdk.service.iamv2.GetWorkspaceAssignmentProxyRequest`. +* [Breaking] Remove `accountId`, `workspaceId` and `principalId` fields for `com.databricks.sdk.service.iamv2.GetWorkspaceAssignmentRequest`. +* [Breaking] Remove `principalId` field for `com.databricks.sdk.service.iamv2.GetWorkspaceIdentityDetailRequest`. +* [Breaking] Remove `groupId` field for `com.databricks.sdk.service.iamv2.ListDirectGroupMembersProxyRequest`. +* [Breaking] Remove `accountId` and `groupId` fields for `com.databricks.sdk.service.iamv2.ListDirectGroupMembersRequest`. +* [Breaking] Remove `accountId` field for `com.databricks.sdk.service.iamv2.ListGroupsRequest`. +* [Breaking] Remove `accountId` field for `com.databricks.sdk.service.iamv2.ListServicePrincipalsRequest`. +* [Breaking] Remove `principalId` field for `com.databricks.sdk.service.iamv2.ListTransitiveParentGroupsProxyRequest`. +* [Breaking] Remove `accountId` and `principalId` fields for `com.databricks.sdk.service.iamv2.ListTransitiveParentGroupsRequest`. +* [Breaking] Remove `accountId` field for `com.databricks.sdk.service.iamv2.ListUsersRequest`. +* [Breaking] Remove `accountId` and `workspaceId` fields for `com.databricks.sdk.service.iamv2.ListWorkspaceAssignmentsRequest`. +* [Breaking] Remove `groupId` field for `com.databricks.sdk.service.iamv2.UpdateGroupProxyRequest`. +* [Breaking] Remove `accountId` and `groupId` fields for `com.databricks.sdk.service.iamv2.UpdateGroupRequest`. +* [Breaking] Remove `servicePrincipalId` field for `com.databricks.sdk.service.iamv2.UpdateServicePrincipalProxyRequest`. +* [Breaking] Remove `accountId` and `servicePrincipalId` fields for `com.databricks.sdk.service.iamv2.UpdateServicePrincipalRequest`. +* [Breaking] Remove `userId` field for `com.databricks.sdk.service.iamv2.UpdateUserProxyRequest`. +* [Breaking] Remove `accountId` and `userId` fields for `com.databricks.sdk.service.iamv2.UpdateUserRequest`. +* [Breaking] Remove `principalId` field for `com.databricks.sdk.service.iamv2.UpdateWorkspaceAssignmentProxyRequest`. +* [Breaking] Remove `accountId`, `workspaceId` and `principalId` fields for `com.databricks.sdk.service.iamv2.UpdateWorkspaceAssignmentRequest`. +* [Breaking] Remove `principalId` field for `com.databricks.sdk.service.iamv2.UpdateWorkspaceIdentityDetailRequest`. + ## Release v0.172.0 (2026-10-29) ### Bug Fixes diff --git a/databricks-sdk-java/lockfile.json b/databricks-sdk-java/lockfile.json index 6e0e2de4f..56db4b0f1 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.172.0", + "version": "0.173.0", "lockFileVersion": 1, "dependencies": [ { diff --git a/databricks-sdk-java/pom.xml b/databricks-sdk-java/pom.xml index a3a59e80e..c5fed7d17 100644 --- a/databricks-sdk-java/pom.xml +++ b/databricks-sdk-java/pom.xml @@ -5,7 +5,7 @@ com.databricks databricks-sdk-parent - 0.172.0 + 0.173.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 e217e7891..b4ce5c01c 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.computemigrations.ComputeMigrationsAPI; +import com.databricks.sdk.service.computemigrations.ComputeMigrationsService; import com.databricks.sdk.service.dashboards.GenieAPI; import com.databricks.sdk.service.dashboards.GenieService; import com.databricks.sdk.service.dashboards.LakeviewAPI; @@ -128,6 +130,8 @@ import com.databricks.sdk.service.files.DbfsService; import com.databricks.sdk.service.files.FilesAPI; import com.databricks.sdk.service.files.FilesService; +import com.databricks.sdk.service.genieagents.GenieAgentsAPI; +import com.databricks.sdk.service.genieagents.GenieAgentsService; import com.databricks.sdk.service.iam.AccessControlAPI; import com.databricks.sdk.service.iam.AccessControlService; import com.databricks.sdk.service.iam.AccountAccessControlProxyAPI; @@ -312,6 +316,7 @@ public class WorkspaceClient { private ClusterPoliciesAPI clusterPoliciesAPI; private ClustersExt clustersAPI; private CommandExecutionAPI commandExecutionAPI; + private ComputeMigrationsAPI computeMigrationsAPI; private ConnectionsAPI connectionsAPI; private ConsumerFulfillmentsAPI consumerFulfillmentsAPI; private ConsumerInstallationsAPI consumerInstallationsAPI; @@ -342,6 +347,7 @@ public class WorkspaceClient { private ForecastingAPI forecastingAPI; private FunctionsAPI functionsAPI; private GenieAPI genieAPI; + private GenieAgentsAPI genieAgentsAPI; private GitCredentialsAPI gitCredentialsAPI; private GlobalInitScriptsAPI globalInitScriptsAPI; private GrantsAPI grantsAPI; @@ -458,6 +464,7 @@ public WorkspaceClient(DatabricksConfig config) { clusterPoliciesAPI = new ClusterPoliciesAPI(apiClient); clustersAPI = new ClustersExt(apiClient); commandExecutionAPI = new CommandExecutionAPI(apiClient); + computeMigrationsAPI = new ComputeMigrationsAPI(apiClient); connectionsAPI = new ConnectionsAPI(apiClient); consumerFulfillmentsAPI = new ConsumerFulfillmentsAPI(apiClient); consumerInstallationsAPI = new ConsumerInstallationsAPI(apiClient); @@ -488,6 +495,7 @@ public WorkspaceClient(DatabricksConfig config) { forecastingAPI = new ForecastingAPI(apiClient); functionsAPI = new FunctionsAPI(apiClient); genieAPI = new GenieAPI(apiClient); + genieAgentsAPI = new GenieAgentsAPI(apiClient); gitCredentialsAPI = new GitCredentialsAPI(apiClient); globalInitScriptsAPI = new GlobalInitScriptsAPI(apiClient); grantsAPI = new GrantsAPI(apiClient); @@ -806,6 +814,11 @@ public CommandExecutionAPI commandExecution() { return commandExecutionAPI; } + /** Manage migrations of Classic compute workloads to Serverless. */ + public ComputeMigrationsAPI computeMigrations() { + return computeMigrationsAPI; + } + /** * A connection represents an external data source for use within Databricks. * @@ -1128,6 +1141,16 @@ public GenieAPI genie() { return genieAPI; } + /** + * Genie provides a no-code experience for business users, powered by AI/BI. Analysts set up Genie + * Agents that business users can use to ask questions using natural language. Genie uses data + * registered to Unity Catalog and requires at least CAN USE permission on a Pro or Serverless SQL + * warehouse. Also, Databricks Assistant must be enabled. + */ + public GenieAgentsAPI genieAgents() { + return genieAgentsAPI; + } + /** * Registers personal access token for Databricks to do operations on behalf of the user. * @@ -2559,6 +2582,17 @@ public WorkspaceClient withCommandExecutionAPI(CommandExecutionAPI commandExecut return this; } + /** Replace the default ComputeMigrationsService with a custom implementation. */ + public WorkspaceClient withComputeMigrationsImpl(ComputeMigrationsService computeMigrations) { + return this.withComputeMigrationsAPI(new ComputeMigrationsAPI(computeMigrations)); + } + + /** Replace the default ComputeMigrationsAPI with a custom implementation. */ + public WorkspaceClient withComputeMigrationsAPI(ComputeMigrationsAPI computeMigrations) { + this.computeMigrationsAPI = computeMigrations; + return this; + } + /** Replace the default ConnectionsService with a custom implementation. */ public WorkspaceClient withConnectionsImpl(ConnectionsService connections) { return this.withConnectionsAPI(new ConnectionsAPI(connections)); @@ -2896,6 +2930,17 @@ public WorkspaceClient withGenieAPI(GenieAPI genie) { return this; } + /** Replace the default GenieAgentsService with a custom implementation. */ + public WorkspaceClient withGenieAgentsImpl(GenieAgentsService genieAgents) { + return this.withGenieAgentsAPI(new GenieAgentsAPI(genieAgents)); + } + + /** Replace the default GenieAgentsAPI with a custom implementation. */ + public WorkspaceClient withGenieAgentsAPI(GenieAgentsAPI genieAgents) { + this.genieAgentsAPI = genieAgents; + return this; + } + /** Replace the default GitCredentialsService with a custom implementation. */ public WorkspaceClient withGitCredentialsImpl(GitCredentialsService gitCredentials) { return this.withGitCredentialsAPI(new GitCredentialsAPI(gitCredentials)); 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 b8581593e..21b2b36e4 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.172.0"; + private static final String version = "0.173.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/billing/AlertSpendStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/AlertSpendStatus.java index 6b51044e9..866b680dd 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/AlertSpendStatus.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/AlertSpendStatus.java @@ -16,8 +16,9 @@ public class AlertSpendStatus { /** * Percentage of the threshold consumed, as a decimal string rounded down to one decimal place * (for example, "68.4" means 68.4%). May exceed 100 when spend is over the threshold. Returns - * "0.0" if there's no spend, and is omitted if the threshold is $0. For shared thresholds, this - * is the only value returned; the absolute `spend` and `threshold` dollar amounts are withheld. + * "0.0" if there's no spend, except that a $0 threshold always returns "100.0". For shared + * thresholds, this is the only value returned; the absolute `spend` and `threshold` dollar + * amounts are withheld. */ @JsonProperty("percent_consumed") private String percentConsumed; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsAPI.java index 149b025f6..137032b91 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsAPI.java @@ -116,14 +116,10 @@ public CredentialInfo updateCredential(UpdateCredentialRequest request) { /** * Validates a credential. * - *

For service credentials (purpose is **SERVICE**), either the __credential_name__ or the - * cloud-specific credential must be provided. - * *

For storage credentials (purpose is **STORAGE**), at least one of __external_location_name__ * and __url__ need to be provided. If only one of them is provided, it will be used for * validation. And if both are provided, the __url__ will be used for validation, and - * __external_location_name__ will be ignored when checking overlapping urls. Either the - * __credential_name__ or the cloud-specific credential must be provided. + * __external_location_name__ will be ignored when checking overlapping urls. * *

The caller must be a metastore admin or the credential owner or have the required permission * on the metastore and the credential (e.g., **CREATE_EXTERNAL_LOCATION** when purpose is diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsService.java index c10706d32..8b1c71a97 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsService.java @@ -72,14 +72,10 @@ TemporaryCredentials generateTemporaryServiceCredential( /** * Validates a credential. * - *

For service credentials (purpose is **SERVICE**), either the __credential_name__ or the - * cloud-specific credential must be provided. - * *

For storage credentials (purpose is **STORAGE**), at least one of __external_location_name__ * and __url__ need to be provided. If only one of them is provided, it will be used for * validation. And if both are provided, the __url__ will be used for validation, and - * __external_location_name__ will be ignored when checking overlapping urls. Either the - * __credential_name__ or the cloud-specific credential must be provided. + * __external_location_name__ will be ignored when checking overlapping urls. * *

The caller must be a metastore admin or the credential owner or have the required permission * on the metastore and the credential (e.g., **CREATE_EXTERNAL_LOCATION** when purpose is diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java index aefcf4908..5395359b9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java @@ -17,6 +17,7 @@ public enum Privilege { CREATE_EXTERNAL_LOCATION, CREATE_EXTERNAL_TABLE, CREATE_EXTERNAL_VOLUME, + CREATE_FEATURE, CREATE_FOREIGN_CATALOG, CREATE_FOREIGN_SECURABLE, CREATE_FUNCTION, @@ -40,6 +41,7 @@ public enum Privilege { MANAGE_ALLOWLIST, MODIFY, MODIFY_CLEAN_ROOM, + READ_FEATURE, READ_FILES, READ_METADATA, READ_PRIVATE_FILES, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ReadVolumeRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ReadVolumeRequest.java index 671861277..14872d9a5 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ReadVolumeRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ReadVolumeRequest.java @@ -18,7 +18,7 @@ public class ReadVolumeRequest { @QueryParam("include_browse") private Boolean includeBrowse; - /** The three-level (fully qualified) name of the volume */ + /** The fully qualified name of the volume. */ @JsonIgnore private String name; public ReadVolumeRequest setIncludeBrowse(Boolean includeBrowse) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableType.java index 03dbb51fe..842073272 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableType.java @@ -14,6 +14,7 @@ public enum SecurableType { CREDENTIAL, EXTERNAL_LOCATION, EXTERNAL_METADATA, + FEATURE, FUNCTION, MCP_SERVICE, METASTORE, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsAPI.java index ff05dc3ec..2ae34a326 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsAPI.java @@ -118,8 +118,6 @@ public StorageCredentialInfo update(UpdateStorageCredential request) { * provided, the __url__ will be used for validation, and __external_location_name__ will be * ignored when checking overlapping urls. * - *

Either the __storage_credential_name__ or the cloud-specific credential must be provided. - * *

The caller must be a metastore admin or the storage credential owner or have the * **CREATE_EXTERNAL_LOCATION** privilege on the metastore and the storage credential. */ diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsService.java index cc774418a..b976a778f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/StorageCredentialsService.java @@ -72,8 +72,6 @@ public interface StorageCredentialsService { * provided, the __url__ will be used for validation, and __external_location_name__ will be * ignored when checking overlapping urls. * - *

Either the __storage_credential_name__ or the cloud-specific credential must be provided. - * *

The caller must be a metastore admin or the storage credential owner or have the * **CREATE_EXTERNAL_LOCATION** privilege on the metastore and the storage credential. */ diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialRequest.java index 8344f2947..92b534aba 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialRequest.java @@ -9,11 +9,11 @@ @Generated public class ValidateCredentialRequest { - /** */ + /** Deprecated: create a credential and pass its credential_name instead. */ @JsonProperty("aws_iam_role") private AwsIamRole awsIamRole; - /** */ + /** Deprecated: create a credential and pass its credential_name instead. */ @JsonProperty("azure_managed_identity") private AzureManagedIdentity azureManagedIdentity; @@ -21,7 +21,7 @@ public class ValidateCredentialRequest { @JsonProperty("credential_name") private String credentialName; - /** */ + /** Deprecated: create a credential and pass its credential_name instead. */ @JsonProperty("databricks_gcp_service_account") private DatabricksGcpServiceAccount databricksGcpServiceAccount; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateStorageCredential.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateStorageCredential.java index b5267c325..781d1c73f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateStorageCredential.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateStorageCredential.java @@ -9,23 +9,38 @@ @Generated public class ValidateStorageCredential { - /** The AWS IAM role configuration. */ + /** + * Deprecated: create a storage credential and pass its storage_credential_name instead. The AWS + * IAM role configuration. + */ @JsonProperty("aws_iam_role") private AwsIamRoleRequest awsIamRole; - /** The Azure managed identity configuration. */ + /** + * Deprecated: create a storage credential and pass its storage_credential_name instead. The Azure + * managed identity configuration. + */ @JsonProperty("azure_managed_identity") private AzureManagedIdentityRequest azureManagedIdentity; - /** The Azure service principal configuration. */ + /** + * Deprecated: create a storage credential and pass its storage_credential_name instead. The Azure + * service principal configuration. + */ @JsonProperty("azure_service_principal") private AzureServicePrincipal azureServicePrincipal; - /** The Cloudflare API token configuration. */ + /** + * Deprecated: create a storage credential and pass its storage_credential_name instead. The + * Cloudflare API token configuration. + */ @JsonProperty("cloudflare_api_token") private CloudflareApiToken cloudflareApiToken; - /** The Databricks created GCP service account configuration. */ + /** + * Deprecated: create a storage credential and pass its storage_credential_name instead. The + * Databricks created GCP service account configuration. + */ @JsonProperty("databricks_gcp_service_account") private DatabricksGcpServiceAccountRequest databricksGcpServiceAccount; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/Environment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/Environment.java index 9c3b6bc3e..7826a6822 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/Environment.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/Environment.java @@ -18,14 +18,16 @@ public class Environment { /** * The base environment this environment is built on top of. A base environment defines the * environment version and a list of dependencies for serverless compute. The value can be a file - * path to a custom `env.yaml` file (e.g., `/Workspace/path/to/env.yaml`). Support for a - * Databricks-provided base environment ID (e.g., `workspace-base-environments/databricks_ai_v4`) - * and workspace base environment ID (e.g., - * `workspace-base-environments/dbe_b849b66e-b31a-4cb5-b161-1f2b10877fb7`) is in Beta. Either - * `environment_version` or `base_environment` can be provided. For more information about - * Databricks-provided base environments, see the [list workspace base - * environments](:method:Environments/ListWorkspaceBaseEnvironments) API. For more information, - * see + * path to a custom `env.yaml` file (e.g., `/Workspace/path/to/env.yaml`). + * + *

Support for a Databricks-provided base environment ID (e.g., + * `workspace-base-environments/databricks_ai_v4`) and workspace base environment ID (e.g., + * `workspace-base-environments/dbe_b849b66e-b31a-4cb5-b161-1f2b10877fb7`) is in Beta. + * + *

Either `environment_version` or `base_environment` can be provided. + * + *

For more information about Databricks-provided base environments, see the [list workspace + * base environments](:method:Environments/ListWorkspaceBaseEnvironments) API. */ @JsonProperty("base_environment") private String baseEnvironment; @@ -36,24 +38,26 @@ public class Environment { /** * List of pip dependencies, as supported by the version of pip in this environment. Each - * dependency is a valid pip requirements file line per - * https://pip.pypa.io/en/stable/reference/requirements-file-format/. Allowed dependencies include - * a requirement specifier, an archive URL, a local project path (such as WSFS or UC Volumes in - * Databricks), or a VCS project URL. + * dependency is a valid [pip requirements file line]. Allowed dependencies include a requirement + * specifier, an archive URL, a local project path (such as WSFS or UC Volumes in Databricks), or + * a VCS project URL. + * + *

[pip requirements file line]: + * https://pip.pypa.io/en/stable/reference/requirements-file-format/ */ @JsonProperty("dependencies") private Collection dependencies; /** - * Either `environment_version` or `base_environment` needs to be provided. Environment version - * used by the environment. Each version comes with a specific Python version and a set of Python - * packages. The version is a string, consisting of an integer. + * The environment version used by this environment. Either `environment_version` or + * `base_environment` must be provided. Each version comes with a specific Python version and a + * set of Python packages. The version is a string, consisting of an integer. */ @JsonProperty("environment_version") private String environmentVersion; /** - * List of java dependencies. Each dependency is a string representing a java library path. For + * List of Java dependencies. Each dependency is a string representing a Java library path. For * example: `/Volumes/path/to/test.jar`. */ @JsonProperty("java_dependencies") @@ -63,7 +67,7 @@ public class Environment { * Path to the `pyproject.toml` file that defines the project environment. This field cannot be * combined with `environment_version`, `base_environment`, dependency fields, or any other * environment-source fields. Set the environment version and dependencies in `pyproject.toml` - * instead. For more information, see the serverless dependencies documentation. + * instead. */ @JsonProperty("project_environment") private String projectEnvironment; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ApproveMigrationExecutionRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ApproveMigrationExecutionRequest.java new file mode 100644 index 000000000..50d8bb57f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ApproveMigrationExecutionRequest.java @@ -0,0 +1,81 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A request to approve migration execution at the MIGRATION_REVIEW gate. */ +@Generated +public class ApproveMigrationExecutionRequest { + /** + * Optional free-text feedback or instructions the user provides along with the approval, carried + * into the next stage of the migration. + */ + @JsonProperty("additional_feedback") + private String additionalFeedback; + + /** + * Optional resource version for optimistic concurrency control. If supplied, it must match the + * current server value. + */ + @JsonProperty("etag") + private String etag; + + /** The ID of the migration to approve for execution. */ + @JsonIgnore private String migrationId; + + public ApproveMigrationExecutionRequest setAdditionalFeedback(String additionalFeedback) { + this.additionalFeedback = additionalFeedback; + return this; + } + + public String getAdditionalFeedback() { + return additionalFeedback; + } + + public ApproveMigrationExecutionRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public ApproveMigrationExecutionRequest 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; + ApproveMigrationExecutionRequest that = (ApproveMigrationExecutionRequest) o; + return Objects.equals(additionalFeedback, that.additionalFeedback) + && Objects.equals(etag, that.etag) + && Objects.equals(migrationId, that.migrationId); + } + + @Override + public int hashCode() { + return Objects.hash(additionalFeedback, etag, migrationId); + } + + @Override + public String toString() { + return new ToStringer(ApproveMigrationExecutionRequest.class) + .add("additionalFeedback", additionalFeedback) + .add("etag", etag) + .add("migrationId", migrationId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ApproveMigrationTranslationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ApproveMigrationTranslationRequest.java new file mode 100644 index 000000000..465288275 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ApproveMigrationTranslationRequest.java @@ -0,0 +1,81 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A request to approve the working copy at the TRANSLATION_READY gate. */ +@Generated +public class ApproveMigrationTranslationRequest { + /** + * Optional free-text feedback or instructions the user provides along with the approval, carried + * into the next stage of the migration. + */ + @JsonProperty("additional_feedback") + private String additionalFeedback; + + /** + * Optional resource version for optimistic concurrency control. If supplied, it must match the + * current server value. + */ + @JsonProperty("etag") + private String etag; + + /** The ID of the migration to approve. */ + @JsonIgnore private String migrationId; + + public ApproveMigrationTranslationRequest setAdditionalFeedback(String additionalFeedback) { + this.additionalFeedback = additionalFeedback; + return this; + } + + public String getAdditionalFeedback() { + return additionalFeedback; + } + + public ApproveMigrationTranslationRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public ApproveMigrationTranslationRequest 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; + ApproveMigrationTranslationRequest that = (ApproveMigrationTranslationRequest) o; + return Objects.equals(additionalFeedback, that.additionalFeedback) + && Objects.equals(etag, that.etag) + && Objects.equals(migrationId, that.migrationId); + } + + @Override + public int hashCode() { + return Objects.hash(additionalFeedback, etag, migrationId); + } + + @Override + public String toString() { + return new ToStringer(ApproveMigrationTranslationRequest.class) + .add("additionalFeedback", additionalFeedback) + .add("etag", etag) + .add("migrationId", migrationId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/BakingConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/BakingConfig.java new file mode 100644 index 000000000..b96badd68 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/BakingConfig.java @@ -0,0 +1,66 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Configuration for the baking window (post-execution production monitoring). */ +@Generated +public class BakingConfig { + /** + * Number of successful production runs required before the migration reaches MIGRATION_COMPLETE. + * Default applied by the server (configurable). + */ + @JsonProperty("run_count") + private Long runCount; + + /** + * Maximum baking window duration in hours. If the required run_count has not been reached within + * this window, the migration transitions to FAILED. Default applied by the server (configurable). + */ + @JsonProperty("time_window_hours") + private Long timeWindowHours; + + public BakingConfig setRunCount(Long runCount) { + this.runCount = runCount; + return this; + } + + public Long getRunCount() { + return runCount; + } + + public BakingConfig setTimeWindowHours(Long timeWindowHours) { + this.timeWindowHours = timeWindowHours; + return this; + } + + public Long getTimeWindowHours() { + return timeWindowHours; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BakingConfig that = (BakingConfig) o; + return Objects.equals(runCount, that.runCount) + && Objects.equals(timeWindowHours, that.timeWindowHours); + } + + @Override + public int hashCode() { + return Objects.hash(runCount, timeWindowHours); + } + + @Override + public String toString() { + return new ToStringer(BakingConfig.class) + .add("runCount", runCount) + .add("timeWindowHours", timeWindowHours) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/BakingReport.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/BakingReport.java new file mode 100644 index 000000000..d4e68ef5e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/BakingReport.java @@ -0,0 +1,60 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Summary of baking metrics after the baking window completes. */ +@Generated +public class BakingReport { + /** Number of successful runs. */ + @JsonProperty("successful_runs") + private Long successfulRuns; + + /** Number of runs observed during the baking window. */ + @JsonProperty("total_runs") + private Long totalRuns; + + public BakingReport setSuccessfulRuns(Long successfulRuns) { + this.successfulRuns = successfulRuns; + return this; + } + + public Long getSuccessfulRuns() { + return successfulRuns; + } + + public BakingReport setTotalRuns(Long totalRuns) { + this.totalRuns = totalRuns; + return this; + } + + public Long getTotalRuns() { + return totalRuns; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BakingReport that = (BakingReport) o; + return Objects.equals(successfulRuns, that.successfulRuns) + && Objects.equals(totalRuns, that.totalRuns); + } + + @Override + public int hashCode() { + return Objects.hash(successfulRuns, totalRuns); + } + + @Override + public String toString() { + return new ToStringer(BakingReport.class) + .add("successfulRuns", successfulRuns) + .add("totalRuns", totalRuns) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/CancelMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/CancelMigrationRequest.java new file mode 100644 index 000000000..24244e1d1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/CancelMigrationRequest.java @@ -0,0 +1,78 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A request to cancel a migration from any non-terminal state. */ +@Generated +public class CancelMigrationRequest { + /** Optional free-text reason for the cancellation. */ + @JsonProperty("cancellation_reason") + private String cancellationReason; + + /** + * Optional resource version for optimistic concurrency control. If supplied, it must match the + * current server value. + */ + @JsonProperty("etag") + private String etag; + + /** The ID of the migration to cancel. */ + @JsonIgnore private String migrationId; + + public CancelMigrationRequest setCancellationReason(String cancellationReason) { + this.cancellationReason = cancellationReason; + return this; + } + + public String getCancellationReason() { + return cancellationReason; + } + + public CancelMigrationRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public CancelMigrationRequest 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; + CancelMigrationRequest that = (CancelMigrationRequest) o; + return Objects.equals(cancellationReason, that.cancellationReason) + && Objects.equals(etag, that.etag) + && Objects.equals(migrationId, that.migrationId); + } + + @Override + public int hashCode() { + return Objects.hash(cancellationReason, etag, migrationId); + } + + @Override + public String toString() { + return new ToStringer(CancelMigrationRequest.class) + .add("cancellationReason", cancellationReason) + .add("etag", etag) + .add("migrationId", migrationId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ComputeMigrationsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ComputeMigrationsAPI.java new file mode 100644 index 000000000..72531d837 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ComputeMigrationsAPI.java @@ -0,0 +1,178 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.computemigrations; + +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 migrations of Classic compute workloads to Serverless. */ +@Generated +public class ComputeMigrationsAPI { + private static final Logger LOG = LoggerFactory.getLogger(ComputeMigrationsAPI.class); + + private final ComputeMigrationsService impl; + + /** Regular-use constructor */ + public ComputeMigrationsAPI(ApiClient apiClient) { + impl = new ComputeMigrationsImpl(apiClient); + } + + /** Constructor for mocks */ + public ComputeMigrationsAPI(ComputeMigrationsService mock) { + impl = mock; + } + + /** + * Approves migration execution at the MIGRATION_REVIEW gate, advancing to execution. + * + *

Valid only when the migration is in MIGRATION_REVIEW. If supplied, the `etag` must match the + * current server value. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is not in MIGRATION_REVIEW. Returns ABORTED if the etag does not match the current + * resource version. + */ + public Migration approveMigrationExecution(ApproveMigrationExecutionRequest request) { + return impl.approveMigrationExecution(request); + } + + /** + * Approves the working copy at the TRANSLATION_READY gate. If the migration was created with + * `run_validation`, the working copy is then run to verify it executes successfully before the + * migration is presented for execution review; otherwise it advances straight to + * MIGRATION_REVIEW. + * + *

Valid only when the migration is in TRANSLATION_READY. If supplied, the `etag` must match + * the current server value. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is not in TRANSLATION_READY. Returns ABORTED if the etag does not match the current + * resource version. + */ + public Migration approveMigrationTranslation(ApproveMigrationTranslationRequest request) { + return impl.approveMigrationTranslation(request); + } + + /** + * Cancels the migration, transitioning it to CANCELLED. + * + *

Valid from any non-terminal state, unlike the review-gate transitions, which each require a + * specific state. Any in-flight agent work is abandoned and the migration stops advancing. The + * resource is retained for auditability. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is already in a terminal state. Returns ABORTED if the etag does not match the + * current resource version. + */ + public Migration cancelMigration(CancelMigrationRequest request) { + return impl.cancelMigration(request); + } + + /** + * Creates a new migration for a Classic compute asset. + * + *

The migration is created in PLANNING_PENDING and advances through the state machine as + * planning work is scheduled. The caller must have appropriate permissions: workspace admin for + * infrastructure-scoped migrations, job owner/admin for individual workload migrations. + * + *

At most one migration may hold an asset. Returns ALREADY_EXISTS if the asset has a migration + * in flight, or one that already migrated it successfully; a migration that ended without + * succeeding, or was deleted, releases the asset so it can be migrated again. Returns + * INVALID_PARAMETER_VALUE if the asset is not eligible for migration. + */ + public Migration create(CreateMigrationRequest request) { + return impl.create(request); + } + + public Migration delete(String migrationId) { + return delete(new DeleteMigrationRequest().setMigrationId(migrationId)); + } + + /** + * Deletes a migration (soft-delete). + * + *

Allowed from any state. Deleting a migration marks the record deleted only — it does not + * roll back a migration that already ran, and resources created during the migration are not + * cleaned up. The migration resource is retained for auditability. To stop an in-flight migration + * (agent teardown, transition to CANCELLED), use CancelMigration instead. + * + *

Returns NOT_FOUND if the migration does not exist, or was already deleted: a deleted + * migration is hidden from every method (Get, Update, List, and Delete), so it cannot be deleted + * again. Returns ABORTED if a supplied nonempty request etag does not match the resource version. + */ + public Migration delete(DeleteMigrationRequest request) { + return impl.delete(request); + } + + public Migration get(String migrationId) { + return get(new GetMigrationRequest().setMigrationId(migrationId)); + } + + /** + * Retrieves a migration by its ID. + * + *

Returns the current state, configuration, and output artifacts of the migration. Use this to + * poll migration progress or inspect artifacts after state transitions. Returns NOT_FOUND if the + * migration does not exist in the caller's workspace. + */ + public Migration get(GetMigrationRequest request) { + return impl.get(request); + } + + /** + * Lists migrations in the caller's workspace, ordered by migration ID, with cursor-based + * pagination and filtering by asset type and state. + * + *

Eventually consistent: results are read from a cache, and pagination is not a point-in-time + * snapshot, so a migration created during a List may not appear until a subsequent one. + */ + public Iterable list(ListMigrationsRequest request) { + return Paginator.newTokenPagination( + request, + impl::list, + ListMigrationsResponse::getMigrations, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + /** + * Rejects migration execution at the MIGRATION_REVIEW gate, sending the migration to + * REVISION_PENDING to loop back for re-planning. + * + *

Valid only when the migration is in MIGRATION_REVIEW. If supplied, the `etag` must match the + * current server value. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is not in MIGRATION_REVIEW. Returns ABORTED if the etag does not match the current + * resource version. + */ + public Migration rejectMigrationExecution(RejectMigrationExecutionRequest request) { + return impl.rejectMigrationExecution(request); + } + + /** + * Rejects the working copy at the TRANSLATION_READY gate, sending the migration to + * REVISION_PENDING to loop back for re-planning. + * + *

Valid only when the migration is in TRANSLATION_READY. If supplied, the `etag` must match + * the current server value. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is not in TRANSLATION_READY. Returns ABORTED if the etag does not match the current + * resource version. + */ + public Migration rejectMigrationTranslation(RejectMigrationTranslationRequest request) { + return impl.rejectMigrationTranslation(request); + } + + public ComputeMigrationsService impl() { + return impl; + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ComputeMigrationsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ComputeMigrationsImpl.java new file mode 100644 index 000000000..3353777f8 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ComputeMigrationsImpl.java @@ -0,0 +1,193 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.computemigrations; + +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; +import java.util.UUID; + +/** Package-local implementation of ComputeMigrations */ +@Generated +class ComputeMigrationsImpl implements ComputeMigrationsService { + private final ApiClient apiClient; + + public ComputeMigrationsImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public Migration approveMigrationExecution(ApproveMigrationExecutionRequest request) { + String path = + String.format( + "/api/compute-migrations/v1/migrations/%s/approveExecution", request.getMigrationId()); + 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, Migration.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Migration approveMigrationTranslation(ApproveMigrationTranslationRequest request) { + String path = + String.format( + "/api/compute-migrations/v1/migrations/%s/approveTranslation", + request.getMigrationId()); + 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, Migration.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Migration cancelMigration(CancelMigrationRequest request) { + String path = + String.format("/api/compute-migrations/v1/migrations/%s/cancel", request.getMigrationId()); + 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, Migration.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Migration create(CreateMigrationRequest request) { + String path = "/api/compute-migrations/v1/migrations"; + try { + Request req = new Request("POST", path, apiClient.serialize(request.getMigration())); + + 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, Migration.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Migration delete(DeleteMigrationRequest request) { + String path = + String.format("/api/compute-migrations/v1/migrations/%s", request.getMigrationId()); + 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, Migration.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Migration get(GetMigrationRequest request) { + String path = + String.format("/api/compute-migrations/v1/migrations/%s", request.getMigrationId()); + 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 ListMigrationsResponse list(ListMigrationsRequest request) { + String path = "/api/compute-migrations/v1/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 Migration rejectMigrationExecution(RejectMigrationExecutionRequest request) { + String path = + String.format( + "/api/compute-migrations/v1/migrations/%s/rejectExecution", request.getMigrationId()); + 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, Migration.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public Migration rejectMigrationTranslation(RejectMigrationTranslationRequest request) { + String path = + String.format( + "/api/compute-migrations/v1/migrations/%s/rejectTranslation", request.getMigrationId()); + 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, Migration.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/computemigrations/ComputeMigrationsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ComputeMigrationsService.java new file mode 100644 index 000000000..6d12884b9 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ComputeMigrationsService.java @@ -0,0 +1,130 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; + +/** + * Manage migrations of Classic compute workloads to Serverless. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface ComputeMigrationsService { + /** + * Approves migration execution at the MIGRATION_REVIEW gate, advancing to execution. + * + *

Valid only when the migration is in MIGRATION_REVIEW. If supplied, the `etag` must match the + * current server value. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is not in MIGRATION_REVIEW. Returns ABORTED if the etag does not match the current + * resource version. + */ + Migration approveMigrationExecution( + ApproveMigrationExecutionRequest approveMigrationExecutionRequest); + + /** + * Approves the working copy at the TRANSLATION_READY gate. If the migration was created with + * `run_validation`, the working copy is then run to verify it executes successfully before the + * migration is presented for execution review; otherwise it advances straight to + * MIGRATION_REVIEW. + * + *

Valid only when the migration is in TRANSLATION_READY. If supplied, the `etag` must match + * the current server value. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is not in TRANSLATION_READY. Returns ABORTED if the etag does not match the current + * resource version. + */ + Migration approveMigrationTranslation( + ApproveMigrationTranslationRequest approveMigrationTranslationRequest); + + /** + * Cancels the migration, transitioning it to CANCELLED. + * + *

Valid from any non-terminal state, unlike the review-gate transitions, which each require a + * specific state. Any in-flight agent work is abandoned and the migration stops advancing. The + * resource is retained for auditability. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is already in a terminal state. Returns ABORTED if the etag does not match the + * current resource version. + */ + Migration cancelMigration(CancelMigrationRequest cancelMigrationRequest); + + /** + * Creates a new migration for a Classic compute asset. + * + *

The migration is created in PLANNING_PENDING and advances through the state machine as + * planning work is scheduled. The caller must have appropriate permissions: workspace admin for + * infrastructure-scoped migrations, job owner/admin for individual workload migrations. + * + *

At most one migration may hold an asset. Returns ALREADY_EXISTS if the asset has a migration + * in flight, or one that already migrated it successfully; a migration that ended without + * succeeding, or was deleted, releases the asset so it can be migrated again. Returns + * INVALID_PARAMETER_VALUE if the asset is not eligible for migration. + */ + Migration create(CreateMigrationRequest createMigrationRequest); + + /** + * Deletes a migration (soft-delete). + * + *

Allowed from any state. Deleting a migration marks the record deleted only — it does not + * roll back a migration that already ran, and resources created during the migration are not + * cleaned up. The migration resource is retained for auditability. To stop an in-flight migration + * (agent teardown, transition to CANCELLED), use CancelMigration instead. + * + *

Returns NOT_FOUND if the migration does not exist, or was already deleted: a deleted + * migration is hidden from every method (Get, Update, List, and Delete), so it cannot be deleted + * again. Returns ABORTED if a supplied nonempty request etag does not match the resource version. + */ + Migration delete(DeleteMigrationRequest deleteMigrationRequest); + + /** + * Retrieves a migration by its ID. + * + *

Returns the current state, configuration, and output artifacts of the migration. Use this to + * poll migration progress or inspect artifacts after state transitions. Returns NOT_FOUND if the + * migration does not exist in the caller's workspace. + */ + Migration get(GetMigrationRequest getMigrationRequest); + + /** + * Lists migrations in the caller's workspace, ordered by migration ID, with cursor-based + * pagination and filtering by asset type and state. + * + *

Eventually consistent: results are read from a cache, and pagination is not a point-in-time + * snapshot, so a migration created during a List may not appear until a subsequent one. + */ + ListMigrationsResponse list(ListMigrationsRequest listMigrationsRequest); + + /** + * Rejects migration execution at the MIGRATION_REVIEW gate, sending the migration to + * REVISION_PENDING to loop back for re-planning. + * + *

Valid only when the migration is in MIGRATION_REVIEW. If supplied, the `etag` must match the + * current server value. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is not in MIGRATION_REVIEW. Returns ABORTED if the etag does not match the current + * resource version. + */ + Migration rejectMigrationExecution( + RejectMigrationExecutionRequest rejectMigrationExecutionRequest); + + /** + * Rejects the working copy at the TRANSLATION_READY gate, sending the migration to + * REVISION_PENDING to loop back for re-planning. + * + *

Valid only when the migration is in TRANSLATION_READY. If supplied, the `etag` must match + * the current server value. + * + *

Returns NOT_FOUND if the migration does not exist. Returns FAILED_PRECONDITION if the + * migration is not in TRANSLATION_READY. Returns ABORTED if the etag does not match the current + * resource version. + */ + Migration rejectMigrationTranslation( + RejectMigrationTranslationRequest rejectMigrationTranslationRequest); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/CreateMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/CreateMigrationRequest.java new file mode 100644 index 000000000..7d35de8f6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/CreateMigrationRequest.java @@ -0,0 +1,68 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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 { + /** + * The migration to create. The server generates `migration_id` and sets `state` to + * PLANNING_PENDING. Required fields: `asset_type`, `asset_uri`. + */ + @JsonProperty("migration") + private Migration migration; + + /** + * Client-generated request ID for idempotent request deduplication. The server de-duplicates + * requests with the same request_id for at least 24 hours, returning the existing migration + * instead of creating a duplicate. + */ + @JsonIgnore + @QueryParam("request_id") + private String requestId; + + public CreateMigrationRequest setMigration(Migration migration) { + this.migration = migration; + return this; + } + + public Migration getMigration() { + return migration; + } + + public CreateMigrationRequest 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; + CreateMigrationRequest that = (CreateMigrationRequest) o; + return Objects.equals(migration, that.migration) && Objects.equals(requestId, that.requestId); + } + + @Override + public int hashCode() { + return Objects.hash(migration, requestId); + } + + @Override + public String toString() { + return new ToStringer(CreateMigrationRequest.class) + .add("migration", migration) + .add("requestId", requestId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/DeleteMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/DeleteMigrationRequest.java new file mode 100644 index 000000000..50bde7039 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/DeleteMigrationRequest.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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 DeleteMigrationRequest { + /** If nonempty, must match the current resource etag or the request fails with ABORTED. */ + @JsonIgnore + @QueryParam("etag") + private String etag; + + /** The ID of the migration to cancel. */ + @JsonIgnore private String migrationId; + + public DeleteMigrationRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public DeleteMigrationRequest 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; + DeleteMigrationRequest that = (DeleteMigrationRequest) o; + return Objects.equals(etag, that.etag) && Objects.equals(migrationId, that.migrationId); + } + + @Override + public int hashCode() { + return Objects.hash(etag, migrationId); + } + + @Override + public String toString() { + return new ToStringer(DeleteMigrationRequest.class) + .add("etag", etag) + .add("migrationId", migrationId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/GetMigrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/GetMigrationRequest.java new file mode 100644 index 000000000..e0c6a6872 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/GetMigrationRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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 { + /** The ID of the migration to retrieve. */ + @JsonIgnore private String migrationId; + + public GetMigrationRequest 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; + GetMigrationRequest that = (GetMigrationRequest) o; + return Objects.equals(migrationId, that.migrationId); + } + + @Override + public int hashCode() { + return Objects.hash(migrationId); + } + + @Override + public String toString() { + return new ToStringer(GetMigrationRequest.class).add("migrationId", migrationId).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ListMigrationsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ListMigrationsRequest.java new file mode 100644 index 000000000..6b6d451be --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ListMigrationsRequest.java @@ -0,0 +1,98 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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.Collection; +import java.util.Objects; + +@Generated +public class ListMigrationsRequest { + /** Filter by asset type. */ + @JsonIgnore + @QueryParam("asset_type") + private MigrationAssetType assetType; + + /** Maximum number of migrations to return. Default: 50, maximum: 1000. */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * Page token from a previous ListMigrations call. When paginating, all other parameters must + * match the call that provided the page token. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** Filter by migration state. Returns migrations in any of the specified states. */ + @JsonIgnore + @QueryParam("states") + private Collection states; + + public ListMigrationsRequest setAssetType(MigrationAssetType assetType) { + this.assetType = assetType; + return this; + } + + public MigrationAssetType getAssetType() { + return assetType; + } + + 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 setStates(Collection states) { + this.states = states; + return this; + } + + public Collection getStates() { + return states; + } + + @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(assetType, that.assetType) + && Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(states, that.states); + } + + @Override + public int hashCode() { + return Objects.hash(assetType, pageSize, pageToken, states); + } + + @Override + public String toString() { + return new ToStringer(ListMigrationsRequest.class) + .add("assetType", assetType) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("states", states) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ListMigrationsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ListMigrationsResponse.java new file mode 100644 index 000000000..838cbf7eb --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ListMigrationsResponse.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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 paginated list of migrations matching the request filters. */ +@Generated +public class ListMigrationsResponse { + /** The migrations matching the request filters. */ + @JsonProperty("migrations") + private Collection migrations; + + /** Token for the next page. Omitted if 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/computemigrations/Migration.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/Migration.java new file mode 100644 index 000000000..fe2f9a616 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/Migration.java @@ -0,0 +1,277 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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 persistent object tracking the full lifecycle of migrating one Classic compute asset to + * Serverless. Each Migration has a well-defined state machine and is the unit of orchestration, + * approval, and rollback. + */ +@Generated +public class Migration { + /** Type of Classic compute asset being migrated. Cannot be changed after creation. */ + @JsonProperty("asset_type") + private MigrationAssetType assetType; + + /** URI of the source asset (e.g., "jobs/12345"). Cannot be changed after creation. */ + @JsonProperty("asset_uri") + private String assetUri; + + /** + * When true, the server skips the translation review (TRANSLATION_READY) instead of waiting for + * an explicit ApproveMigrationTranslation. MIGRATION_REVIEW is never skipped. Unset/false means + * the translation review requires explicit user action. Set at creation; cannot be changed + * afterward. Does not suppress cancellation or terminal failures. + */ + @JsonProperty("auto_approve") + private Boolean autoApprove; + + /** Baking window configuration. Mutable via UpdateMigration before baking starts. */ + @JsonProperty("baking_config") + private BakingConfig bakingConfig; + + /** Summary of baking metrics after the baking window completes. */ + @JsonProperty("baking_report") + private BakingReport bakingReport; + + /** Timestamp when the migration was created. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** + * Resource version for optimistic concurrency control. Clients read this from GetMigration or + * ListMigrations and pass it back as the request `etag` on update, delete, approve, reject, and + * cancel methods. + */ + @JsonProperty("etag") + private String etag; + + /** The user who initiated this migration and their role. Set at creation. */ + @JsonProperty("initiator") + private MigrationInitiator initiator; + + /** Server-generated unique identifier for this migration. */ + @JsonProperty("migration_id") + private String migrationId; + + /** Agent-produced planning report, presented to the user at the review gates. */ + @JsonProperty("migration_report") + private MigrationReport migrationReport; + + /** + * When true, Databricks runs the working copy to validate it after the translation review. + * Unset/false skips the run, so the migration goes from the translation review straight to + * execution review. Whether the translation review waits for the user is controlled by + * `auto_approve`, not this field. Set at creation; cannot be changed afterward. + */ + @JsonProperty("run_validation") + private Boolean runValidation; + + /** Current state of the migration in the state machine. Managed by the server. */ + @JsonProperty("state") + private MigrationState state; + + /** + * History of state transitions, ordered chronologically. Each entry records the state entered and + * the timestamp of the transition. + */ + @JsonProperty("state_history") + private Collection stateHistory; + + /** Agent-produced validation results from sandbox execution. */ + @JsonProperty("validation_report") + private ValidationReport validationReport; + + public Migration setAssetType(MigrationAssetType assetType) { + this.assetType = assetType; + return this; + } + + public MigrationAssetType getAssetType() { + return assetType; + } + + public Migration setAssetUri(String assetUri) { + this.assetUri = assetUri; + return this; + } + + public String getAssetUri() { + return assetUri; + } + + public Migration setAutoApprove(Boolean autoApprove) { + this.autoApprove = autoApprove; + return this; + } + + public Boolean getAutoApprove() { + return autoApprove; + } + + public Migration setBakingConfig(BakingConfig bakingConfig) { + this.bakingConfig = bakingConfig; + return this; + } + + public BakingConfig getBakingConfig() { + return bakingConfig; + } + + public Migration setBakingReport(BakingReport bakingReport) { + this.bakingReport = bakingReport; + return this; + } + + public BakingReport getBakingReport() { + return bakingReport; + } + + public Migration setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public Migration setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public Migration setInitiator(MigrationInitiator initiator) { + this.initiator = initiator; + return this; + } + + public MigrationInitiator getInitiator() { + return initiator; + } + + public Migration setMigrationId(String migrationId) { + this.migrationId = migrationId; + return this; + } + + public String getMigrationId() { + return migrationId; + } + + public Migration setMigrationReport(MigrationReport migrationReport) { + this.migrationReport = migrationReport; + return this; + } + + public MigrationReport getMigrationReport() { + return migrationReport; + } + + public Migration setRunValidation(Boolean runValidation) { + this.runValidation = runValidation; + return this; + } + + public Boolean getRunValidation() { + return runValidation; + } + + public Migration setState(MigrationState state) { + this.state = state; + return this; + } + + public MigrationState getState() { + return state; + } + + public Migration setStateHistory(Collection stateHistory) { + this.stateHistory = stateHistory; + return this; + } + + public Collection getStateHistory() { + return stateHistory; + } + + public Migration setValidationReport(ValidationReport validationReport) { + this.validationReport = validationReport; + return this; + } + + public ValidationReport getValidationReport() { + return validationReport; + } + + @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(assetType, that.assetType) + && Objects.equals(assetUri, that.assetUri) + && Objects.equals(autoApprove, that.autoApprove) + && Objects.equals(bakingConfig, that.bakingConfig) + && Objects.equals(bakingReport, that.bakingReport) + && Objects.equals(createTime, that.createTime) + && Objects.equals(etag, that.etag) + && Objects.equals(initiator, that.initiator) + && Objects.equals(migrationId, that.migrationId) + && Objects.equals(migrationReport, that.migrationReport) + && Objects.equals(runValidation, that.runValidation) + && Objects.equals(state, that.state) + && Objects.equals(stateHistory, that.stateHistory) + && Objects.equals(validationReport, that.validationReport); + } + + @Override + public int hashCode() { + return Objects.hash( + assetType, + assetUri, + autoApprove, + bakingConfig, + bakingReport, + createTime, + etag, + initiator, + migrationId, + migrationReport, + runValidation, + state, + stateHistory, + validationReport); + } + + @Override + public String toString() { + return new ToStringer(Migration.class) + .add("assetType", assetType) + .add("assetUri", assetUri) + .add("autoApprove", autoApprove) + .add("bakingConfig", bakingConfig) + .add("bakingReport", bakingReport) + .add("createTime", createTime) + .add("etag", etag) + .add("initiator", initiator) + .add("migrationId", migrationId) + .add("migrationReport", migrationReport) + .add("runValidation", runValidation) + .add("state", state) + .add("stateHistory", stateHistory) + .add("validationReport", validationReport) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationAsset.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationAsset.java new file mode 100644 index 000000000..f0b8b0b12 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationAsset.java @@ -0,0 +1,75 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A working copy (job or notebook) the migration agent created for the migration. */ +@Generated +public class MigrationAsset { + /** Type of asset this working copy represents. */ + @JsonProperty("asset_type") + private MigrationAssetType assetType; + + /** Identifier of the asset. */ + @JsonProperty("id") + private String id; + + /** Link to the asset, e.g. "jobs/12345". */ + @JsonProperty("uri") + private String uri; + + public MigrationAsset setAssetType(MigrationAssetType assetType) { + this.assetType = assetType; + return this; + } + + public MigrationAssetType getAssetType() { + return assetType; + } + + public MigrationAsset setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public MigrationAsset setUri(String uri) { + this.uri = uri; + return this; + } + + public String getUri() { + return uri; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MigrationAsset that = (MigrationAsset) o; + return Objects.equals(assetType, that.assetType) + && Objects.equals(id, that.id) + && Objects.equals(uri, that.uri); + } + + @Override + public int hashCode() { + return Objects.hash(assetType, id, uri); + } + + @Override + public String toString() { + return new ToStringer(MigrationAsset.class) + .add("assetType", assetType) + .add("id", id) + .add("uri", uri) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationAssetType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationAssetType.java new file mode 100644 index 000000000..3934c541c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationAssetType.java @@ -0,0 +1,16 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; + +/** + * Type of a migration asset: the Classic asset being migrated, or an asset the migration agent + * created for it. Migrations can only be created for JOB assets. + */ +@Generated +public enum MigrationAssetType { + FILE, + INTERACTIVE, + JOB, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationInitiator.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationInitiator.java new file mode 100644 index 000000000..ca0152095 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationInitiator.java @@ -0,0 +1,63 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** The initiator of a migration, including their role and user identity. */ +@Generated +public class MigrationInitiator { + /** + * The role of the initiator, determining approval authority. Set by the server: the role is + * resolved from the caller's identity and permissions on the asset, never taken from the request, + * since a caller must not be able to assert its own approval authority. + */ + @JsonProperty("role") + private MigrationInitiatorRole role; + + /** The user ID of the initiator. Set by the server from the request context. */ + @JsonProperty("user_id") + private Long userId; + + public MigrationInitiator setRole(MigrationInitiatorRole role) { + this.role = role; + return this; + } + + public MigrationInitiatorRole getRole() { + return role; + } + + public MigrationInitiator setUserId(Long userId) { + this.userId = userId; + return this; + } + + public Long getUserId() { + return userId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MigrationInitiator that = (MigrationInitiator) o; + return Objects.equals(role, that.role) && Objects.equals(userId, that.userId); + } + + @Override + public int hashCode() { + return Objects.hash(role, userId); + } + + @Override + public String toString() { + return new ToStringer(MigrationInitiator.class) + .add("role", role) + .add("userId", userId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationInitiatorRole.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationInitiatorRole.java new file mode 100644 index 000000000..595130b8b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationInitiatorRole.java @@ -0,0 +1,14 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; + +/** Role of the migration initiator, determining approval authority. */ +@Generated +public enum MigrationInitiatorRole { + ACCOUNT_ADMIN, + JOB_ADMIN, + SYSTEM, + WORKSPACE_ADMIN, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationReport.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationReport.java new file mode 100644 index 000000000..de3c8b92e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationReport.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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; + +/** Agent-produced planning report, presented to the user at the review gates. */ +@Generated +public class MigrationReport { + /** The primary asset the agent created — the entry point / validation target. */ + @JsonProperty("primary_asset") + private MigrationAsset primaryAsset; + + /** Additional assets the agent created (e.g. notebooks or jobs the primary asset invokes). */ + @JsonProperty("secondary_assets") + private Collection secondaryAssets; + + public MigrationReport setPrimaryAsset(MigrationAsset primaryAsset) { + this.primaryAsset = primaryAsset; + return this; + } + + public MigrationAsset getPrimaryAsset() { + return primaryAsset; + } + + public MigrationReport setSecondaryAssets(Collection secondaryAssets) { + this.secondaryAssets = secondaryAssets; + return this; + } + + public Collection getSecondaryAssets() { + return secondaryAssets; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MigrationReport that = (MigrationReport) o; + return Objects.equals(primaryAsset, that.primaryAsset) + && Objects.equals(secondaryAssets, that.secondaryAssets); + } + + @Override + public int hashCode() { + return Objects.hash(primaryAsset, secondaryAssets); + } + + @Override + public String toString() { + return new ToStringer(MigrationReport.class) + .add("primaryAsset", primaryAsset) + .add("secondaryAssets", secondaryAssets) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationState.java new file mode 100644 index 000000000..365acd5c9 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationState.java @@ -0,0 +1,27 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; + +/** The state of a migration in its lifecycle. */ +@Generated +public enum MigrationState { + CANCELLED, + FAILED, + MIGRATION_COMPLETE, + MIGRATION_OBSERVATION, + MIGRATION_PENDING, + MIGRATION_REVIEW, + MIGRATION_RUNNING, + NOT_SUPPORTED, + PLANNING_PENDING, + PLANNING_REVIEW, + PLANNING_RUNNING, + REVISION_PENDING, + TRANSLATION_CREATING, + TRANSLATION_PENDING, + TRANSLATION_READY, + VALIDATION_RUNNING, + VALIDATION_SCHEDULING, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationStateTransition.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationStateTransition.java new file mode 100644 index 000000000..4183e305b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/MigrationStateTransition.java @@ -0,0 +1,98 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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 record of a state transition in the migration lifecycle. */ +@Generated +public class MigrationStateTransition { + /** + * Free-text the service recorded for this transition — e.g. an internally-determined cancellation + * or failure reason. Empty for user-driven transitions. + */ + @JsonProperty("internal_comment") + private String internalComment; + + /** The state that was entered. */ + @JsonProperty("state") + private MigrationState state; + + /** Timestamp when this state was entered. */ + @JsonProperty("transition_time") + private Timestamp transitionTime; + + /** + * Free-text the initiating user supplied at a user-driven transition — reviewer feedback on an + * approval, or the reason for a rejection or cancellation. Empty for transitions the service + * drives internally. + */ + @JsonProperty("user_comment") + private String userComment; + + public MigrationStateTransition setInternalComment(String internalComment) { + this.internalComment = internalComment; + return this; + } + + public String getInternalComment() { + return internalComment; + } + + public MigrationStateTransition setState(MigrationState state) { + this.state = state; + return this; + } + + public MigrationState getState() { + return state; + } + + public MigrationStateTransition setTransitionTime(Timestamp transitionTime) { + this.transitionTime = transitionTime; + return this; + } + + public Timestamp getTransitionTime() { + return transitionTime; + } + + public MigrationStateTransition setUserComment(String userComment) { + this.userComment = userComment; + return this; + } + + public String getUserComment() { + return userComment; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MigrationStateTransition that = (MigrationStateTransition) o; + return Objects.equals(internalComment, that.internalComment) + && Objects.equals(state, that.state) + && Objects.equals(transitionTime, that.transitionTime) + && Objects.equals(userComment, that.userComment); + } + + @Override + public int hashCode() { + return Objects.hash(internalComment, state, transitionTime, userComment); + } + + @Override + public String toString() { + return new ToStringer(MigrationStateTransition.class) + .add("internalComment", internalComment) + .add("state", state) + .add("transitionTime", transitionTime) + .add("userComment", userComment) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/RejectMigrationExecutionRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/RejectMigrationExecutionRequest.java new file mode 100644 index 000000000..9703dad0b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/RejectMigrationExecutionRequest.java @@ -0,0 +1,84 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * A request to reject migration execution at the MIGRATION_REVIEW gate, looping back to + * REVISION_PENDING. + */ +@Generated +public class RejectMigrationExecutionRequest { + /** + * Optional resource version for optimistic concurrency control. If supplied, it must match the + * current server value. + */ + @JsonProperty("etag") + private String etag; + + /** The ID of the migration to reject. */ + @JsonIgnore private String migrationId; + + /** + * Required free-text reason for the rejection, fed back into re-planning so the next plan can + * address the user's concerns. + */ + @JsonProperty("rejection_reason") + private String rejectionReason; + + public RejectMigrationExecutionRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public RejectMigrationExecutionRequest setMigrationId(String migrationId) { + this.migrationId = migrationId; + return this; + } + + public String getMigrationId() { + return migrationId; + } + + public RejectMigrationExecutionRequest setRejectionReason(String rejectionReason) { + this.rejectionReason = rejectionReason; + return this; + } + + public String getRejectionReason() { + return rejectionReason; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RejectMigrationExecutionRequest that = (RejectMigrationExecutionRequest) o; + return Objects.equals(etag, that.etag) + && Objects.equals(migrationId, that.migrationId) + && Objects.equals(rejectionReason, that.rejectionReason); + } + + @Override + public int hashCode() { + return Objects.hash(etag, migrationId, rejectionReason); + } + + @Override + public String toString() { + return new ToStringer(RejectMigrationExecutionRequest.class) + .add("etag", etag) + .add("migrationId", migrationId) + .add("rejectionReason", rejectionReason) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/RejectMigrationTranslationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/RejectMigrationTranslationRequest.java new file mode 100644 index 000000000..52836f8c1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/RejectMigrationTranslationRequest.java @@ -0,0 +1,84 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * A request to reject the working copy at the TRANSLATION_READY gate, looping back to + * REVISION_PENDING. + */ +@Generated +public class RejectMigrationTranslationRequest { + /** + * Optional resource version for optimistic concurrency control. If supplied, it must match the + * current server value. + */ + @JsonProperty("etag") + private String etag; + + /** The ID of the migration to reject. */ + @JsonIgnore private String migrationId; + + /** + * Required free-text reason for the rejection, fed back into re-planning so the next plan can + * address the user's concerns. + */ + @JsonProperty("rejection_reason") + private String rejectionReason; + + public RejectMigrationTranslationRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public RejectMigrationTranslationRequest setMigrationId(String migrationId) { + this.migrationId = migrationId; + return this; + } + + public String getMigrationId() { + return migrationId; + } + + public RejectMigrationTranslationRequest setRejectionReason(String rejectionReason) { + this.rejectionReason = rejectionReason; + return this; + } + + public String getRejectionReason() { + return rejectionReason; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RejectMigrationTranslationRequest that = (RejectMigrationTranslationRequest) o; + return Objects.equals(etag, that.etag) + && Objects.equals(migrationId, that.migrationId) + && Objects.equals(rejectionReason, that.rejectionReason); + } + + @Override + public int hashCode() { + return Objects.hash(etag, migrationId, rejectionReason); + } + + @Override + public String toString() { + return new ToStringer(RejectMigrationTranslationRequest.class) + .add("etag", etag) + .add("migrationId", migrationId) + .add("rejectionReason", rejectionReason) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ValidationReport.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ValidationReport.java new file mode 100644 index 000000000..5843a582b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/computemigrations/ValidationReport.java @@ -0,0 +1,116 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.computemigrations; + +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; + +/** Validation results from running the translated workload in the sandbox. */ +@Generated +public class ValidationReport { + /** + * Duration of the sandbox validation run in milliseconds. Pair with start_time to derive the end + * time. + */ + @JsonProperty("duration_ms") + private Long durationMs; + + /** + * Databricks-internal recommendation on whether to proceed with the migration, based on the + * validation run. May differ from run_status: a run can succeed while the recommendation is + * negative, or vice versa. + */ + @JsonProperty("passed") + private Boolean passed; + + /** + * Status of the validation run itself (the objective run outcome), as reported by the run system, + * e.g. "SUCCESS" / "FAILED" / "TIMED_OUT". + */ + @JsonProperty("run_status") + private String runStatus; + + /** Link to the validation run (job or notebook). */ + @JsonProperty("run_url") + private String runUrl; + + /** Timestamp when validation started in the sandbox. */ + @JsonProperty("start_time") + private Timestamp startTime; + + public ValidationReport setDurationMs(Long durationMs) { + this.durationMs = durationMs; + return this; + } + + public Long getDurationMs() { + return durationMs; + } + + public ValidationReport setPassed(Boolean passed) { + this.passed = passed; + return this; + } + + public Boolean getPassed() { + return passed; + } + + public ValidationReport setRunStatus(String runStatus) { + this.runStatus = runStatus; + return this; + } + + public String getRunStatus() { + return runStatus; + } + + public ValidationReport setRunUrl(String runUrl) { + this.runUrl = runUrl; + return this; + } + + public String getRunUrl() { + return runUrl; + } + + public ValidationReport setStartTime(Timestamp startTime) { + this.startTime = startTime; + return this; + } + + public Timestamp getStartTime() { + return startTime; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ValidationReport that = (ValidationReport) o; + return Objects.equals(durationMs, that.durationMs) + && Objects.equals(passed, that.passed) + && Objects.equals(runStatus, that.runStatus) + && Objects.equals(runUrl, that.runUrl) + && Objects.equals(startTime, that.startTime); + } + + @Override + public int hashCode() { + return Objects.hash(durationMs, passed, runStatus, runUrl, startTime); + } + + @Override + public String toString() { + return new ToStringer(ValidationReport.class) + .add("durationMs", durationMs) + .add("passed", passed) + .add("runStatus", runStatus) + .add("runUrl", runUrl) + .add("startTime", startTime) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/CreateGenieAgentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/CreateGenieAgentRequest.java new file mode 100644 index 000000000..48560a06a --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/CreateGenieAgentRequest.java @@ -0,0 +1,67 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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 CreateGenieAgentRequest { + /** The Genie Agent to create. */ + @JsonProperty("genie_agent") + private GenieAgent genieAgent; + + /** + * The ID for the new Genie Agent: 32 lowercase hexadecimal characters (a UUID without dashes), + * not all zeros. Assigned by the server if omitted. Fails with ALREADY_EXISTS if the ID is in use + * in the workspace, including by a Genie Agent in the trash, or PERMISSION_DENIED if the caller + * cannot view the Genie Agent using it. + */ + @JsonIgnore + @QueryParam("genie_agent_id") + private String genieAgentId; + + public CreateGenieAgentRequest setGenieAgent(GenieAgent genieAgent) { + this.genieAgent = genieAgent; + return this; + } + + public GenieAgent getGenieAgent() { + return genieAgent; + } + + public CreateGenieAgentRequest setGenieAgentId(String genieAgentId) { + this.genieAgentId = genieAgentId; + return this; + } + + public String getGenieAgentId() { + return genieAgentId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreateGenieAgentRequest that = (CreateGenieAgentRequest) o; + return Objects.equals(genieAgent, that.genieAgent) + && Objects.equals(genieAgentId, that.genieAgentId); + } + + @Override + public int hashCode() { + return Objects.hash(genieAgent, genieAgentId); + } + + @Override + public String toString() { + return new ToStringer(CreateGenieAgentRequest.class) + .add("genieAgent", genieAgent) + .add("genieAgentId", genieAgentId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/DeleteGenieAgentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/DeleteGenieAgentRequest.java new file mode 100644 index 000000000..10a74998b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/DeleteGenieAgentRequest.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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 DeleteGenieAgentRequest { + /** + * Etag from a previous read. On mismatch the delete fails with ABORTED and nothing is deleted. + */ + @JsonIgnore + @QueryParam("etag") + private String etag; + + /** The resource name of the Genie Agent to delete, in the form `agents/{genie_agent_id}`. */ + @JsonIgnore private String name; + + public DeleteGenieAgentRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public DeleteGenieAgentRequest 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; + DeleteGenieAgentRequest that = (DeleteGenieAgentRequest) o; + return Objects.equals(etag, that.etag) && Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(etag, name); + } + + @Override + public String toString() { + return new ToStringer(DeleteGenieAgentRequest.class) + .add("etag", etag) + .add("name", name) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgent.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgent.java new file mode 100644 index 000000000..75751a0af --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgent.java @@ -0,0 +1,218 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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 Genie Agent resource. */ +@Generated +public class GenieAgent { + /** Time when the Genie Agent was created. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** + * The definition of the Genie Agent: its sample questions, data sources, instructions, and + * benchmarks. Must set at least one field. Returned on get and on list with + * `GENIE_AGENT_VIEW_FULL`. Create and update return a submitted definition unchanged; one the + * service would store differently, or with a column config the workspace can't keep (unknown + * column, or a display name while those are disabled), is rejected with INVALID_PARAMETER_VALUE. + */ + @JsonProperty("definition") + private GenieAgentDefinition definition; + + /** + * Description of the Genie Agent. + * + *

The maximum length is 4,096 characters. Requests with a longer value are rejected with + * INVALID_PARAMETER_VALUE. + */ + @JsonProperty("description") + private String description; + + /** + * Display name of the Genie Agent. Must be unique within its folder (effective_parent_path): a + * create, rename, or move that would collide with an existing Genie Agent's name in the target + * folder is rejected with ALREADY_EXISTS. + * + *

The maximum length is 63 characters. Requests with a longer value are rejected with + * INVALID_PARAMETER_VALUE. + */ + @JsonProperty("display_name") + private String displayName; + + /** The workspace folder that contains the Genie Agent. */ + @JsonProperty("effective_parent_path") + private String effectiveParentPath; + + /** + * Weak etag of `definition` only; metadata changes do not affect it. Send it on update or delete + * to detect concurrent definition changes. + */ + @JsonProperty("etag") + private String etag; + + /** + * The resource name of the Genie Agent, in the form `agents/{genie_agent_id}`. Ignored on create. + */ + @JsonProperty("name") + private String name; + + /** + * The workspace folder to create the Genie Agent in. If omitted, the caller's home folder is + * used. Returned exactly as submitted; see `effective_parent_path` for the current folder. On + * update, setting it moves the Genie Agent and clearing it does not. At most 4,096 characters. + */ + @JsonProperty("parent_path") + private String parentPath; + + /** Time when the Genie Agent was last modified. */ + @JsonProperty("update_time") + private Timestamp updateTime; + + /** Warehouse associated with the Genie Agent. */ + @JsonProperty("warehouse_id") + private String warehouseId; + + public GenieAgent setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public GenieAgent setDefinition(GenieAgentDefinition definition) { + this.definition = definition; + return this; + } + + public GenieAgentDefinition getDefinition() { + return definition; + } + + public GenieAgent setDescription(String description) { + this.description = description; + return this; + } + + public String getDescription() { + return description; + } + + public GenieAgent setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public GenieAgent setEffectiveParentPath(String effectiveParentPath) { + this.effectiveParentPath = effectiveParentPath; + return this; + } + + public String getEffectiveParentPath() { + return effectiveParentPath; + } + + public GenieAgent setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public GenieAgent setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public GenieAgent setParentPath(String parentPath) { + this.parentPath = parentPath; + return this; + } + + public String getParentPath() { + return parentPath; + } + + public GenieAgent setUpdateTime(Timestamp updateTime) { + this.updateTime = updateTime; + return this; + } + + public Timestamp getUpdateTime() { + return updateTime; + } + + public GenieAgent setWarehouseId(String warehouseId) { + this.warehouseId = warehouseId; + return this; + } + + public String getWarehouseId() { + return warehouseId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgent that = (GenieAgent) o; + return Objects.equals(createTime, that.createTime) + && Objects.equals(definition, that.definition) + && Objects.equals(description, that.description) + && Objects.equals(displayName, that.displayName) + && Objects.equals(effectiveParentPath, that.effectiveParentPath) + && Objects.equals(etag, that.etag) + && Objects.equals(name, that.name) + && Objects.equals(parentPath, that.parentPath) + && Objects.equals(updateTime, that.updateTime) + && Objects.equals(warehouseId, that.warehouseId); + } + + @Override + public int hashCode() { + return Objects.hash( + createTime, + definition, + description, + displayName, + effectiveParentPath, + etag, + name, + parentPath, + updateTime, + warehouseId); + } + + @Override + public String toString() { + return new ToStringer(GenieAgent.class) + .add("createTime", createTime) + .add("definition", definition) + .add("description", description) + .add("displayName", displayName) + .add("effectiveParentPath", effectiveParentPath) + .add("etag", etag) + .add("name", name) + .add("parentPath", parentPath) + .add("updateTime", updateTime) + .add("warehouseId", warehouseId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkAnswer.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkAnswer.java new file mode 100644 index 000000000..a40758452 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkAnswer.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** The expected answer to a benchmark question. */ +@Generated +public class GenieAgentBenchmarkAnswer { + /** The answer. */ + @JsonProperty("content") + private String content; + + /** The format of the answer. */ + @JsonProperty("format") + private GenieAgentBenchmarkAnswerFormat format; + + public GenieAgentBenchmarkAnswer setContent(String content) { + this.content = content; + return this; + } + + public String getContent() { + return content; + } + + public GenieAgentBenchmarkAnswer setFormat(GenieAgentBenchmarkAnswerFormat format) { + this.format = format; + return this; + } + + public GenieAgentBenchmarkAnswerFormat getFormat() { + return format; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentBenchmarkAnswer that = (GenieAgentBenchmarkAnswer) o; + return Objects.equals(content, that.content) && Objects.equals(format, that.format); + } + + @Override + public int hashCode() { + return Objects.hash(content, format); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentBenchmarkAnswer.class) + .add("content", content) + .add("format", format) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkAnswerFormat.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkAnswerFormat.java new file mode 100644 index 000000000..d1f8916a8 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkAnswerFormat.java @@ -0,0 +1,11 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; + +/** The format of a benchmark answer. */ +@Generated +public enum GenieAgentBenchmarkAnswerFormat { + GENIE_AGENT_BENCHMARK_ANSWER_FORMAT_SQL, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkQuestion.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkQuestion.java new file mode 100644 index 000000000..9e6dd4097 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarkQuestion.java @@ -0,0 +1,96 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** A benchmark question with its expected answer. */ +@Generated +public class GenieAgentBenchmarkQuestion { + /** + * The expected answer. At most one answer is supported; omit it when the question has no expected + * answer. + */ + @JsonProperty("answer") + private Collection answer; + + /** Notes on how to evaluate answers to the question. */ + @JsonProperty("evaluation_note") + private String evaluationNote; + + /** + * Identifier of the question: 32 lowercase hexadecimal characters, unique within the Genie Agent. + */ + @JsonProperty("id") + private String id; + + /** The question. */ + @JsonProperty("question") + private String question; + + public GenieAgentBenchmarkQuestion setAnswer(Collection answer) { + this.answer = answer; + return this; + } + + public Collection getAnswer() { + return answer; + } + + public GenieAgentBenchmarkQuestion setEvaluationNote(String evaluationNote) { + this.evaluationNote = evaluationNote; + return this; + } + + public String getEvaluationNote() { + return evaluationNote; + } + + public GenieAgentBenchmarkQuestion setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public GenieAgentBenchmarkQuestion setQuestion(String question) { + this.question = question; + return this; + } + + public String getQuestion() { + return question; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentBenchmarkQuestion that = (GenieAgentBenchmarkQuestion) o; + return Objects.equals(answer, that.answer) + && Objects.equals(evaluationNote, that.evaluationNote) + && Objects.equals(id, that.id) + && Objects.equals(question, that.question); + } + + @Override + public int hashCode() { + return Objects.hash(answer, evaluationNote, id, question); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentBenchmarkQuestion.class) + .add("answer", answer) + .add("evaluationNote", evaluationNote) + .add("id", id) + .add("question", question) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarks.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarks.java new file mode 100644 index 000000000..cbc3ac380 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentBenchmarks.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** Benchmarks for evaluating a Genie Agent. */ +@Generated +public class GenieAgentBenchmarks { + /** The benchmark questions, sorted by `id` in descending order. */ + @JsonProperty("questions") + private Collection questions; + + public GenieAgentBenchmarks setQuestions(Collection questions) { + this.questions = questions; + return this; + } + + public Collection getQuestions() { + return questions; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentBenchmarks that = (GenieAgentBenchmarks) o; + return Objects.equals(questions, that.questions); + } + + @Override + public int hashCode() { + return Objects.hash(questions); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentBenchmarks.class).add("questions", questions).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentColumnConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentColumnConfig.java new file mode 100644 index 000000000..cb9ef4123 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentColumnConfig.java @@ -0,0 +1,146 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** Settings for one column of a table or metric view. */ +@Generated +public class GenieAgentColumnConfig { + /** The name of the column. Must exist in the table or metric view. */ + @JsonProperty("column") + private String column; + + /** Description of the column, overriding its Unity Catalog comment. */ + @JsonProperty("description") + private String description; + + /** + * Display name of the column in the Genie Agent. Accepted only where column display names are + * enabled for the workspace. + */ + @JsonProperty("display_name") + private String displayName; + + /** Whether the Genie Agent indexes the column's values to match them in questions. */ + @JsonProperty("enable_entity_matching") + private Boolean enableEntityMatching; + + /** Whether the Genie Agent samples example values from the column to learn its format. */ + @JsonProperty("enable_format_assistance") + private Boolean enableFormatAssistance; + + /** Whether the column is hidden from the Genie Agent. */ + @JsonProperty("exclude") + private Boolean exclude; + + /** Synonyms for the column name. */ + @JsonProperty("synonyms") + private Collection synonyms; + + public GenieAgentColumnConfig setColumn(String column) { + this.column = column; + return this; + } + + public String getColumn() { + return column; + } + + public GenieAgentColumnConfig setDescription(String description) { + this.description = description; + return this; + } + + public String getDescription() { + return description; + } + + public GenieAgentColumnConfig setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public GenieAgentColumnConfig setEnableEntityMatching(Boolean enableEntityMatching) { + this.enableEntityMatching = enableEntityMatching; + return this; + } + + public Boolean getEnableEntityMatching() { + return enableEntityMatching; + } + + public GenieAgentColumnConfig setEnableFormatAssistance(Boolean enableFormatAssistance) { + this.enableFormatAssistance = enableFormatAssistance; + return this; + } + + public Boolean getEnableFormatAssistance() { + return enableFormatAssistance; + } + + public GenieAgentColumnConfig setExclude(Boolean exclude) { + this.exclude = exclude; + return this; + } + + public Boolean getExclude() { + return exclude; + } + + public GenieAgentColumnConfig setSynonyms(Collection synonyms) { + this.synonyms = synonyms; + return this; + } + + public Collection getSynonyms() { + return synonyms; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentColumnConfig that = (GenieAgentColumnConfig) o; + return Objects.equals(column, that.column) + && Objects.equals(description, that.description) + && Objects.equals(displayName, that.displayName) + && Objects.equals(enableEntityMatching, that.enableEntityMatching) + && Objects.equals(enableFormatAssistance, that.enableFormatAssistance) + && Objects.equals(exclude, that.exclude) + && Objects.equals(synonyms, that.synonyms); + } + + @Override + public int hashCode() { + return Objects.hash( + column, + description, + displayName, + enableEntityMatching, + enableFormatAssistance, + exclude, + synonyms); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentColumnConfig.class) + .add("column", column) + .add("description", description) + .add("displayName", displayName) + .add("enableEntityMatching", enableEntityMatching) + .add("enableFormatAssistance", enableFormatAssistance) + .add("exclude", exclude) + .add("synonyms", synonyms) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentConfig.java new file mode 100644 index 000000000..e03f01d75 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentConfig.java @@ -0,0 +1,49 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** + * General settings of a Genie Agent. The warehouse, display name, and description are separate + * fields of the Genie Agent. + */ +@Generated +public class GenieAgentConfig { + /** Sample questions shown to users of the Genie Agent, sorted by `id`. */ + @JsonProperty("sample_questions") + private Collection sampleQuestions; + + public GenieAgentConfig setSampleQuestions(Collection sampleQuestions) { + this.sampleQuestions = sampleQuestions; + return this; + } + + public Collection getSampleQuestions() { + return sampleQuestions; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentConfig that = (GenieAgentConfig) o; + return Objects.equals(sampleQuestions, that.sampleQuestions); + } + + @Override + public int hashCode() { + return Objects.hash(sampleQuestions); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentConfig.class) + .add("sampleQuestions", sampleQuestions) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentDataSources.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentDataSources.java new file mode 100644 index 000000000..a3960c7a1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentDataSources.java @@ -0,0 +1,77 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** The data a Genie Agent can access. */ +@Generated +public class GenieAgentDataSources { + /** Unity Catalog MCP connections, sorted by `mcp_connection`. */ + @JsonProperty("mcp_connections") + private Collection mcpConnections; + + /** Unity Catalog tables, views, and metric views, in the order they were added. */ + @JsonProperty("tables") + private Collection tables; + + /** Unity Catalog volumes, in the order they were added. */ + @JsonProperty("volumes") + private Collection volumes; + + public GenieAgentDataSources setMcpConnections( + Collection mcpConnections) { + this.mcpConnections = mcpConnections; + return this; + } + + public Collection getMcpConnections() { + return mcpConnections; + } + + public GenieAgentDataSources setTables(Collection tables) { + this.tables = tables; + return this; + } + + public Collection getTables() { + return tables; + } + + public GenieAgentDataSources setVolumes(Collection volumes) { + this.volumes = volumes; + return this; + } + + public Collection getVolumes() { + return volumes; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentDataSources that = (GenieAgentDataSources) o; + return Objects.equals(mcpConnections, that.mcpConnections) + && Objects.equals(tables, that.tables) + && Objects.equals(volumes, that.volumes); + } + + @Override + public int hashCode() { + return Objects.hash(mcpConnections, tables, volumes); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentDataSources.class) + .add("mcpConnections", mcpConnections) + .add("tables", tables) + .add("volumes", volumes) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentDefinition.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentDefinition.java new file mode 100644 index 000000000..9accba53e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentDefinition.java @@ -0,0 +1,90 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** The definition of a Genie Agent. */ +@Generated +public class GenieAgentDefinition { + /** Benchmarks for evaluating the quality of the Genie Agent's answers. */ + @JsonProperty("benchmarks") + private GenieAgentBenchmarks benchmarks; + + /** General settings of the Genie Agent. */ + @JsonProperty("config") + private GenieAgentConfig config; + + /** The data the Genie Agent can access. */ + @JsonProperty("data_sources") + private GenieAgentDataSources dataSources; + + /** Instructions and SQL that guide how the Genie Agent answers questions. */ + @JsonProperty("instructions") + private GenieAgentInstructions instructions; + + public GenieAgentDefinition setBenchmarks(GenieAgentBenchmarks benchmarks) { + this.benchmarks = benchmarks; + return this; + } + + public GenieAgentBenchmarks getBenchmarks() { + return benchmarks; + } + + public GenieAgentDefinition setConfig(GenieAgentConfig config) { + this.config = config; + return this; + } + + public GenieAgentConfig getConfig() { + return config; + } + + public GenieAgentDefinition setDataSources(GenieAgentDataSources dataSources) { + this.dataSources = dataSources; + return this; + } + + public GenieAgentDataSources getDataSources() { + return dataSources; + } + + public GenieAgentDefinition setInstructions(GenieAgentInstructions instructions) { + this.instructions = instructions; + return this; + } + + public GenieAgentInstructions getInstructions() { + return instructions; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentDefinition that = (GenieAgentDefinition) o; + return Objects.equals(benchmarks, that.benchmarks) + && Objects.equals(config, that.config) + && Objects.equals(dataSources, that.dataSources) + && Objects.equals(instructions, that.instructions); + } + + @Override + public int hashCode() { + return Objects.hash(benchmarks, config, dataSources, instructions); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentDefinition.class) + .add("benchmarks", benchmarks) + .add("config", config) + .add("dataSources", dataSources) + .add("instructions", instructions) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentExampleQuestionSql.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentExampleQuestionSql.java new file mode 100644 index 000000000..9f7b3f366 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentExampleQuestionSql.java @@ -0,0 +1,108 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** An example question paired with the SQL that answers it. */ +@Generated +public class GenieAgentExampleQuestionSql { + /** + * Identifier of the example: 32 lowercase hexadecimal characters, unique within the Genie Agent. + */ + @JsonProperty("id") + private String id; + + /** Parameters used in the SQL, in the order given. */ + @JsonProperty("parameters") + private Collection parameters; + + /** The question. */ + @JsonProperty("question") + private String question; + + /** The SQL that answers the question. */ + @JsonProperty("sql") + private String sql; + + /** Guidance on when to use this example. */ + @JsonProperty("usage_guidance") + private String usageGuidance; + + public GenieAgentExampleQuestionSql setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public GenieAgentExampleQuestionSql setParameters(Collection parameters) { + this.parameters = parameters; + return this; + } + + public Collection getParameters() { + return parameters; + } + + public GenieAgentExampleQuestionSql setQuestion(String question) { + this.question = question; + return this; + } + + public String getQuestion() { + return question; + } + + public GenieAgentExampleQuestionSql setSql(String sql) { + this.sql = sql; + return this; + } + + public String getSql() { + return sql; + } + + public GenieAgentExampleQuestionSql setUsageGuidance(String usageGuidance) { + this.usageGuidance = usageGuidance; + return this; + } + + public String getUsageGuidance() { + return usageGuidance; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentExampleQuestionSql that = (GenieAgentExampleQuestionSql) o; + return Objects.equals(id, that.id) + && Objects.equals(parameters, that.parameters) + && Objects.equals(question, that.question) + && Objects.equals(sql, that.sql) + && Objects.equals(usageGuidance, that.usageGuidance); + } + + @Override + public int hashCode() { + return Objects.hash(id, parameters, question, sql, usageGuidance); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentExampleQuestionSql.class) + .add("id", id) + .add("parameters", parameters) + .add("question", question) + .add("sql", sql) + .add("usageGuidance", usageGuidance) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentInstructions.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentInstructions.java new file mode 100644 index 000000000..67da8c5dd --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentInstructions.java @@ -0,0 +1,109 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** Instructions and SQL that guide how a Genie Agent answers questions. */ +@Generated +public class GenieAgentInstructions { + /** Example questions paired with the SQL that answers them. */ + @JsonProperty("example_question_sqls") + private Collection exampleQuestionSqls; + + /** Predefined joins between tables or metric views. */ + @JsonProperty("join_specs") + private Collection joinSpecs; + + /** Unity Catalog SQL functions the generated SQL may call. */ + @JsonProperty("sql_functions") + private Collection sqlFunctions; + + /** Reusable SQL filters, expressions, and measures. */ + @JsonProperty("sql_snippets") + private GenieAgentSqlSnippets sqlSnippets; + + /** General text instructions. At most one text instruction is supported. */ + @JsonProperty("text_instructions") + private Collection textInstructions; + + public GenieAgentInstructions setExampleQuestionSqls( + Collection exampleQuestionSqls) { + this.exampleQuestionSqls = exampleQuestionSqls; + return this; + } + + public Collection getExampleQuestionSqls() { + return exampleQuestionSqls; + } + + public GenieAgentInstructions setJoinSpecs(Collection joinSpecs) { + this.joinSpecs = joinSpecs; + return this; + } + + public Collection getJoinSpecs() { + return joinSpecs; + } + + public GenieAgentInstructions setSqlFunctions(Collection sqlFunctions) { + this.sqlFunctions = sqlFunctions; + return this; + } + + public Collection getSqlFunctions() { + return sqlFunctions; + } + + public GenieAgentInstructions setSqlSnippets(GenieAgentSqlSnippets sqlSnippets) { + this.sqlSnippets = sqlSnippets; + return this; + } + + public GenieAgentSqlSnippets getSqlSnippets() { + return sqlSnippets; + } + + public GenieAgentInstructions setTextInstructions( + Collection textInstructions) { + this.textInstructions = textInstructions; + return this; + } + + public Collection getTextInstructions() { + return textInstructions; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentInstructions that = (GenieAgentInstructions) o; + return Objects.equals(exampleQuestionSqls, that.exampleQuestionSqls) + && Objects.equals(joinSpecs, that.joinSpecs) + && Objects.equals(sqlFunctions, that.sqlFunctions) + && Objects.equals(sqlSnippets, that.sqlSnippets) + && Objects.equals(textInstructions, that.textInstructions); + } + + @Override + public int hashCode() { + return Objects.hash( + exampleQuestionSqls, joinSpecs, sqlFunctions, sqlSnippets, textInstructions); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentInstructions.class) + .add("exampleQuestionSqls", exampleQuestionSqls) + .add("joinSpecs", joinSpecs) + .add("sqlFunctions", sqlFunctions) + .add("sqlSnippets", sqlSnippets) + .add("textInstructions", textInstructions) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinRelationshipType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinRelationshipType.java new file mode 100644 index 000000000..0c42e30cf --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinRelationshipType.java @@ -0,0 +1,14 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; + +/** How the rows of the two sides of a join relate. */ +@Generated +public enum GenieAgentJoinRelationshipType { + GENIE_AGENT_JOIN_RELATIONSHIP_TYPE_MANY_TO_MANY, + GENIE_AGENT_JOIN_RELATIONSHIP_TYPE_MANY_TO_ONE, + GENIE_AGENT_JOIN_RELATIONSHIP_TYPE_ONE_TO_MANY, + GENIE_AGENT_JOIN_RELATIONSHIP_TYPE_ONE_TO_ONE, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinSource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinSource.java new file mode 100644 index 000000000..058d574dd --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinSource.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** One side of a join. */ +@Generated +public class GenieAgentJoinSource { + /** The alias the join condition uses for this side. */ + @JsonProperty("alias") + private String alias; + + /** The full three-level name of the table or metric view. */ + @JsonProperty("identifier") + private String identifier; + + public GenieAgentJoinSource setAlias(String alias) { + this.alias = alias; + return this; + } + + public String getAlias() { + return alias; + } + + public GenieAgentJoinSource setIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + public String getIdentifier() { + return identifier; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentJoinSource that = (GenieAgentJoinSource) o; + return Objects.equals(alias, that.alias) && Objects.equals(identifier, that.identifier); + } + + @Override + public int hashCode() { + return Objects.hash(alias, identifier); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentJoinSource.class) + .add("alias", alias) + .add("identifier", identifier) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinSpec.java new file mode 100644 index 000000000..b04ec40ff --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentJoinSpec.java @@ -0,0 +1,135 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A predefined join between two tables or metric views. */ +@Generated +public class GenieAgentJoinSpec { + /** Description of the join's purpose. */ + @JsonProperty("comment") + private String comment; + + /** Identifier of the join: 32 lowercase hexadecimal characters, unique within the Genie Agent. */ + @JsonProperty("id") + private String id; + + /** Guidance on when to use the join. */ + @JsonProperty("instruction") + private String instruction; + + /** The left side of the join. */ + @JsonProperty("left") + private GenieAgentJoinSource left; + + /** How the rows of the two sides relate. */ + @JsonProperty("relationship_type") + private GenieAgentJoinRelationshipType relationshipType; + + /** The right side of the join. */ + @JsonProperty("right") + private GenieAgentJoinSource right; + + /** The join condition, for example `orders.customer_id = customers.id`. */ + @JsonProperty("sql") + private String sql; + + public GenieAgentJoinSpec setComment(String comment) { + this.comment = comment; + return this; + } + + public String getComment() { + return comment; + } + + public GenieAgentJoinSpec setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public GenieAgentJoinSpec setInstruction(String instruction) { + this.instruction = instruction; + return this; + } + + public String getInstruction() { + return instruction; + } + + public GenieAgentJoinSpec setLeft(GenieAgentJoinSource left) { + this.left = left; + return this; + } + + public GenieAgentJoinSource getLeft() { + return left; + } + + public GenieAgentJoinSpec setRelationshipType(GenieAgentJoinRelationshipType relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + public GenieAgentJoinRelationshipType getRelationshipType() { + return relationshipType; + } + + public GenieAgentJoinSpec setRight(GenieAgentJoinSource right) { + this.right = right; + return this; + } + + public GenieAgentJoinSource getRight() { + return right; + } + + public GenieAgentJoinSpec setSql(String sql) { + this.sql = sql; + return this; + } + + public String getSql() { + return sql; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentJoinSpec that = (GenieAgentJoinSpec) o; + return Objects.equals(comment, that.comment) + && Objects.equals(id, that.id) + && Objects.equals(instruction, that.instruction) + && Objects.equals(left, that.left) + && Objects.equals(relationshipType, that.relationshipType) + && Objects.equals(right, that.right) + && Objects.equals(sql, that.sql); + } + + @Override + public int hashCode() { + return Objects.hash(comment, id, instruction, left, relationshipType, right, sql); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentJoinSpec.class) + .add("comment", comment) + .add("id", id) + .add("instruction", instruction) + .add("left", left) + .add("relationshipType", relationshipType) + .add("right", right) + .add("sql", sql) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentMcpConnection.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentMcpConnection.java new file mode 100644 index 000000000..ced81fa59 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentMcpConnection.java @@ -0,0 +1,45 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A Unity Catalog MCP connection the Genie Agent can use. */ +@Generated +public class GenieAgentMcpConnection { + /** The name of the Unity Catalog connection, for example `system.ai.google_calendar`. */ + @JsonProperty("mcp_connection") + private String mcpConnection; + + public GenieAgentMcpConnection setMcpConnection(String mcpConnection) { + this.mcpConnection = mcpConnection; + return this; + } + + public String getMcpConnection() { + return mcpConnection; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentMcpConnection that = (GenieAgentMcpConnection) o; + return Objects.equals(mcpConnection, that.mcpConnection); + } + + @Override + public int hashCode() { + return Objects.hash(mcpConnection); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentMcpConnection.class) + .add("mcpConnection", mcpConnection) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSampleQuestion.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSampleQuestion.java new file mode 100644 index 000000000..3313c405e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSampleQuestion.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A sample question shown to users of the Genie Agent. */ +@Generated +public class GenieAgentSampleQuestion { + /** + * Identifier of the sample question: 32 lowercase hexadecimal characters, unique within the Genie + * Agent. + */ + @JsonProperty("id") + private String id; + + /** The text of the question. */ + @JsonProperty("question") + private String question; + + public GenieAgentSampleQuestion setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public GenieAgentSampleQuestion setQuestion(String question) { + this.question = question; + return this; + } + + public String getQuestion() { + return question; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSampleQuestion that = (GenieAgentSampleQuestion) o; + return Objects.equals(id, that.id) && Objects.equals(question, that.question); + } + + @Override + public int hashCode() { + return Objects.hash(id, question); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSampleQuestion.class) + .add("id", id) + .add("question", question) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlExpression.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlExpression.java new file mode 100644 index 000000000..b19aa76c2 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlExpression.java @@ -0,0 +1,124 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** A reusable non-aggregated SQL expression (dimension). */ +@Generated +public class GenieAgentSqlExpression { + /** The alias the Genie Agent uses for the expression in generated SQL. */ + @JsonProperty("alias") + private String alias; + + /** Display name of the expression. */ + @JsonProperty("display_name") + private String displayName; + + /** + * Identifier of the expression: 32 lowercase hexadecimal characters, unique within the Genie + * Agent. + */ + @JsonProperty("id") + private String id; + + /** Guidance on when to use the expression. */ + @JsonProperty("instruction") + private String instruction; + + /** The SQL of the expression. */ + @JsonProperty("sql") + private String sql; + + /** Synonyms for the expression. */ + @JsonProperty("synonyms") + private Collection synonyms; + + public GenieAgentSqlExpression setAlias(String alias) { + this.alias = alias; + return this; + } + + public String getAlias() { + return alias; + } + + public GenieAgentSqlExpression setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public GenieAgentSqlExpression setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public GenieAgentSqlExpression setInstruction(String instruction) { + this.instruction = instruction; + return this; + } + + public String getInstruction() { + return instruction; + } + + public GenieAgentSqlExpression setSql(String sql) { + this.sql = sql; + return this; + } + + public String getSql() { + return sql; + } + + public GenieAgentSqlExpression setSynonyms(Collection synonyms) { + this.synonyms = synonyms; + return this; + } + + public Collection getSynonyms() { + return synonyms; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSqlExpression that = (GenieAgentSqlExpression) o; + return Objects.equals(alias, that.alias) + && Objects.equals(displayName, that.displayName) + && Objects.equals(id, that.id) + && Objects.equals(instruction, that.instruction) + && Objects.equals(sql, that.sql) + && Objects.equals(synonyms, that.synonyms); + } + + @Override + public int hashCode() { + return Objects.hash(alias, displayName, id, instruction, sql, synonyms); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSqlExpression.class) + .add("alias", alias) + .add("displayName", displayName) + .add("id", id) + .add("instruction", instruction) + .add("sql", sql) + .add("synonyms", synonyms) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlFilter.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlFilter.java new file mode 100644 index 000000000..43f923b7b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlFilter.java @@ -0,0 +1,108 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** A reusable SQL filter. */ +@Generated +public class GenieAgentSqlFilter { + /** Display name of the filter. */ + @JsonProperty("display_name") + private String displayName; + + /** + * Identifier of the filter: 32 lowercase hexadecimal characters, unique within the Genie Agent. + */ + @JsonProperty("id") + private String id; + + /** Guidance on when to use the filter. */ + @JsonProperty("instruction") + private String instruction; + + /** The SQL of the filter. */ + @JsonProperty("sql") + private String sql; + + /** Synonyms for the filter. */ + @JsonProperty("synonyms") + private Collection synonyms; + + public GenieAgentSqlFilter setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public GenieAgentSqlFilter setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public GenieAgentSqlFilter setInstruction(String instruction) { + this.instruction = instruction; + return this; + } + + public String getInstruction() { + return instruction; + } + + public GenieAgentSqlFilter setSql(String sql) { + this.sql = sql; + return this; + } + + public String getSql() { + return sql; + } + + public GenieAgentSqlFilter setSynonyms(Collection synonyms) { + this.synonyms = synonyms; + return this; + } + + public Collection getSynonyms() { + return synonyms; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSqlFilter that = (GenieAgentSqlFilter) o; + return Objects.equals(displayName, that.displayName) + && Objects.equals(id, that.id) + && Objects.equals(instruction, that.instruction) + && Objects.equals(sql, that.sql) + && Objects.equals(synonyms, that.synonyms); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, id, instruction, sql, synonyms); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSqlFilter.class) + .add("displayName", displayName) + .add("id", id) + .add("instruction", instruction) + .add("sql", sql) + .add("synonyms", synonyms) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlFunction.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlFunction.java new file mode 100644 index 000000000..9beadffc9 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlFunction.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A Unity Catalog SQL function the generated SQL may call. */ +@Generated +public class GenieAgentSqlFunction { + /** + * Identifier of the entry: 32 lowercase hexadecimal characters, unique within the Genie Agent. + */ + @JsonProperty("id") + private String id; + + /** The full three-level name of the function, for example `catalog.schema.function`. */ + @JsonProperty("identifier") + private String identifier; + + public GenieAgentSqlFunction setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public GenieAgentSqlFunction setIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + public String getIdentifier() { + return identifier; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSqlFunction that = (GenieAgentSqlFunction) o; + return Objects.equals(id, that.id) && Objects.equals(identifier, that.identifier); + } + + @Override + public int hashCode() { + return Objects.hash(id, identifier); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSqlFunction.class) + .add("id", id) + .add("identifier", identifier) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlMeasure.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlMeasure.java new file mode 100644 index 000000000..fd276c39d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlMeasure.java @@ -0,0 +1,123 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** A reusable aggregated SQL measure. */ +@Generated +public class GenieAgentSqlMeasure { + /** The alias the Genie Agent uses for the measure in generated SQL. */ + @JsonProperty("alias") + private String alias; + + /** Display name of the measure. */ + @JsonProperty("display_name") + private String displayName; + + /** + * Identifier of the measure: 32 lowercase hexadecimal characters, unique within the Genie Agent. + */ + @JsonProperty("id") + private String id; + + /** Guidance on when to use the measure. */ + @JsonProperty("instruction") + private String instruction; + + /** The SQL of the measure. */ + @JsonProperty("sql") + private String sql; + + /** Synonyms for the measure. */ + @JsonProperty("synonyms") + private Collection synonyms; + + public GenieAgentSqlMeasure setAlias(String alias) { + this.alias = alias; + return this; + } + + public String getAlias() { + return alias; + } + + public GenieAgentSqlMeasure setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public GenieAgentSqlMeasure setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + public GenieAgentSqlMeasure setInstruction(String instruction) { + this.instruction = instruction; + return this; + } + + public String getInstruction() { + return instruction; + } + + public GenieAgentSqlMeasure setSql(String sql) { + this.sql = sql; + return this; + } + + public String getSql() { + return sql; + } + + public GenieAgentSqlMeasure setSynonyms(Collection synonyms) { + this.synonyms = synonyms; + return this; + } + + public Collection getSynonyms() { + return synonyms; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSqlMeasure that = (GenieAgentSqlMeasure) o; + return Objects.equals(alias, that.alias) + && Objects.equals(displayName, that.displayName) + && Objects.equals(id, that.id) + && Objects.equals(instruction, that.instruction) + && Objects.equals(sql, that.sql) + && Objects.equals(synonyms, that.synonyms); + } + + @Override + public int hashCode() { + return Objects.hash(alias, displayName, id, instruction, sql, synonyms); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSqlMeasure.class) + .add("alias", alias) + .add("displayName", displayName) + .add("id", id) + .add("instruction", instruction) + .add("sql", sql) + .add("synonyms", synonyms) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameter.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameter.java new file mode 100644 index 000000000..a5bc05bf7 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameter.java @@ -0,0 +1,90 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A parameter of a parameterized SQL example. */ +@Generated +public class GenieAgentSqlParameter { + /** The parameter's default value. */ + @JsonProperty("default_value") + private GenieAgentSqlParameterDefaultValue defaultValue; + + /** Description of the parameter. */ + @JsonProperty("description") + private String description; + + /** The name of the parameter in the SQL. */ + @JsonProperty("name") + private String name; + + /** The parameter's data type, for example `STRING` or `INTEGER`. */ + @JsonProperty("type_hint") + private String typeHint; + + public GenieAgentSqlParameter setDefaultValue(GenieAgentSqlParameterDefaultValue defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + public GenieAgentSqlParameterDefaultValue getDefaultValue() { + return defaultValue; + } + + public GenieAgentSqlParameter setDescription(String description) { + this.description = description; + return this; + } + + public String getDescription() { + return description; + } + + public GenieAgentSqlParameter setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public GenieAgentSqlParameter setTypeHint(String typeHint) { + this.typeHint = typeHint; + return this; + } + + public String getTypeHint() { + return typeHint; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSqlParameter that = (GenieAgentSqlParameter) o; + return Objects.equals(defaultValue, that.defaultValue) + && Objects.equals(description, that.description) + && Objects.equals(name, that.name) + && Objects.equals(typeHint, that.typeHint); + } + + @Override + public int hashCode() { + return Objects.hash(defaultValue, description, name, typeHint); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSqlParameter.class) + .add("defaultValue", defaultValue) + .add("description", description) + .add("name", name) + .add("typeHint", typeHint) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameterDefaultRange.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameterDefaultRange.java new file mode 100644 index 000000000..154d0dd77 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameterDefaultRange.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A range of default values for a SQL parameter. */ +@Generated +public class GenieAgentSqlParameterDefaultRange { + /** The upper end of the range. */ + @JsonProperty("max") + private String max; + + /** The lower end of the range. */ + @JsonProperty("min") + private String min; + + public GenieAgentSqlParameterDefaultRange setMax(String max) { + this.max = max; + return this; + } + + public String getMax() { + return max; + } + + public GenieAgentSqlParameterDefaultRange setMin(String min) { + this.min = min; + return this; + } + + public String getMin() { + return min; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSqlParameterDefaultRange that = (GenieAgentSqlParameterDefaultRange) o; + return Objects.equals(max, that.max) && Objects.equals(min, that.min); + } + + @Override + public int hashCode() { + return Objects.hash(max, min); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSqlParameterDefaultRange.class) + .add("max", max) + .add("min", min) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameterDefaultValue.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameterDefaultValue.java new file mode 100644 index 000000000..25ce04e66 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlParameterDefaultValue.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** The default value of a SQL parameter: a list of values or a range. */ +@Generated +public class GenieAgentSqlParameterDefaultValue { + /** The default range. */ + @JsonProperty("value_range") + private GenieAgentSqlParameterDefaultRange valueRange; + + /** The default values. A single default is a one-element list. */ + @JsonProperty("values") + private Collection values; + + public GenieAgentSqlParameterDefaultValue setValueRange( + GenieAgentSqlParameterDefaultRange valueRange) { + this.valueRange = valueRange; + return this; + } + + public GenieAgentSqlParameterDefaultRange getValueRange() { + return valueRange; + } + + public GenieAgentSqlParameterDefaultValue setValues(Collection values) { + this.values = values; + return this; + } + + public Collection getValues() { + return values; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSqlParameterDefaultValue that = (GenieAgentSqlParameterDefaultValue) o; + return Objects.equals(valueRange, that.valueRange) && Objects.equals(values, that.values); + } + + @Override + public int hashCode() { + return Objects.hash(valueRange, values); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSqlParameterDefaultValue.class) + .add("valueRange", valueRange) + .add("values", values) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlSnippets.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlSnippets.java new file mode 100644 index 000000000..4e5bbfeb0 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentSqlSnippets.java @@ -0,0 +1,76 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** Reusable SQL snippets. */ +@Generated +public class GenieAgentSqlSnippets { + /** Non-aggregated expressions (dimensions), such as `price * units`. */ + @JsonProperty("expressions") + private Collection expressions; + + /** Filters, such as `state = 'CA'`. */ + @JsonProperty("filters") + private Collection filters; + + /** Aggregated measures, such as `SUM(price * units)`. */ + @JsonProperty("measures") + private Collection measures; + + public GenieAgentSqlSnippets setExpressions(Collection expressions) { + this.expressions = expressions; + return this; + } + + public Collection getExpressions() { + return expressions; + } + + public GenieAgentSqlSnippets setFilters(Collection filters) { + this.filters = filters; + return this; + } + + public Collection getFilters() { + return filters; + } + + public GenieAgentSqlSnippets setMeasures(Collection measures) { + this.measures = measures; + return this; + } + + public Collection getMeasures() { + return measures; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentSqlSnippets that = (GenieAgentSqlSnippets) o; + return Objects.equals(expressions, that.expressions) + && Objects.equals(filters, that.filters) + && Objects.equals(measures, that.measures); + } + + @Override + public int hashCode() { + return Objects.hash(expressions, filters, measures); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentSqlSnippets.class) + .add("expressions", expressions) + .add("filters", filters) + .add("measures", measures) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentTable.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentTable.java new file mode 100644 index 000000000..e20a32419 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentTable.java @@ -0,0 +1,76 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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; + +/** A Unity Catalog table, view, or metric view the Genie Agent can access. */ +@Generated +public class GenieAgentTable { + /** Column settings for the table, sorted by `column`. */ + @JsonProperty("column_configs") + private Collection columnConfigs; + + /** Description of the table. */ + @JsonProperty("description") + private String description; + + /** The full three-level name, for example `catalog.schema.table`. */ + @JsonProperty("identifier") + private String identifier; + + public GenieAgentTable setColumnConfigs(Collection columnConfigs) { + this.columnConfigs = columnConfigs; + return this; + } + + public Collection getColumnConfigs() { + return columnConfigs; + } + + public GenieAgentTable setDescription(String description) { + this.description = description; + return this; + } + + public String getDescription() { + return description; + } + + public GenieAgentTable setIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + public String getIdentifier() { + return identifier; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentTable that = (GenieAgentTable) o; + return Objects.equals(columnConfigs, that.columnConfigs) + && Objects.equals(description, that.description) + && Objects.equals(identifier, that.identifier); + } + + @Override + public int hashCode() { + return Objects.hash(columnConfigs, description, identifier); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentTable.class) + .add("columnConfigs", columnConfigs) + .add("description", description) + .add("identifier", identifier) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentTextInstruction.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentTextInstruction.java new file mode 100644 index 000000000..a7600e745 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentTextInstruction.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A general text instruction for the Genie Agent. */ +@Generated +public class GenieAgentTextInstruction { + /** The text of the instruction. */ + @JsonProperty("content") + private String content; + + /** + * Identifier of the instruction: 32 lowercase hexadecimal characters, unique within the Genie + * Agent. + */ + @JsonProperty("id") + private String id; + + public GenieAgentTextInstruction setContent(String content) { + this.content = content; + return this; + } + + public String getContent() { + return content; + } + + public GenieAgentTextInstruction setId(String id) { + this.id = id; + return this; + } + + public String getId() { + return id; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentTextInstruction that = (GenieAgentTextInstruction) o; + return Objects.equals(content, that.content) && Objects.equals(id, that.id); + } + + @Override + public int hashCode() { + return Objects.hash(content, id); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentTextInstruction.class) + .add("content", content) + .add("id", id) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentView.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentView.java new file mode 100644 index 000000000..0ddcac7c1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentView.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; + +/** The fields returned for each Genie Agent in a list response. */ +@Generated +public enum GenieAgentView { + GENIE_AGENT_VIEW_BASIC, + GENIE_AGENT_VIEW_FULL, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentVolume.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentVolume.java new file mode 100644 index 000000000..f397fd0b7 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentVolume.java @@ -0,0 +1,62 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** A Unity Catalog volume the Genie Agent can access. */ +@Generated +public class GenieAgentVolume { + /** Description of the volume. */ + @JsonProperty("description") + private String description; + + /** + * The volume path, for example `/Volumes/catalog/schema/volume`. May name a directory or file + * within the volume. + */ + @JsonProperty("path") + private String path; + + public GenieAgentVolume setDescription(String description) { + this.description = description; + return this; + } + + public String getDescription() { + return description; + } + + public GenieAgentVolume setPath(String path) { + this.path = path; + return this; + } + + public String getPath() { + return path; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieAgentVolume that = (GenieAgentVolume) o; + return Objects.equals(description, that.description) && Objects.equals(path, that.path); + } + + @Override + public int hashCode() { + return Objects.hash(description, path); + } + + @Override + public String toString() { + return new ToStringer(GenieAgentVolume.class) + .add("description", description) + .add("path", path) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentsAPI.java new file mode 100644 index 000000000..7549f2171 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentsAPI.java @@ -0,0 +1,81 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.genieagents; + +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; + +/** + * Genie provides a no-code experience for business users, powered by AI/BI. Analysts set up Genie + * Agents that business users can use to ask questions using natural language. Genie uses data + * registered to Unity Catalog and requires at least CAN USE permission on a Pro or Serverless SQL + * warehouse. Also, Databricks Assistant must be enabled. + */ +@Generated +public class GenieAgentsAPI { + private static final Logger LOG = LoggerFactory.getLogger(GenieAgentsAPI.class); + + private final GenieAgentsService impl; + + /** Regular-use constructor */ + public GenieAgentsAPI(ApiClient apiClient) { + impl = new GenieAgentsImpl(apiClient); + } + + /** Constructor for mocks */ + public GenieAgentsAPI(GenieAgentsService mock) { + impl = mock; + } + + /** Creates a Genie Agent. */ + public GenieAgent createGenieAgent(CreateGenieAgentRequest request) { + return impl.createGenieAgent(request); + } + + public void deleteGenieAgent(String name) { + deleteGenieAgent(new DeleteGenieAgentRequest().setName(name)); + } + + /** Deletes a Genie Agent, moving it to trash. */ + public void deleteGenieAgent(DeleteGenieAgentRequest request) { + impl.deleteGenieAgent(request); + } + + public GenieAgent getGenieAgent(String name) { + return getGenieAgent(new GetGenieAgentRequest().setName(name)); + } + + /** Gets a Genie Agent. */ + public GenieAgent getGenieAgent(GetGenieAgentRequest request) { + return impl.getGenieAgent(request); + } + + /** + * Lists the Genie Agents in the workspace. Genie Agents created from an integration (for example, + * from a dashboard) are not listed. + */ + public Iterable listGenieAgents(ListGenieAgentsRequest request) { + return Paginator.newTokenPagination( + request, + impl::listGenieAgents, + ListGenieAgentsResponse::getGenieAgents, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + + /** Updates a Genie Agent. Only the fields named in update_mask are applied. */ + public GenieAgent updateGenieAgent(UpdateGenieAgentRequest request) { + return impl.updateGenieAgent(request); + } + + public GenieAgentsService impl() { + return impl; + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentsImpl.java new file mode 100644 index 000000000..d13ba5082 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentsImpl.java @@ -0,0 +1,105 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.genieagents; + +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 GenieAgents */ +@Generated +class GenieAgentsImpl implements GenieAgentsService { + private final ApiClient apiClient; + + public GenieAgentsImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public GenieAgent createGenieAgent(CreateGenieAgentRequest request) { + String path = "/api/2.0/genie/agents"; + try { + Request req = new Request("POST", path, apiClient.serialize(request.getGenieAgent())); + + 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, GenieAgent.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public void deleteGenieAgent(DeleteGenieAgentRequest request) { + String path = String.format("/api/2.0/genie/%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()); + } + apiClient.execute(req, Void.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public GenieAgent getGenieAgent(GetGenieAgentRequest request) { + String path = String.format("/api/2.0/genie/%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, GenieAgent.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ListGenieAgentsResponse listGenieAgents(ListGenieAgentsRequest request) { + String path = "/api/2.0/genie/agents"; + 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, ListGenieAgentsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public GenieAgent updateGenieAgent(UpdateGenieAgentRequest request) { + String path = String.format("/api/2.0/genie/%s", request.getName()); + try { + Request req = new Request("PATCH", path, apiClient.serialize(request.getGenieAgent())); + + 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, GenieAgent.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/genieagents/GenieAgentsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentsService.java new file mode 100644 index 000000000..82a1b5dd5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GenieAgentsService.java @@ -0,0 +1,35 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.genieagents; + +import com.databricks.sdk.support.Generated; + +/** + * Genie provides a no-code experience for business users, powered by AI/BI. Analysts set up Genie + * Agents that business users can use to ask questions using natural language. Genie uses data + * registered to Unity Catalog and requires at least CAN USE permission on a Pro or Serverless SQL + * warehouse. Also, Databricks Assistant must be enabled. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface GenieAgentsService { + /** Creates a Genie Agent. */ + GenieAgent createGenieAgent(CreateGenieAgentRequest createGenieAgentRequest); + + /** Deletes a Genie Agent, moving it to trash. */ + void deleteGenieAgent(DeleteGenieAgentRequest deleteGenieAgentRequest); + + /** Gets a Genie Agent. */ + GenieAgent getGenieAgent(GetGenieAgentRequest getGenieAgentRequest); + + /** + * Lists the Genie Agents in the workspace. Genie Agents created from an integration (for example, + * from a dashboard) are not listed. + */ + ListGenieAgentsResponse listGenieAgents(ListGenieAgentsRequest listGenieAgentsRequest); + + /** Updates a Genie Agent. Only the fields named in update_mask are applied. */ + GenieAgent updateGenieAgent(UpdateGenieAgentRequest updateGenieAgentRequest); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GetGenieAgentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GetGenieAgentRequest.java new file mode 100644 index 000000000..b8af405cd --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/GetGenieAgentRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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 GetGenieAgentRequest { + /** The resource name of the Genie Agent to retrieve, in the form `agents/{genie_agent_id}`. */ + @JsonIgnore private String name; + + public GetGenieAgentRequest 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; + GetGenieAgentRequest that = (GetGenieAgentRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetGenieAgentRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/ListGenieAgentsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/ListGenieAgentsRequest.java new file mode 100644 index 000000000..2722dcd67 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/ListGenieAgentsRequest.java @@ -0,0 +1,88 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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 ListGenieAgentsRequest { + /** + * Maximum number of Genie Agents to return per page. Defaults to 20 when unset or 0; values above + * 100 are coerced to 100. Negative values are rejected with INVALID_PARAMETER_VALUE. With + * `GENIE_AGENT_VIEW_FULL`, a smaller per-page maximum applies. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * Pagination token from a previous response's `next_page_token`. A token that was not returned by + * this method is rejected with INVALID_PARAMETER_VALUE. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** + * The fields to return for each Genie Agent. Defaults to `GENIE_AGENT_VIEW_BASIC`. Use + * `GENIE_AGENT_VIEW_FULL` only when the agent bodies are needed, since it returns smaller pages. + */ + @JsonIgnore + @QueryParam("view") + private GenieAgentView view; + + public ListGenieAgentsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListGenieAgentsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListGenieAgentsRequest setView(GenieAgentView view) { + this.view = view; + return this; + } + + public GenieAgentView getView() { + return view; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListGenieAgentsRequest that = (ListGenieAgentsRequest) o; + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(view, that.view); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken, view); + } + + @Override + public String toString() { + return new ToStringer(ListGenieAgentsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("view", view) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/ListGenieAgentsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/ListGenieAgentsResponse.java new file mode 100644 index 000000000..7660cd406 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/ListGenieAgentsResponse.java @@ -0,0 +1,81 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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 a list request: a page of Genie Agents plus the token for the next page. */ +@Generated +public class ListGenieAgentsResponse { + /** The Genie Agents, with the fields selected by the request's `view`. */ + @JsonProperty("genie_agents") + private Collection genieAgents; + + /** Token to get the next page of results. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + /** + * Resource names, in the form `agents/{genie_agent_id}`, of Genie Agents in this page that could + * not be read and are omitted from `genie_agents`. Populated only for `GENIE_AGENT_VIEW_FULL`. To + * see why, get the Genie Agent by name; to retry, repeat the request. Other kinds of resource + * names may be added to this field in the future. + */ + @JsonProperty("unreachable") + private Collection unreachable; + + public ListGenieAgentsResponse setGenieAgents(Collection genieAgents) { + this.genieAgents = genieAgents; + return this; + } + + public Collection getGenieAgents() { + return genieAgents; + } + + public ListGenieAgentsResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public ListGenieAgentsResponse setUnreachable(Collection unreachable) { + this.unreachable = unreachable; + return this; + } + + public Collection getUnreachable() { + return unreachable; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListGenieAgentsResponse that = (ListGenieAgentsResponse) o; + return Objects.equals(genieAgents, that.genieAgents) + && Objects.equals(nextPageToken, that.nextPageToken) + && Objects.equals(unreachable, that.unreachable); + } + + @Override + public int hashCode() { + return Objects.hash(genieAgents, nextPageToken, unreachable); + } + + @Override + public String toString() { + return new ToStringer(ListGenieAgentsResponse.class) + .add("genieAgents", genieAgents) + .add("nextPageToken", nextPageToken) + .add("unreachable", unreachable) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/UpdateGenieAgentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/UpdateGenieAgentRequest.java new file mode 100644 index 000000000..6572254b2 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/genieagents/UpdateGenieAgentRequest.java @@ -0,0 +1,114 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.genieagents; + +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 UpdateGenieAgentRequest { + /** + * Etag from a previous read. On mismatch the update fails with ABORTED (metadata changes may + * already be applied); get the agent and retry. May return TEMPORARILY_UNAVAILABLE. + */ + @JsonIgnore + @QueryParam("etag") + private String etag; + + /** + * The Genie Agent to update. Its `name` identifies the resource; fields named in update_mask are + * applied. + */ + @JsonProperty("genie_agent") + private GenieAgent genieAgent; + + /** + * The resource name of the Genie Agent, in the form `agents/{genie_agent_id}`. Ignored on create. + */ + @JsonIgnore private String name; + + /** + * The set of fields to update. The mask is required and must name at least one field; an empty or + * absent mask is rejected with INVALID_PARAMETER_VALUE, as is a path that is not an updatable + * field. + * + *

A field named in the mask takes the value from `genie_agent`, even when it is unset there: + * an unset `description` is cleared; an unset `display_name`, `warehouse_id`, or `definition` is + * rejected with INVALID_PARAMETER_VALUE; an unset `parent_path` is cleared without moving the + * Genie Agent. `definition` is replaced as a whole; paths within it are not supported. + * + *

The special value `*` replaces the whole Genie Agent, as if every updatable field were + * named. It must be the only path in the mask. Prefer naming fields explicitly: with `*`, any + * field added to Genie Agent later is also replaced, so a client unaware of it may clear it. + */ + @JsonIgnore + @QueryParam("update_mask") + private FieldMask updateMask; + + public UpdateGenieAgentRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public UpdateGenieAgentRequest setGenieAgent(GenieAgent genieAgent) { + this.genieAgent = genieAgent; + return this; + } + + public GenieAgent getGenieAgent() { + return genieAgent; + } + + public UpdateGenieAgentRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public UpdateGenieAgentRequest 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; + UpdateGenieAgentRequest that = (UpdateGenieAgentRequest) o; + return Objects.equals(etag, that.etag) + && Objects.equals(genieAgent, that.genieAgent) + && Objects.equals(name, that.name) + && Objects.equals(updateMask, that.updateMask); + } + + @Override + public int hashCode() { + return Objects.hash(etag, genieAgent, name, updateMask); + } + + @Override + public String toString() { + return new ToStringer(UpdateGenieAgentRequest.class) + .add("etag", etag) + .add("genieAgent", genieAgent) + .add("name", name) + .add("updateMask", updateMask) + .toString(); + } +} 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 515bf2409..a60341768 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 @@ -105,9 +105,8 @@ public WorkspaceAssignmentDetail createWorkspaceAssignmentDetail( return impl.createWorkspaceAssignmentDetail(request); } - public void deleteDirectGroupMember(long groupId, long principalId) { - deleteDirectGroupMember( - new DeleteDirectGroupMemberRequest().setGroupId(groupId).setPrincipalId(principalId)); + public void deleteDirectGroupMember(String name) { + deleteDirectGroupMember(new DeleteDirectGroupMemberRequest().setName(name)); } /** @@ -120,8 +119,8 @@ public void deleteDirectGroupMember(DeleteDirectGroupMemberRequest request) { impl.deleteDirectGroupMember(request); } - public void deleteGroup(String groupId) { - deleteGroup(new DeleteGroupRequest().setGroupId(groupId)); + public void deleteGroup(String name) { + deleteGroup(new DeleteGroupRequest().setName(name)); } /** @@ -149,9 +148,8 @@ public void deleteIdentityVisibilityFilter(DeleteIdentityVisibilityFilterRequest impl.deleteIdentityVisibilityFilter(request); } - public void deleteServicePrincipal(String servicePrincipalId) { - deleteServicePrincipal( - new DeleteServicePrincipalRequest().setServicePrincipalId(servicePrincipalId)); + public void deleteServicePrincipal(String name) { + deleteServicePrincipal(new DeleteServicePrincipalRequest().setName(name)); } /** Deletes a service principal from the Databricks account by its internal ID. */ @@ -159,8 +157,8 @@ public void deleteServicePrincipal(DeleteServicePrincipalRequest request) { impl.deleteServicePrincipal(request); } - public void deleteUser(String userId) { - deleteUser(new DeleteUserRequest().setUserId(userId)); + public void deleteUser(String name) { + deleteUser(new DeleteUserRequest().setName(name)); } /** Deletes a user from the Databricks account by its internal ID. */ @@ -168,11 +166,8 @@ public void deleteUser(DeleteUserRequest request) { impl.deleteUser(request); } - public void deleteWorkspaceAssignment(long workspaceId, long principalId) { - deleteWorkspaceAssignment( - new DeleteWorkspaceAssignmentRequest() - .setWorkspaceId(workspaceId) - .setPrincipalId(principalId)); + public void deleteWorkspaceAssignment(String name) { + deleteWorkspaceAssignment(new DeleteWorkspaceAssignmentRequest().setName(name)); } /** @@ -200,9 +195,8 @@ public void deleteWorkspaceAssignmentDetail(DeleteWorkspaceAssignmentDetailReque impl.deleteWorkspaceAssignmentDetail(request); } - public DirectGroupMember getDirectGroupMember(long groupId, long principalId) { - return getDirectGroupMember( - new GetDirectGroupMemberRequest().setGroupId(groupId).setPrincipalId(principalId)); + public DirectGroupMember getDirectGroupMember(String name) { + return getDirectGroupMember(new GetDirectGroupMemberRequest().setName(name)); } /** Gets a provisioned direct member of a group. */ @@ -250,8 +244,8 @@ public ExternalUser getExternalUser(GetExternalUserRequest request) { return impl.getExternalUser(request); } - public Group getGroup(String groupId) { - return getGroup(new GetGroupRequest().setGroupId(groupId)); + public Group getGroup(String name) { + return getGroup(new GetGroupRequest().setName(name)); } /** Fetches a group from the Databricks account by its internal ID. */ @@ -272,9 +266,8 @@ public IdentityVisibilityFilter getIdentityVisibilityFilter( return impl.getIdentityVisibilityFilter(request); } - public ServicePrincipal getServicePrincipal(String servicePrincipalId) { - return getServicePrincipal( - new GetServicePrincipalRequest().setServicePrincipalId(servicePrincipalId)); + public ServicePrincipal getServicePrincipal(String name) { + return getServicePrincipal(new GetServicePrincipalRequest().setName(name)); } /** Fetches a service principal from the Databricks account by its internal ID. */ @@ -282,8 +275,8 @@ public ServicePrincipal getServicePrincipal(GetServicePrincipalRequest request) return impl.getServicePrincipal(request); } - public User getUser(String userId) { - return getUser(new GetUserRequest().setUserId(userId)); + public User getUser(String name) { + return getUser(new GetUserRequest().setName(name)); } /** Fetches a user from the Databricks account by its internal ID. */ @@ -291,11 +284,8 @@ public User getUser(GetUserRequest request) { return impl.getUser(request); } - public WorkspaceAccessDetail getWorkspaceAccessDetail(long workspaceId, long principalId) { - return getWorkspaceAccessDetail( - new GetWorkspaceAccessDetailRequest() - .setWorkspaceId(workspaceId) - .setPrincipalId(principalId)); + public WorkspaceAccessDetail getWorkspaceAccessDetail(String name) { + return getWorkspaceAccessDetail(new GetWorkspaceAccessDetailRequest().setName(name)); } /** @@ -309,11 +299,8 @@ public WorkspaceAccessDetail getWorkspaceAccessDetail(GetWorkspaceAccessDetailRe return impl.getWorkspaceAccessDetail(request); } - public WorkspaceAssignment getWorkspaceAssignment(long workspaceId, long principalId) { - return getWorkspaceAssignment( - new GetWorkspaceAssignmentRequest() - .setWorkspaceId(workspaceId) - .setPrincipalId(principalId)); + public WorkspaceAssignment getWorkspaceAssignment(String name) { + return getWorkspaceAssignment(new GetWorkspaceAssignmentRequest().setName(name)); } /** Returns the assignment for a principal in a workspace. */ @@ -335,8 +322,8 @@ public WorkspaceAssignmentDetail getWorkspaceAssignmentDetail( return impl.getWorkspaceAssignmentDetail(request); } - public Iterable listDirectGroupMembers(long groupId) { - return listDirectGroupMembers(new ListDirectGroupMembersRequest().setGroupId(groupId)); + public Iterable listDirectGroupMembers(String parent) { + return listDirectGroupMembers(new ListDirectGroupMembersRequest().setParent(parent)); } /** @@ -357,6 +344,10 @@ public Iterable listDirectGroupMembers(ListDirectGroupMembers }); } + public Iterable listGroups(String parent) { + return listGroups(new ListGroupsRequest().setParent(parent)); + } + /** * Lists the groups in the Databricks account, returning one page per call. Supports filtering by * group name or external ID. @@ -401,6 +392,10 @@ public Iterable listIdentityVisibilityFilters( }); } + public Iterable listServicePrincipals(String parent) { + return listServicePrincipals(new ListServicePrincipalsRequest().setParent(parent)); + } + /** * Lists the service principals in the Databricks account, returning one page per call. Supports * filtering by application ID or external ID. @@ -419,9 +414,8 @@ public Iterable listServicePrincipals(ListServicePrincipalsReq }); } - public ListTransitiveParentGroupsResponse listTransitiveParentGroups(long principalId) { - return listTransitiveParentGroups( - new ListTransitiveParentGroupsRequest().setPrincipalId(principalId)); + public ListTransitiveParentGroupsResponse listTransitiveParentGroups(String parent) { + return listTransitiveParentGroups(new ListTransitiveParentGroupsRequest().setParent(parent)); } /** Lists all transitive parent groups of a principal. */ @@ -430,6 +424,10 @@ public ListTransitiveParentGroupsResponse listTransitiveParentGroups( return impl.listTransitiveParentGroups(request); } + public Iterable listUsers(String parent) { + return listUsers(new ListUsersRequest().setParent(parent)); + } + /** * Lists the users in the Databricks account, returning one page per call. Supports filtering by * username or external ID. @@ -473,9 +471,8 @@ public Iterable listWorkspaceAssignmentDetails( }); } - public Iterable listWorkspaceAssignments(long workspaceId) { - return listWorkspaceAssignments( - new ListWorkspaceAssignmentsRequest().setWorkspaceId(workspaceId)); + public Iterable listWorkspaceAssignments(String parent) { + return listWorkspaceAssignments(new ListWorkspaceAssignmentsRequest().setParent(parent)); } /** @@ -546,7 +543,8 @@ public Group updateGroup(UpdateGroupRequest 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. * - *

For locally managed service principals, is_agent must be set to true or false when updated. + *

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. * *

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 diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Impl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Impl.java index 98934da6c..9a209bb5b 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Impl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Impl.java @@ -18,10 +18,7 @@ public AccountIamV2Impl(ApiClient apiClient) { @Override public DirectGroupMember createDirectGroupMember(CreateDirectGroupMemberRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/groups/%s/direct-members", - apiClient.configuredAccountID(), request.getGroupId()); + String path = String.format("/api/2.0/identity/%s/direct-members", request.getParent()); try { Request req = new Request("POST", path, apiClient.serialize(request.getDirectGroupMember())); @@ -36,8 +33,7 @@ public DirectGroupMember createDirectGroupMember(CreateDirectGroupMemberRequest @Override public Group createGroup(CreateGroupRequest request) { - String path = - String.format("/api/2.0/identity/accounts/%s/groups", apiClient.configuredAccountID()); + String path = String.format("/api/2.0/identity/%s/groups", request.getParent()); try { Request req = new Request("POST", path, apiClient.serialize(request.getGroup())); @@ -70,9 +66,7 @@ public IdentityVisibilityFilter createIdentityVisibilityFilter( @Override public ServicePrincipal createServicePrincipal(CreateServicePrincipalRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/service-principals", apiClient.configuredAccountID()); + String path = String.format("/api/2.0/identity/%s/service-principals", request.getParent()); try { Request req = new Request("POST", path, apiClient.serialize(request.getServicePrincipal())); @@ -87,8 +81,7 @@ public ServicePrincipal createServicePrincipal(CreateServicePrincipalRequest req @Override public User createUser(CreateUserRequest request) { - String path = - String.format("/api/2.0/identity/accounts/%s/users", apiClient.configuredAccountID()); + String path = String.format("/api/2.0/identity/%s/users", request.getParent()); try { Request req = new Request("POST", path, apiClient.serialize(request.getUser())); @@ -103,10 +96,7 @@ public User createUser(CreateUserRequest request) { @Override public WorkspaceAssignment createWorkspaceAssignment(CreateWorkspaceAssignmentRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignments", - apiClient.configuredAccountID(), request.getWorkspaceId()); + String path = String.format("/api/2.0/identity/%s/workspace-assignments", request.getParent()); try { Request req = new Request("POST", path, apiClient.serialize(request.getWorkspaceAssignment())); @@ -142,10 +132,7 @@ public WorkspaceAssignmentDetail createWorkspaceAssignmentDetail( @Override public void deleteDirectGroupMember(DeleteDirectGroupMemberRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/groups/%s/direct-members/%s", - apiClient.configuredAccountID(), request.getGroupId(), request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -159,10 +146,7 @@ public void deleteDirectGroupMember(DeleteDirectGroupMemberRequest request) { @Override public void deleteGroup(DeleteGroupRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/groups/%s", - apiClient.configuredAccountID(), request.getGroupId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -190,10 +174,7 @@ public void deleteIdentityVisibilityFilter(DeleteIdentityVisibilityFilterRequest @Override public void deleteServicePrincipal(DeleteServicePrincipalRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/service-principals/%s", - apiClient.configuredAccountID(), request.getServicePrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -207,10 +188,7 @@ public void deleteServicePrincipal(DeleteServicePrincipalRequest request) { @Override public void deleteUser(DeleteUserRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/users/%s", - apiClient.configuredAccountID(), request.getUserId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -224,10 +202,7 @@ public void deleteUser(DeleteUserRequest request) { @Override public void deleteWorkspaceAssignment(DeleteWorkspaceAssignmentRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignments/%s", - apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -258,10 +233,7 @@ public void deleteWorkspaceAssignmentDetail(DeleteWorkspaceAssignmentDetailReque @Override public DirectGroupMember getDirectGroupMember(GetDirectGroupMemberRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/groups/%s/direct-members/%s", - apiClient.configuredAccountID(), request.getGroupId(), request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -318,10 +290,7 @@ public ExternalUser getExternalUser(GetExternalUserRequest request) { @Override public Group getGroup(GetGroupRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/groups/%s", - apiClient.configuredAccountID(), request.getGroupId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -350,10 +319,7 @@ public IdentityVisibilityFilter getIdentityVisibilityFilter( @Override public ServicePrincipal getServicePrincipal(GetServicePrincipalRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/service-principals/%s", - apiClient.configuredAccountID(), request.getServicePrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -367,10 +333,7 @@ public ServicePrincipal getServicePrincipal(GetServicePrincipalRequest request) @Override public User getUser(GetUserRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/users/%s", - apiClient.configuredAccountID(), request.getUserId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -384,10 +347,7 @@ public User getUser(GetUserRequest request) { @Override public WorkspaceAccessDetail getWorkspaceAccessDetail(GetWorkspaceAccessDetailRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-access-details/%s", - apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -401,10 +361,7 @@ public WorkspaceAccessDetail getWorkspaceAccessDetail(GetWorkspaceAccessDetailRe @Override public WorkspaceAssignment getWorkspaceAssignment(GetWorkspaceAssignmentRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignments/%s", - apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -437,10 +394,7 @@ public WorkspaceAssignmentDetail getWorkspaceAssignmentDetail( @Override public ListDirectGroupMembersResponse listDirectGroupMembers( ListDirectGroupMembersRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/groups/%s/direct-members", - apiClient.configuredAccountID(), request.getGroupId()); + String path = String.format("/api/2.0/identity/%s/direct-members", request.getParent()); try { Request req = new Request("GET", path); @@ -454,8 +408,7 @@ public ListDirectGroupMembersResponse listDirectGroupMembers( @Override public ListGroupsResponse listGroups(ListGroupsRequest request) { - String path = - String.format("/api/2.0/identity/accounts/%s/groups", apiClient.configuredAccountID()); + String path = String.format("/api/2.0/identity/%s/groups", request.getParent()); try { Request req = new Request("GET", path); @@ -485,9 +438,7 @@ public ListIdentityVisibilityFiltersResponse listIdentityVisibilityFilters( @Override public ListServicePrincipalsResponse listServicePrincipals(ListServicePrincipalsRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/service-principals", apiClient.configuredAccountID()); + String path = String.format("/api/2.0/identity/%s/service-principals", request.getParent()); try { Request req = new Request("GET", path); @@ -503,9 +454,7 @@ public ListServicePrincipalsResponse listServicePrincipals(ListServicePrincipals public ListTransitiveParentGroupsResponse listTransitiveParentGroups( ListTransitiveParentGroupsRequest request) { String path = - String.format( - "/api/2.0/identity/accounts/%s/principals/%s/transitive-parent-groups", - apiClient.configuredAccountID(), request.getPrincipalId()); + String.format("/api/2.0/identity/%s/transitive-parent-groups", request.getParent()); try { Request req = new Request("GET", path); @@ -519,8 +468,7 @@ public ListTransitiveParentGroupsResponse listTransitiveParentGroups( @Override public ListUsersResponse listUsers(ListUsersRequest request) { - String path = - String.format("/api/2.0/identity/accounts/%s/users", apiClient.configuredAccountID()); + String path = String.format("/api/2.0/identity/%s/users", request.getParent()); try { Request req = new Request("GET", path); @@ -553,10 +501,7 @@ public ListWorkspaceAssignmentDetailsResponse listWorkspaceAssignmentDetails( @Override public ListWorkspaceAssignmentsResponse listWorkspaceAssignments( ListWorkspaceAssignmentsRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignments", - apiClient.configuredAccountID(), request.getWorkspaceId()); + String path = String.format("/api/2.0/identity/%s/workspace-assignments", request.getParent()); try { Request req = new Request("GET", path); @@ -625,10 +570,7 @@ public ResolveUserResponse resolveUser(ResolveUserRequest request) { @Override public Group updateGroup(UpdateGroupRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/groups/%s", - apiClient.configuredAccountID(), request.getGroupId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getGroup())); @@ -643,10 +585,7 @@ public Group updateGroup(UpdateGroupRequest request) { @Override public ServicePrincipal updateServicePrincipal(UpdateServicePrincipalRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/service-principals/%s", - apiClient.configuredAccountID(), request.getServicePrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getServicePrincipal())); @@ -661,10 +600,7 @@ public ServicePrincipal updateServicePrincipal(UpdateServicePrincipalRequest req @Override public User updateUser(UpdateUserRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/users/%s", - apiClient.configuredAccountID(), request.getUserId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getUser())); @@ -679,10 +615,7 @@ public User updateUser(UpdateUserRequest request) { @Override public WorkspaceAssignment updateWorkspaceAssignment(UpdateWorkspaceAssignmentRequest request) { - String path = - String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignments/%s", - apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getWorkspaceAssignment())); 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 d66ce253c..e441a8821 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 @@ -281,7 +281,8 @@ ResolveServicePrincipalResponse resolveServicePrincipal( * Updates an existing service principal in the Databricks account. Only the fields named in the * update mask are modified. Returns the updated ServicePrincipal resource. * - *

For locally managed service principals, is_agent must be set to true or false when updated. + *

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. * *

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 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 1d9eff191..88336efec 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 @@ -14,8 +14,8 @@ public class CreateDirectGroupMemberProxyRequest { @JsonProperty("direct_group_member") private DirectGroupMember directGroupMember; - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private Long groupId; + /** The parent resource name of the group to add the member to. Format: groups/{group_id} */ + @JsonIgnore private String parent; public CreateDirectGroupMemberProxyRequest setDirectGroupMember( DirectGroupMember directGroupMember) { @@ -27,13 +27,13 @@ public DirectGroupMember getDirectGroupMember() { return directGroupMember; } - public CreateDirectGroupMemberProxyRequest setGroupId(Long groupId) { - this.groupId = groupId; + public CreateDirectGroupMemberProxyRequest setParent(String parent) { + this.parent = parent; return this; } - public Long getGroupId() { - return groupId; + public String getParent() { + return parent; } @Override @@ -42,19 +42,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; CreateDirectGroupMemberProxyRequest that = (CreateDirectGroupMemberProxyRequest) o; return Objects.equals(directGroupMember, that.directGroupMember) - && Objects.equals(groupId, that.groupId); + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(directGroupMember, groupId); + return Objects.hash(directGroupMember, parent); } @Override public String toString() { return new ToStringer(CreateDirectGroupMemberProxyRequest.class) .add("directGroupMember", directGroupMember) - .add("groupId", groupId) + .add("parent", parent) .toString(); } } 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 179bc43f9..404fe73f5 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 @@ -14,8 +14,11 @@ public class CreateDirectGroupMemberRequest { @JsonProperty("direct_group_member") private DirectGroupMember directGroupMember; - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private Long groupId; + /** + * The parent resource name of the group to add the member to. Format: + * accounts/{account_id}/groups/{group_id} + */ + @JsonIgnore private String parent; public CreateDirectGroupMemberRequest setDirectGroupMember(DirectGroupMember directGroupMember) { this.directGroupMember = directGroupMember; @@ -26,13 +29,13 @@ public DirectGroupMember getDirectGroupMember() { return directGroupMember; } - public CreateDirectGroupMemberRequest setGroupId(Long groupId) { - this.groupId = groupId; + public CreateDirectGroupMemberRequest setParent(String parent) { + this.parent = parent; return this; } - public Long getGroupId() { - return groupId; + public String getParent() { + return parent; } @Override @@ -41,19 +44,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; CreateDirectGroupMemberRequest that = (CreateDirectGroupMemberRequest) o; return Objects.equals(directGroupMember, that.directGroupMember) - && Objects.equals(groupId, that.groupId); + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(directGroupMember, groupId); + return Objects.hash(directGroupMember, parent); } @Override public String toString() { return new ToStringer(CreateDirectGroupMemberRequest.class) .add("directGroupMember", directGroupMember) - .add("groupId", groupId) + .add("parent", parent) .toString(); } } 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 968828918..2e2033f3f 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 @@ -3,7 +3,9 @@ package com.databricks.sdk.service.iamv2; 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; @@ -13,6 +15,14 @@ public class CreateGroupProxyRequest { @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. + */ + @JsonIgnore + @QueryParam("parent") + private String parent; + public CreateGroupProxyRequest setGroup(Group group) { this.group = group; return this; @@ -22,21 +32,33 @@ public Group getGroup() { return group; } + public CreateGroupProxyRequest 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; CreateGroupProxyRequest that = (CreateGroupProxyRequest) o; - return Objects.equals(group, that.group); + return Objects.equals(group, that.group) && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(group); + return Objects.hash(group, parent); } @Override public String toString() { - return new ToStringer(CreateGroupProxyRequest.class).add("group", group).toString(); + return new ToStringer(CreateGroupProxyRequest.class) + .add("group", group) + .add("parent", parent) + .toString(); } } 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 ee163beb3..98d344b7b 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 @@ -4,6 +4,7 @@ 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; @@ -13,6 +14,12 @@ public class CreateGroupRequest { @JsonProperty("group") private Group group; + /** + * The parent resource name of the account in which to create the group. Format: + * accounts/{account_id} + */ + @JsonIgnore private String parent; + public CreateGroupRequest setGroup(Group group) { this.group = group; return this; @@ -22,21 +29,33 @@ public Group getGroup() { return group; } + public CreateGroupRequest 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; CreateGroupRequest that = (CreateGroupRequest) o; - return Objects.equals(group, that.group); + return Objects.equals(group, that.group) && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(group); + return Objects.hash(group, parent); } @Override public String toString() { - return new ToStringer(CreateGroupRequest.class).add("group", group).toString(); + return new ToStringer(CreateGroupRequest.class) + .add("group", group) + .add("parent", parent) + .toString(); } } 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 26d5752ca..a6d95d9d1 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 @@ -3,16 +3,35 @@ package com.databricks.sdk.service.iamv2; 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 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. + */ + @JsonIgnore + @QueryParam("parent") + private String parent; + /** Required. Service principal to be created in Databricks */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; + public CreateServicePrincipalProxyRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public CreateServicePrincipalProxyRequest setServicePrincipal(ServicePrincipal servicePrincipal) { this.servicePrincipal = servicePrincipal; return this; @@ -27,17 +46,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CreateServicePrincipalProxyRequest that = (CreateServicePrincipalProxyRequest) o; - return Objects.equals(servicePrincipal, that.servicePrincipal); + return Objects.equals(parent, that.parent) + && Objects.equals(servicePrincipal, that.servicePrincipal); } @Override public int hashCode() { - return Objects.hash(servicePrincipal); + return Objects.hash(parent, servicePrincipal); } @Override public String toString() { return new ToStringer(CreateServicePrincipalProxyRequest.class) + .add("parent", parent) .add("servicePrincipal", servicePrincipal) .toString(); } 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 9010d9d50..a732b478b 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 @@ -4,15 +4,31 @@ 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; @Generated public class CreateServicePrincipalRequest { + /** + * The parent resource name of the account in which to create the service principal. Format: + * accounts/{account_id} + */ + @JsonIgnore private String parent; + /** Required. Service principal to be created in Databricks */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; + public CreateServicePrincipalRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public CreateServicePrincipalRequest setServicePrincipal(ServicePrincipal servicePrincipal) { this.servicePrincipal = servicePrincipal; return this; @@ -27,17 +43,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CreateServicePrincipalRequest that = (CreateServicePrincipalRequest) o; - return Objects.equals(servicePrincipal, that.servicePrincipal); + return Objects.equals(parent, that.parent) + && Objects.equals(servicePrincipal, that.servicePrincipal); } @Override public int hashCode() { - return Objects.hash(servicePrincipal); + return Objects.hash(parent, servicePrincipal); } @Override public String toString() { return new ToStringer(CreateServicePrincipalRequest.class) + .add("parent", parent) .add("servicePrincipal", servicePrincipal) .toString(); } 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 638007ef8..ed91c8f3e 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 @@ -3,16 +3,35 @@ package com.databricks.sdk.service.iamv2; 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 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. + */ + @JsonIgnore + @QueryParam("parent") + private String parent; + /** Required. User to be created in Databricks */ @JsonProperty("user") private User user; + public CreateUserProxyRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public CreateUserProxyRequest setUser(User user) { this.user = user; return this; @@ -27,16 +46,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CreateUserProxyRequest that = (CreateUserProxyRequest) o; - return Objects.equals(user, that.user); + return Objects.equals(parent, that.parent) && Objects.equals(user, that.user); } @Override public int hashCode() { - return Objects.hash(user); + return Objects.hash(parent, user); } @Override public String toString() { - return new ToStringer(CreateUserProxyRequest.class).add("user", user).toString(); + return new ToStringer(CreateUserProxyRequest.class) + .add("parent", parent) + .add("user", user) + .toString(); } } 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 dbf3ec858..fae5f44f0 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 @@ -4,15 +4,31 @@ 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; @Generated public class CreateUserRequest { + /** + * The parent resource name of the account in which to create the user. Format: + * accounts/{account_id} + */ + @JsonIgnore private String parent; + /** Required. User to be created in Databricks */ @JsonProperty("user") private User user; + public CreateUserRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public CreateUserRequest setUser(User user) { this.user = user; return this; @@ -27,16 +43,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CreateUserRequest that = (CreateUserRequest) o; - return Objects.equals(user, that.user); + return Objects.equals(parent, that.parent) && Objects.equals(user, that.user); } @Override public int hashCode() { - return Objects.hash(user); + return Objects.hash(parent, user); } @Override public String toString() { - return new ToStringer(CreateUserRequest.class).add("user", user).toString(); + return new ToStringer(CreateUserRequest.class) + .add("parent", parent) + .add("user", user) + .toString(); } } 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 4e1c219ed..f58c04620 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 @@ -3,16 +3,36 @@ package com.databricks.sdk.service.iamv2; 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 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. + */ + @JsonIgnore + @QueryParam("parent") + private String parent; + /** Required. Workspace assignment to be created in Databricks. */ @JsonProperty("workspace_assignment") private WorkspaceAssignment workspaceAssignment; + public CreateWorkspaceAssignmentProxyRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public CreateWorkspaceAssignmentProxyRequest setWorkspaceAssignment( WorkspaceAssignment workspaceAssignment) { this.workspaceAssignment = workspaceAssignment; @@ -28,17 +48,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CreateWorkspaceAssignmentProxyRequest that = (CreateWorkspaceAssignmentProxyRequest) o; - return Objects.equals(workspaceAssignment, that.workspaceAssignment); + return Objects.equals(parent, that.parent) + && Objects.equals(workspaceAssignment, that.workspaceAssignment); } @Override public int hashCode() { - return Objects.hash(workspaceAssignment); + return Objects.hash(parent, workspaceAssignment); } @Override public String toString() { return new ToStringer(CreateWorkspaceAssignmentProxyRequest.class) + .add("parent", parent) .add("workspaceAssignment", workspaceAssignment) .toString(); } 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 028998469..704d37b5a 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 @@ -10,12 +10,24 @@ @Generated public class CreateWorkspaceAssignmentRequest { + /** + * The parent resource name of the workspace to assign the principal to. Format: + * accounts/{account_id}/workspaces/{workspace_id} + */ + @JsonIgnore private String parent; + /** Required. Workspace assignment to be created in Databricks. */ @JsonProperty("workspace_assignment") private WorkspaceAssignment workspaceAssignment; - /** Required. The workspace ID for which the workspace assignment is being created. */ - @JsonIgnore private Long workspaceId; + public CreateWorkspaceAssignmentRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } public CreateWorkspaceAssignmentRequest setWorkspaceAssignment( WorkspaceAssignment workspaceAssignment) { @@ -27,34 +39,25 @@ public WorkspaceAssignment getWorkspaceAssignment() { return workspaceAssignment; } - public CreateWorkspaceAssignmentRequest setWorkspaceId(Long workspaceId) { - this.workspaceId = workspaceId; - return this; - } - - public Long getWorkspaceId() { - return workspaceId; - } - @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CreateWorkspaceAssignmentRequest that = (CreateWorkspaceAssignmentRequest) o; - return Objects.equals(workspaceAssignment, that.workspaceAssignment) - && Objects.equals(workspaceId, that.workspaceId); + return Objects.equals(parent, that.parent) + && Objects.equals(workspaceAssignment, that.workspaceAssignment); } @Override public int hashCode() { - return Objects.hash(workspaceAssignment, workspaceId); + return Objects.hash(parent, workspaceAssignment); } @Override public String toString() { return new ToStringer(CreateWorkspaceAssignmentRequest.class) + .add("parent", parent) .add("workspaceAssignment", workspaceAssignment) - .add("workspaceId", workspaceId) .toString(); } } 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 32713efbd..168fa1b18 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 @@ -9,28 +9,19 @@ @Generated public class DeleteDirectGroupMemberProxyRequest { - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private Long groupId; - - /** Required. Internal ID of the principal to be unassigned from the group. */ - @JsonIgnore private Long principalId; - - public DeleteDirectGroupMemberProxyRequest setGroupId(Long groupId) { - this.groupId = groupId; - return this; - } - - public Long getGroupId() { - return groupId; - } - - public DeleteDirectGroupMemberProxyRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + /** + * The resource name of the group membership. Format: + * groups/{group_id}/direct-members/{principal_id} + */ + @JsonIgnore private String name; + + public DeleteDirectGroupMemberProxyRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } @Override @@ -38,19 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteDirectGroupMemberProxyRequest that = (DeleteDirectGroupMemberProxyRequest) o; - return Objects.equals(groupId, that.groupId) && Objects.equals(principalId, that.principalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(groupId, principalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteDirectGroupMemberProxyRequest.class) - .add("groupId", groupId) - .add("principalId", principalId) - .toString(); + return new ToStringer(DeleteDirectGroupMemberProxyRequest.class).add("name", name).toString(); } } 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 a319d360d..da9d07b40 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 @@ -9,28 +9,19 @@ @Generated public class DeleteDirectGroupMemberRequest { - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private Long groupId; - - /** Required. Internal ID of the principal to be unassigned from the group. */ - @JsonIgnore private Long principalId; - - public DeleteDirectGroupMemberRequest setGroupId(Long groupId) { - this.groupId = groupId; - return this; - } - - public Long getGroupId() { - return groupId; - } - - public DeleteDirectGroupMemberRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + /** + * The resource name of the group membership. Format: + * accounts/{account_id}/groups/{group_id}/direct-members/{principal_id} + */ + @JsonIgnore private String name; + + public DeleteDirectGroupMemberRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } @Override @@ -38,19 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteDirectGroupMemberRequest that = (DeleteDirectGroupMemberRequest) o; - return Objects.equals(groupId, that.groupId) && Objects.equals(principalId, that.principalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(groupId, principalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteDirectGroupMemberRequest.class) - .add("groupId", groupId) - .add("principalId", principalId) - .toString(); + return new ToStringer(DeleteDirectGroupMemberRequest.class).add("name", name).toString(); } } 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 aff780869..941ba0fac 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,16 +9,16 @@ @Generated public class DeleteGroupProxyRequest { - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private String groupId; + /** The resource name of the group. Format: groups/{group_id} */ + @JsonIgnore private String name; - public DeleteGroupProxyRequest setGroupId(String groupId) { - this.groupId = groupId; + public DeleteGroupProxyRequest setName(String name) { + this.name = name; return this; } - public String getGroupId() { - return groupId; + public String getName() { + return name; } @Override @@ -26,16 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteGroupProxyRequest that = (DeleteGroupProxyRequest) o; - return Objects.equals(groupId, that.groupId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(groupId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteGroupProxyRequest.class).add("groupId", groupId).toString(); + return new ToStringer(DeleteGroupProxyRequest.class).add("name", name).toString(); } } 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 560d46550..6cd8b5e37 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,16 +9,16 @@ @Generated public class DeleteGroupRequest { - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private String groupId; + /** The resource name of the group. Format: accounts/{account_id}/groups/{group_id} */ + @JsonIgnore private String name; - public DeleteGroupRequest setGroupId(String groupId) { - this.groupId = groupId; + public DeleteGroupRequest setName(String name) { + this.name = name; return this; } - public String getGroupId() { - return groupId; + public String getName() { + return name; } @Override @@ -26,16 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteGroupRequest that = (DeleteGroupRequest) o; - return Objects.equals(groupId, that.groupId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(groupId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteGroupRequest.class).add("groupId", groupId).toString(); + return new ToStringer(DeleteGroupRequest.class).add("name", name).toString(); } } 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 2e014d5ca..ad0ced620 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 @@ -9,16 +9,18 @@ @Generated public class DeleteServicePrincipalProxyRequest { - /** Required. Internal ID of the service principal in Databricks. */ - @JsonIgnore private String servicePrincipalId; + /** + * The resource name of the service principal. Format: service-principals/{service_principal_id} + */ + @JsonIgnore private String name; - public DeleteServicePrincipalProxyRequest setServicePrincipalId(String servicePrincipalId) { - this.servicePrincipalId = servicePrincipalId; + public DeleteServicePrincipalProxyRequest setName(String name) { + this.name = name; return this; } - public String getServicePrincipalId() { - return servicePrincipalId; + public String getName() { + return name; } @Override @@ -26,18 +28,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteServicePrincipalProxyRequest that = (DeleteServicePrincipalProxyRequest) o; - return Objects.equals(servicePrincipalId, that.servicePrincipalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(servicePrincipalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteServicePrincipalProxyRequest.class) - .add("servicePrincipalId", servicePrincipalId) - .toString(); + return new ToStringer(DeleteServicePrincipalProxyRequest.class).add("name", name).toString(); } } 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 b3081a445..752142396 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 @@ -9,16 +9,19 @@ @Generated public class DeleteServicePrincipalRequest { - /** Required. Internal ID of the service principal in Databricks. */ - @JsonIgnore private String servicePrincipalId; - - public DeleteServicePrincipalRequest setServicePrincipalId(String servicePrincipalId) { - this.servicePrincipalId = servicePrincipalId; + /** + * The resource name of the service principal. Format: + * accounts/{account_id}/service-principals/{service_principal_id} + */ + @JsonIgnore private String name; + + public DeleteServicePrincipalRequest setName(String name) { + this.name = name; return this; } - public String getServicePrincipalId() { - return servicePrincipalId; + public String getName() { + return name; } @Override @@ -26,18 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteServicePrincipalRequest that = (DeleteServicePrincipalRequest) o; - return Objects.equals(servicePrincipalId, that.servicePrincipalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(servicePrincipalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteServicePrincipalRequest.class) - .add("servicePrincipalId", servicePrincipalId) - .toString(); + return new ToStringer(DeleteServicePrincipalRequest.class).add("name", name).toString(); } } 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 d9d8b0d94..a33cf5da5 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,16 +9,16 @@ @Generated public class DeleteUserProxyRequest { - /** Required. Internal ID of the user in Databricks. */ - @JsonIgnore private String userId; + /** The resource name of the user. Format: users/{user_id} */ + @JsonIgnore private String name; - public DeleteUserProxyRequest setUserId(String userId) { - this.userId = userId; + public DeleteUserProxyRequest setName(String name) { + this.name = name; return this; } - public String getUserId() { - return userId; + public String getName() { + return name; } @Override @@ -26,16 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteUserProxyRequest that = (DeleteUserProxyRequest) o; - return Objects.equals(userId, that.userId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(userId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteUserProxyRequest.class).add("userId", userId).toString(); + return new ToStringer(DeleteUserProxyRequest.class).add("name", name).toString(); } } 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 256413117..130e85431 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,16 +9,16 @@ @Generated public class DeleteUserRequest { - /** Required. Internal ID of the user in Databricks. */ - @JsonIgnore private String userId; + /** The resource name of the user. Format: accounts/{account_id}/users/{user_id} */ + @JsonIgnore private String name; - public DeleteUserRequest setUserId(String userId) { - this.userId = userId; + public DeleteUserRequest setName(String name) { + this.name = name; return this; } - public String getUserId() { - return userId; + public String getName() { + return name; } @Override @@ -26,16 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteUserRequest that = (DeleteUserRequest) o; - return Objects.equals(userId, that.userId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(userId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteUserRequest.class).add("userId", userId).toString(); + return new ToStringer(DeleteUserRequest.class).add("name", name).toString(); } } 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 133c23ec1..ba2b993fd 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,16 +9,16 @@ @Generated public class DeleteWorkspaceAssignmentProxyRequest { - /** Required. ID of the principal in Databricks to delete workspace assignment for. */ - @JsonIgnore private Long principalId; + /** The resource name of the workspace assignment. Format: workspace-assignments/{principal_id} */ + @JsonIgnore private String name; - public DeleteWorkspaceAssignmentProxyRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public DeleteWorkspaceAssignmentProxyRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } @Override @@ -26,18 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteWorkspaceAssignmentProxyRequest that = (DeleteWorkspaceAssignmentProxyRequest) o; - return Objects.equals(principalId, that.principalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(principalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteWorkspaceAssignmentProxyRequest.class) - .add("principalId", principalId) - .toString(); + return new ToStringer(DeleteWorkspaceAssignmentProxyRequest.class).add("name", name).toString(); } } 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 0a5d0657c..2553a1ed5 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 @@ -9,28 +9,19 @@ @Generated public class DeleteWorkspaceAssignmentRequest { - /** Required. ID of the principal in Databricks to delete workspace assignment for. */ - @JsonIgnore private Long principalId; - - /** The workspace ID where the principal has access. */ - @JsonIgnore private Long workspaceId; - - public DeleteWorkspaceAssignmentRequest setPrincipalId(Long principalId) { - this.principalId = principalId; - return this; - } - - public Long getPrincipalId() { - return principalId; - } - - public DeleteWorkspaceAssignmentRequest setWorkspaceId(Long workspaceId) { - this.workspaceId = workspaceId; + /** + * The resource name of the workspace assignment. Format: + * accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id} + */ + @JsonIgnore private String name; + + public DeleteWorkspaceAssignmentRequest setName(String name) { + this.name = name; return this; } - public Long getWorkspaceId() { - return workspaceId; + public String getName() { + return name; } @Override @@ -38,20 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeleteWorkspaceAssignmentRequest that = (DeleteWorkspaceAssignmentRequest) o; - return Objects.equals(principalId, that.principalId) - && Objects.equals(workspaceId, that.workspaceId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(principalId, workspaceId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(DeleteWorkspaceAssignmentRequest.class) - .add("principalId", principalId) - .add("workspaceId", workspaceId) - .toString(); + return new ToStringer(DeleteWorkspaceAssignmentRequest.class).add("name", name).toString(); } } 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 296903d52..34814a29d 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 @@ -26,6 +26,22 @@ public class DirectGroupMember { @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} + */ + @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} + */ + @JsonProperty("parent") + private String parent; + /** Internal ID of the principal in Databricks. */ @JsonProperty("principal_id") private Long principalId; @@ -70,6 +86,24 @@ public GroupMembershipSource getMembershipSource() { return membershipSource; } + public DirectGroupMember setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public DirectGroupMember setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public DirectGroupMember setPrincipalId(Long principalId) { this.principalId = principalId; return this; @@ -97,6 +131,8 @@ public boolean equals(Object o) { && Objects.equals(externalId, that.externalId) && Objects.equals(groupId, that.groupId) && Objects.equals(membershipSource, that.membershipSource) + && Objects.equals(name, that.name) + && Objects.equals(parent, that.parent) && Objects.equals(principalId, that.principalId) && Objects.equals(principalType, that.principalType); } @@ -104,7 +140,14 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - displayName, externalId, groupId, membershipSource, principalId, principalType); + displayName, + externalId, + groupId, + membershipSource, + name, + parent, + principalId, + principalType); } @Override @@ -114,6 +157,8 @@ public String toString() { .add("externalId", externalId) .add("groupId", groupId) .add("membershipSource", membershipSource) + .add("name", name) + .add("parent", parent) .add("principalId", principalId) .add("principalType", principalType) .toString(); 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 a9ebff025..da84e46ee 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 @@ -9,28 +9,19 @@ @Generated public class GetDirectGroupMemberProxyRequest { - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private Long groupId; - - /** Required. Internal ID of the principal belonging to the group in Databricks. */ - @JsonIgnore private Long principalId; - - public GetDirectGroupMemberProxyRequest setGroupId(Long groupId) { - this.groupId = groupId; - return this; - } - - public Long getGroupId() { - return groupId; - } - - public GetDirectGroupMemberProxyRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + /** + * The resource name of the group membership. Format: + * groups/{group_id}/direct-members/{principal_id} + */ + @JsonIgnore private String name; + + public GetDirectGroupMemberProxyRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } @Override @@ -38,19 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetDirectGroupMemberProxyRequest that = (GetDirectGroupMemberProxyRequest) o; - return Objects.equals(groupId, that.groupId) && Objects.equals(principalId, that.principalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(groupId, principalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetDirectGroupMemberProxyRequest.class) - .add("groupId", groupId) - .add("principalId", principalId) - .toString(); + return new ToStringer(GetDirectGroupMemberProxyRequest.class).add("name", name).toString(); } } 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 da8451c3c..3fa170bc1 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 @@ -9,28 +9,19 @@ @Generated public class GetDirectGroupMemberRequest { - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private Long groupId; - - /** Required. Internal ID of the principal belonging to the group in Databricks. */ - @JsonIgnore private Long principalId; - - public GetDirectGroupMemberRequest setGroupId(Long groupId) { - this.groupId = groupId; - return this; - } - - public Long getGroupId() { - return groupId; - } - - public GetDirectGroupMemberRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + /** + * The resource name of the group membership. Format: + * accounts/{account_id}/groups/{group_id}/direct-members/{principal_id} + */ + @JsonIgnore private String name; + + public GetDirectGroupMemberRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } @Override @@ -38,19 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetDirectGroupMemberRequest that = (GetDirectGroupMemberRequest) o; - return Objects.equals(groupId, that.groupId) && Objects.equals(principalId, that.principalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(groupId, principalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetDirectGroupMemberRequest.class) - .add("groupId", groupId) - .add("principalId", principalId) - .toString(); + return new ToStringer(GetDirectGroupMemberRequest.class).add("name", name).toString(); } } 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 4f10c3a6a..d81daa96b 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,16 +9,16 @@ @Generated public class GetGroupProxyRequest { - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private String groupId; + /** The resource name of the group. Format: groups/{group_id} */ + @JsonIgnore private String name; - public GetGroupProxyRequest setGroupId(String groupId) { - this.groupId = groupId; + public GetGroupProxyRequest setName(String name) { + this.name = name; return this; } - public String getGroupId() { - return groupId; + public String getName() { + return name; } @Override @@ -26,16 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetGroupProxyRequest that = (GetGroupProxyRequest) o; - return Objects.equals(groupId, that.groupId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(groupId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetGroupProxyRequest.class).add("groupId", groupId).toString(); + return new ToStringer(GetGroupProxyRequest.class).add("name", name).toString(); } } 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 4f9ebf2c1..46d4aa326 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,16 +9,16 @@ @Generated public class GetGroupRequest { - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private String groupId; + /** The resource name of the group. Format: accounts/{account_id}/groups/{group_id} */ + @JsonIgnore private String name; - public GetGroupRequest setGroupId(String groupId) { - this.groupId = groupId; + public GetGroupRequest setName(String name) { + this.name = name; return this; } - public String getGroupId() { - return groupId; + public String getName() { + return name; } @Override @@ -26,16 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetGroupRequest that = (GetGroupRequest) o; - return Objects.equals(groupId, that.groupId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(groupId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetGroupRequest.class).add("groupId", groupId).toString(); + return new ToStringer(GetGroupRequest.class).add("name", name).toString(); } } 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 cba391135..5a8c46828 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 @@ -9,16 +9,18 @@ @Generated public class GetServicePrincipalProxyRequest { - /** Required. Internal ID of the service principal in Databricks. */ - @JsonIgnore private String servicePrincipalId; + /** + * The resource name of the service principal. Format: service-principals/{service_principal_id} + */ + @JsonIgnore private String name; - public GetServicePrincipalProxyRequest setServicePrincipalId(String servicePrincipalId) { - this.servicePrincipalId = servicePrincipalId; + public GetServicePrincipalProxyRequest setName(String name) { + this.name = name; return this; } - public String getServicePrincipalId() { - return servicePrincipalId; + public String getName() { + return name; } @Override @@ -26,18 +28,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetServicePrincipalProxyRequest that = (GetServicePrincipalProxyRequest) o; - return Objects.equals(servicePrincipalId, that.servicePrincipalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(servicePrincipalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetServicePrincipalProxyRequest.class) - .add("servicePrincipalId", servicePrincipalId) - .toString(); + return new ToStringer(GetServicePrincipalProxyRequest.class).add("name", name).toString(); } } 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 d17d7f97e..8c7b13968 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 @@ -9,16 +9,19 @@ @Generated public class GetServicePrincipalRequest { - /** Required. Internal ID of the service principal in Databricks. */ - @JsonIgnore private String servicePrincipalId; - - public GetServicePrincipalRequest setServicePrincipalId(String servicePrincipalId) { - this.servicePrincipalId = servicePrincipalId; + /** + * The resource name of the service principal. Format: + * accounts/{account_id}/service-principals/{service_principal_id} + */ + @JsonIgnore private String name; + + public GetServicePrincipalRequest setName(String name) { + this.name = name; return this; } - public String getServicePrincipalId() { - return servicePrincipalId; + public String getName() { + return name; } @Override @@ -26,18 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetServicePrincipalRequest that = (GetServicePrincipalRequest) o; - return Objects.equals(servicePrincipalId, that.servicePrincipalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(servicePrincipalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetServicePrincipalRequest.class) - .add("servicePrincipalId", servicePrincipalId) - .toString(); + return new ToStringer(GetServicePrincipalRequest.class).add("name", name).toString(); } } 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 46c3355ac..967dd3520 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,16 +9,16 @@ @Generated public class GetUserProxyRequest { - /** Required. Internal ID of the user in Databricks. */ - @JsonIgnore private String userId; + /** The resource name of the user. Format: users/{user_id} */ + @JsonIgnore private String name; - public GetUserProxyRequest setUserId(String userId) { - this.userId = userId; + public GetUserProxyRequest setName(String name) { + this.name = name; return this; } - public String getUserId() { - return userId; + public String getName() { + return name; } @Override @@ -26,16 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetUserProxyRequest that = (GetUserProxyRequest) o; - return Objects.equals(userId, that.userId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(userId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetUserProxyRequest.class).add("userId", userId).toString(); + return new ToStringer(GetUserProxyRequest.class).add("name", name).toString(); } } 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 11a036c97..0bfed4e30 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,16 +9,16 @@ @Generated public class GetUserRequest { - /** Required. Internal ID of the user in Databricks. */ - @JsonIgnore private String userId; + /** The resource name of the user. Format: accounts/{account_id}/users/{user_id} */ + @JsonIgnore private String name; - public GetUserRequest setUserId(String userId) { - this.userId = userId; + public GetUserRequest setName(String name) { + this.name = name; return this; } - public String getUserId() { - return userId; + public String getName() { + return name; } @Override @@ -26,16 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetUserRequest that = (GetUserRequest) o; - return Objects.equals(userId, that.userId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(userId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetUserRequest.class).add("userId", userId).toString(); + return new ToStringer(GetUserRequest.class).add("name", name).toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAccessDetailLocalRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAccessDetailLocalRequest.java index 52923abdc..96333408d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAccessDetailLocalRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAccessDetailLocalRequest.java @@ -11,23 +11,23 @@ @Generated public class GetWorkspaceAccessDetailLocalRequest { /** - * Required. The internal ID of the principal (user/sp/group) for which the access details are - * being requested. + * The resource name of the workspace access detail. Format: + * workspace-access-details/{principal_id} */ - @JsonIgnore private Long principalId; + @JsonIgnore private String name; /** Controls what fields are returned. */ @JsonIgnore @QueryParam("view") private WorkspaceAccessDetailView view; - public GetWorkspaceAccessDetailLocalRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public GetWorkspaceAccessDetailLocalRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } public GetWorkspaceAccessDetailLocalRequest setView(WorkspaceAccessDetailView view) { @@ -44,18 +44,18 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetWorkspaceAccessDetailLocalRequest that = (GetWorkspaceAccessDetailLocalRequest) o; - return Objects.equals(principalId, that.principalId) && Objects.equals(view, that.view); + return Objects.equals(name, that.name) && Objects.equals(view, that.view); } @Override public int hashCode() { - return Objects.hash(principalId, view); + return Objects.hash(name, view); } @Override public String toString() { return new ToStringer(GetWorkspaceAccessDetailLocalRequest.class) - .add("principalId", principalId) + .add("name", name) .add("view", view) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAccessDetailRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAccessDetailRequest.java index 39e1a686d..7e48220bf 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAccessDetailRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetWorkspaceAccessDetailRequest.java @@ -11,26 +11,23 @@ @Generated public class GetWorkspaceAccessDetailRequest { /** - * Required. The internal ID of the principal (user/sp/group) for which the access details are - * being requested. + * The resource name of the workspace access detail. Format: + * accounts/{account_id}/workspaces/{workspace_id}/workspace-access-details/{principal_id} */ - @JsonIgnore private Long principalId; + @JsonIgnore private String name; /** Controls what fields are returned. */ @JsonIgnore @QueryParam("view") private WorkspaceAccessDetailView view; - /** Required. The workspace ID for which the access details are being requested. */ - @JsonIgnore private Long workspaceId; - - public GetWorkspaceAccessDetailRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public GetWorkspaceAccessDetailRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } public GetWorkspaceAccessDetailRequest setView(WorkspaceAccessDetailView view) { @@ -42,36 +39,24 @@ public WorkspaceAccessDetailView getView() { return view; } - public GetWorkspaceAccessDetailRequest setWorkspaceId(Long workspaceId) { - this.workspaceId = workspaceId; - return this; - } - - public Long getWorkspaceId() { - return workspaceId; - } - @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetWorkspaceAccessDetailRequest that = (GetWorkspaceAccessDetailRequest) o; - return Objects.equals(principalId, that.principalId) - && Objects.equals(view, that.view) - && Objects.equals(workspaceId, that.workspaceId); + return Objects.equals(name, that.name) && Objects.equals(view, that.view); } @Override public int hashCode() { - return Objects.hash(principalId, view, workspaceId); + return Objects.hash(name, view); } @Override public String toString() { return new ToStringer(GetWorkspaceAccessDetailRequest.class) - .add("principalId", principalId) + .add("name", name) .add("view", view) - .add("workspaceId", workspaceId) .toString(); } } 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 87d089868..9dc275ef6 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,19 +9,16 @@ @Generated public class GetWorkspaceAssignmentProxyRequest { - /** - * Required. The internal ID of the principal (user/sp/group) for which the assignment is being - * requested. - */ - @JsonIgnore private Long principalId; - - public GetWorkspaceAssignmentProxyRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + /** The resource name of the workspace assignment. Format: workspace-assignments/{principal_id} */ + @JsonIgnore private String name; + + public GetWorkspaceAssignmentProxyRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } @Override @@ -29,18 +26,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetWorkspaceAssignmentProxyRequest that = (GetWorkspaceAssignmentProxyRequest) o; - return Objects.equals(principalId, that.principalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(principalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetWorkspaceAssignmentProxyRequest.class) - .add("principalId", principalId) - .toString(); + return new ToStringer(GetWorkspaceAssignmentProxyRequest.class).add("name", name).toString(); } } 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 ff513b5ba..17edc48c1 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,30 +10,18 @@ @Generated public class GetWorkspaceAssignmentRequest { /** - * Required. The internal ID of the principal (user/sp/group) for which the assignment is being - * requested. + * The resource name of the workspace assignment. Format: + * accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id} */ - @JsonIgnore private Long principalId; + @JsonIgnore private String name; - /** Required. The workspace ID for which the assignment is being requested. */ - @JsonIgnore private Long workspaceId; - - public GetWorkspaceAssignmentRequest setPrincipalId(Long principalId) { - this.principalId = principalId; - return this; - } - - public Long getPrincipalId() { - return principalId; - } - - public GetWorkspaceAssignmentRequest setWorkspaceId(Long workspaceId) { - this.workspaceId = workspaceId; + public GetWorkspaceAssignmentRequest setName(String name) { + this.name = name; return this; } - public Long getWorkspaceId() { - return workspaceId; + public String getName() { + return name; } @Override @@ -41,20 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetWorkspaceAssignmentRequest that = (GetWorkspaceAssignmentRequest) o; - return Objects.equals(principalId, that.principalId) - && Objects.equals(workspaceId, that.workspaceId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(principalId, workspaceId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetWorkspaceAssignmentRequest.class) - .add("principalId", principalId) - .add("workspaceId", workspaceId) - .toString(); + return new ToStringer(GetWorkspaceAssignmentRequest.class).add("name", name).toString(); } } 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 d5ddfa57e..6735c9cec 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,18 +10,18 @@ @Generated public class GetWorkspaceIdentityDetailRequest { /** - * Required. The internal ID of the principal (user/sp/group) for which the identity details are - * being requested. + * The resource name of the workspace identity detail. Format: + * principals/{principal_id}/workspace-identity-detail */ - @JsonIgnore private Long principalId; + @JsonIgnore private String name; - public GetWorkspaceIdentityDetailRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public GetWorkspaceIdentityDetailRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } @Override @@ -29,18 +29,16 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetWorkspaceIdentityDetailRequest that = (GetWorkspaceIdentityDetailRequest) o; - return Objects.equals(principalId, that.principalId); + return Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(principalId); + return Objects.hash(name); } @Override public String toString() { - return new ToStringer(GetWorkspaceIdentityDetailRequest.class) - .add("principalId", principalId) - .toString(); + return new ToStringer(GetWorkspaceIdentityDetailRequest.class).add("name", name).toString(); } } 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 aa30a1eae..4c46d8787 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 @@ -26,6 +26,20 @@ public class 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} + */ + @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. + */ + @JsonProperty("parent") + private String parent; + public Group setAccountId(String accountId) { this.accountId = accountId; return this; @@ -62,6 +76,24 @@ public String getGroupName() { return groupName; } + public Group setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public Group setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -70,12 +102,14 @@ public boolean equals(Object o) { return Objects.equals(accountId, that.accountId) && Objects.equals(externalId, that.externalId) && Objects.equals(groupId, that.groupId) - && Objects.equals(groupName, that.groupName); + && Objects.equals(groupName, that.groupName) + && Objects.equals(name, that.name) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(accountId, externalId, groupId, groupName); + return Objects.hash(accountId, externalId, groupId, groupName, name, parent); } @Override @@ -85,6 +119,8 @@ public String toString() { .add("externalId", externalId) .add("groupId", groupId) .add("groupName", groupName) + .add("name", name) + .add("parent", parent) .toString(); } } 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 d84c55584..834315274 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 @@ -10,9 +10,6 @@ @Generated public class ListDirectGroupMembersProxyRequest { - /** Required. Internal ID of the group in Databricks whose direct members are being listed. */ - @JsonIgnore private Long groupId; - /** * 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 @@ -27,14 +24,10 @@ public class ListDirectGroupMembersProxyRequest { @QueryParam("page_token") private String pageToken; - public ListDirectGroupMembersProxyRequest setGroupId(Long groupId) { - this.groupId = groupId; - return this; - } - - public Long getGroupId() { - return groupId; - } + /** + * The parent resource name of the group whose direct members to list. Format: groups/{group_id} + */ + @JsonIgnore private String parent; public ListDirectGroupMembersProxyRequest setPageSize(Long pageSize) { this.pageSize = pageSize; @@ -54,27 +47,36 @@ public String getPageToken() { return pageToken; } + public ListDirectGroupMembersProxyRequest 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; ListDirectGroupMembersProxyRequest that = (ListDirectGroupMembersProxyRequest) o; - return Objects.equals(groupId, that.groupId) - && Objects.equals(pageSize, that.pageSize) - && Objects.equals(pageToken, that.pageToken); + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(groupId, pageSize, pageToken); + return Objects.hash(pageSize, pageToken, parent); } @Override public String toString() { return new ToStringer(ListDirectGroupMembersProxyRequest.class) - .add("groupId", groupId) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 2af37ceef..e50474c1d 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 @@ -10,9 +10,6 @@ @Generated public class ListDirectGroupMembersRequest { - /** Required. Internal ID of the group in Databricks whose direct members are being listed. */ - @JsonIgnore private Long groupId; - /** * 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 @@ -30,14 +27,11 @@ public class ListDirectGroupMembersRequest { @QueryParam("page_token") private String pageToken; - public ListDirectGroupMembersRequest setGroupId(Long groupId) { - this.groupId = groupId; - return this; - } - - public Long getGroupId() { - return groupId; - } + /** + * The parent resource name of the group whose direct members to list. Format: + * accounts/{account_id}/groups/{group_id} + */ + @JsonIgnore private String parent; public ListDirectGroupMembersRequest setPageSize(Long pageSize) { this.pageSize = pageSize; @@ -57,27 +51,36 @@ public String getPageToken() { return pageToken; } + public ListDirectGroupMembersRequest 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; ListDirectGroupMembersRequest that = (ListDirectGroupMembersRequest) o; - return Objects.equals(groupId, that.groupId) - && Objects.equals(pageSize, that.pageSize) - && Objects.equals(pageToken, that.pageToken); + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(groupId, pageSize, pageToken); + return Objects.hash(pageSize, pageToken, parent); } @Override public String toString() { return new ToStringer(ListDirectGroupMembersRequest.class) - .add("groupId", groupId) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 548073ae4..90f4b9b26 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 @@ -32,6 +32,14 @@ public class ListGroupsProxyRequest { @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. + */ + @JsonIgnore + @QueryParam("parent") + private String parent; + public ListGroupsProxyRequest setFilter(String filter) { this.filter = filter; return this; @@ -59,6 +67,15 @@ public String getPageToken() { return pageToken; } + public ListGroupsProxyRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -66,12 +83,13 @@ public boolean equals(Object o) { ListGroupsProxyRequest that = (ListGroupsProxyRequest) o; return Objects.equals(filter, that.filter) && Objects.equals(pageSize, that.pageSize) - && Objects.equals(pageToken, that.pageToken); + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(filter, pageSize, pageToken); + return Objects.hash(filter, pageSize, pageToken, parent); } @Override @@ -80,6 +98,7 @@ public String toString() { .add("filter", filter) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 ba9400064..51c923146 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 @@ -32,6 +32,9 @@ public class ListGroupsRequest { @QueryParam("page_token") private String pageToken; + /** The parent resource name of the account whose groups to list. Format: accounts/{account_id} */ + @JsonIgnore private String parent; + public ListGroupsRequest setFilter(String filter) { this.filter = filter; return this; @@ -59,6 +62,15 @@ public String getPageToken() { return pageToken; } + public ListGroupsRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -66,12 +78,13 @@ public boolean equals(Object o) { ListGroupsRequest that = (ListGroupsRequest) o; return Objects.equals(filter, that.filter) && Objects.equals(pageSize, that.pageSize) - && Objects.equals(pageToken, that.pageToken); + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(filter, pageSize, pageToken); + return Objects.hash(filter, pageSize, pageToken, parent); } @Override @@ -80,6 +93,7 @@ public String toString() { .add("filter", filter) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 5d115bf99..192c874ca 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 @@ -32,6 +32,14 @@ public class ListServicePrincipalsProxyRequest { @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. + */ + @JsonIgnore + @QueryParam("parent") + private String parent; + public ListServicePrincipalsProxyRequest setFilter(String filter) { this.filter = filter; return this; @@ -59,6 +67,15 @@ public String getPageToken() { return pageToken; } + public ListServicePrincipalsProxyRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -66,12 +83,13 @@ public boolean equals(Object o) { ListServicePrincipalsProxyRequest that = (ListServicePrincipalsProxyRequest) o; return Objects.equals(filter, that.filter) && Objects.equals(pageSize, that.pageSize) - && Objects.equals(pageToken, that.pageToken); + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(filter, pageSize, pageToken); + return Objects.hash(filter, pageSize, pageToken, parent); } @Override @@ -80,6 +98,7 @@ public String toString() { .add("filter", filter) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 bea69db71..5b9974d1a 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 @@ -32,6 +32,12 @@ public class ListServicePrincipalsRequest { @QueryParam("page_token") private String pageToken; + /** + * The parent resource name of the account whose service principals to list. Format: + * accounts/{account_id} + */ + @JsonIgnore private String parent; + public ListServicePrincipalsRequest setFilter(String filter) { this.filter = filter; return this; @@ -59,6 +65,15 @@ public String getPageToken() { return pageToken; } + public ListServicePrincipalsRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -66,12 +81,13 @@ public boolean equals(Object o) { ListServicePrincipalsRequest that = (ListServicePrincipalsRequest) o; return Objects.equals(filter, that.filter) && Objects.equals(pageSize, that.pageSize) - && Objects.equals(pageToken, that.pageToken); + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(filter, pageSize, pageToken); + return Objects.hash(filter, pageSize, pageToken, parent); } @Override @@ -80,6 +96,7 @@ public String toString() { .add("filter", filter) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 63f59f713..566753b41 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 @@ -28,10 +28,10 @@ public class ListTransitiveParentGroupsProxyRequest { private String pageToken; /** - * Required. Internal ID of the principal in Databricks whose transitive parent groups are being - * listed. + * The parent resource name of the principal whose transitive parent groups to list. Format: + * principals/{principal_id} */ - @JsonIgnore private Long principalId; + @JsonIgnore private String parent; public ListTransitiveParentGroupsProxyRequest setPageSize(Long pageSize) { this.pageSize = pageSize; @@ -51,13 +51,13 @@ public String getPageToken() { return pageToken; } - public ListTransitiveParentGroupsProxyRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public ListTransitiveParentGroupsProxyRequest setParent(String parent) { + this.parent = parent; return this; } - public Long getPrincipalId() { - return principalId; + public String getParent() { + return parent; } @Override @@ -67,12 +67,12 @@ public boolean equals(Object o) { ListTransitiveParentGroupsProxyRequest that = (ListTransitiveParentGroupsProxyRequest) o; return Objects.equals(pageSize, that.pageSize) && Objects.equals(pageToken, that.pageToken) - && Objects.equals(principalId, that.principalId); + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(pageSize, pageToken, principalId); + return Objects.hash(pageSize, pageToken, parent); } @Override @@ -80,7 +80,7 @@ public String toString() { return new ToStringer(ListTransitiveParentGroupsProxyRequest.class) .add("pageSize", pageSize) .add("pageToken", pageToken) - .add("principalId", principalId) + .add("parent", parent) .toString(); } } 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 1391fce38..e004c52ec 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 @@ -28,10 +28,10 @@ public class ListTransitiveParentGroupsRequest { private String pageToken; /** - * Required. Internal ID of the principal in Databricks whose transitive parent groups are being - * listed. + * The parent resource name of the principal whose transitive parent groups to list. Format: + * accounts/{account_id}/principals/{principal_id} */ - @JsonIgnore private Long principalId; + @JsonIgnore private String parent; public ListTransitiveParentGroupsRequest setPageSize(Long pageSize) { this.pageSize = pageSize; @@ -51,13 +51,13 @@ public String getPageToken() { return pageToken; } - public ListTransitiveParentGroupsRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public ListTransitiveParentGroupsRequest setParent(String parent) { + this.parent = parent; return this; } - public Long getPrincipalId() { - return principalId; + public String getParent() { + return parent; } @Override @@ -67,12 +67,12 @@ public boolean equals(Object o) { ListTransitiveParentGroupsRequest that = (ListTransitiveParentGroupsRequest) o; return Objects.equals(pageSize, that.pageSize) && Objects.equals(pageToken, that.pageToken) - && Objects.equals(principalId, that.principalId); + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(pageSize, pageToken, principalId); + return Objects.hash(pageSize, pageToken, parent); } @Override @@ -80,7 +80,7 @@ public String toString() { return new ToStringer(ListTransitiveParentGroupsRequest.class) .add("pageSize", pageSize) .add("pageToken", pageToken) - .add("principalId", principalId) + .add("parent", parent) .toString(); } } 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 e7c2489b7..35f0617ba 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 @@ -32,6 +32,14 @@ public class ListUsersProxyRequest { @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. + */ + @JsonIgnore + @QueryParam("parent") + private String parent; + public ListUsersProxyRequest setFilter(String filter) { this.filter = filter; return this; @@ -59,6 +67,15 @@ public String getPageToken() { return pageToken; } + public ListUsersProxyRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -66,12 +83,13 @@ public boolean equals(Object o) { ListUsersProxyRequest that = (ListUsersProxyRequest) o; return Objects.equals(filter, that.filter) && Objects.equals(pageSize, that.pageSize) - && Objects.equals(pageToken, that.pageToken); + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(filter, pageSize, pageToken); + return Objects.hash(filter, pageSize, pageToken, parent); } @Override @@ -80,6 +98,7 @@ public String toString() { .add("filter", filter) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 3e4cc8314..6acc18b62 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 @@ -32,6 +32,9 @@ public class ListUsersRequest { @QueryParam("page_token") private String pageToken; + /** The parent resource name of the account whose users to list. Format: accounts/{account_id} */ + @JsonIgnore private String parent; + public ListUsersRequest setFilter(String filter) { this.filter = filter; return this; @@ -59,6 +62,15 @@ public String getPageToken() { return pageToken; } + public ListUsersRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -66,12 +78,13 @@ public boolean equals(Object o) { ListUsersRequest that = (ListUsersRequest) o; return Objects.equals(filter, that.filter) && Objects.equals(pageSize, that.pageSize) - && Objects.equals(pageToken, that.pageToken); + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(filter, pageSize, pageToken); + return Objects.hash(filter, pageSize, pageToken, parent); } @Override @@ -80,6 +93,7 @@ public String toString() { .add("filter", filter) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 837368142..ecc9a0092 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 @@ -24,6 +24,15 @@ public class ListWorkspaceAssignmentsProxyRequest { @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. + */ + @JsonIgnore + @QueryParam("parent") + private String parent; + public ListWorkspaceAssignmentsProxyRequest setPageSize(Long pageSize) { this.pageSize = pageSize; return this; @@ -42,17 +51,28 @@ public String getPageToken() { return pageToken; } + public ListWorkspaceAssignmentsProxyRequest 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; ListWorkspaceAssignmentsProxyRequest that = (ListWorkspaceAssignmentsProxyRequest) o; - return Objects.equals(pageSize, that.pageSize) && Objects.equals(pageToken, that.pageToken); + 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); + return Objects.hash(pageSize, pageToken, parent); } @Override @@ -60,6 +80,7 @@ public String toString() { return new ToStringer(ListWorkspaceAssignmentsProxyRequest.class) .add("pageSize", pageSize) .add("pageToken", pageToken) + .add("parent", parent) .toString(); } } 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 590924e2b..1c0d63ed9 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 @@ -27,8 +27,11 @@ public class ListWorkspaceAssignmentsRequest { @QueryParam("page_token") private String pageToken; - /** Required. The workspace ID for which the workspace assignments are being fetched. */ - @JsonIgnore private Long workspaceId; + /** + * The parent resource name of the workspace whose assignments to list. Format: + * accounts/{account_id}/workspaces/{workspace_id} + */ + @JsonIgnore private String parent; public ListWorkspaceAssignmentsRequest setPageSize(Long pageSize) { this.pageSize = pageSize; @@ -48,13 +51,13 @@ public String getPageToken() { return pageToken; } - public ListWorkspaceAssignmentsRequest setWorkspaceId(Long workspaceId) { - this.workspaceId = workspaceId; + public ListWorkspaceAssignmentsRequest setParent(String parent) { + this.parent = parent; return this; } - public Long getWorkspaceId() { - return workspaceId; + public String getParent() { + return parent; } @Override @@ -64,12 +67,12 @@ public boolean equals(Object o) { ListWorkspaceAssignmentsRequest that = (ListWorkspaceAssignmentsRequest) o; return Objects.equals(pageSize, that.pageSize) && Objects.equals(pageToken, that.pageToken) - && Objects.equals(workspaceId, that.workspaceId); + && Objects.equals(parent, that.parent); } @Override public int hashCode() { - return Objects.hash(pageSize, pageToken, workspaceId); + return Objects.hash(pageSize, pageToken, parent); } @Override @@ -77,7 +80,7 @@ public String toString() { return new ToStringer(ListWorkspaceAssignmentsRequest.class) .add("pageSize", pageSize) .add("pageToken", pageToken) - .add("workspaceId", workspaceId) + .add("parent", parent) .toString(); } } 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 1568cba33..330cba9c4 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 @@ -33,6 +33,21 @@ public class ServicePrincipal { @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} + */ + @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. + */ + @JsonProperty("parent") + private String parent; + /** Internal service principal ID of the service principal in Databricks. */ @JsonProperty("service_principal_id") private String servicePrincipalId; @@ -82,6 +97,24 @@ public String getExternalId() { return externalId; } + public ServicePrincipal setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public ServicePrincipal setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public ServicePrincipal setServicePrincipalId(String servicePrincipalId) { this.servicePrincipalId = servicePrincipalId; return this; @@ -101,13 +134,22 @@ public boolean equals(Object o) { && Objects.equals(applicationId, that.applicationId) && Objects.equals(displayName, that.displayName) && Objects.equals(externalId, that.externalId) + && Objects.equals(name, that.name) + && Objects.equals(parent, that.parent) && Objects.equals(servicePrincipalId, that.servicePrincipalId); } @Override public int hashCode() { return Objects.hash( - accountId, accountSpStatus, applicationId, displayName, externalId, servicePrincipalId); + accountId, + accountSpStatus, + applicationId, + displayName, + externalId, + name, + parent, + servicePrincipalId); } @Override @@ -118,6 +160,8 @@ public String toString() { .add("applicationId", applicationId) .add("displayName", displayName) .add("externalId", externalId) + .add("name", name) + .add("parent", parent) .add("servicePrincipalId", servicePrincipalId) .toString(); } 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 4f11444d9..663cb29b6 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 @@ -22,6 +22,15 @@ public class TransitiveParentGroup { @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} + */ + @JsonProperty("name") + private String name; + public TransitiveParentGroup setAccountId(String accountId) { this.accountId = accountId; return this; @@ -49,6 +58,15 @@ public String getGroupId() { return groupId; } + public TransitiveParentGroup setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -56,12 +74,13 @@ public boolean equals(Object o) { TransitiveParentGroup that = (TransitiveParentGroup) o; return Objects.equals(accountId, that.accountId) && Objects.equals(externalId, that.externalId) - && Objects.equals(groupId, that.groupId); + && Objects.equals(groupId, that.groupId) + && Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(accountId, externalId, groupId); + return Objects.hash(accountId, externalId, groupId, name); } @Override @@ -70,6 +89,7 @@ public String toString() { .add("accountId", accountId) .add("externalId", externalId) .add("groupId", groupId) + .add("name", name) .toString(); } } 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 1b94dc7a5..cc0fb6c06 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 @@ -15,8 +15,11 @@ public class UpdateGroupProxyRequest { @JsonProperty("group") private Group group; - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private String groupId; + /** + * 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} + */ + @JsonIgnore private String name; /** Required. The list of fields to update. */ @JsonIgnore @@ -32,13 +35,13 @@ public Group getGroup() { return group; } - public UpdateGroupProxyRequest setGroupId(String groupId) { - this.groupId = groupId; + public UpdateGroupProxyRequest setName(String name) { + this.name = name; return this; } - public String getGroupId() { - return groupId; + public String getName() { + return name; } public UpdateGroupProxyRequest setUpdateMask(String updateMask) { @@ -56,20 +59,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; UpdateGroupProxyRequest that = (UpdateGroupProxyRequest) o; return Objects.equals(group, that.group) - && Objects.equals(groupId, that.groupId) + && Objects.equals(name, that.name) && Objects.equals(updateMask, that.updateMask); } @Override public int hashCode() { - return Objects.hash(group, groupId, updateMask); + return Objects.hash(group, name, updateMask); } @Override public String toString() { return new ToStringer(UpdateGroupProxyRequest.class) .add("group", group) - .add("groupId", groupId) + .add("name", name) .add("updateMask", updateMask) .toString(); } 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 782aadc28..14702dfec 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 @@ -15,8 +15,11 @@ public class UpdateGroupRequest { @JsonProperty("group") private Group group; - /** Required. Internal ID of the group in Databricks. */ - @JsonIgnore private String groupId; + /** + * 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} + */ + @JsonIgnore private String name; /** Required. The list of fields to update. */ @JsonIgnore @@ -32,13 +35,13 @@ public Group getGroup() { return group; } - public UpdateGroupRequest setGroupId(String groupId) { - this.groupId = groupId; + public UpdateGroupRequest setName(String name) { + this.name = name; return this; } - public String getGroupId() { - return groupId; + public String getName() { + return name; } public UpdateGroupRequest setUpdateMask(String updateMask) { @@ -56,20 +59,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; UpdateGroupRequest that = (UpdateGroupRequest) o; return Objects.equals(group, that.group) - && Objects.equals(groupId, that.groupId) + && Objects.equals(name, that.name) && Objects.equals(updateMask, that.updateMask); } @Override public int hashCode() { - return Objects.hash(group, groupId, updateMask); + return Objects.hash(group, name, updateMask); } @Override public String toString() { return new ToStringer(UpdateGroupRequest.class) .add("group", group) - .add("groupId", groupId) + .add("name", name) .add("updateMask", updateMask) .toString(); } 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 394b3933e..103f42868 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 @@ -11,34 +11,38 @@ @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} + */ + @JsonIgnore private String name; + /** Required. Service principal to be updated in Databricks */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; - /** Required. Internal ID of the service principal in Databricks. */ - @JsonIgnore private String servicePrincipalId; - /** Required. The list of fields to update. */ @JsonIgnore @QueryParam("update_mask") private String updateMask; - public UpdateServicePrincipalProxyRequest setServicePrincipal(ServicePrincipal servicePrincipal) { - this.servicePrincipal = servicePrincipal; + public UpdateServicePrincipalProxyRequest setName(String name) { + this.name = name; return this; } - public ServicePrincipal getServicePrincipal() { - return servicePrincipal; + public String getName() { + return name; } - public UpdateServicePrincipalProxyRequest setServicePrincipalId(String servicePrincipalId) { - this.servicePrincipalId = servicePrincipalId; + public UpdateServicePrincipalProxyRequest setServicePrincipal(ServicePrincipal servicePrincipal) { + this.servicePrincipal = servicePrincipal; return this; } - public String getServicePrincipalId() { - return servicePrincipalId; + public ServicePrincipal getServicePrincipal() { + return servicePrincipal; } public UpdateServicePrincipalProxyRequest setUpdateMask(String updateMask) { @@ -55,21 +59,21 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UpdateServicePrincipalProxyRequest that = (UpdateServicePrincipalProxyRequest) o; - return Objects.equals(servicePrincipal, that.servicePrincipal) - && Objects.equals(servicePrincipalId, that.servicePrincipalId) + return Objects.equals(name, that.name) + && Objects.equals(servicePrincipal, that.servicePrincipal) && Objects.equals(updateMask, that.updateMask); } @Override public int hashCode() { - return Objects.hash(servicePrincipal, servicePrincipalId, updateMask); + return Objects.hash(name, servicePrincipal, updateMask); } @Override public String toString() { return new ToStringer(UpdateServicePrincipalProxyRequest.class) + .add("name", name) .add("servicePrincipal", servicePrincipal) - .add("servicePrincipalId", servicePrincipalId) .add("updateMask", updateMask) .toString(); } 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 8d38ca62b..29907a022 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 @@ -11,34 +11,38 @@ @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} + */ + @JsonIgnore private String name; + /** Required. Service Principal to be updated in Databricks */ @JsonProperty("service_principal") private ServicePrincipal servicePrincipal; - /** Required. Internal ID of the service principal in Databricks. */ - @JsonIgnore private String servicePrincipalId; - /** Required. The list of fields to update. */ @JsonIgnore @QueryParam("update_mask") private String updateMask; - public UpdateServicePrincipalRequest setServicePrincipal(ServicePrincipal servicePrincipal) { - this.servicePrincipal = servicePrincipal; + public UpdateServicePrincipalRequest setName(String name) { + this.name = name; return this; } - public ServicePrincipal getServicePrincipal() { - return servicePrincipal; + public String getName() { + return name; } - public UpdateServicePrincipalRequest setServicePrincipalId(String servicePrincipalId) { - this.servicePrincipalId = servicePrincipalId; + public UpdateServicePrincipalRequest setServicePrincipal(ServicePrincipal servicePrincipal) { + this.servicePrincipal = servicePrincipal; return this; } - public String getServicePrincipalId() { - return servicePrincipalId; + public ServicePrincipal getServicePrincipal() { + return servicePrincipal; } public UpdateServicePrincipalRequest setUpdateMask(String updateMask) { @@ -55,21 +59,21 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UpdateServicePrincipalRequest that = (UpdateServicePrincipalRequest) o; - return Objects.equals(servicePrincipal, that.servicePrincipal) - && Objects.equals(servicePrincipalId, that.servicePrincipalId) + return Objects.equals(name, that.name) + && Objects.equals(servicePrincipal, that.servicePrincipal) && Objects.equals(updateMask, that.updateMask); } @Override public int hashCode() { - return Objects.hash(servicePrincipal, servicePrincipalId, updateMask); + return Objects.hash(name, servicePrincipal, updateMask); } @Override public String toString() { return new ToStringer(UpdateServicePrincipalRequest.class) + .add("name", name) .add("servicePrincipal", servicePrincipal) - .add("servicePrincipalId", servicePrincipalId) .add("updateMask", updateMask) .toString(); } 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 cefe2c876..5d63405e2 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 @@ -11,6 +11,12 @@ @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} + */ + @JsonIgnore private String name; + /** Required. The list of fields to update. */ @JsonIgnore @QueryParam("update_mask") @@ -20,8 +26,14 @@ public class UpdateUserProxyRequest { @JsonProperty("user") private User user; - /** Required. Internal ID of the user in Databricks. */ - @JsonIgnore private String userId; + public UpdateUserProxyRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } public UpdateUserProxyRequest setUpdateMask(String updateMask) { this.updateMask = updateMask; @@ -41,36 +53,27 @@ public User getUser() { return user; } - public UpdateUserProxyRequest setUserId(String userId) { - this.userId = userId; - return this; - } - - public String getUserId() { - return userId; - } - @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UpdateUserProxyRequest that = (UpdateUserProxyRequest) o; - return Objects.equals(updateMask, that.updateMask) - && Objects.equals(user, that.user) - && Objects.equals(userId, that.userId); + return Objects.equals(name, that.name) + && Objects.equals(updateMask, that.updateMask) + && Objects.equals(user, that.user); } @Override public int hashCode() { - return Objects.hash(updateMask, user, userId); + return Objects.hash(name, updateMask, user); } @Override public String toString() { return new ToStringer(UpdateUserProxyRequest.class) + .add("name", name) .add("updateMask", updateMask) .add("user", user) - .add("userId", userId) .toString(); } } 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 4c836e322..b7e8f1340 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 @@ -11,6 +11,12 @@ @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} + */ + @JsonIgnore private String name; + /** Required. The list of fields to update. */ @JsonIgnore @QueryParam("update_mask") @@ -20,8 +26,14 @@ public class UpdateUserRequest { @JsonProperty("user") private User user; - /** Required. Internal ID of the user in Databricks. */ - @JsonIgnore private String userId; + public UpdateUserRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } public UpdateUserRequest setUpdateMask(String updateMask) { this.updateMask = updateMask; @@ -41,36 +53,27 @@ public User getUser() { return user; } - public UpdateUserRequest setUserId(String userId) { - this.userId = userId; - return this; - } - - public String getUserId() { - return userId; - } - @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UpdateUserRequest that = (UpdateUserRequest) o; - return Objects.equals(updateMask, that.updateMask) - && Objects.equals(user, that.user) - && Objects.equals(userId, that.userId); + return Objects.equals(name, that.name) + && Objects.equals(updateMask, that.updateMask) + && Objects.equals(user, that.user); } @Override public int hashCode() { - return Objects.hash(updateMask, user, userId); + return Objects.hash(name, updateMask, user); } @Override public String toString() { return new ToStringer(UpdateUserRequest.class) + .add("name", name) .add("updateMask", updateMask) .add("user", user) - .add("userId", userId) .toString(); } } 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 0a567e274..7f14be640 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 @@ -12,8 +12,13 @@ @Generated public class UpdateWorkspaceAssignmentProxyRequest { - /** Required. ID of the principal in Databricks. */ - @JsonIgnore private Long principalId; + /** + * 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} + */ + @JsonIgnore private String name; /** Required. The list of fields to update. */ @JsonIgnore @@ -24,13 +29,13 @@ public class UpdateWorkspaceAssignmentProxyRequest { @JsonProperty("workspace_assignment") private WorkspaceAssignment workspaceAssignment; - public UpdateWorkspaceAssignmentProxyRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public UpdateWorkspaceAssignmentProxyRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } public UpdateWorkspaceAssignmentProxyRequest setUpdateMask(FieldMask updateMask) { @@ -57,20 +62,20 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UpdateWorkspaceAssignmentProxyRequest that = (UpdateWorkspaceAssignmentProxyRequest) o; - return Objects.equals(principalId, that.principalId) + return Objects.equals(name, that.name) && Objects.equals(updateMask, that.updateMask) && Objects.equals(workspaceAssignment, that.workspaceAssignment); } @Override public int hashCode() { - return Objects.hash(principalId, updateMask, workspaceAssignment); + return Objects.hash(name, updateMask, workspaceAssignment); } @Override public String toString() { return new ToStringer(UpdateWorkspaceAssignmentProxyRequest.class) - .add("principalId", principalId) + .add("name", name) .add("updateMask", updateMask) .add("workspaceAssignment", workspaceAssignment) .toString(); 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 058be4896..626bada5d 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 @@ -12,8 +12,13 @@ @Generated public class UpdateWorkspaceAssignmentRequest { - /** Required. ID of the principal in Databricks. */ - @JsonIgnore private Long principalId; + /** + * 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} + */ + @JsonIgnore private String name; /** Required. The list of fields to update. */ @JsonIgnore @@ -24,16 +29,13 @@ public class UpdateWorkspaceAssignmentRequest { @JsonProperty("workspace_assignment") private WorkspaceAssignment workspaceAssignment; - /** Required. The workspace ID for which the workspace assignment is being updated. */ - @JsonIgnore private Long workspaceId; - - public UpdateWorkspaceAssignmentRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public UpdateWorkspaceAssignmentRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } public UpdateWorkspaceAssignmentRequest setUpdateMask(FieldMask updateMask) { @@ -55,38 +57,27 @@ public WorkspaceAssignment getWorkspaceAssignment() { return workspaceAssignment; } - public UpdateWorkspaceAssignmentRequest setWorkspaceId(Long workspaceId) { - this.workspaceId = workspaceId; - return this; - } - - public Long getWorkspaceId() { - return workspaceId; - } - @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UpdateWorkspaceAssignmentRequest that = (UpdateWorkspaceAssignmentRequest) o; - return Objects.equals(principalId, that.principalId) + return Objects.equals(name, that.name) && Objects.equals(updateMask, that.updateMask) - && Objects.equals(workspaceAssignment, that.workspaceAssignment) - && Objects.equals(workspaceId, that.workspaceId); + && Objects.equals(workspaceAssignment, that.workspaceAssignment); } @Override public int hashCode() { - return Objects.hash(principalId, updateMask, workspaceAssignment, workspaceId); + return Objects.hash(name, updateMask, workspaceAssignment); } @Override public String toString() { return new ToStringer(UpdateWorkspaceAssignmentRequest.class) - .add("principalId", principalId) + .add("name", name) .add("updateMask", updateMask) .add("workspaceAssignment", workspaceAssignment) - .add("workspaceId", workspaceId) .toString(); } } 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 2a27582ba..37e7a7400 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 @@ -12,8 +12,11 @@ @Generated public class UpdateWorkspaceIdentityDetailRequest { - /** Required. ID of the principal in Databricks. */ - @JsonIgnore private Long principalId; + /** + * The resource name of the workspace identity detail. Format: + * principals/{principal_id}/workspace-identity-detail + */ + @JsonIgnore private String name; /** Required. The list of fields to update. */ @JsonIgnore @@ -24,13 +27,13 @@ public class UpdateWorkspaceIdentityDetailRequest { @JsonProperty("workspace_identity_detail") private WorkspaceIdentityDetail workspaceIdentityDetail; - public UpdateWorkspaceIdentityDetailRequest setPrincipalId(Long principalId) { - this.principalId = principalId; + public UpdateWorkspaceIdentityDetailRequest setName(String name) { + this.name = name; return this; } - public Long getPrincipalId() { - return principalId; + public String getName() { + return name; } public UpdateWorkspaceIdentityDetailRequest setUpdateMask(FieldMask updateMask) { @@ -57,20 +60,20 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; UpdateWorkspaceIdentityDetailRequest that = (UpdateWorkspaceIdentityDetailRequest) o; - return Objects.equals(principalId, that.principalId) + return Objects.equals(name, that.name) && Objects.equals(updateMask, that.updateMask) && Objects.equals(workspaceIdentityDetail, that.workspaceIdentityDetail); } @Override public int hashCode() { - return Objects.hash(principalId, updateMask, workspaceIdentityDetail); + return Objects.hash(name, updateMask, workspaceIdentityDetail); } @Override public String toString() { return new ToStringer(UpdateWorkspaceIdentityDetailRequest.class) - .add("principalId", principalId) + .add("name", name) .add("updateMask", updateMask) .add("workspaceIdentityDetail", workspaceIdentityDetail) .toString(); 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 ff6b64207..308d2fb2b 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 @@ -26,6 +26,20 @@ public class User { @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} + */ + @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. + */ + @JsonProperty("parent") + private String parent; + /** Internal userId of the user in Databricks. */ @JsonProperty("user_id") private String userId; @@ -70,6 +84,24 @@ public UserFullName getFullName() { return fullName; } + public User setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public User setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public User setUserId(String userId) { this.userId = userId; return this; @@ -97,13 +129,16 @@ public boolean equals(Object o) { && Objects.equals(accountUserStatus, that.accountUserStatus) && Objects.equals(externalId, that.externalId) && Objects.equals(fullName, that.fullName) + && Objects.equals(name, that.name) + && Objects.equals(parent, that.parent) && Objects.equals(userId, that.userId) && Objects.equals(username, that.username); } @Override public int hashCode() { - return Objects.hash(accountId, accountUserStatus, externalId, fullName, userId, username); + return Objects.hash( + accountId, accountUserStatus, externalId, fullName, name, parent, userId, username); } @Override @@ -113,6 +148,8 @@ public String toString() { .add("accountUserStatus", accountUserStatus) .add("externalId", externalId) .add("fullName", fullName) + .add("name", name) + .add("parent", parent) .add("userId", userId) .add("username", username) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceAccessDetail.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceAccessDetail.java index 98309d8d1..fc99ff1f7 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceAccessDetail.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceAccessDetail.java @@ -19,6 +19,15 @@ public class WorkspaceAccessDetail { @JsonProperty("account_id") private String accountId; + /** + * The resource name of the workspace access detail. The format depends on the API that returned + * it: - Account-scoped: + * accounts/{account_id}/workspaces/{workspace_id}/workspace-access-details/{principal_id} - + * Workspace-scoped: workspace-access-details/{principal_id} + */ + @JsonProperty("name") + private String name; + /** The permissions granted to the principal in the workspace. */ @JsonProperty("permissions") private Collection permissions; @@ -59,6 +68,15 @@ public String getAccountId() { return accountId; } + public WorkspaceAccessDetail setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + public WorkspaceAccessDetail setPermissions(Collection permissions) { this.permissions = permissions; return this; @@ -111,6 +129,7 @@ public boolean equals(Object o) { WorkspaceAccessDetail that = (WorkspaceAccessDetail) o; return Objects.equals(accessType, that.accessType) && Objects.equals(accountId, that.accountId) + && Objects.equals(name, that.name) && Objects.equals(permissions, that.permissions) && Objects.equals(principalId, that.principalId) && Objects.equals(principalType, that.principalType) @@ -121,7 +140,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - accessType, accountId, permissions, principalId, principalType, status, workspaceId); + accessType, accountId, name, permissions, principalId, principalType, status, workspaceId); } @Override @@ -129,6 +148,7 @@ public String toString() { return new ToStringer(WorkspaceAccessDetail.class) .add("accessType", accessType) .add("accountId", accountId) + .add("name", name) .add("permissions", permissions) .add("principalId", principalId) .add("principalType", principalType) 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 0ad4f33a9..f545c3c33 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 @@ -51,7 +51,28 @@ public class WorkspaceAssignment { @JsonProperty("entitlements") private Collection entitlements; - /** The internal ID of the principal (user/sp/group) in Databricks. */ + /** + * 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} + */ + @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. + */ + @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. + */ @JsonProperty("principal_id") private Long principalId; @@ -91,6 +112,24 @@ public Collection getEntitlements() { return entitlements; } + public WorkspaceAssignment setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public WorkspaceAssignment setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + public WorkspaceAssignment setPrincipalId(Long principalId) { this.principalId = principalId; return this; @@ -126,6 +165,8 @@ public boolean equals(Object o) { return Objects.equals(accountId, that.accountId) && Objects.equals(effectiveEntitlements, that.effectiveEntitlements) && Objects.equals(entitlements, that.entitlements) + && Objects.equals(name, that.name) + && Objects.equals(parent, that.parent) && Objects.equals(principalId, that.principalId) && Objects.equals(principalType, that.principalType) && Objects.equals(workspaceId, that.workspaceId); @@ -134,7 +175,14 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - accountId, effectiveEntitlements, entitlements, principalId, principalType, workspaceId); + accountId, + effectiveEntitlements, + entitlements, + name, + parent, + principalId, + principalType, + workspaceId); } @Override @@ -143,6 +191,8 @@ public String toString() { .add("accountId", accountId) .add("effectiveEntitlements", effectiveEntitlements) .add("entitlements", entitlements) + .add("name", name) + .add("parent", parent) .add("principalId", principalId) .add("principalType", principalType) .add("workspaceId", 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 f94addd67..81b37435c 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 @@ -90,9 +90,8 @@ public WorkspaceAssignment createWorkspaceAssignmentProxy( return impl.createWorkspaceAssignmentProxy(request); } - public void deleteDirectGroupMemberProxy(long groupId, long principalId) { - deleteDirectGroupMemberProxy( - new DeleteDirectGroupMemberProxyRequest().setGroupId(groupId).setPrincipalId(principalId)); + public void deleteDirectGroupMemberProxy(String name) { + deleteDirectGroupMemberProxy(new DeleteDirectGroupMemberProxyRequest().setName(name)); } /** Deletes a group membership (unassigns a principal from a group). */ @@ -100,8 +99,8 @@ public void deleteDirectGroupMemberProxy(DeleteDirectGroupMemberProxyRequest req impl.deleteDirectGroupMemberProxy(request); } - public void deleteGroupProxy(String groupId) { - deleteGroupProxy(new DeleteGroupProxyRequest().setGroupId(groupId)); + public void deleteGroupProxy(String name) { + deleteGroupProxy(new DeleteGroupProxyRequest().setName(name)); } /** @@ -112,9 +111,8 @@ public void deleteGroupProxy(DeleteGroupProxyRequest request) { impl.deleteGroupProxy(request); } - public void deleteServicePrincipalProxy(String servicePrincipalId) { - deleteServicePrincipalProxy( - new DeleteServicePrincipalProxyRequest().setServicePrincipalId(servicePrincipalId)); + public void deleteServicePrincipalProxy(String name) { + deleteServicePrincipalProxy(new DeleteServicePrincipalProxyRequest().setName(name)); } /** @@ -125,8 +123,8 @@ public void deleteServicePrincipalProxy(DeleteServicePrincipalProxyRequest reque impl.deleteServicePrincipalProxy(request); } - public void deleteUserProxy(String userId) { - deleteUserProxy(new DeleteUserProxyRequest().setUserId(userId)); + public void deleteUserProxy(String name) { + deleteUserProxy(new DeleteUserProxyRequest().setName(name)); } /** @@ -153,9 +151,8 @@ public void deleteWorkspaceAssignmentDetailProxy( impl.deleteWorkspaceAssignmentDetailProxy(request); } - public void deleteWorkspaceAssignmentProxy(long principalId) { - deleteWorkspaceAssignmentProxy( - new DeleteWorkspaceAssignmentProxyRequest().setPrincipalId(principalId)); + public void deleteWorkspaceAssignmentProxy(String name) { + deleteWorkspaceAssignmentProxy(new DeleteWorkspaceAssignmentProxyRequest().setName(name)); } /** @@ -168,9 +165,8 @@ public void deleteWorkspaceAssignmentProxy(DeleteWorkspaceAssignmentProxyRequest impl.deleteWorkspaceAssignmentProxy(request); } - public DirectGroupMember getDirectGroupMemberProxy(long groupId, long principalId) { - return getDirectGroupMemberProxy( - new GetDirectGroupMemberProxyRequest().setGroupId(groupId).setPrincipalId(principalId)); + public DirectGroupMember getDirectGroupMemberProxy(String name) { + return getDirectGroupMemberProxy(new GetDirectGroupMemberProxyRequest().setName(name)); } /** Gets a provisioned direct member of a group. */ @@ -222,8 +218,8 @@ public ExternalUser getExternalUserProxy(GetExternalUserProxyRequest request) { return impl.getExternalUserProxy(request); } - public Group getGroupProxy(String groupId) { - return getGroupProxy(new GetGroupProxyRequest().setGroupId(groupId)); + public Group getGroupProxy(String name) { + return getGroupProxy(new GetGroupProxyRequest().setName(name)); } /** @@ -234,9 +230,8 @@ public Group getGroupProxy(GetGroupProxyRequest request) { return impl.getGroupProxy(request); } - public ServicePrincipal getServicePrincipalProxy(String servicePrincipalId) { - return getServicePrincipalProxy( - new GetServicePrincipalProxyRequest().setServicePrincipalId(servicePrincipalId)); + public ServicePrincipal getServicePrincipalProxy(String name) { + return getServicePrincipalProxy(new GetServicePrincipalProxyRequest().setName(name)); } /** @@ -247,8 +242,8 @@ public ServicePrincipal getServicePrincipalProxy(GetServicePrincipalProxyRequest return impl.getServicePrincipalProxy(request); } - public User getUserProxy(String userId) { - return getUserProxy(new GetUserProxyRequest().setUserId(userId)); + public User getUserProxy(String name) { + return getUserProxy(new GetUserProxyRequest().setName(name)); } /** @@ -259,9 +254,8 @@ public User getUserProxy(GetUserProxyRequest request) { return impl.getUserProxy(request); } - public WorkspaceAccessDetail getWorkspaceAccessDetailLocal(long principalId) { - return getWorkspaceAccessDetailLocal( - new GetWorkspaceAccessDetailLocalRequest().setPrincipalId(principalId)); + public WorkspaceAccessDetail getWorkspaceAccessDetailLocal(String name) { + return getWorkspaceAccessDetailLocal(new GetWorkspaceAccessDetailLocalRequest().setName(name)); } /** @@ -287,9 +281,8 @@ public WorkspaceAssignmentDetail getWorkspaceAssignmentDetailProxy( return impl.getWorkspaceAssignmentDetailProxy(request); } - public WorkspaceAssignment getWorkspaceAssignmentProxy(long principalId) { - return getWorkspaceAssignmentProxy( - new GetWorkspaceAssignmentProxyRequest().setPrincipalId(principalId)); + public WorkspaceAssignment getWorkspaceAssignmentProxy(String name) { + return getWorkspaceAssignmentProxy(new GetWorkspaceAssignmentProxyRequest().setName(name)); } /** Returns the assignment for a principal in the calling workspace. */ @@ -298,9 +291,8 @@ public WorkspaceAssignment getWorkspaceAssignmentProxy( return impl.getWorkspaceAssignmentProxy(request); } - public WorkspaceIdentityDetail getWorkspaceIdentityDetail(long principalId) { - return getWorkspaceIdentityDetail( - new GetWorkspaceIdentityDetailRequest().setPrincipalId(principalId)); + public WorkspaceIdentityDetail getWorkspaceIdentityDetail(String name) { + return getWorkspaceIdentityDetail(new GetWorkspaceIdentityDetailRequest().setName(name)); } /** Returns the identity details for a principal in a workspace. */ @@ -309,9 +301,8 @@ public WorkspaceIdentityDetail getWorkspaceIdentityDetail( return impl.getWorkspaceIdentityDetail(request); } - public Iterable listDirectGroupMembersProxy(long groupId) { - return listDirectGroupMembersProxy( - new ListDirectGroupMembersProxyRequest().setGroupId(groupId)); + public Iterable listDirectGroupMembersProxy(String parent) { + return listDirectGroupMembersProxy(new ListDirectGroupMembersProxyRequest().setParent(parent)); } /** @@ -370,9 +361,9 @@ public Iterable listServicePrincipalsProxy( }); } - public ListTransitiveParentGroupsResponse listTransitiveParentGroupsProxy(long principalId) { + public ListTransitiveParentGroupsResponse listTransitiveParentGroupsProxy(String parent) { return listTransitiveParentGroupsProxy( - new ListTransitiveParentGroupsProxyRequest().setPrincipalId(principalId)); + new ListTransitiveParentGroupsProxyRequest().setParent(parent)); } /** Lists all transitive parent groups of a principal. */ @@ -485,7 +476,8 @@ public Group updateGroupProxy(UpdateGroupProxyRequest request) { * workspace. Only the fields named in the update mask are modified. Returns the updated * ServicePrincipal resource. * - *

For locally managed service principals, is_agent must be set to true or false when updated. + *

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. * *

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 diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Impl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Impl.java index 43ab6672e..d82cf1908 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Impl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Impl.java @@ -19,7 +19,7 @@ public WorkspaceIamV2Impl(ApiClient apiClient) { @Override public DirectGroupMember createDirectGroupMemberProxy( CreateDirectGroupMemberProxyRequest request) { - String path = String.format("/api/2.0/identity/groups/%s/direct-members", request.getGroupId()); + String path = String.format("/api/2.0/identity/%s/direct-members", request.getParent()); try { Request req = new Request("POST", path, apiClient.serialize(request.getDirectGroupMember())); @@ -131,10 +131,7 @@ public WorkspaceAssignment createWorkspaceAssignmentProxy( @Override public void deleteDirectGroupMemberProxy(DeleteDirectGroupMemberProxyRequest request) { - String path = - String.format( - "/api/2.0/identity/groups/%s/direct-members/%s", - request.getGroupId(), request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -151,7 +148,7 @@ public void deleteDirectGroupMemberProxy(DeleteDirectGroupMemberProxyRequest req @Override public void deleteGroupProxy(DeleteGroupProxyRequest request) { - String path = String.format("/api/2.0/identity/groups/%s", request.getGroupId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -168,8 +165,7 @@ public void deleteGroupProxy(DeleteGroupProxyRequest request) { @Override public void deleteServicePrincipalProxy(DeleteServicePrincipalProxyRequest request) { - String path = - String.format("/api/2.0/identity/service-principals/%s", request.getServicePrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -186,7 +182,7 @@ public void deleteServicePrincipalProxy(DeleteServicePrincipalProxyRequest reque @Override public void deleteUserProxy(DeleteUserProxyRequest request) { - String path = String.format("/api/2.0/identity/users/%s", request.getUserId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -223,8 +219,7 @@ public void deleteWorkspaceAssignmentDetailProxy( @Override public void deleteWorkspaceAssignmentProxy(DeleteWorkspaceAssignmentProxyRequest request) { - String path = - String.format("/api/2.0/identity/workspace-assignments/%s", request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("DELETE", path); @@ -241,10 +236,7 @@ public void deleteWorkspaceAssignmentProxy(DeleteWorkspaceAssignmentProxyRequest @Override public DirectGroupMember getDirectGroupMemberProxy(GetDirectGroupMemberProxyRequest request) { - String path = - String.format( - "/api/2.0/identity/groups/%s/direct-members/%s", - request.getGroupId(), request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -313,7 +305,7 @@ public ExternalUser getExternalUserProxy(GetExternalUserProxyRequest request) { @Override public Group getGroupProxy(GetGroupProxyRequest request) { - String path = String.format("/api/2.0/identity/groups/%s", request.getGroupId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -330,8 +322,7 @@ public Group getGroupProxy(GetGroupProxyRequest request) { @Override public ServicePrincipal getServicePrincipalProxy(GetServicePrincipalProxyRequest request) { - String path = - String.format("/api/2.0/identity/service-principals/%s", request.getServicePrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -348,7 +339,7 @@ public ServicePrincipal getServicePrincipalProxy(GetServicePrincipalProxyRequest @Override public User getUserProxy(GetUserProxyRequest request) { - String path = String.format("/api/2.0/identity/users/%s", request.getUserId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -366,8 +357,7 @@ public User getUserProxy(GetUserProxyRequest request) { @Override public WorkspaceAccessDetail getWorkspaceAccessDetailLocal( GetWorkspaceAccessDetailLocalRequest request) { - String path = - String.format("/api/2.0/identity/workspace-access-details/%s", request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -405,8 +395,7 @@ public WorkspaceAssignmentDetail getWorkspaceAssignmentDetailProxy( @Override public WorkspaceAssignment getWorkspaceAssignmentProxy( GetWorkspaceAssignmentProxyRequest request) { - String path = - String.format("/api/2.0/identity/workspace-assignments/%s", request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -424,8 +413,7 @@ public WorkspaceAssignment getWorkspaceAssignmentProxy( @Override public WorkspaceIdentityDetail getWorkspaceIdentityDetail( GetWorkspaceIdentityDetailRequest request) { - String path = - String.format("/api/2.0/identity/workspace-identity-details/%s", request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("GET", path); @@ -443,7 +431,7 @@ public WorkspaceIdentityDetail getWorkspaceIdentityDetail( @Override public ListDirectGroupMembersResponse listDirectGroupMembersProxy( ListDirectGroupMembersProxyRequest request) { - String path = String.format("/api/2.0/identity/groups/%s/direct-members", request.getGroupId()); + String path = String.format("/api/2.0/identity/%s/direct-members", request.getParent()); try { Request req = new Request("GET", path); @@ -497,8 +485,7 @@ public ListServicePrincipalsResponse listServicePrincipalsProxy( public ListTransitiveParentGroupsResponse listTransitiveParentGroupsProxy( ListTransitiveParentGroupsProxyRequest request) { String path = - String.format( - "/api/2.0/identity/principals/%s/transitive-parent-groups", request.getPrincipalId()); + String.format("/api/2.0/identity/%s/transitive-parent-groups", request.getParent()); try { Request req = new Request("GET", path); @@ -623,7 +610,7 @@ public ResolveUserResponse resolveUserProxy(ResolveUserProxyRequest request) { @Override public Group updateGroupProxy(UpdateGroupProxyRequest request) { - String path = String.format("/api/2.0/identity/groups/%s", request.getGroupId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getGroup())); @@ -641,8 +628,7 @@ public Group updateGroupProxy(UpdateGroupProxyRequest request) { @Override public ServicePrincipal updateServicePrincipalProxy(UpdateServicePrincipalProxyRequest request) { - String path = - String.format("/api/2.0/identity/service-principals/%s", request.getServicePrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getServicePrincipal())); @@ -660,7 +646,7 @@ public ServicePrincipal updateServicePrincipalProxy(UpdateServicePrincipalProxyR @Override public User updateUserProxy(UpdateUserProxyRequest request) { - String path = String.format("/api/2.0/identity/users/%s", request.getUserId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getUser())); @@ -701,8 +687,7 @@ public WorkspaceAssignmentDetail updateWorkspaceAssignmentDetailProxy( @Override public WorkspaceAssignment updateWorkspaceAssignmentProxy( UpdateWorkspaceAssignmentProxyRequest request) { - String path = - String.format("/api/2.0/identity/workspace-assignments/%s", request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getWorkspaceAssignment())); @@ -722,8 +707,7 @@ public WorkspaceAssignment updateWorkspaceAssignmentProxy( @Override public WorkspaceIdentityDetail updateWorkspaceIdentityDetail( UpdateWorkspaceIdentityDetailRequest request) { - String path = - String.format("/api/2.0/identity/workspace-identity-details/%s", request.getPrincipalId()); + String path = String.format("/api/2.0/identity/%s", request.getName()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getWorkspaceIdentityDetail())); 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 26af04e2e..603542a5b 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 @@ -260,7 +260,8 @@ ResolveServicePrincipalResponse resolveServicePrincipalProxy( * workspace. Only the fields named in the update mask are modified. Returns the updated * ServicePrincipal resource. * - *

For locally managed service principals, is_agent must be set to true or false when updated. + *

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. * *

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 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 744193111..d0b29caa8 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 @@ -14,6 +14,13 @@ public class WorkspaceIdentityDetail { @JsonProperty("assignment_type") private WorkspaceIdentityDetailAssignmentType assignmentType; + /** + * The resource name of the workspace identity detail. Format: + * principals/{principal_id}/workspace-identity-detail + */ + @JsonProperty("name") + private String name; + /** The internal ID of the principal (user/sp/group) in Databricks. */ @JsonProperty("principal_id") private Long principalId; @@ -36,6 +43,15 @@ public WorkspaceIdentityDetailAssignmentType getAssignmentType() { return assignmentType; } + public WorkspaceIdentityDetail setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + public WorkspaceIdentityDetail setPrincipalId(Long principalId) { this.principalId = principalId; return this; @@ -69,6 +85,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; WorkspaceIdentityDetail that = (WorkspaceIdentityDetail) o; return Objects.equals(assignmentType, that.assignmentType) + && Objects.equals(name, that.name) && Objects.equals(principalId, that.principalId) && Objects.equals(principalType, that.principalType) && Objects.equals(workspaceIdentityStatus, that.workspaceIdentityStatus); @@ -76,13 +93,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(assignmentType, principalId, principalType, workspaceIdentityStatus); + return Objects.hash(assignmentType, name, principalId, principalType, workspaceIdentityStatus); } @Override public String toString() { return new ToStringer(WorkspaceIdentityDetail.class) .add("assignmentType", assignmentType) + .add("name", name) .add("principalId", principalId) .add("principalType", principalType) .add("workspaceIdentityStatus", workspaceIdentityStatus) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CompletedJob.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CompletedJob.java new file mode 100644 index 000000000..1427e7828 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CompletedJob.java @@ -0,0 +1,106 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Timestamp; +import java.util.Objects; + +/** A single upstream completion that contributed to triggering the run, captured at trigger time */ +@Generated +public class CompletedJob { + /** The completion time of the upstream run */ + @JsonProperty("completion_time") + private Timestamp completionTime; + + /** The ID of the upstream job */ + @JsonProperty("job_id") + private String jobId; + + /** The ID of the upstream run whose completion contributed to the trigger */ + @JsonProperty("run_id") + private String runId; + + /** The termination code of the upstream run */ + @JsonProperty("termination_code") + private TerminationCodeCode terminationCode; + + /** The ID of the workspace containing the upstream job */ + @JsonProperty("workspace_id") + private String workspaceId; + + public CompletedJob setCompletionTime(Timestamp completionTime) { + this.completionTime = completionTime; + return this; + } + + public Timestamp getCompletionTime() { + return completionTime; + } + + public CompletedJob setJobId(String jobId) { + this.jobId = jobId; + return this; + } + + public String getJobId() { + return jobId; + } + + public CompletedJob setRunId(String runId) { + this.runId = runId; + return this; + } + + public String getRunId() { + return runId; + } + + public CompletedJob setTerminationCode(TerminationCodeCode terminationCode) { + this.terminationCode = terminationCode; + return this; + } + + public TerminationCodeCode getTerminationCode() { + return terminationCode; + } + + public CompletedJob setWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + public String getWorkspaceId() { + return workspaceId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CompletedJob that = (CompletedJob) o; + return Objects.equals(completionTime, that.completionTime) + && Objects.equals(jobId, that.jobId) + && Objects.equals(runId, that.runId) + && Objects.equals(terminationCode, that.terminationCode) + && Objects.equals(workspaceId, that.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash(completionTime, jobId, runId, terminationCode, workspaceId); + } + + @Override + public String toString() { + return new ToStringer(CompletedJob.class) + .add("completionTime", completionTime) + .add("jobId", jobId) + .add("runId", runId) + .add("terminationCode", terminationCode) + .add("workspaceId", workspaceId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CreateJob.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CreateJob.java index a11331885..6378777fb 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CreateJob.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CreateJob.java @@ -82,10 +82,12 @@ public class CreateJob { * serverless compute or a compute resource that uses Environments mode. * *

For notebook tasks that use serverless compute or a compute resource that uses Environments - * mode, if the environment_key is not specified, the notebook environment will be used if - * present. If a jobs environment is specified, it will override the notebook environment. For - * other tasks that use serverless compute or a compute resource that uses Environments mode, the - * task environment is required to be specified using environment_key in the task settings. + * mode, if the `environment_key` is not specified, the notebook environment will be used if + * present. If a jobs environment is specified, it will override the notebook environment. + * + *

For other tasks that use serverless compute or a compute resource that uses Environments + * mode, the task environment is required to be specified using `environment_key` in the task + * settings. */ @JsonProperty("environments") private Collection environments; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCluster.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCluster.java index d8087d986..e99012802 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCluster.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCluster.java @@ -21,6 +21,14 @@ public class JobCluster { @JsonProperty("new_cluster") private com.databricks.sdk.service.compute.ClusterSpec newCluster; + /** + * Serverless compute settings for this cluster. At most one job cluster per job may set this + * field; the rate limit defined on the referenced policy applies across all tasks bound to this + * cluster. + */ + @JsonProperty("serverless_compute") + private JobClusterServerlessCompute serverlessCompute; + /** * The ID of the serverless compute object to bind this cluster to. At most one JobCluster per job * may set this field; the rate limit defined on the referenced serverless compute applies across @@ -47,6 +55,15 @@ public com.databricks.sdk.service.compute.ClusterSpec getNewCluster() { return newCluster; } + public JobCluster setServerlessCompute(JobClusterServerlessCompute serverlessCompute) { + this.serverlessCompute = serverlessCompute; + return this; + } + + public JobClusterServerlessCompute getServerlessCompute() { + return serverlessCompute; + } + public JobCluster setServerlessComputeId(String serverlessComputeId) { this.serverlessComputeId = serverlessComputeId; return this; @@ -63,12 +80,13 @@ public boolean equals(Object o) { JobCluster that = (JobCluster) o; return Objects.equals(jobClusterKey, that.jobClusterKey) && Objects.equals(newCluster, that.newCluster) + && Objects.equals(serverlessCompute, that.serverlessCompute) && Objects.equals(serverlessComputeId, that.serverlessComputeId); } @Override public int hashCode() { - return Objects.hash(jobClusterKey, newCluster, serverlessComputeId); + return Objects.hash(jobClusterKey, newCluster, serverlessCompute, serverlessComputeId); } @Override @@ -76,6 +94,7 @@ public String toString() { return new ToStringer(JobCluster.class) .add("jobClusterKey", jobClusterKey) .add("newCluster", newCluster) + .add("serverlessCompute", serverlessCompute) .add("serverlessComputeId", serverlessComputeId) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobClusterServerlessCompute.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobClusterServerlessCompute.java new file mode 100644 index 000000000..bcbf11e21 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobClusterServerlessCompute.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Serverless compute settings for a job cluster. */ +@Generated +public class JobClusterServerlessCompute { + /** The ID of the serverless compute policy to apply to this cluster. */ + @JsonProperty("policy_id") + private String policyId; + + public JobClusterServerlessCompute setPolicyId(String policyId) { + this.policyId = policyId; + return this; + } + + public String getPolicyId() { + return policyId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobClusterServerlessCompute that = (JobClusterServerlessCompute) o; + return Objects.equals(policyId, that.policyId); + } + + @Override + public int hashCode() { + return Objects.hash(policyId); + } + + @Override + public String toString() { + return new ToStringer(JobClusterServerlessCompute.class).add("policyId", policyId).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfiguration.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfiguration.java new file mode 100644 index 000000000..e74fecab4 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfiguration.java @@ -0,0 +1,65 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +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; + +/** A trigger that starts a run after every upstream job completes with a configured status. */ +@Generated +public class JobCompletionTriggerConfiguration { + /** The status that all upstream jobs must have before this trigger fires. Defaults to SUCCESS. */ + @JsonProperty("if_status") + private JobCompletionTriggerConfigurationIfStatus ifStatus; + + /** + * The upstream jobs to monitor. Each job must be in a workspace attached to the same Unity + * Catalog metastore as the downstream job. A maximum of 10 jobs can be monitored. + */ + @JsonProperty("jobs") + private Collection jobs; + + public JobCompletionTriggerConfiguration setIfStatus( + JobCompletionTriggerConfigurationIfStatus ifStatus) { + this.ifStatus = ifStatus; + return this; + } + + public JobCompletionTriggerConfigurationIfStatus getIfStatus() { + return ifStatus; + } + + public JobCompletionTriggerConfiguration setJobs( + Collection jobs) { + this.jobs = jobs; + return this; + } + + public Collection getJobs() { + return jobs; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobCompletionTriggerConfiguration that = (JobCompletionTriggerConfiguration) o; + return Objects.equals(ifStatus, that.ifStatus) && Objects.equals(jobs, that.jobs); + } + + @Override + public int hashCode() { + return Objects.hash(ifStatus, jobs); + } + + @Override + public String toString() { + return new ToStringer(JobCompletionTriggerConfiguration.class) + .add("ifStatus", ifStatus) + .add("jobs", jobs) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfigurationIfStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfigurationIfStatus.java new file mode 100644 index 000000000..b0cf80fe1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfigurationIfStatus.java @@ -0,0 +1,13 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +import com.databricks.sdk.support.Generated; + +/** The status that all upstream jobs must have before a job completion trigger fires. */ +@Generated +public enum JobCompletionTriggerConfigurationIfStatus { + DONE, + FAILED, + SUCCESS, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfigurationMonitoredJob.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfigurationMonitoredJob.java new file mode 100644 index 000000000..45c717d05 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerConfigurationMonitoredJob.java @@ -0,0 +1,64 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** An upstream job to monitor. */ +@Generated +public class JobCompletionTriggerConfigurationMonitoredJob { + /** The ID of the upstream job. */ + @JsonProperty("job_id") + private String jobId; + + /** + * The ID of the workspace containing the upstream job. This can differ from the caller's + * workspace and downstream services enforce correct entitlements and CAN_VIEW permissions for the + * user + job combination. SDR: https://databricks.atlassian.net/browse/SDR-5267 + */ + @JsonProperty("workspace_id") + private String workspaceId; + + public JobCompletionTriggerConfigurationMonitoredJob setJobId(String jobId) { + this.jobId = jobId; + return this; + } + + public String getJobId() { + return jobId; + } + + public JobCompletionTriggerConfigurationMonitoredJob setWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + public String getWorkspaceId() { + return workspaceId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobCompletionTriggerConfigurationMonitoredJob that = + (JobCompletionTriggerConfigurationMonitoredJob) o; + return Objects.equals(jobId, that.jobId) && Objects.equals(workspaceId, that.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, workspaceId); + } + + @Override + public String toString() { + return new ToStringer(JobCompletionTriggerConfigurationMonitoredJob.class) + .add("jobId", jobId) + .add("workspaceId", workspaceId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerRunInfoDetails.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerRunInfoDetails.java new file mode 100644 index 000000000..b6adb5d8c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerRunInfoDetails.java @@ -0,0 +1,50 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +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; + +/** + * Contains the immutable set of upstream completions that triggered the run, in configured jobs + * order + */ +@Generated +public class JobCompletionTriggerRunInfoDetails { + /** */ + @JsonProperty("completed_jobs") + private Collection completedJobs; + + public JobCompletionTriggerRunInfoDetails setCompletedJobs( + Collection completedJobs) { + this.completedJobs = completedJobs; + return this; + } + + public Collection getCompletedJobs() { + return completedJobs; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobCompletionTriggerRunInfoDetails that = (JobCompletionTriggerRunInfoDetails) o; + return Objects.equals(completedJobs, that.completedJobs); + } + + @Override + public int hashCode() { + return Objects.hash(completedJobs); + } + + @Override + public String toString() { + return new ToStringer(JobCompletionTriggerRunInfoDetails.class) + .add("completedJobs", completedJobs) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerState.java new file mode 100644 index 000000000..7e5599b9c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerState.java @@ -0,0 +1,47 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +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; + +/** Runtime state for a job completion trigger. */ +@Generated +public class JobCompletionTriggerState { + /** State for each configured upstream job, in the same order as `jobs`. */ + @JsonProperty("monitored_job_states") + private Collection monitoredJobStates; + + public JobCompletionTriggerState setMonitoredJobStates( + Collection monitoredJobStates) { + this.monitoredJobStates = monitoredJobStates; + return this; + } + + public Collection getMonitoredJobStates() { + return monitoredJobStates; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobCompletionTriggerState that = (JobCompletionTriggerState) o; + return Objects.equals(monitoredJobStates, that.monitoredJobStates); + } + + @Override + public int hashCode() { + return Objects.hash(monitoredJobStates); + } + + @Override + public String toString() { + return new ToStringer(JobCompletionTriggerState.class) + .add("monitoredJobStates", monitoredJobStates) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerStateMonitoredJobState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerStateMonitoredJobState.java new file mode 100644 index 000000000..497ede6ed --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobCompletionTriggerStateMonitoredJobState.java @@ -0,0 +1,170 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +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; + +@Generated +public class JobCompletionTriggerStateMonitoredJobState { + /** Whether this job has contributed a matching completion toward the next trigger fire. */ + @JsonProperty("has_seen_completion") + private Boolean hasSeenCompletion; + + /** + * Whether the upstream job was missing or deleted when last observed by this trigger. Omitted + * when deletion status is unknown. This observation may become stale while the trigger is paused + * or evaluation cannot access the upstream job. + */ + @JsonProperty("is_deleted") + private Boolean isDeleted; + + /** The ID of the upstream job. */ + @JsonProperty("job_id") + private String jobId; + + /** The completion time of the latest matching upstream run observed by the trigger. */ + @JsonProperty("last_seen_completion_time") + private Timestamp lastSeenCompletionTime; + + /** The termination code of the latest matching upstream run observed by the trigger. */ + @JsonProperty("last_seen_result") + private TerminationCodeCode lastSeenResult; + + /** The ID of the latest matching upstream run observed by the trigger. */ + @JsonProperty("last_seen_run_id") + private String lastSeenRunId; + + /** + * The termination code of the latest upstream run if it does not satisfy `if_status`. Unset when + * the latest run matches or no run has been observed. + */ + @JsonProperty("latest_non_matching_result") + private TerminationCodeCode latestNonMatchingResult; + + /** The ID of the workspace containing the upstream job. */ + @JsonProperty("workspace_id") + private String workspaceId; + + public JobCompletionTriggerStateMonitoredJobState setHasSeenCompletion( + Boolean hasSeenCompletion) { + this.hasSeenCompletion = hasSeenCompletion; + return this; + } + + public Boolean getHasSeenCompletion() { + return hasSeenCompletion; + } + + public JobCompletionTriggerStateMonitoredJobState setIsDeleted(Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + public Boolean getIsDeleted() { + return isDeleted; + } + + public JobCompletionTriggerStateMonitoredJobState setJobId(String jobId) { + this.jobId = jobId; + return this; + } + + public String getJobId() { + return jobId; + } + + public JobCompletionTriggerStateMonitoredJobState setLastSeenCompletionTime( + Timestamp lastSeenCompletionTime) { + this.lastSeenCompletionTime = lastSeenCompletionTime; + return this; + } + + public Timestamp getLastSeenCompletionTime() { + return lastSeenCompletionTime; + } + + public JobCompletionTriggerStateMonitoredJobState setLastSeenResult( + TerminationCodeCode lastSeenResult) { + this.lastSeenResult = lastSeenResult; + return this; + } + + public TerminationCodeCode getLastSeenResult() { + return lastSeenResult; + } + + public JobCompletionTriggerStateMonitoredJobState setLastSeenRunId(String lastSeenRunId) { + this.lastSeenRunId = lastSeenRunId; + return this; + } + + public String getLastSeenRunId() { + return lastSeenRunId; + } + + public JobCompletionTriggerStateMonitoredJobState setLatestNonMatchingResult( + TerminationCodeCode latestNonMatchingResult) { + this.latestNonMatchingResult = latestNonMatchingResult; + return this; + } + + public TerminationCodeCode getLatestNonMatchingResult() { + return latestNonMatchingResult; + } + + public JobCompletionTriggerStateMonitoredJobState setWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + public String getWorkspaceId() { + return workspaceId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobCompletionTriggerStateMonitoredJobState that = + (JobCompletionTriggerStateMonitoredJobState) o; + return Objects.equals(hasSeenCompletion, that.hasSeenCompletion) + && Objects.equals(isDeleted, that.isDeleted) + && Objects.equals(jobId, that.jobId) + && Objects.equals(lastSeenCompletionTime, that.lastSeenCompletionTime) + && Objects.equals(lastSeenResult, that.lastSeenResult) + && Objects.equals(lastSeenRunId, that.lastSeenRunId) + && Objects.equals(latestNonMatchingResult, that.latestNonMatchingResult) + && Objects.equals(workspaceId, that.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + hasSeenCompletion, + isDeleted, + jobId, + lastSeenCompletionTime, + lastSeenResult, + lastSeenRunId, + latestNonMatchingResult, + workspaceId); + } + + @Override + public String toString() { + return new ToStringer(JobCompletionTriggerStateMonitoredJobState.class) + .add("hasSeenCompletion", hasSeenCompletion) + .add("isDeleted", isDeleted) + .add("jobId", jobId) + .add("lastSeenCompletionTime", lastSeenCompletionTime) + .add("lastSeenResult", lastSeenResult) + .add("lastSeenRunId", lastSeenRunId) + .add("latestNonMatchingResult", latestNonMatchingResult) + .add("workspaceId", workspaceId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobSettings.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobSettings.java index 50314e1b0..e52bdd76d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobSettings.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobSettings.java @@ -78,10 +78,12 @@ public class JobSettings { * serverless compute or a compute resource that uses Environments mode. * *

For notebook tasks that use serverless compute or a compute resource that uses Environments - * mode, if the environment_key is not specified, the notebook environment will be used if - * present. If a jobs environment is specified, it will override the notebook environment. For - * other tasks that use serverless compute or a compute resource that uses Environments mode, the - * task environment is required to be specified using environment_key in the task settings. + * mode, if the `environment_key` is not specified, the notebook environment will be used if + * present. If a jobs environment is specified, it will override the notebook environment. + * + *

For other tasks that use serverless compute or a compute resource that uses Environments + * mode, the task environment is required to be specified using `environment_key` in the task + * settings. */ @JsonProperty("environments") private Collection environments; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/PerTriggerState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/PerTriggerState.java index 21d276d71..d04ef1694 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/PerTriggerState.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/PerTriggerState.java @@ -23,6 +23,10 @@ public class PerTriggerState { @JsonProperty("file_arrival") private FileArrivalTriggerState fileArrival; + /** */ + @JsonProperty("job_completion") + private JobCompletionTriggerState jobCompletion; + /** */ @JsonProperty("model") private ModelTriggerState model; @@ -65,6 +69,15 @@ public FileArrivalTriggerState getFileArrival() { return fileArrival; } + public PerTriggerState setJobCompletion(JobCompletionTriggerState jobCompletion) { + this.jobCompletion = jobCompletion; + return this; + } + + public JobCompletionTriggerState getJobCompletion() { + return jobCompletion; + } + public PerTriggerState setModel(ModelTriggerState model) { this.model = model; return this; @@ -126,6 +139,7 @@ public boolean equals(Object o) { PerTriggerState that = (PerTriggerState) o; return Objects.equals(continuous, that.continuous) && Objects.equals(fileArrival, that.fileArrival) + && Objects.equals(jobCompletion, that.jobCompletion) && Objects.equals(model, that.model) && Objects.equals(pauseStatus, that.pauseStatus) && Objects.equals(periodic, that.periodic) @@ -137,7 +151,15 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - continuous, fileArrival, model, pauseStatus, periodic, schedule, sqlCondition, tableUpdate); + continuous, + fileArrival, + jobCompletion, + model, + pauseStatus, + periodic, + schedule, + sqlCondition, + tableUpdate); } @Override @@ -145,6 +167,7 @@ public String toString() { return new ToStringer(PerTriggerState.class) .add("continuous", continuous) .add("fileArrival", fileArrival) + .add("jobCompletion", jobCompletion) .add("model", model) .add("pauseStatus", pauseStatus) .add("periodic", periodic) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerConfiguration.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerConfiguration.java index 932102147..191f3befd 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerConfiguration.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerConfiguration.java @@ -24,6 +24,10 @@ public class TriggerConfiguration { @JsonProperty("file_arrival") private FileArrivalTriggerConfiguration fileArrival; + /** Job completion trigger configuration. */ + @JsonProperty("job_completion") + private JobCompletionTriggerConfiguration jobCompletion; + /** Model trigger configuration. */ @JsonProperty("model") private ModelTriggerConfiguration model; @@ -72,6 +76,15 @@ public FileArrivalTriggerConfiguration getFileArrival() { return fileArrival; } + public TriggerConfiguration setJobCompletion(JobCompletionTriggerConfiguration jobCompletion) { + this.jobCompletion = jobCompletion; + return this; + } + + public JobCompletionTriggerConfiguration getJobCompletion() { + return jobCompletion; + } + public TriggerConfiguration setModel(ModelTriggerConfiguration model) { this.model = model; return this; @@ -133,6 +146,7 @@ public boolean equals(Object o) { TriggerConfiguration that = (TriggerConfiguration) o; return Objects.equals(continuous, that.continuous) && Objects.equals(fileArrival, that.fileArrival) + && Objects.equals(jobCompletion, that.jobCompletion) && Objects.equals(model, that.model) && Objects.equals(pauseStatus, that.pauseStatus) && Objects.equals(periodic, that.periodic) @@ -144,7 +158,15 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - continuous, fileArrival, model, pauseStatus, periodic, schedule, sqlCondition, tableUpdate); + continuous, + fileArrival, + jobCompletion, + model, + pauseStatus, + periodic, + schedule, + sqlCondition, + tableUpdate); } @Override @@ -152,6 +174,7 @@ public String toString() { return new ToStringer(TriggerConfiguration.class) .add("continuous", continuous) .add("fileArrival", fileArrival) + .add("jobCompletion", jobCompletion) .add("model", model) .add("pauseStatus", pauseStatus) .add("periodic", periodic) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerInfo.java index 8cfdb07f2..9074b31b1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerInfo.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerInfo.java @@ -10,6 +10,13 @@ /** Additional details about what triggered the run */ @Generated public class TriggerInfo { + /** + * Additional details for job runs triggered by a job completion trigger (trigger: + * "JOB_COMPLETION") + */ + @JsonProperty("job_completion") + private JobCompletionTriggerRunInfoDetails jobCompletion; + /** The run id of the Run Job task run */ @JsonProperty("run_id") private Long runId; @@ -18,6 +25,15 @@ public class TriggerInfo { @JsonProperty("sql_condition") private SqlConditionRunInfoDetails sqlCondition; + public TriggerInfo setJobCompletion(JobCompletionTriggerRunInfoDetails jobCompletion) { + this.jobCompletion = jobCompletion; + return this; + } + + public JobCompletionTriggerRunInfoDetails getJobCompletion() { + return jobCompletion; + } + public TriggerInfo setRunId(Long runId) { this.runId = runId; return this; @@ -41,17 +57,20 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TriggerInfo that = (TriggerInfo) o; - return Objects.equals(runId, that.runId) && Objects.equals(sqlCondition, that.sqlCondition); + return Objects.equals(jobCompletion, that.jobCompletion) + && Objects.equals(runId, that.runId) + && Objects.equals(sqlCondition, that.sqlCondition); } @Override public int hashCode() { - return Objects.hash(runId, sqlCondition); + return Objects.hash(jobCompletion, runId, sqlCondition); } @Override public String toString() { return new ToStringer(TriggerInfo.class) + .add("jobCompletion", jobCompletion) .add("runId", runId) .add("sqlCondition", sqlCondition) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerSettings.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerSettings.java index 8992031a2..e5a429525 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerSettings.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerSettings.java @@ -13,6 +13,10 @@ public class TriggerSettings { @JsonProperty("file_arrival") private FileArrivalTriggerConfiguration fileArrival; + /** Job completion trigger settings. */ + @JsonProperty("job_completion") + private JobCompletionTriggerConfiguration jobCompletion; + /** */ @JsonProperty("model") private ModelTriggerConfiguration model; @@ -45,6 +49,15 @@ public FileArrivalTriggerConfiguration getFileArrival() { return fileArrival; } + public TriggerSettings setJobCompletion(JobCompletionTriggerConfiguration jobCompletion) { + this.jobCompletion = jobCompletion; + return this; + } + + public JobCompletionTriggerConfiguration getJobCompletion() { + return jobCompletion; + } + public TriggerSettings setModel(ModelTriggerConfiguration model) { this.model = model; return this; @@ -96,6 +109,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; TriggerSettings that = (TriggerSettings) o; return Objects.equals(fileArrival, that.fileArrival) + && Objects.equals(jobCompletion, that.jobCompletion) && Objects.equals(model, that.model) && Objects.equals(pauseStatus, that.pauseStatus) && Objects.equals(periodic, that.periodic) @@ -105,13 +119,15 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(fileArrival, model, pauseStatus, periodic, sqlCondition, tableUpdate); + return Objects.hash( + fileArrival, jobCompletion, model, pauseStatus, periodic, sqlCondition, tableUpdate); } @Override public String toString() { return new ToStringer(TriggerSettings.class) .add("fileArrival", fileArrival) + .add("jobCompletion", jobCompletion) .add("model", model) .add("pauseStatus", pauseStatus) .add("periodic", periodic) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerStateProto.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerStateProto.java index e80482440..c537d2edc 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerStateProto.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerStateProto.java @@ -13,6 +13,10 @@ public class TriggerStateProto { @JsonProperty("file_arrival") private FileArrivalTriggerState fileArrival; + /** */ + @JsonProperty("job_completion") + private JobCompletionTriggerState jobCompletion; + /** * Whether this trigger is paused or not. For continuous schedules, it can differ from the * configured pause_status whenever a paused continuous job is kickstarted by an operation other @@ -38,6 +42,15 @@ public FileArrivalTriggerState getFileArrival() { return fileArrival; } + public TriggerStateProto setJobCompletion(JobCompletionTriggerState jobCompletion) { + this.jobCompletion = jobCompletion; + return this; + } + + public JobCompletionTriggerState getJobCompletion() { + return jobCompletion; + } + public TriggerStateProto setPauseStatus(PauseStatus pauseStatus) { this.pauseStatus = pauseStatus; return this; @@ -71,6 +84,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; TriggerStateProto that = (TriggerStateProto) o; return Objects.equals(fileArrival, that.fileArrival) + && Objects.equals(jobCompletion, that.jobCompletion) && Objects.equals(pauseStatus, that.pauseStatus) && Objects.equals(sqlCondition, that.sqlCondition) && Objects.equals(table, that.table); @@ -78,13 +92,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(fileArrival, pauseStatus, sqlCondition, table); + return Objects.hash(fileArrival, jobCompletion, pauseStatus, sqlCondition, table); } @Override public String toString() { return new ToStringer(TriggerStateProto.class) .add("fileArrival", fileArrival) + .add("jobCompletion", jobCompletion) .add("pauseStatus", pauseStatus) .add("sqlCondition", sqlCondition) .add("table", table) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerType.java index 3f1e2c2d2..1eb0ffa69 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/TriggerType.java @@ -23,6 +23,7 @@ public enum TriggerType { CONTINUOUS, // Indicates a run that is triggered by a continuous job. CONTINUOUS_RESTART, // Indicates a run created by user to manually restart a continuous job run. FILE_ARRIVAL, // Indicates a run that is triggered by a file arrival. + JOB_COMPLETION, // Indicates a run that is triggered by an upstream job completion. ONE_TIME, // One time triggers that fire a single run. This occurs you triggered a single // run on demand through the UI or the API. PERIODIC, // Schedules that periodically trigger runs, such as a cron scheduler. diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillFeaturesRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillFeaturesRequest.java index 9d81b1e61..8082e9bc7 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillFeaturesRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillFeaturesRequest.java @@ -11,7 +11,7 @@ @Generated public class BackfillFeaturesRequest { - /** Output ranges to backfill. */ + /** Time ranges of source data to backfill. Ranges must not overlap. */ @JsonProperty("backfill_ranges") private Collection backfillRanges; @@ -22,7 +22,11 @@ public class BackfillFeaturesRequest { @JsonProperty("budget_policy_id") private String budgetPolicyId; - /** Full names of the features to backfill. */ + /** + * Full names of the features to backfill. All features must share the same interval between + * values and the same offset. The interval is the slide_duration of a sliding window or the + * window_duration of a tumbling window. + */ @JsonProperty("feature_full_names") private Collection featureFullNames; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillOperationMetadata.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillOperationMetadata.java index b96f77f04..c206f227a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillOperationMetadata.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillOperationMetadata.java @@ -11,7 +11,11 @@ /** Progress and configuration for a backfill. */ @Generated public class BackfillOperationMetadata { - /** Output ranges targeted by the backfill. */ + /** + * The requested time ranges, each aligned outward to the boundaries at which the features emit + * values. Ranges that overlap after alignment are combined into one. The backfill stops at the + * most recent materialized values, so a range may extend past the values that it recomputed. + */ @JsonProperty("backfill_ranges") private Collection backfillRanges; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillRange.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillRange.java index 8991e7426..608f61ac9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillRange.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillRange.java @@ -8,10 +8,19 @@ import com.google.protobuf.Timestamp; import java.util.Objects; -/** A time range for a backfill. */ +/** + * A time range of source data for a backfill. The range is aligned outward to the boundaries at + * which the feature emits values: every slide_duration for a sliding window or every + * window_duration for a tumbling window, shifted by offset. Feature values up to one + * window_duration after the aligned end may change. The backfill stops at the most recent + * materialized values and leaves later values to materialization. + */ @Generated public class BackfillRange { - /** End of the backfill range, exclusive. If unset, defaults to the current time. */ + /** + * End of the backfill range, exclusive. If unset, defaults to the most recent materialized + * values. + */ @JsonProperty("end_time") private Timestamp endTime; 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 85be19eea..67a4c880b 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 @@ -287,7 +287,7 @@ public UpdateMaterializationSetOperation updateMaterializationSet( return new UpdateMaterializationSetOperation(impl, operation); } - /** Update a materialized feature (pause/resume). */ + /** Updates a materialized feature. */ public MaterializedFeature updateMaterializedFeature(UpdateMaterializedFeatureRequest request) { return impl.updateMaterializedFeature(request); } 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 4705e823e..c11b53248 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 @@ -126,7 +126,7 @@ ListMaterializedFeaturesResponse listMaterializedFeatures( Operation updateMaterializationSet( UpdateMaterializationSetRequest updateMaterializationSetRequest); - /** Update a materialized feature (pause/resume). */ + /** Updates a materialized feature. */ MaterializedFeature updateMaterializedFeature( UpdateMaterializedFeatureRequest updateMaterializedFeatureRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationNotifications.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationNotifications.java index 7ee35c916..512cc273a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationNotifications.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializationNotifications.java @@ -7,7 +7,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; -/** Notifications for the jobs and pipelines that materialize a feature, one field per trigger. */ +/** + * Notifications for the jobs and pipelines that materialize the features in a set, one field per + * trigger. + */ @Generated public class MaterializationNotifications { /** Who to notify when a run fails, and on which attempts. */ 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 3da02e9e1..bafc91b1c 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 @@ -58,8 +58,8 @@ public class MaterializedFeature { private String latestBackfillOperation; /** - * The materialization set this materialized feature was created for, through DABs or - * direct-engine creation. Unset for a materialized feature that was not created as part of a set. + * The ID of the materialization set containing this materialized feature. Unset for a + * materialized feature that is not part of a set. */ @JsonProperty("materialization_set_id") private String materializationSetId; @@ -68,11 +68,7 @@ public class MaterializedFeature { @JsonProperty("materialized_feature_id") private String materializedFeatureId; - /** - * Notification configuration around the materialization job or pipeline lifecycle. They are - * applied to every job and pipeline that materializes this feature. Features which are - * materialized in the same pipeline will share the same notification. - */ + /** Notification configuration for the jobs and pipelines that materialize this feature. */ @JsonProperty("notifications") private MaterializationNotifications notifications; @@ -97,10 +93,7 @@ public class MaterializedFeature { @JsonProperty("pipeline_id") private String pipelineId; - /** - * The schedule state of the materialization pipeline. Hidden from GraphQL: being deprecated, so - * not exposed to Catalog Explorer. - */ + /** Deprecated: This legacy pipeline setting does not control batch job scheduling. */ @JsonProperty("pipeline_schedule_state") private MaterializedFeaturePipelineScheduleState pipelineScheduleState; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/UpdateMaterializedFeatureRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/UpdateMaterializedFeatureRequest.java index 3bba2ae27..5f203c0d5 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/UpdateMaterializedFeatureRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/UpdateMaterializedFeatureRequest.java @@ -18,10 +18,7 @@ public class UpdateMaterializedFeatureRequest { /** Server-assigned unique identifier for the materialized feature. */ @JsonIgnore private String materializedFeatureId; - /** - * Provide the materialization feature fields which should be updated. Currently, only the - * pipeline_state field can be updated. - */ + /** The fields to update. Only `pipeline_schedule_state` is supported. */ @JsonIgnore @QueryParam("update_mask") private String updateMask; 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 f2839914f..45dc36472 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 @@ -15,12 +15,17 @@ public class CreateRoleRequest { @JsonIgnore private String parent; /** - * If true, update the role if it already exists instead of returning an error. + * If true, update the role if it already exists instead of returning an error. This requires + * `role_id` to be set. Without `role_id`, the request follows the normal create path and fails if + * the role name already exists. * - *

When the role already exists, the provided `role` spec fully replaces the existing one: - * `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. + *

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. */ @JsonIgnore @QueryParam("replace_existing") 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 8101b73e2..370990648 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 @@ -559,7 +559,14 @@ public UpdateProjectOperation updateProject(UpdateProjectRequest request) { return new UpdateProjectOperation(impl, operation); } - /** Update a role for a branch. */ + /** + * Updates the mutable fields of a Postgres role for a branch. + * + *

The fields `spec.identity_type`, `spec.auth_method`, and `spec.postgres_role` are fixed when + * the role is created. UpdateRole ignores values supplied for these fields in the request body + * and retains their existing values. Explicitly naming one of these fields in `update_mask` + * returns an INVALID_PARAMETER_VALUE error. + */ public UpdateRoleOperation updateRole(UpdateRoleRequest request) { Operation operation = impl.updateRole(request); return new UpdateRoleOperation(impl, operation); 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 be42f1364..8452ca9a5 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 @@ -220,7 +220,14 @@ RevealRolePasswordResponse revealRolePassword( /** Updates the specified database project. */ Operation updateProject(UpdateProjectRequest updateProjectRequest); - /** Update a role for a branch. */ + /** + * Updates the mutable fields of a Postgres role for a branch. + * + *

The fields `spec.identity_type`, `spec.auth_method`, and `spec.postgres_role` are fixed when + * the role is created. UpdateRole ignores values supplied for these fields in the request body + * and retains their existing values. Explicitly naming one of these fields in `update_mask` + * returns an INVALID_PARAMETER_VALUE error. + */ Operation updateRole(UpdateRoleRequest updateRoleRequest); /** 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 983155859..574afa7d1 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 @@ -32,6 +32,10 @@ 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. */ @JsonProperty("auth_method") private RoleAuthMethod authMethod; @@ -40,6 +44,10 @@ public class RoleRoleSpec { * The type of role. When specifying a managed-identity, the chosen role_id must be a valid: * *

* 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. */ @JsonProperty("identity_type") private RoleIdentityType identityType; @@ -61,6 +69,10 @@ 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. */ @JsonProperty("postgres_role") private String postgresRole; 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 12ba817f1..864f6f3d5 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 @@ -27,7 +27,20 @@ public class UpdateRoleRequest { @JsonProperty("role") private Role role; - /** The list of fields to update. */ + /** + * 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 + * `DATABRICKS_SUPERUSER`. + */ @JsonIgnore @QueryParam("update_mask") private FieldMask updateMask; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/DownloadFileRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/DownloadFileRequest.java new file mode 100644 index 000000000..ebe23eb36 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/DownloadFileRequest.java @@ -0,0 +1,169 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.sandbox; + +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 DownloadFileRequest { + /** A single byte range, such as bytes=0-1023 or bytes=-1024. Equivalent to the Range header. */ + @JsonIgnore + @QueryParam("byte_range") + private String byteRange; + + /** + * Entity tags or *. A mismatch returns 412 Precondition Failed. Equivalent to the If-Match + * header. + */ + @JsonIgnore + @QueryParam("if_match") + private String ifMatch; + + /** + * An HTTP-date. Returns 304 if the file has not changed since this time. Ignored when + * If-None-Match is present. Equivalent to the If-Modified-Since header. + */ + @JsonIgnore + @QueryParam("if_modified_since") + private String ifModifiedSince; + + /** Entity tags or *. A match returns 304 Not Modified. Equivalent to the If-None-Match header. */ + @JsonIgnore + @QueryParam("if_none_match") + private String ifNoneMatch; + + /** + * A strong entity tag. A mismatch, weak entity tag, or HTTP-date causes a full download. + * Equivalent to the If-Range header. + */ + @JsonIgnore + @QueryParam("if_range") + private String ifRange; + + /** + * An HTTP-date. Returns 412 if the file has changed since this time. Ignored when If-Match is + * present. Equivalent to the If-Unmodified-Since header. + */ + @JsonIgnore + @QueryParam("if_unmodified_since") + private String ifUnmodifiedSince; + + /** The sandbox resource name, in the form sandboxes/{sandbox_id}. */ + @JsonIgnore private String parent; + + /** The absolute UTF-8 path of the file inside the sandbox. */ + @JsonIgnore + @QueryParam("path") + private String path; + + public DownloadFileRequest setByteRange(String byteRange) { + this.byteRange = byteRange; + return this; + } + + public String getByteRange() { + return byteRange; + } + + public DownloadFileRequest setIfMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + public String getIfMatch() { + return ifMatch; + } + + public DownloadFileRequest setIfModifiedSince(String ifModifiedSince) { + this.ifModifiedSince = ifModifiedSince; + return this; + } + + public String getIfModifiedSince() { + return ifModifiedSince; + } + + public DownloadFileRequest setIfNoneMatch(String ifNoneMatch) { + this.ifNoneMatch = ifNoneMatch; + return this; + } + + public String getIfNoneMatch() { + return ifNoneMatch; + } + + public DownloadFileRequest setIfRange(String ifRange) { + this.ifRange = ifRange; + return this; + } + + public String getIfRange() { + return ifRange; + } + + public DownloadFileRequest setIfUnmodifiedSince(String ifUnmodifiedSince) { + this.ifUnmodifiedSince = ifUnmodifiedSince; + return this; + } + + public String getIfUnmodifiedSince() { + return ifUnmodifiedSince; + } + + public DownloadFileRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + public DownloadFileRequest setPath(String path) { + this.path = path; + return this; + } + + public String getPath() { + return path; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DownloadFileRequest that = (DownloadFileRequest) o; + return Objects.equals(byteRange, that.byteRange) + && Objects.equals(ifMatch, that.ifMatch) + && Objects.equals(ifModifiedSince, that.ifModifiedSince) + && Objects.equals(ifNoneMatch, that.ifNoneMatch) + && Objects.equals(ifRange, that.ifRange) + && Objects.equals(ifUnmodifiedSince, that.ifUnmodifiedSince) + && Objects.equals(parent, that.parent) + && Objects.equals(path, that.path); + } + + @Override + public int hashCode() { + return Objects.hash( + byteRange, ifMatch, ifModifiedSince, ifNoneMatch, ifRange, ifUnmodifiedSince, parent, path); + } + + @Override + public String toString() { + return new ToStringer(DownloadFileRequest.class) + .add("byteRange", byteRange) + .add("ifMatch", ifMatch) + .add("ifModifiedSince", ifModifiedSince) + .add("ifNoneMatch", ifNoneMatch) + .add("ifRange", ifRange) + .add("ifUnmodifiedSince", ifUnmodifiedSince) + .add("parent", parent) + .add("path", path) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/DownloadFileResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/DownloadFileResponse.java new file mode 100644 index 000000000..c7f523596 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/DownloadFileResponse.java @@ -0,0 +1,142 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.sandbox; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.Header; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.util.Objects; + +@Generated +public class DownloadFileResponse { + /** The supported range unit: bytes. */ + @JsonIgnore + @Header("Accept-Ranges") + private String acceptRanges; + + /** The length of the response body in bytes. */ + @JsonIgnore + @Header("Content-Length") + private Long contentLength; + + /** The returned byte range and full file length, for a partial response. */ + @JsonIgnore + @Header("Content-Range") + private String contentRange; + + /** The media type of the response body: application/octet-stream. */ + @JsonIgnore + @Header("Content-Type") + private String contentType; + + /** */ + @JsonIgnore private InputStream contents; + + /** The entity tag used for conditional requests. */ + @JsonIgnore + @Header("etag") + private String etag; + + /** The modification time as an HTTP-date, when representable. */ + @JsonIgnore + @Header("Last-Modified") + private String lastModified; + + public DownloadFileResponse setAcceptRanges(String acceptRanges) { + this.acceptRanges = acceptRanges; + return this; + } + + public String getAcceptRanges() { + return acceptRanges; + } + + public DownloadFileResponse setContentLength(Long contentLength) { + this.contentLength = contentLength; + return this; + } + + public Long getContentLength() { + return contentLength; + } + + public DownloadFileResponse setContentRange(String contentRange) { + this.contentRange = contentRange; + return this; + } + + public String getContentRange() { + return contentRange; + } + + public DownloadFileResponse setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + public String getContentType() { + return contentType; + } + + public DownloadFileResponse setContents(InputStream contents) { + this.contents = contents; + return this; + } + + public InputStream getContents() { + return contents; + } + + public DownloadFileResponse setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + public DownloadFileResponse setLastModified(String lastModified) { + this.lastModified = lastModified; + return this; + } + + public String getLastModified() { + return lastModified; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DownloadFileResponse that = (DownloadFileResponse) o; + return Objects.equals(acceptRanges, that.acceptRanges) + && Objects.equals(contentLength, that.contentLength) + && Objects.equals(contentRange, that.contentRange) + && Objects.equals(contentType, that.contentType) + && Objects.equals(contents, that.contents) + && Objects.equals(etag, that.etag) + && Objects.equals(lastModified, that.lastModified); + } + + @Override + public int hashCode() { + return Objects.hash( + acceptRanges, contentLength, contentRange, contentType, contents, etag, lastModified); + } + + @Override + public String toString() { + return new ToStringer(DownloadFileResponse.class) + .add("acceptRanges", acceptRanges) + .add("contentLength", contentLength) + .add("contentRange", contentRange) + .add("contentType", contentType) + .add("contents", contents) + .add("etag", etag) + .add("lastModified", lastModified) + .toString(); + } +} 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 9353fa6e9..f5b989aea 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 @@ -54,6 +54,33 @@ public void deleteSandbox(DeleteSandboxRequest request) { impl.deleteSandbox(request); } + public DownloadFileResponse downloadFile(String parent, String path) { + return downloadFile(new DownloadFileRequest().setParent(parent).setPath(path)); + } + + /** + * Downloads a regular file from a sandbox as an application/octet-stream body. The sandbox starts + * automatically if it is stopped. Filesystem access uses the sandbox user's permissions and + * follows symbolic links. + * + *

A full download returns 200 OK. A satisfiable single byte range returns 206 Partial Content. + * Multiple byte ranges are unsupported and return 400. Invalid ranges are ignored; an + * unsatisfiable range returns 416 with Content-Range describing the file length. Range is ignored + * for empty files. + * + *

Conditional requests can return 304 Not Modified or 412 Precondition Failed. If-Range + * selects a partial response only when its strong entity tag matches; otherwise, the entire file + * is returned. HTTP-date validators in If-Range cause a full download. Reads are not snapshots: + * concurrent in-place writes can affect the returned bytes. HEAD is unsupported. + * + *

Range and conditional options may be supplied as query parameters or HTTP headers. A + * parameter and one header may both be supplied when their values match exactly. Conflicting + * values or repeated parameters return 400. + */ + public DownloadFileResponse downloadFile(DownloadFileRequest request) { + return impl.downloadFile(request); + } + /** * Runs a command in the sandbox and blocks until it exits, returning the captured stdout, stderr * and exit code in a single response. @@ -154,6 +181,23 @@ public Sandbox updateSandbox(UpdateSandboxRequest request) { return impl.updateSandbox(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. + * + *

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. + */ + public void uploadFile(UploadFileRequest request) { + impl.uploadFile(request); + } + public SandboxService impl() { return impl; } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxImpl.java index 050308919..c856e267a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxImpl.java @@ -87,6 +87,23 @@ public void deleteSandbox(DeleteSandboxRequest request) { } } + @Override + public DownloadFileResponse downloadFile(DownloadFileRequest request) { + String path = String.format("/api/2.0/sandbox-files/%s/content", request.getParent()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/octet-stream"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, DownloadFileResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public ExecuteCommandSyncResponse executeCommandSync(ExecuteCommandSyncRequest request) { String path = String.format("/api/2.0/sandbox-exec/%s/exec-sync", request.getName()); @@ -261,4 +278,21 @@ public Sandbox updateSandbox(UpdateSandboxRequest request) { throw new DatabricksException("IO error: " + e.getMessage(), e); } } + + @Override + public void uploadFile(UploadFileRequest request) { + String path = String.format("/api/2.0/sandbox-files/%s/content", request.getParent()); + try { + Request req = new Request("PUT", path, request.getContents()); + + ApiClient.setQuery(req, request); + req.withHeader("Content-Type", "application/octet-stream"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + apiClient.execute(req, Void.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/sandbox/SandboxService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java index ec103b8ad..3cc4d62e3 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 @@ -28,6 +28,27 @@ public interface SandboxService { /** Deletes a Sandbox. */ void deleteSandbox(DeleteSandboxRequest deleteSandboxRequest); + /** + * Downloads a regular file from a sandbox as an application/octet-stream body. The sandbox starts + * automatically if it is stopped. Filesystem access uses the sandbox user's permissions and + * follows symbolic links. + * + *

A full download returns 200 OK. A satisfiable single byte range returns 206 Partial Content. + * Multiple byte ranges are unsupported and return 400. Invalid ranges are ignored; an + * unsatisfiable range returns 416 with Content-Range describing the file length. Range is ignored + * for empty files. + * + *

Conditional requests can return 304 Not Modified or 412 Precondition Failed. If-Range + * selects a partial response only when its strong entity tag matches; otherwise, the entire file + * is returned. HTTP-date validators in If-Range cause a full download. Reads are not snapshots: + * concurrent in-place writes can affect the returned bytes. HEAD is unsupported. + * + *

Range and conditional options may be supplied as query parameters or HTTP headers. A + * parameter and one header may both be supplied when their values match exactly. Conflicting + * values or repeated parameters return 400. + */ + DownloadFileResponse downloadFile(DownloadFileRequest downloadFileRequest); + /** * Runs a command in the sandbox and blocks until it exits, returning the captured stdout, stderr * and exit code in a single response. @@ -72,4 +93,19 @@ ListDirectoryContentsResponse listDirectoryContents( * or unknown paths; NOT_FOUND if the sandbox does not exist. */ Sandbox updateSandbox(UpdateSandboxRequest updateSandboxRequest); + + /** + * 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. + * + *

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. + */ + void uploadFile(UploadFileRequest uploadFileRequest); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/UploadFileRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/UploadFileRequest.java new file mode 100644 index 000000000..85faac215 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/UploadFileRequest.java @@ -0,0 +1,75 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.sandbox; + +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.io.InputStream; +import java.util.Objects; + +@Generated +public class UploadFileRequest { + /** The complete file contents. An empty body creates an empty file. */ + @JsonIgnore private InputStream contents; + + /** The sandbox resource name, in the form sandboxes/{sandbox_id}. */ + @JsonIgnore private String parent; + + /** The absolute UTF-8 destination path inside the sandbox. */ + @JsonIgnore + @QueryParam("path") + private String path; + + public UploadFileRequest setContents(InputStream contents) { + this.contents = contents; + return this; + } + + public InputStream getContents() { + return contents; + } + + public UploadFileRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + public UploadFileRequest setPath(String path) { + this.path = path; + return this; + } + + public String getPath() { + return path; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UploadFileRequest that = (UploadFileRequest) o; + return Objects.equals(contents, that.contents) + && Objects.equals(parent, that.parent) + && Objects.equals(path, that.path); + } + + @Override + public int hashCode() { + return Objects.hash(contents, parent, path); + } + + @Override + public String toString() { + return new ToStringer(UploadFileRequest.class) + .add("contents", contents) + .add("parent", parent) + .add("path", path) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityAPI.java index cf8d0d1ed..3700cee4b 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityAPI.java @@ -167,6 +167,12 @@ public Iterable listPrivateEndpointRules( }); } + /** Updates the name or billing workspace for a network connectivity configuration. */ + public NetworkConnectivityConfiguration updateNetworkConnectivityConfig( + UpdateNetworkConnectivityConfigRequest request) { + return impl.updateNetworkConnectivityConfig(request); + } + /** * Updates a private endpoint rule. Currently only a private endpoint rule to customer-managed * resources is allowed to be updated. diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityConfiguration.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityConfiguration.java index 316184e01..86204ff02 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityConfiguration.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityConfiguration.java @@ -16,6 +16,13 @@ public class NetworkConnectivityConfiguration { @JsonProperty("account_id") private String accountId; + /** + * The workspace to which charges for this network connectivity configuration are attributed. The + * workspace must be active and attached to this network connectivity configuration when set. + */ + @JsonProperty("billing_workspace_id") + private Long billingWorkspaceId; + /** Time in epoch milliseconds when this object was created. */ @JsonProperty("creation_time") private Long creationTime; @@ -59,6 +66,15 @@ public String getAccountId() { return accountId; } + public NetworkConnectivityConfiguration setBillingWorkspaceId(Long billingWorkspaceId) { + this.billingWorkspaceId = billingWorkspaceId; + return this; + } + + public Long getBillingWorkspaceId() { + return billingWorkspaceId; + } + public NetworkConnectivityConfiguration setCreationTime(Long creationTime) { this.creationTime = creationTime; return this; @@ -120,6 +136,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; NetworkConnectivityConfiguration that = (NetworkConnectivityConfiguration) o; return Objects.equals(accountId, that.accountId) + && Objects.equals(billingWorkspaceId, that.billingWorkspaceId) && Objects.equals(creationTime, that.creationTime) && Objects.equals(egressConfig, that.egressConfig) && Objects.equals(name, that.name) @@ -132,6 +149,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( accountId, + billingWorkspaceId, creationTime, egressConfig, name, @@ -144,6 +162,7 @@ public int hashCode() { public String toString() { return new ToStringer(NetworkConnectivityConfiguration.class) .add("accountId", accountId) + .add("billingWorkspaceId", billingWorkspaceId) .add("creationTime", creationTime) .add("egressConfig", egressConfig) .add("name", name) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityImpl.java index 581678f50..e3053c15e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityImpl.java @@ -165,6 +165,26 @@ public ListPrivateEndpointRulesResponse listPrivateEndpointRules( } } + @Override + public NetworkConnectivityConfiguration updateNetworkConnectivityConfig( + UpdateNetworkConnectivityConfigRequest request) { + String path = + String.format( + "/api/2.0/accounts/%s/network-connectivity-configs/%s", + apiClient.configuredAccountID(), request.getNetworkConnectivityConfigId()); + try { + Request req = + new Request("PATCH", path, apiClient.serialize(request.getNetworkConnectivityConfig())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + return apiClient.execute(req, NetworkConnectivityConfiguration.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public NccPrivateEndpointRule updatePrivateEndpointRule( UpdateNccPrivateEndpointRuleRequest request) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityService.java index 30e491376..23ddb0520 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NetworkConnectivityService.java @@ -82,6 +82,10 @@ ListNetworkConnectivityConfigurationsResponse listNetworkConnectivityConfigurati ListPrivateEndpointRulesResponse listPrivateEndpointRules( ListPrivateEndpointRulesRequest listPrivateEndpointRulesRequest); + /** Updates the name or billing workspace for a network connectivity configuration. */ + NetworkConnectivityConfiguration updateNetworkConnectivityConfig( + UpdateNetworkConnectivityConfigRequest updateNetworkConnectivityConfigRequest); + /** * Updates a private endpoint rule. Currently only a private endpoint rule to customer-managed * resources is allowed to be updated. diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateNetworkConnectivityConfigRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateNetworkConnectivityConfigRequest.java new file mode 100644 index 000000000..e58c156ec --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateNetworkConnectivityConfigRequest.java @@ -0,0 +1,79 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settings; + +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 UpdateNetworkConnectivityConfigRequest { + /** The network connectivity configuration fields to update. */ + @JsonProperty("network_connectivity_config") + private NetworkConnectivityConfiguration networkConnectivityConfig; + + /** Your Network Connectivity Configuration ID. */ + @JsonIgnore private String networkConnectivityConfigId; + + /** Must contain at least one of `name` or `billing_workspace_id`. */ + @JsonIgnore + @QueryParam("update_mask") + private FieldMask updateMask; + + public UpdateNetworkConnectivityConfigRequest setNetworkConnectivityConfig( + NetworkConnectivityConfiguration networkConnectivityConfig) { + this.networkConnectivityConfig = networkConnectivityConfig; + return this; + } + + public NetworkConnectivityConfiguration getNetworkConnectivityConfig() { + return networkConnectivityConfig; + } + + public UpdateNetworkConnectivityConfigRequest setNetworkConnectivityConfigId( + String networkConnectivityConfigId) { + this.networkConnectivityConfigId = networkConnectivityConfigId; + return this; + } + + public String getNetworkConnectivityConfigId() { + return networkConnectivityConfigId; + } + + public UpdateNetworkConnectivityConfigRequest 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; + UpdateNetworkConnectivityConfigRequest that = (UpdateNetworkConnectivityConfigRequest) o; + return Objects.equals(networkConnectivityConfig, that.networkConnectivityConfig) + && Objects.equals(networkConnectivityConfigId, that.networkConnectivityConfigId) + && Objects.equals(updateMask, that.updateMask); + } + + @Override + public int hashCode() { + return Objects.hash(networkConnectivityConfig, networkConnectivityConfigId, updateMask); + } + + @Override + public String toString() { + return new ToStringer(UpdateNetworkConnectivityConfigRequest.class) + .add("networkConnectivityConfig", networkConnectivityConfig) + .add("networkConnectivityConfigId", networkConnectivityConfigId) + .add("updateMask", updateMask) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/CreateWarehouseRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/CreateWarehouseRequest.java index 1efe31e01..384bdccb1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/CreateWarehouseRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/CreateWarehouseRequest.java @@ -61,8 +61,9 @@ public class CreateWarehouseRequest { private String instanceProfileArn; /** - * Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be a multiple of 3 - * between 3 and 960. The effective maximum cannot be lower than the warehouse's minimum capacity. + * Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be at least the + * minimum DBU for the selected warehouse size and no greater than the configured DBU limit. + * Actual capacity may be below this ceiling. */ @JsonProperty("max_dbu") private Long maxDbu; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/EditWarehouseRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/EditWarehouseRequest.java index aa6e43ef7..857f245f1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/EditWarehouseRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/EditWarehouseRequest.java @@ -69,8 +69,9 @@ public class EditWarehouseRequest { private String instanceProfileArn; /** - * Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be a multiple of 3 - * between 3 and 960. The effective maximum cannot be lower than the warehouse's minimum capacity. + * Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be at least the + * minimum DBU for the selected warehouse size and no greater than the configured DBU limit. + * Actual capacity may be below this ceiling. */ @JsonProperty("max_dbu") private Long maxDbu; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/EndpointInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/EndpointInfo.java index ded928a07..a9f62b4f6 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/EndpointInfo.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/EndpointInfo.java @@ -72,8 +72,9 @@ public class EndpointInfo { private String jdbcUrl; /** - * Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be a multiple of 3 - * between 3 and 960. The effective maximum cannot be lower than the warehouse's minimum capacity. + * Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be at least the + * minimum DBU for the selected warehouse size and no greater than the configured DBU limit. + * Actual capacity may be below this ceiling. */ @JsonProperty("max_dbu") private Long maxDbu; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/GetWarehouseResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/GetWarehouseResponse.java index de7b5938c..861bbfb93 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/GetWarehouseResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/GetWarehouseResponse.java @@ -72,8 +72,9 @@ public class GetWarehouseResponse { private String jdbcUrl; /** - * Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be a multiple of 3 - * between 3 and 960. The effective maximum cannot be lower than the warehouse's minimum capacity. + * Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be at least the + * minimum DBU for the selected warehouse size and no greater than the configured DBU limit. + * Actual capacity may be below this ceiling. */ @JsonProperty("max_dbu") private Long maxDbu; diff --git a/examples/docs/pom.xml b/examples/docs/pom.xml index 22fc161aa..cd765e8ce 100644 --- a/examples/docs/pom.xml +++ b/examples/docs/pom.xml @@ -24,7 +24,7 @@ com.databricks databricks-sdk-java - 0.172.0 + 0.173.0 diff --git a/examples/spring-boot-oauth-u2m-demo/pom.xml b/examples/spring-boot-oauth-u2m-demo/pom.xml index 528e73291..c43f71a50 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.172.0 + 0.173.0 diff --git a/lockfile.json b/lockfile.json index 4900bf229..59cffdf39 100644 --- a/lockfile.json +++ b/lockfile.json @@ -1,7 +1,7 @@ { "artifactId": "databricks-sdk-parent", "groupId": "com.databricks", - "version": "0.172.0", + "version": "0.173.0", "lockFileVersion": 1, "dependencies": [], "mavenPlugins": [], diff --git a/pom.xml b/pom.xml index a1e37b04a..888446392 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.databricks databricks-sdk-parent - 0.172.0 + 0.173.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 f7ee5d059..0dc625217 100644 --- a/shaded/pom.xml +++ b/shaded/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - 0.172.0 + 0.173.0 com.databricks