From 25b84a811ec6da019bddfdef08a02ea132b5a715 Mon Sep 17 00:00:00 2001 From: "databricks-ci-ghec-2[bot]" <184307802+databricks-ci-ghec-2[bot]@users.noreply.github.com> Date: Fri, 28 Aug 2026 03:41:10 +0000 Subject: [PATCH] Update SDK to 07160623ece27c15e0692c1f0db24410dd0fcbdb --- .codegen/_openapi_sha | 2 +- .gitattributes | 46 ++++- NEXT_CHANGELOG.md | 33 ++++ .../databricks/sdk/service/apps/Space.java | 22 ++- .../BundleDeploymentsAPI.java | 5 + .../BundleDeploymentsImpl.java | 18 ++ .../BundleDeploymentsService.java | 3 + .../CreateDeploymentRequest.java | 5 +- .../bundledeployments/DashboardMetadata.java | 2 +- .../service/bundledeployments/Deployment.java | 17 +- .../DeploymentResourceType.java | 9 + .../bundledeployments/OperationStatus.java | 1 + .../bundledeployments/StagedOperation.java | 68 +++++++ .../UpdateDeploymentRequest.java | 83 +++++++++ .../service/bundledeployments/Version.java | 21 +++ .../sdk/service/catalog/ColumnMask.java | 6 +- .../catalog/ColumnTagValueExtraction.java | 59 ++++++ .../catalog/FunctionArgExpression.java | 48 +++++ .../sdk/service/catalog/FunctionArgument.java | 23 ++- .../sdk/service/catalog/TableRowFilter.java | 6 +- .../catalog/TagIntrospectionExpression.java | 60 +++++++ .../service/catalog/TagValueExtraction.java | 43 +++++ .../service/compute/ClusterAttributes.java | 4 +- .../sdk/service/compute/ClusterDetails.java | 4 +- .../sdk/service/compute/ClusterSpec.java | 4 +- .../sdk/service/compute/CreateCluster.java | 4 +- .../sdk/service/compute/EditCluster.java | 4 +- ...anceForClusterResponseClusterSettings.java | 4 +- .../compute/HardwareAcceleratorType.java | 3 + .../service/compute/NodeTypeFlexibility.java | 22 ++- .../compute/UpdateClusterResource.java | 4 +- .../sdk/service/dashboards/GenieAPI.java | 9 + .../GenieCancelResponseRequest.java | 72 ++++++++ .../sdk/service/dashboards/GenieImpl.java | 21 +++ .../sdk/service/dashboards/GenieService.java | 7 + .../sdk/service/dashboards/LakeviewAPI.java | 55 +++++- .../dashboards/LakeviewEmbeddedAPI.java | 3 + .../dashboards/LakeviewEmbeddedService.java | 3 + .../service/dashboards/LakeviewService.java | 55 +++++- .../sdk/service/iamv2/AccountIamV2API.java | 47 ++++- .../sdk/service/iamv2/AccountIamV2Impl.java | 43 +++++ .../service/iamv2/AccountIamV2Service.java | 29 ++- .../sdk/service/iamv2/ExternalGroup.java | 113 ++++++++++++ .../iamv2/ExternalServicePrincipal.java | 152 ++++++++++++++++ .../sdk/service/iamv2/ExternalUser.java | 168 ++++++++++++++++++ .../sdk/service/iamv2/FullName.java | 59 ++++++ .../iamv2/GetExternalGroupProxyRequest.java | 43 +++++ .../iamv2/GetExternalGroupRequest.java | 44 +++++ ...tExternalServicePrincipalProxyRequest.java | 46 +++++ .../GetExternalServicePrincipalRequest.java | 44 +++++ .../iamv2/GetExternalUserProxyRequest.java | 41 +++++ .../service/iamv2/GetExternalUserRequest.java | 44 +++++ .../ListDirectGroupMembersProxyRequest.java | 3 +- .../iamv2/ListDirectGroupMembersRequest.java | 3 +- .../service/iamv2/ListGroupsProxyRequest.java | 6 +- .../sdk/service/iamv2/ListGroupsRequest.java | 6 +- .../ListServicePrincipalsProxyRequest.java | 6 +- .../iamv2/ListServicePrincipalsRequest.java | 3 +- ...istTransitiveParentGroupsProxyRequest.java | 3 +- .../ListTransitiveParentGroupsRequest.java | 3 +- .../service/iamv2/ListUsersProxyRequest.java | 6 +- .../sdk/service/iamv2/ListUsersRequest.java | 6 +- ...orkspaceAssignmentDetailsProxyRequest.java | 3 +- ...ListWorkspaceAssignmentDetailsRequest.java | 3 +- .../ListWorkspaceAssignmentsProxyRequest.java | 3 +- .../ListWorkspaceAssignmentsRequest.java | 3 +- .../sdk/service/iamv2/WorkspaceIamV2API.java | 51 +++++- .../sdk/service/iamv2/WorkspaceIamV2Impl.java | 52 ++++++ .../service/iamv2/WorkspaceIamV2Service.java | 32 +++- .../sdk/service/jobs/AlertTask.java | 25 ++- .../sdk/service/jobs/Continuous.java | 22 ++- .../jobs/ContinuousTriggerConfiguration.java | 22 ++- .../sdk/service/jobs/CreateJob.java | 3 + .../sdk/service/jobs/DayOfWeek.java | 17 ++ .../sdk/service/jobs/JobSettings.java | 3 + .../sdk/service/jobs/MaintenanceWindow.java | 87 +++++++++ .../service/jobs/TriggerConfiguration.java | 7 +- .../sdk/service/ml/ColumnIdentifier.java | 49 ----- .../sdk/service/ml/ColumnSelection.java | 3 +- .../sdk/service/ml/ContinuousWindow.java | 60 ------- .../databricks/sdk/service/ml/DataSource.java | 20 ++- .../sdk/service/ml/DeltaTableSource.java | 45 +---- .../databricks/sdk/service/ml/Feature.java | 58 ------ .../databricks/sdk/service/ml/Function.java | 42 +---- .../service/ml/FunctionExtraParameter.java | 63 ------- .../sdk/service/ml/FunctionFunctionType.java | 26 --- .../sdk/service/ml/KafkaSource.java | 43 +---- .../sdk/service/ml/MaterializedFeature.java | 22 +-- .../sdk/service/ml/RollingWindow.java | 6 +- .../sdk/service/ml/SlidingWindow.java | 44 ++++- .../sdk/service/ml/SourceLateness.java | 49 +++++ .../databricks/sdk/service/ml/TimeWindow.java | 43 +++-- .../sdk/service/ml/TumblingWindow.java | 47 ++++- .../pipelines/ClonePipelineRequest.java | 8 +- .../service/pipelines/ConnectorOptions.java | 16 ++ .../sdk/service/pipelines/CreatePipeline.java | 8 +- .../sdk/service/pipelines/EditPipeline.java | 8 +- .../pipelines/IngestionSourceType.java | 1 + .../service/pipelines/PipelineCluster.java | 7 +- .../sdk/service/pipelines/PipelineSpec.java | 8 +- .../service/pipelines/RabbitmqOptions.java | 47 +++++ .../sdk/service/pipelines/SchemaSpec.java | 8 +- .../sdk/service/pipelines/TableSpec.java | 8 +- .../sdk/service/postgres/BranchSpec.java | 29 ++- .../sdk/service/postgres/BranchStatus.java | 19 ++ .../postgres/CreateSnapshotOperation.java | 162 +++++++++++++++++ .../postgres/CreateSnapshotRequest.java | 79 ++++++++ .../sdk/service/postgres/DailySchedule.java | 43 +++++ .../sdk/service/postgres/DayOfWeek.java | 17 ++ .../postgres/DeleteSnapshotOperation.java | 162 +++++++++++++++++ .../postgres/DeleteSnapshotRequest.java | 44 +++++ .../service/postgres/GetSnapshotRequest.java | 44 +++++ .../postgres/GetSnapshotScheduleRequest.java | 44 +++++ .../postgres/ListSnapshotsRequest.java | 76 ++++++++ .../postgres/ListSnapshotsResponse.java | 60 +++++++ .../sdk/service/postgres/MonthlySchedule.java | 60 +++++++ .../sdk/service/postgres/PostgresAPI.java | 66 +++++++ .../sdk/service/postgres/PostgresImpl.java | 104 +++++++++++ .../sdk/service/postgres/PostgresService.java | 24 +++ .../sdk/service/postgres/ScheduleCadence.java | 95 ++++++++++ .../sdk/service/postgres/Snapshot.java | 124 +++++++++++++ .../postgres/SnapshotOperationMetadata.java | 29 +++ .../service/postgres/SnapshotSchedule.java | 72 ++++++++ .../SnapshotScheduleOperationMetadata.java | 29 +++ .../sdk/service/postgres/SnapshotSpec.java | 127 +++++++++++++ .../sdk/service/postgres/SnapshotStatus.java | 112 ++++++++++++ .../UpdateSnapshotScheduleOperation.java | 162 +++++++++++++++++ .../UpdateSnapshotScheduleRequest.java | 86 +++++++++ .../sdk/service/postgres/WeeklySchedule.java | 59 ++++++ .../service/sql/AlertStatementParameter.java | 22 +-- .../databricks/sdk/service/sql/AlertV2.java | 18 +- .../sdk/service/sql/UpdateAlertV2Request.java | 2 +- 132 files changed, 4243 insertions(+), 575 deletions(-) create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/StagedOperation.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateDeploymentRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnTagValueExtraction.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgExpression.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagIntrospectionExpression.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagValueExtraction.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieCancelResponseRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DayOfWeek.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/MaintenanceWindow.java delete mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnIdentifier.java delete mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ContinuousWindow.java delete mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionExtraParameter.java delete mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionFunctionType.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SourceLateness.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/RabbitmqOptions.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotOperation.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DailySchedule.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DayOfWeek.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotOperation.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotScheduleRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsResponse.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MonthlySchedule.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ScheduleCadence.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Snapshot.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotOperationMetadata.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSchedule.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotScheduleOperationMetadata.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSpec.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotStatus.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleOperation.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleRequest.java create mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/WeeklySchedule.java diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index e1ef04f4f..d1aca684e 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -b73946692eb938a39aa3c6a863873f99eadde611 \ No newline at end of file +07160623ece27c15e0692c1f0db24410dd0fcbdb \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 32e5aa8e8..abfdc4a66 100644 --- a/.gitattributes +++ b/.gitattributes @@ -309,6 +309,8 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/O databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/OperationActionType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/OperationStatus.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Resource.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/StagedOperation.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateDeploymentRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateOperationRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Version.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/VersionComplete.java linguist-generated=true @@ -380,6 +382,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnInfo. databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnMask.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnMaskOptions.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnRelationship.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnTagValueExtraction.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnTypeName.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionDependency.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ConnectionInfo.java linguist-generated=true @@ -510,6 +513,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ExternalMet databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FailedStatus.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FileEventQueue.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ForeignKeyConstraint.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgExpression.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgument.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionDependency.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionInfo.java linguist-generated=true @@ -800,7 +804,9 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesAPI.j databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TablesService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagAssignmentSourceType.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagIntrospectionExpression.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagKeyValue.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagValueExtraction.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TemporaryCredentials.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TemporaryPathCredentialsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TemporaryPathCredentialsImpl.java linguist-generated=true @@ -1187,6 +1193,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/Download databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/EvaluationStatusType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAttachment.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieCancelResponseRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieConversation.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieConversationSummary.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieConversationType.java linguist-generated=true @@ -1656,8 +1663,18 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspa databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DeleteWorkspaceAssignmentRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/DirectGroupMember.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/Entitlement.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberProxyRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetDirectGroupMemberRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupProxyRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetGroupRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetServicePrincipalProxyRequest.java linguist-generated=true @@ -1766,6 +1783,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CronTriggerCon databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DashboardPageSnapshot.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DashboardTask.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DashboardTaskOutput.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DayOfWeek.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DbtCloudJobRunStep.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DbtCloudTask.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DbtCloudTaskOutput.java linguist-generated=true @@ -1837,6 +1855,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ListJobsReques databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ListJobsResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ListRunsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ListRunsResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/MaintenanceWindow.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ModelTriggerConfiguration.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ModelTriggerConfigurationCondition.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ModelTriggerState.java linguist-generated=true @@ -2165,11 +2184,9 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/AvgFunction.java databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BackfillSource.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BatchCreateMaterializedFeaturesRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/BatchCreateMaterializedFeaturesResponse.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnIdentifier.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnSelection.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CommentActivityAction.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CommentObject.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ContinuousWindow.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CountFunction.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CreateComment.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/CreateCommentResponse.java linguist-generated=true @@ -2266,8 +2283,6 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ForecastingExper databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ForecastingImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ForecastingService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Function.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionExtraParameter.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionFunctionType.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/GetByNameRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/GetExperimentByNameResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/GetExperimentPermissionLevelsRequest.java linguist-generated=true @@ -2439,6 +2454,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SetModelTagReque databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SetModelVersionTagRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SetTag.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SlidingWindow.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SourceLateness.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Status.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/StddevPopFunction.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/StddevSampFunction.java linguist-generated=true @@ -2661,6 +2677,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/Pipelines databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PostgresCatalogConfig.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PostgresSlotConfig.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PublishingMode.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/RabbitmqOptions.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/RedditAdsOptions.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/RedditAdsOptionsRedditAdsCustomReportOptions.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ReplaceWhereOverride.java linguist-generated=true @@ -2729,8 +2746,11 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateProj databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateProjectRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateRoleOperation.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateRoleRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotOperation.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSyncedTableOperation.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSyncedTableRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DailySchedule.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DataApi.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DataApiDataApiSpec.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DataApiDataApiStatus.java linguist-generated=true @@ -2741,6 +2761,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseDa databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseDatabaseStatus.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabaseOperationMetadata.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DatabricksServiceExceptionWithDetailsProto.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DayOfWeek.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteBranchOperation.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteBranchRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteCatalogOperation.java linguist-generated=true @@ -2757,6 +2778,8 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteProj databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteProjectRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteRoleOperation.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteRoleRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotOperation.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSyncedTableOperation.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSyncedTableRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeltaTableSyncInfo.java linguist-generated=true @@ -2782,6 +2805,8 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetEndpoin databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetOperationRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetProjectRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetRoleRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotScheduleRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSyncedTableRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/InitialBranchSpec.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/InitialEndpointSpec.java linguist-generated=true @@ -2799,6 +2824,9 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListProjec databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListProjectsResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListRolesRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListRolesResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MonthlySchedule.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/NewPipelineSpec.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/NewPipelineSpecPipelineChannel.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/OpenApiMode.java linguist-generated=true @@ -2825,6 +2853,13 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/RoleMember databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/RoleOperationMetadata.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/RoleRoleSpec.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/RoleRoleStatus.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ScheduleCadence.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Snapshot.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotOperationMetadata.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSchedule.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotScheduleOperationMetadata.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSpec.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotStatus.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SyncedTable.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SyncedTableOperationMetadata.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SyncedTablePipelineProgress.java linguist-generated=true @@ -2853,6 +2888,9 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateProj databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateProjectRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateRoleOperation.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateRoleRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleOperation.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/WeeklySchedule.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/AwsCredentials.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/AwsKeyInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/AzureKeyInfo.java linguist-generated=true diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 6328d4f6d..bf62813f8 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -15,3 +15,36 @@ ### Internal Changes ### API Changes +* Add `updateDeployment()` method for `workspaceClient.bundleDeployments()` service. +* Add `genieCancelResponse()` method for `workspaceClient.genie()` service. +* Add `getExternalGroup()`, `getExternalServicePrincipal()` and `getExternalUser()` methods for `accountClient.accountIamV2()` service. +* Add `getExternalGroupProxy()`, `getExternalServicePrincipalProxy()` and `getExternalUserProxy()` methods for `workspaceClient.workspaceIamV2()` service. +* Add `createSnapshot()`, `deleteSnapshot()`, `getSnapshot()`, `getSnapshotSchedule()`, `listSnapshots()` and `updateSnapshotSchedule()` methods for `workspaceClient.postgres()` service. +* Add `assumeGroupId` field for `com.databricks.sdk.service.apps.Space`. +* Add `operations` field for `com.databricks.sdk.service.bundledeployments.Version`. +* Add `functionArgExpression` field for `com.databricks.sdk.service.catalog.FunctionArgument`. +* Add `awsContextId` field for `com.databricks.sdk.service.compute.NodeTypeFlexibility`. +* Add `parameters` field for `com.databricks.sdk.service.jobs.AlertTask`. +* Add `maintenanceWindow` field for `com.databricks.sdk.service.jobs.Continuous`. +* Add `maintenanceWindow` field for `com.databricks.sdk.service.jobs.ContinuousTriggerConfiguration`. +* Add `lateness` field for `com.databricks.sdk.service.ml.DataSource`. +* Add `delay` and `offset` fields for `com.databricks.sdk.service.ml.SlidingWindow`. +* Add `startTime` field for `com.databricks.sdk.service.ml.TimeWindow`. +* Add `delay` and `offset` fields for `com.databricks.sdk.service.ml.TumblingWindow`. +* Add `rabbitmqOptions` field for `com.databricks.sdk.service.pipelines.ConnectorOptions`. +* Add `sourceSnapshot` field for `com.databricks.sdk.service.postgres.BranchSpec`. +* Add `sourceSnapshot` field for `com.databricks.sdk.service.postgres.BranchStatus`. +* Add `DEPLOYMENT_RESOURCE_TYPE_VECTOR_SEARCH_ENDPOINT`, `DEPLOYMENT_RESOURCE_TYPE_VECTOR_SEARCH_INDEX`, `DEPLOYMENT_RESOURCE_TYPE_JOB_RUN`, `DEPLOYMENT_RESOURCE_TYPE_POSTGRES_CATALOG`, `DEPLOYMENT_RESOURCE_TYPE_POSTGRES_SYNCED_TABLE`, `DEPLOYMENT_RESOURCE_TYPE_GENIE_SPACE`, `DEPLOYMENT_RESOURCE_TYPE_INSTANCE_POOL`, `DEPLOYMENT_RESOURCE_TYPE_POSTGRES_DATABASE` and `DEPLOYMENT_RESOURCE_TYPE_POSTGRES_ROLE` enum values for `com.databricks.sdk.service.bundledeployments.DeploymentResourceType`. +* Add `OPERATION_STATUS_PENDING` enum value for `com.databricks.sdk.service.bundledeployments.OperationStatus`. +* Add `GPU_1X_H100` enum value for `com.databricks.sdk.service.compute.HardwareAcceleratorType`. +* Add `RABBITMQ` enum value for `com.databricks.sdk.service.pipelines.IngestionSourceType`. +* Change `sourceSchema` field for `com.databricks.sdk.service.pipelines.SchemaSpec` to no longer be required. +* [Breaking] Change `sourceSchema` field for `com.databricks.sdk.service.pipelines.SchemaSpec` to no longer be required. +* Change `sourceTable` field for `com.databricks.sdk.service.pipelines.TableSpec` to no longer be required. +* [Breaking] Change `sourceTable` field for `com.databricks.sdk.service.pipelines.TableSpec` to no longer be required. +* [Breaking] Remove `entityColumns` and `timeseriesColumn` fields for `com.databricks.sdk.service.ml.DeltaTableSource`. +* [Breaking] Remove `filterCondition`, `inputs` and `timeWindow` fields for `com.databricks.sdk.service.ml.Feature`. +* [Breaking] Remove `extraParameters` and `functionType` fields for `com.databricks.sdk.service.ml.Function`. +* [Breaking] Remove `entityColumnIdentifiers` and `timeseriesColumnIdentifier` fields for `com.databricks.sdk.service.ml.KafkaSource`. +* [Breaking] Remove `cronSchedule` field for `com.databricks.sdk.service.ml.MaterializedFeature`. +* [Breaking] Remove `continuous` field for `com.databricks.sdk.service.ml.TimeWindow`. \ No newline at end of file diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/Space.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/Space.java index 4f53e29dc..601807ebb 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/Space.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/Space.java @@ -11,6 +11,14 @@ @Generated public class Space { + /** + * The group whose permissions users assume via Role Authorization for apps in this space. When + * set, user tokens assume the role of this group instead of doing regular obo token downscoping. + * Set only at space creation. + */ + @JsonProperty("assume_group_id") + private String assumeGroupId; + /** The creation time of the app space. Formatted timestamp in ISO 6801. */ @JsonProperty("create_time") private Timestamp createTime; @@ -81,6 +89,15 @@ public class Space { @JsonProperty("user_api_scopes") private Collection userApiScopes; + public Space setAssumeGroupId(String assumeGroupId) { + this.assumeGroupId = assumeGroupId; + return this; + } + + public String getAssumeGroupId() { + return assumeGroupId; + } + public Space setCreateTime(Timestamp createTime) { this.createTime = createTime; return this; @@ -230,7 +247,8 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Space that = (Space) o; - return Objects.equals(createTime, that.createTime) + return Objects.equals(assumeGroupId, that.assumeGroupId) + && Objects.equals(createTime, that.createTime) && Objects.equals(creator, that.creator) && Objects.equals(description, that.description) && Objects.equals(effectiveUsagePolicyId, that.effectiveUsagePolicyId) @@ -251,6 +269,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + assumeGroupId, createTime, creator, description, @@ -272,6 +291,7 @@ public int hashCode() { @Override public String toString() { return new ToStringer(Space.class) + .add("assumeGroupId", assumeGroupId) .add("createTime", createTime) .add("creator", creator) .add("description", description) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsAPI.java index 243022ba3..85a8d55b2 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsAPI.java @@ -190,6 +190,11 @@ public Iterable listVersions(ListVersionsRequest request) { }); } + /** Updates a deployment. */ + public Deployment updateDeployment(UpdateDeploymentRequest request) { + return impl.updateDeployment(request); + } + /** * Updates a resource operation's mutable fields. * diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsImpl.java index b3531a66c..943f37624 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsImpl.java @@ -241,6 +241,24 @@ public ListVersionsResponse listVersions(ListVersionsRequest request) { } } + @Override + public Deployment updateDeployment(UpdateDeploymentRequest request) { + String path = String.format("/api/2.0/bundle/%s", request.getName()); + try { + Request req = new Request("PATCH", path, apiClient.serialize(request.getDeployment())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Deployment.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation updateOperation(UpdateOperationRequest request) { String path = String.format("/api/2.0/bundle/%s", request.getName()); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java index 9daaf27a1..d9bbe87b5 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java @@ -80,6 +80,9 @@ public interface BundleDeploymentsService { */ ListVersionsResponse listVersions(ListVersionsRequest listVersionsRequest); + /** Updates a deployment. */ + Deployment updateDeployment(UpdateDeploymentRequest updateDeploymentRequest); + /** * Updates a resource operation's mutable fields. * diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateDeploymentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateDeploymentRequest.java index 0fa885063..196965c03 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateDeploymentRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateDeploymentRequest.java @@ -10,8 +10,9 @@ @Generated public class CreateDeploymentRequest { /** - * The deployment to create. The caller must set `initial_parent_path`. Other fields are ignored - * on input and populated by the service. + * The deployment to create. `initial_parent_path` is required. `display_name`, `target_name`, + * `deployment_mode`, and `workspace_info` may be set; every other field is assigned by the + * service and ignored on input. */ @JsonProperty("deployment") private Deployment deployment; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DashboardMetadata.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DashboardMetadata.java index 42e6b1c67..2d99e2ab1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DashboardMetadata.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DashboardMetadata.java @@ -12,7 +12,7 @@ public class DashboardMetadata { /** * Path of the file that declares this dashboard, relative to the bundle's workspace.file_path - * (Version.workspace_info.file_path) — join the two to get the file's absolute workspace path. + * (Deployment.workspace_info.file_path) — join the two to get the file's absolute workspace path. * *

For now this lives only on the dashboard metadata, and is a single string because it was a * single string (`relative_path`) in the legacy bundle metadata.json. We may generalize it in the diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Deployment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Deployment.java index 4a7ea6d48..b1f76a9f9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Deployment.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Deployment.java @@ -22,10 +22,7 @@ public class Deployment { @JsonProperty("created_by") private String createdBy; - /** - * Bundle target deployment mode (development or production), derived from the most recent - * version's mode. - */ + /** Bundle target deployment mode (development or production). */ @JsonProperty("deployment_mode") private DeploymentMode deploymentMode; @@ -43,10 +40,7 @@ public class Deployment { @JsonProperty("destroyed_by") private String destroyedBy; - /** - * Human-readable name for the deployment, up to 256 characters. Output only: clients update it by - * setting `display_name` when creating a version. - */ + /** Human-readable name for the deployment, up to 256 characters. */ @JsonProperty("display_name") private String displayName; @@ -86,10 +80,7 @@ public class Deployment { @JsonProperty("status") private DeploymentStatus status; - /** - * The bundle target name associated with this deployment. Output only: it is denormalized from - * the latest version, not set directly on the deployment. - */ + /** The bundle target name associated with this deployment. */ @JsonProperty("target_name") private String targetName; @@ -105,7 +96,7 @@ public class Deployment { @JsonProperty("updated_by") private String updatedBy; - /** Workspace location of the deployment, derived from the latest version. */ + /** Workspace location of the deployment. */ @JsonProperty("workspace_info") private WorkspaceInfo workspaceInfo; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DeploymentResourceType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DeploymentResourceType.java index 42c13ed0f..067e98000 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DeploymentResourceType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DeploymentResourceType.java @@ -16,18 +16,27 @@ public enum DeploymentResourceType { DEPLOYMENT_RESOURCE_TYPE_DATABASE_INSTANCE, DEPLOYMENT_RESOURCE_TYPE_EXPERIMENT, DEPLOYMENT_RESOURCE_TYPE_EXTERNAL_LOCATION, + DEPLOYMENT_RESOURCE_TYPE_GENIE_SPACE, + DEPLOYMENT_RESOURCE_TYPE_INSTANCE_POOL, DEPLOYMENT_RESOURCE_TYPE_JOB, + DEPLOYMENT_RESOURCE_TYPE_JOB_RUN, DEPLOYMENT_RESOURCE_TYPE_MODEL, DEPLOYMENT_RESOURCE_TYPE_MODEL_SERVING_ENDPOINT, DEPLOYMENT_RESOURCE_TYPE_PIPELINE, DEPLOYMENT_RESOURCE_TYPE_POSTGRES_BRANCH, + DEPLOYMENT_RESOURCE_TYPE_POSTGRES_CATALOG, + DEPLOYMENT_RESOURCE_TYPE_POSTGRES_DATABASE, DEPLOYMENT_RESOURCE_TYPE_POSTGRES_ENDPOINT, DEPLOYMENT_RESOURCE_TYPE_POSTGRES_PROJECT, + DEPLOYMENT_RESOURCE_TYPE_POSTGRES_ROLE, + DEPLOYMENT_RESOURCE_TYPE_POSTGRES_SYNCED_TABLE, DEPLOYMENT_RESOURCE_TYPE_QUALITY_MONITOR, DEPLOYMENT_RESOURCE_TYPE_REGISTERED_MODEL, DEPLOYMENT_RESOURCE_TYPE_SCHEMA, DEPLOYMENT_RESOURCE_TYPE_SECRET_SCOPE, DEPLOYMENT_RESOURCE_TYPE_SQL_WAREHOUSE, DEPLOYMENT_RESOURCE_TYPE_SYNCED_DATABASE_TABLE, + DEPLOYMENT_RESOURCE_TYPE_VECTOR_SEARCH_ENDPOINT, + DEPLOYMENT_RESOURCE_TYPE_VECTOR_SEARCH_INDEX, DEPLOYMENT_RESOURCE_TYPE_VOLUME, } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/OperationStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/OperationStatus.java index 68720aef0..fc626790b 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/OperationStatus.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/OperationStatus.java @@ -8,5 +8,6 @@ @Generated public enum OperationStatus { OPERATION_STATUS_FAILED, + OPERATION_STATUS_PENDING, OPERATION_STATUS_SUCCEEDED, } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/StagedOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/StagedOperation.java new file mode 100644 index 000000000..5fabdec98 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/StagedOperation.java @@ -0,0 +1,68 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundledeployments; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * A resource operation to record when a version is created. Each staged operation identifies the + * resource it applies to and the action planned for it; the server records the operation in + * `OPERATION_STATUS_PENDING`, and its outcome is filled in later via UpdateOperation. + */ +@Generated +public class StagedOperation { + /** The type of operation planned for this resource. */ + @JsonProperty("action_type") + private OperationActionType actionType; + + /** + * The key identifying the resource this operation applies to (e.g. "jobs.foo", "pipelines.bar"). + * Becomes the final component of the operation's name and must be unique among the operations in + * the version. + */ + @JsonProperty("resource_key") + private String resourceKey; + + public StagedOperation setActionType(OperationActionType actionType) { + this.actionType = actionType; + return this; + } + + public OperationActionType getActionType() { + return actionType; + } + + public StagedOperation setResourceKey(String resourceKey) { + this.resourceKey = resourceKey; + return this; + } + + public String getResourceKey() { + return resourceKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StagedOperation that = (StagedOperation) o; + return Objects.equals(actionType, that.actionType) + && Objects.equals(resourceKey, that.resourceKey); + } + + @Override + public int hashCode() { + return Objects.hash(actionType, resourceKey); + } + + @Override + public String toString() { + return new ToStringer(StagedOperation.class) + .add("actionType", actionType) + .add("resourceKey", resourceKey) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateDeploymentRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateDeploymentRequest.java new file mode 100644 index 000000000..459f3c11e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateDeploymentRequest.java @@ -0,0 +1,83 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.bundledeployments; + +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 UpdateDeploymentRequest { + /** + * The deployment to update. Its `name` selects the deployment; the fields named in `update_mask` + * carry the new values. All other fields are ignored. + */ + @JsonProperty("deployment") + private Deployment deployment; + + /** Resource name of the deployment. Format: deployments/{deployment_id} */ + @JsonIgnore private String name; + + /** + * The fields to update; supported paths are `display_name`, `deployment_mode`, `target_name`, and + * `workspace_info`. An empty mask or any other path returns INVALID_PARAMETER_VALUE. + */ + @JsonIgnore + @QueryParam("update_mask") + private FieldMask updateMask; + + public UpdateDeploymentRequest setDeployment(Deployment deployment) { + this.deployment = deployment; + return this; + } + + public Deployment getDeployment() { + return deployment; + } + + public UpdateDeploymentRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public UpdateDeploymentRequest 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; + UpdateDeploymentRequest that = (UpdateDeploymentRequest) o; + return Objects.equals(deployment, that.deployment) + && Objects.equals(name, that.name) + && Objects.equals(updateMask, that.updateMask); + } + + @Override + public int hashCode() { + return Objects.hash(deployment, name, updateMask); + } + + @Override + public String toString() { + return new ToStringer(UpdateDeploymentRequest.class) + .add("deployment", deployment) + .add("name", name) + .add("updateMask", updateMask) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Version.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Version.java index 0a62a1431..7d3e570da 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Version.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Version.java @@ -6,6 +6,7 @@ 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; /** @@ -67,6 +68,14 @@ public class Version { @JsonProperty("name") private String name; + /** + * The full operation plan for this version: one PENDING operation per entry, recorded in the same + * transaction. Input only -- supplied on create and never returned by create/get/list; read the + * recorded operations via ListOperations. + */ + @JsonProperty("operations") + private Collection operations; + /** * The version_id this version was created on top of — the deployment's most recent version at * creation time. Leave unset when creating the first version (the deployment has no prior @@ -195,6 +204,15 @@ public String getName() { return name; } + public Version setOperations(Collection operations) { + this.operations = operations; + return this; + } + + public Collection getOperations() { + return operations; + } + public Version setPreviousVersionId(String previousVersionId) { this.previousVersionId = previousVersionId; return this; @@ -264,6 +282,7 @@ public boolean equals(Object o) { && Objects.equals(displayName, that.displayName) && Objects.equals(gitInfo, that.gitInfo) && Objects.equals(name, that.name) + && Objects.equals(operations, that.operations) && Objects.equals(previousVersionId, that.previousVersionId) && Objects.equals(status, that.status) && Objects.equals(targetName, that.targetName) @@ -285,6 +304,7 @@ public int hashCode() { displayName, gitInfo, name, + operations, previousVersionId, status, targetName, @@ -306,6 +326,7 @@ public String toString() { .add("displayName", displayName) .add("gitInfo", gitInfo) .add("name", name) + .add("operations", operations) .add("previousVersionId", previousVersionId) .add("status", status) .add("targetName", targetName) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnMask.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnMask.java index ce97f8f9f..d0e648cf8 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnMask.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnMask.java @@ -15,9 +15,9 @@ public class ColumnMask { private String functionName; /** - * The list of additional table columns or literals to be passed as additional arguments to a - * column mask function. This is the replacement of the deprecated using_column_names field and - * carries information about the types (alias or constant) of the arguments to the mask function. + * The list of table columns or literals to be passed as additional arguments to a column mask + * function, carrying the type (column reference vs constant literal) of each argument. + * Deprecated: use using_column_names instead. */ @JsonProperty("using_arguments") private Collection usingArguments; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnTagValueExtraction.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnTagValueExtraction.java new file mode 100644 index 000000000..e1706593e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ColumnTagValueExtraction.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Extracts the value of a column-level tag: get_column_tag_value(col, "tagKey"). */ +@Generated +public class ColumnTagValueExtraction { + /** The alias from MATCH COLUMNS that identifies the column. */ + @JsonProperty("column_alias") + private String columnAlias; + + /** 1024 matches the max_length on FunctionArgument.constant above. */ + @JsonProperty("tag_key") + private String tagKey; + + public ColumnTagValueExtraction setColumnAlias(String columnAlias) { + this.columnAlias = columnAlias; + return this; + } + + public String getColumnAlias() { + return columnAlias; + } + + public ColumnTagValueExtraction setTagKey(String tagKey) { + this.tagKey = tagKey; + return this; + } + + public String getTagKey() { + return tagKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ColumnTagValueExtraction that = (ColumnTagValueExtraction) o; + return Objects.equals(columnAlias, that.columnAlias) && Objects.equals(tagKey, that.tagKey); + } + + @Override + public int hashCode() { + return Objects.hash(columnAlias, tagKey); + } + + @Override + public String toString() { + return new ToStringer(ColumnTagValueExtraction.class) + .add("columnAlias", columnAlias) + .add("tagKey", tagKey) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgExpression.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgExpression.java new file mode 100644 index 000000000..ad1121c03 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgExpression.java @@ -0,0 +1,48 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * An expression that is evaluated at query time against per-request context. New variants (e.g., + * identity attributes) are added as additional oneof cases. + */ +@Generated +public class FunctionArgExpression { + /** An expression that introspects tags at query time. */ + @JsonProperty("tag_introspection") + private TagIntrospectionExpression tagIntrospection; + + public FunctionArgExpression setTagIntrospection(TagIntrospectionExpression tagIntrospection) { + this.tagIntrospection = tagIntrospection; + return this; + } + + public TagIntrospectionExpression getTagIntrospection() { + return tagIntrospection; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FunctionArgExpression that = (FunctionArgExpression) o; + return Objects.equals(tagIntrospection, that.tagIntrospection); + } + + @Override + public int hashCode() { + return Objects.hash(tagIntrospection); + } + + @Override + public String toString() { + return new ToStringer(FunctionArgExpression.class) + .add("tagIntrospection", tagIntrospection) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgument.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgument.java index 665e0ee05..1cc67eb94 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgument.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionArgument.java @@ -17,6 +17,13 @@ public class FunctionArgument { @JsonProperty("constant") private String constant; + /** + * An expression evaluated at query time. Wraps per-request expression variants (e.g., tag + * introspection) so new variants can be added without extending the FunctionArgument oneof. + */ + @JsonProperty("function_arg_expression") + private FunctionArgExpression functionArgExpression; + public FunctionArgument setAlias(String alias) { this.alias = alias; return this; @@ -35,17 +42,28 @@ public String getConstant() { return constant; } + public FunctionArgument setFunctionArgExpression(FunctionArgExpression functionArgExpression) { + this.functionArgExpression = functionArgExpression; + return this; + } + + public FunctionArgExpression getFunctionArgExpression() { + return functionArgExpression; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FunctionArgument that = (FunctionArgument) o; - return Objects.equals(alias, that.alias) && Objects.equals(constant, that.constant); + return Objects.equals(alias, that.alias) + && Objects.equals(constant, that.constant) + && Objects.equals(functionArgExpression, that.functionArgExpression); } @Override public int hashCode() { - return Objects.hash(alias, constant); + return Objects.hash(alias, constant, functionArgExpression); } @Override @@ -53,6 +71,7 @@ public String toString() { return new ToStringer(FunctionArgument.class) .add("alias", alias) .add("constant", constant) + .add("functionArgExpression", functionArgExpression) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableRowFilter.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableRowFilter.java index c3901c8f5..6f3f6c141 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableRowFilter.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TableRowFilter.java @@ -15,9 +15,9 @@ public class TableRowFilter { private String functionName; /** - * The list of additional table columns or literals to be passed as additional arguments to a row - * filter function. This is the replacement of the deprecated input_column_names field and carries - * information about the types (alias or constant) of the arguments to the filter function. + * The list of table columns or literals to be passed as additional arguments to a row filter + * function, carrying the type (column reference vs constant literal) of each argument. + * Deprecated: use input_column_names instead. */ @JsonProperty("input_arguments") private Collection inputArguments; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagIntrospectionExpression.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagIntrospectionExpression.java new file mode 100644 index 000000000..3f544f56c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagIntrospectionExpression.java @@ -0,0 +1,60 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** An expression that introspects tags at query time. */ +@Generated +public class TagIntrospectionExpression { + /** Extracts the value of a column-level tag. */ + @JsonProperty("column_tag_value") + private ColumnTagValueExtraction columnTagValue; + + /** Extracts the value of a securable-level tag. */ + @JsonProperty("tag_value") + private TagValueExtraction tagValue; + + public TagIntrospectionExpression setColumnTagValue(ColumnTagValueExtraction columnTagValue) { + this.columnTagValue = columnTagValue; + return this; + } + + public ColumnTagValueExtraction getColumnTagValue() { + return columnTagValue; + } + + public TagIntrospectionExpression setTagValue(TagValueExtraction tagValue) { + this.tagValue = tagValue; + return this; + } + + public TagValueExtraction getTagValue() { + return tagValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagIntrospectionExpression that = (TagIntrospectionExpression) o; + return Objects.equals(columnTagValue, that.columnTagValue) + && Objects.equals(tagValue, that.tagValue); + } + + @Override + public int hashCode() { + return Objects.hash(columnTagValue, tagValue); + } + + @Override + public String toString() { + return new ToStringer(TagIntrospectionExpression.class) + .add("columnTagValue", columnTagValue) + .add("tagValue", tagValue) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagValueExtraction.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagValueExtraction.java new file mode 100644 index 000000000..6494c1b8b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TagValueExtraction.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Extracts the value of a securable-level tag: get_tag_value("tagKey"). */ +@Generated +public class TagValueExtraction { + /** 1024 matches the max_length on FunctionArgument.constant above. */ + @JsonProperty("tag_key") + private String tagKey; + + public TagValueExtraction setTagKey(String tagKey) { + this.tagKey = tagKey; + return this; + } + + public String getTagKey() { + return tagKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TagValueExtraction that = (TagValueExtraction) o; + return Objects.equals(tagKey, that.tagKey); + } + + @Override + public int hashCode() { + return Objects.hash(tagKey); + } + + @Override + public String toString() { + return new ToStringer(TagValueExtraction.class).add("tagKey", tagKey).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterAttributes.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterAttributes.java index 006d00fb6..c1c4371fa 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterAttributes.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterAttributes.java @@ -225,8 +225,8 @@ public class ClusterAttributes { private Collection sshPublicKeys; /** - * If set, what the total initial volume size (in GB) of the remote disks should be. Currently - * only supported for GCP HYPERDISK_BALANCED disks. + * If set, what the total initial volume size (in GB) of the remote disks should be. Supported for + * GCP. */ @JsonProperty("total_initial_remote_disk_size") private Long totalInitialRemoteDiskSize; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterDetails.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterDetails.java index 5c4477c08..5e6da3aa8 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterDetails.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterDetails.java @@ -365,8 +365,8 @@ public class ClusterDetails { private TerminationReason terminationReason; /** - * If set, what the total initial volume size (in GB) of the remote disks should be. Currently - * only supported for GCP HYPERDISK_BALANCED disks. + * If set, what the total initial volume size (in GB) of the remote disks should be. Supported for + * GCP. */ @JsonProperty("total_initial_remote_disk_size") private Long totalInitialRemoteDiskSize; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterSpec.java index 0bb026d5a..f4ac48f6c 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterSpec.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/ClusterSpec.java @@ -252,8 +252,8 @@ public class ClusterSpec { private Collection sshPublicKeys; /** - * If set, what the total initial volume size (in GB) of the remote disks should be. Currently - * only supported for GCP HYPERDISK_BALANCED disks. + * If set, what the total initial volume size (in GB) of the remote disks should be. Supported for + * GCP. */ @JsonProperty("total_initial_remote_disk_size") private Long totalInitialRemoteDiskSize; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CreateCluster.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CreateCluster.java index b140edc48..66da6b29c 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CreateCluster.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/CreateCluster.java @@ -255,8 +255,8 @@ public class CreateCluster { private Collection sshPublicKeys; /** - * If set, what the total initial volume size (in GB) of the remote disks should be. Currently - * only supported for GCP HYPERDISK_BALANCED disks. + * If set, what the total initial volume size (in GB) of the remote disks should be. Supported for + * GCP. */ @JsonProperty("total_initial_remote_disk_size") private Long totalInitialRemoteDiskSize; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/EditCluster.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/EditCluster.java index 4789d9bfb..203a1d68a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/EditCluster.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/EditCluster.java @@ -252,8 +252,8 @@ public class EditCluster { private Collection sshPublicKeys; /** - * If set, what the total initial volume size (in GB) of the remote disks should be. Currently - * only supported for GCP HYPERDISK_BALANCED disks. + * If set, what the total initial volume size (in GB) of the remote disks should be. Supported for + * GCP. */ @JsonProperty("total_initial_remote_disk_size") private Long totalInitialRemoteDiskSize; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/EnforcePolicyComplianceForClusterResponseClusterSettings.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/EnforcePolicyComplianceForClusterResponseClusterSettings.java index 3f2a4dbd0..dfe45e642 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/EnforcePolicyComplianceForClusterResponseClusterSettings.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/EnforcePolicyComplianceForClusterResponseClusterSettings.java @@ -241,8 +241,8 @@ public class EnforcePolicyComplianceForClusterResponseClusterSettings { private Collection sshPublicKeys; /** - * If set, what the total initial volume size (in GB) of the remote disks should be. Currently - * only supported for GCP HYPERDISK_BALANCED disks. + * If set, what the total initial volume size (in GB) of the remote disks should be. Supported for + * GCP. */ @JsonProperty("total_initial_remote_disk_size") private Long totalInitialRemoteDiskSize; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/HardwareAcceleratorType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/HardwareAcceleratorType.java index bf43f8dfb..58e133a04 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/HardwareAcceleratorType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/HardwareAcceleratorType.java @@ -15,6 +15,9 @@ public enum HardwareAcceleratorType { @JsonProperty("GPU_1xA10") GPU_1X_A10, + @JsonProperty("GPU_1xH100") + GPU_1X_H100, + @JsonProperty("GPU_8xH100") GPU_8X_H100, } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/NodeTypeFlexibility.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/NodeTypeFlexibility.java index b0cc04734..8d6860ca3 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/NodeTypeFlexibility.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/NodeTypeFlexibility.java @@ -18,6 +18,13 @@ public class NodeTypeFlexibility { @JsonProperty("alternate_node_type_ids") private Collection alternateNodeTypeIds; + /** + * The AWS Context ID for EC2 Fleet. When set (non-empty), the value is passed to AWS CreateFleet + * API to create the EC2 Fleet. + */ + @JsonProperty("aws_context_id") + private String awsContextId; + public NodeTypeFlexibility setAlternateNodeTypeIds(Collection alternateNodeTypeIds) { this.alternateNodeTypeIds = alternateNodeTypeIds; return this; @@ -27,23 +34,34 @@ public Collection getAlternateNodeTypeIds() { return alternateNodeTypeIds; } + public NodeTypeFlexibility setAwsContextId(String awsContextId) { + this.awsContextId = awsContextId; + return this; + } + + public String getAwsContextId() { + return awsContextId; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; NodeTypeFlexibility that = (NodeTypeFlexibility) o; - return Objects.equals(alternateNodeTypeIds, that.alternateNodeTypeIds); + return Objects.equals(alternateNodeTypeIds, that.alternateNodeTypeIds) + && Objects.equals(awsContextId, that.awsContextId); } @Override public int hashCode() { - return Objects.hash(alternateNodeTypeIds); + return Objects.hash(alternateNodeTypeIds, awsContextId); } @Override public String toString() { return new ToStringer(NodeTypeFlexibility.class) .add("alternateNodeTypeIds", alternateNodeTypeIds) + .add("awsContextId", awsContextId) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/UpdateClusterResource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/UpdateClusterResource.java index a045d1ccc..b047d4429 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/UpdateClusterResource.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/UpdateClusterResource.java @@ -241,8 +241,8 @@ public class UpdateClusterResource { private Collection sshPublicKeys; /** - * If set, what the total initial volume size (in GB) of the remote disks should be. Currently - * only supported for GCP HYPERDISK_BALANCED disks. + * If set, what the total initial volume size (in GB) of the remote disks should be. Supported for + * GCP. */ @JsonProperty("total_initial_remote_disk_size") private Long totalInitialRemoteDiskSize; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java index 1bd88cba7..2739b4cc8 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java @@ -205,6 +205,15 @@ public GenieGenerateDownloadFullQueryResultResponse generateDownloadFullQueryRes return impl.generateDownloadFullQueryResult(request); } + /** + * Cancels an in-flight agent-mode response. `response_id` is the id returned in the + * `response.created` event from the agent-mode responses endpoint. The response stops at the next + * agent boundary and its terminal state is returned. + */ + public GenieMessage genieCancelResponse(GenieCancelResponseRequest request) { + return impl.genieCancelResponse(request); + } + /** Create and run evaluations for multiple benchmark questions in a Genie space. */ public GenieEvalRunResponse genieCreateEvalRun(GenieCreateEvalRunRequest request) { return impl.genieCreateEvalRun(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieCancelResponseRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieCancelResponseRequest.java new file mode 100644 index 000000000..b294ec768 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieCancelResponseRequest.java @@ -0,0 +1,72 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.dashboards; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +/** Request to cancel an in-flight agent-mode response. */ +@Generated +public class GenieCancelResponseRequest { + /** The ID of the Genie agent (synonymous with the Genie space ID). */ + @JsonIgnore private String agentId; + + /** The ID of the conversation containing the response. */ + @JsonIgnore private String conversationId; + + /** The ID of the response to cancel (the id from the `response.created` event). */ + @JsonIgnore private String responseId; + + public GenieCancelResponseRequest setAgentId(String agentId) { + this.agentId = agentId; + return this; + } + + public String getAgentId() { + return agentId; + } + + public GenieCancelResponseRequest setConversationId(String conversationId) { + this.conversationId = conversationId; + return this; + } + + public String getConversationId() { + return conversationId; + } + + public GenieCancelResponseRequest setResponseId(String responseId) { + this.responseId = responseId; + return this; + } + + public String getResponseId() { + return responseId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GenieCancelResponseRequest that = (GenieCancelResponseRequest) o; + return Objects.equals(agentId, that.agentId) + && Objects.equals(conversationId, that.conversationId) + && Objects.equals(responseId, that.responseId); + } + + @Override + public int hashCode() { + return Objects.hash(agentId, conversationId, responseId); + } + + @Override + public String toString() { + return new ToStringer(GenieCancelResponseRequest.class) + .add("agentId", agentId) + .add("conversationId", conversationId) + .add("responseId", responseId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieImpl.java index e57ab4e44..733cd425b 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieImpl.java @@ -206,6 +206,27 @@ public GenieGenerateDownloadFullQueryResultResponse generateDownloadFullQueryRes } } + @Override + public GenieMessage genieCancelResponse(GenieCancelResponseRequest request) { + String path = + String.format( + "/api/2.0/genie/agents/%s/conversations/%s/responses/%s/cancel", + request.getAgentId(), request.getConversationId(), request.getResponseId()); + 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, GenieMessage.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public GenieEvalRunResponse genieCreateEvalRun(GenieCreateEvalRunRequest request) { String path = String.format("/api/2.0/genie/spaces/%s/eval-runs", request.getSpaceId()); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieService.java index f45ee890f..c8ed0be9e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieService.java @@ -84,6 +84,13 @@ GenieGetMessageQueryResultResponse executeMessageQuery( GenieGenerateDownloadFullQueryResultResponse generateDownloadFullQueryResult( GenieGenerateDownloadFullQueryResultRequest genieGenerateDownloadFullQueryResultRequest); + /** + * Cancels an in-flight agent-mode response. `response_id` is the id returned in the + * `response.created` event from the agent-mode responses endpoint. The response stops at the next + * agent boundary and its terminal state is returned. + */ + GenieMessage genieCancelResponse(GenieCancelResponseRequest genieCancelResponseRequest); + /** Create and run evaluations for multiple benchmark questions in a Genie space. */ GenieEvalRunResponse genieCreateEvalRun(GenieCreateEvalRunRequest genieCreateEvalRunRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewAPI.java index 35d3ca246..1bbedf591 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewAPI.java @@ -27,7 +27,11 @@ public LakeviewAPI(LakeviewService mock) { impl = mock; } - /** Create a draft dashboard. */ + /** + * Create a draft dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ public Dashboard create(CreateDashboardRequest request) { return impl.create(request); } @@ -69,7 +73,11 @@ public Dashboard get(String dashboardId) { return get(new GetDashboardRequest().setDashboardId(dashboardId)); } - /** Get a draft dashboard. */ + /** + * Get a draft dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ public Dashboard get(GetDashboardRequest request) { return impl.get(request); } @@ -78,7 +86,12 @@ public PublishedDashboard getPublished(String dashboardId) { return getPublished(new GetPublishedDashboardRequest().setDashboardId(dashboardId)); } - /** Get the current published dashboard. */ + /** + * Get the current published dashboard. + * + *

Requires one of the following entitlements: Workspace access, Databricks SQL access, or + * Consumer access. + */ public PublishedDashboard getPublished(GetPublishedDashboardRequest request) { return impl.getPublished(request); } @@ -107,7 +120,11 @@ public Subscription getSubscription(GetSubscriptionRequest request) { return impl.getSubscription(request); } - /** List dashboards. */ + /** + * List dashboards. + * + *

Requires the Databricks SQL access entitlement. + */ public Iterable list(ListDashboardsRequest request) { return Paginator.newTokenPagination( request, @@ -166,12 +183,20 @@ public Dashboard migrate(MigrateDashboardRequest request) { return impl.migrate(request); } - /** Publish the current draft dashboard. */ + /** + * Publish the current draft dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ public PublishedDashboard publish(PublishRequest request) { return impl.publish(request); } - /** Revert a dashboard's definition in draft mode to the last published version. */ + /** + * Revert a dashboard's definition in draft mode to the last published version. + * + *

Requires the Databricks SQL access entitlement. + */ public RevertDashboardResponse revert(RevertDashboardRequest request) { return impl.revert(request); } @@ -180,7 +205,11 @@ public void trash(String dashboardId) { trash(new TrashDashboardRequest().setDashboardId(dashboardId)); } - /** Trash a dashboard. */ + /** + * Trash a dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ public void trash(TrashDashboardRequest request) { impl.trash(request); } @@ -189,12 +218,20 @@ public void unpublish(String dashboardId) { unpublish(new UnpublishDashboardRequest().setDashboardId(dashboardId)); } - /** Unpublish the dashboard. */ + /** + * Unpublish the dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ public void unpublish(UnpublishDashboardRequest request) { impl.unpublish(request); } - /** Update a draft dashboard. */ + /** + * Update a draft dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ public Dashboard update(UpdateDashboardRequest request) { return impl.update(request); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewEmbeddedAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewEmbeddedAPI.java index cff7fc8df..fb2f2e569 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewEmbeddedAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewEmbeddedAPI.java @@ -31,6 +31,9 @@ public GetPublishedDashboardTokenInfoResponse getPublishedDashboardTokenInfo(Str /** * Get a required authorization details and scopes of a published dashboard to mint an OAuth * token. + * + *

Requires one of the following entitlements: Workspace access, Databricks SQL access, or + * Consumer access. */ public GetPublishedDashboardTokenInfoResponse getPublishedDashboardTokenInfo( GetPublishedDashboardTokenInfoRequest request) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewEmbeddedService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewEmbeddedService.java index 3aa679410..70346f075 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewEmbeddedService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewEmbeddedService.java @@ -15,6 +15,9 @@ public interface LakeviewEmbeddedService { /** * Get a required authorization details and scopes of a published dashboard to mint an OAuth * token. + * + *

Requires one of the following entitlements: Workspace access, Databricks SQL access, or + * Consumer access. */ GetPublishedDashboardTokenInfoResponse getPublishedDashboardTokenInfo( GetPublishedDashboardTokenInfoRequest getPublishedDashboardTokenInfoRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewService.java index d8d78e215..56dfcf00f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/LakeviewService.java @@ -13,7 +13,11 @@ */ @Generated public interface LakeviewService { - /** Create a draft dashboard. */ + /** + * Create a draft dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ Dashboard create(CreateDashboardRequest createDashboardRequest); /** Create dashboard schedule. */ @@ -28,10 +32,19 @@ public interface LakeviewService { /** Delete schedule subscription. */ void deleteSubscription(DeleteSubscriptionRequest deleteSubscriptionRequest); - /** Get a draft dashboard. */ + /** + * Get a draft dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ Dashboard get(GetDashboardRequest getDashboardRequest); - /** Get the current published dashboard. */ + /** + * Get the current published dashboard. + * + *

Requires one of the following entitlements: Workspace access, Databricks SQL access, or + * Consumer access. + */ PublishedDashboard getPublished(GetPublishedDashboardRequest getPublishedDashboardRequest); /** Get dashboard schedule. */ @@ -40,7 +53,11 @@ public interface LakeviewService { /** Get schedule subscription. */ Subscription getSubscription(GetSubscriptionRequest getSubscriptionRequest); - /** List dashboards. */ + /** + * List dashboards. + * + *

Requires the Databricks SQL access entitlement. + */ ListDashboardsResponse list(ListDashboardsRequest listDashboardsRequest); /** List dashboard schedules. */ @@ -52,19 +69,39 @@ public interface LakeviewService { /** Migrates a classic SQL dashboard to Lakeview. */ Dashboard migrate(MigrateDashboardRequest migrateDashboardRequest); - /** Publish the current draft dashboard. */ + /** + * Publish the current draft dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ PublishedDashboard publish(PublishRequest publishRequest); - /** Revert a dashboard's definition in draft mode to the last published version. */ + /** + * Revert a dashboard's definition in draft mode to the last published version. + * + *

Requires the Databricks SQL access entitlement. + */ RevertDashboardResponse revert(RevertDashboardRequest revertDashboardRequest); - /** Trash a dashboard. */ + /** + * Trash a dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ void trash(TrashDashboardRequest trashDashboardRequest); - /** Unpublish the dashboard. */ + /** + * Unpublish the dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ void unpublish(UnpublishDashboardRequest unpublishDashboardRequest); - /** Update a draft dashboard. */ + /** + * Update a draft dashboard. + * + *

Requires the Databricks SQL access entitlement. + */ Dashboard update(UpdateDashboardRequest updateDashboardRequest); /** Update dashboard schedule. */ 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 88ea8d43e..fb761b9c4 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 @@ -81,12 +81,7 @@ public WorkspaceAssignment createWorkspaceAssignment(CreateWorkspaceAssignmentRe return impl.createWorkspaceAssignment(request); } - /** - * Creates a workspace assignment detail for a principal. Entitlements are granted one at a time - * rather than atomically. If the request fails partway through, the principal stays assigned to - * the workspace with only some of the requested entitlements. Get the assignment detail - * afterwards to confirm which entitlements were granted. - */ + /** Creates a workspace assignment detail for a principal. */ public WorkspaceAssignmentDetail createWorkspaceAssignmentDetail( CreateWorkspaceAssignmentDetailRequest request) { return impl.createWorkspaceAssignmentDetail(request); @@ -172,6 +167,46 @@ public DirectGroupMember getDirectGroupMember(GetDirectGroupMemberRequest reques return impl.getDirectGroupMember(request); } + public ExternalGroup getExternalGroup(String name) { + return getExternalGroup(new GetExternalGroupRequest().setName(name)); + } + + /** + * Retrieves an external group with the given external ID from the customer's IdP. If the group + * does not exist, it will be created in the account. If the customer is not onboarded onto + * Automatic Identity Management (AIM), this will return an error. + */ + public ExternalGroup getExternalGroup(GetExternalGroupRequest request) { + return impl.getExternalGroup(request); + } + + public ExternalServicePrincipal getExternalServicePrincipal(String name) { + return getExternalServicePrincipal(new GetExternalServicePrincipalRequest().setName(name)); + } + + /** + * Retrieves an external service principal with the given external ID from the customer's IdP. If + * the service principal does not exist, it will be created. If the customer is not onboarded onto + * Automatic Identity Management (AIM), this will return an error. + */ + public ExternalServicePrincipal getExternalServicePrincipal( + GetExternalServicePrincipalRequest request) { + return impl.getExternalServicePrincipal(request); + } + + public ExternalUser getExternalUser(String name) { + return getExternalUser(new GetExternalUserRequest().setName(name)); + } + + /** + * Retrieves an external user with the given external ID from the customer's IdP. If the user does + * not exist, it will be created. If the customer is not onboarded onto Automatic Identity + * Management (AIM), this will return an error. + */ + public ExternalUser getExternalUser(GetExternalUserRequest request) { + return impl.getExternalUser(request); + } + public Group getGroup(String groupId) { return getGroup(new GetGroupRequest().setGroupId(groupId)); } 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 987d27998..1cb522e4e 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 @@ -241,6 +241,49 @@ public DirectGroupMember getDirectGroupMember(GetDirectGroupMemberRequest reques } } + @Override + public ExternalGroup getExternalGroup(GetExternalGroupRequest request) { + String path = String.format("/api/2.0/identity/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + return apiClient.execute(req, ExternalGroup.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ExternalServicePrincipal getExternalServicePrincipal( + GetExternalServicePrincipalRequest request) { + String path = String.format("/api/2.0/identity/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + return apiClient.execute(req, ExternalServicePrincipal.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ExternalUser getExternalUser(GetExternalUserRequest request) { + String path = String.format("/api/2.0/identity/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + return apiClient.execute(req, ExternalUser.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Group getGroup(GetGroupRequest request) { String path = 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 82831155d..270009962 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 @@ -60,12 +60,7 @@ ServicePrincipal createServicePrincipal( WorkspaceAssignment createWorkspaceAssignment( CreateWorkspaceAssignmentRequest createWorkspaceAssignmentRequest); - /** - * Creates a workspace assignment detail for a principal. Entitlements are granted one at a time - * rather than atomically. If the request fails partway through, the principal stays assigned to - * the workspace with only some of the requested entitlements. Get the assignment detail - * afterwards to confirm which entitlements were granted. - */ + /** Creates a workspace assignment detail for a principal. */ WorkspaceAssignmentDetail createWorkspaceAssignmentDetail( CreateWorkspaceAssignmentDetailRequest createWorkspaceAssignmentDetailRequest); @@ -99,6 +94,28 @@ void deleteWorkspaceAssignmentDetail( /** Gets a provisioned direct member of a group. */ DirectGroupMember getDirectGroupMember(GetDirectGroupMemberRequest getDirectGroupMemberRequest); + /** + * Retrieves an external group with the given external ID from the customer's IdP. If the group + * does not exist, it will be created in the account. If the customer is not onboarded onto + * Automatic Identity Management (AIM), this will return an error. + */ + ExternalGroup getExternalGroup(GetExternalGroupRequest getExternalGroupRequest); + + /** + * Retrieves an external service principal with the given external ID from the customer's IdP. If + * the service principal does not exist, it will be created. If the customer is not onboarded onto + * Automatic Identity Management (AIM), this will return an error. + */ + ExternalServicePrincipal getExternalServicePrincipal( + GetExternalServicePrincipalRequest getExternalServicePrincipalRequest); + + /** + * Retrieves an external user with the given external ID from the customer's IdP. If the user does + * not exist, it will be created. If the customer is not onboarded onto Automatic Identity + * Management (AIM), this will return an error. + */ + ExternalUser getExternalUser(GetExternalUserRequest getExternalUserRequest); + /** Fetches a group from the Databricks account by its internal ID. */ Group getGroup(GetGroupRequest getGroupRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java new file mode 100644 index 000000000..ca963356a --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalGroup.java @@ -0,0 +1,113 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * An external group from the customer's Identity Provider, resolved into Databricks. This is a + * read-only resource keyed by the IdP external ID. The Get method may trigger an idempotent sync + * from the customer's IdP to provision or refresh the group's data in Databricks. + */ +@Generated +public class ExternalGroup { + /** The parent account ID, from Databricks. */ + @JsonProperty("account_id") + private String accountId; + + /** Display name of the group from the customer's IdP. */ + @JsonProperty("display_name") + private String displayName; + + /** The external ID of the group in the customer's IdP. */ + @JsonProperty("external_group_id") + private String externalGroupId; + + /** Internal groupId of the group in Databricks. */ + @JsonProperty("internal_id") + private String internalId; + + /** + * The resource name of the external group. The format depends on the API that returned it: - + * Account-scoped: accounts/{account_id}/external-groups/{external_group_id} - Workspace-scoped: + * external-groups/{external_group_id} + */ + @JsonProperty("name") + private String name; + + public ExternalGroup setAccountId(String accountId) { + this.accountId = accountId; + return this; + } + + public String getAccountId() { + return accountId; + } + + public ExternalGroup setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public ExternalGroup setExternalGroupId(String externalGroupId) { + this.externalGroupId = externalGroupId; + return this; + } + + public String getExternalGroupId() { + return externalGroupId; + } + + public ExternalGroup setInternalId(String internalId) { + this.internalId = internalId; + return this; + } + + public String getInternalId() { + return internalId; + } + + public ExternalGroup 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; + ExternalGroup that = (ExternalGroup) o; + return Objects.equals(accountId, that.accountId) + && Objects.equals(displayName, that.displayName) + && Objects.equals(externalGroupId, that.externalGroupId) + && Objects.equals(internalId, that.internalId) + && Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, displayName, externalGroupId, internalId, name); + } + + @Override + public String toString() { + return new ToStringer(ExternalGroup.class) + .add("accountId", accountId) + .add("displayName", displayName) + .add("externalGroupId", externalGroupId) + .add("internalId", internalId) + .add("name", name) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java new file mode 100644 index 000000000..be26cb901 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalServicePrincipal.java @@ -0,0 +1,152 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * An external service principal from the customer's Identity Provider, resolved into Databricks. + * This is a read-only resource keyed by the IdP external ID. The Get method may trigger an + * idempotent sync from the customer's IdP to provision or refresh the service principal's data in + * Databricks. + */ +@Generated +public class ExternalServicePrincipal { + /** The parent account ID, from Databricks. */ + @JsonProperty("account_id") + private String accountId; + + /** The activity status of the service principal in the Databricks account. */ + @JsonProperty("account_sp_status") + private State accountSpStatus; + + /** Application ID of the service principal, from the customer's IdP. */ + @JsonProperty("application_id") + private String applicationId; + + /** Display name of the service principal, from the customer's IdP. */ + @JsonProperty("display_name") + private String displayName; + + /** The external ID of the service principal in the customer's IdP. */ + @JsonProperty("external_service_principal_id") + private String externalServicePrincipalId; + + /** Internal servicePrincipalId of the service principal in Databricks. */ + @JsonProperty("internal_id") + private String internalId; + + /** + * The resource name of the external service principal. The format depends on the API that + * returned it: - Account-scoped: + * accounts/{account_id}/external-service-principals/{external_service_principal_id} - + * Workspace-scoped: external-service-principals/{external_service_principal_id} + */ + @JsonProperty("name") + private String name; + + public ExternalServicePrincipal setAccountId(String accountId) { + this.accountId = accountId; + return this; + } + + public String getAccountId() { + return accountId; + } + + public ExternalServicePrincipal setAccountSpStatus(State accountSpStatus) { + this.accountSpStatus = accountSpStatus; + return this; + } + + public State getAccountSpStatus() { + return accountSpStatus; + } + + public ExternalServicePrincipal setApplicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + public String getApplicationId() { + return applicationId; + } + + public ExternalServicePrincipal setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public ExternalServicePrincipal setExternalServicePrincipalId(String externalServicePrincipalId) { + this.externalServicePrincipalId = externalServicePrincipalId; + return this; + } + + public String getExternalServicePrincipalId() { + return externalServicePrincipalId; + } + + public ExternalServicePrincipal setInternalId(String internalId) { + this.internalId = internalId; + return this; + } + + public String getInternalId() { + return internalId; + } + + public ExternalServicePrincipal 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; + ExternalServicePrincipal that = (ExternalServicePrincipal) o; + return Objects.equals(accountId, that.accountId) + && Objects.equals(accountSpStatus, that.accountSpStatus) + && Objects.equals(applicationId, that.applicationId) + && Objects.equals(displayName, that.displayName) + && Objects.equals(externalServicePrincipalId, that.externalServicePrincipalId) + && Objects.equals(internalId, that.internalId) + && Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + accountSpStatus, + applicationId, + displayName, + externalServicePrincipalId, + internalId, + name); + } + + @Override + public String toString() { + return new ToStringer(ExternalServicePrincipal.class) + .add("accountId", accountId) + .add("accountSpStatus", accountSpStatus) + .add("applicationId", applicationId) + .add("displayName", displayName) + .add("externalServicePrincipalId", externalServicePrincipalId) + .add("internalId", internalId) + .add("name", name) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java new file mode 100644 index 000000000..cac74938a --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ExternalUser.java @@ -0,0 +1,168 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * An external user from the customer's Identity Provider, resolved into Databricks. This is a + * read-only resource that allows customers to look up external user identities by their IdP + * external ID and retrieve the corresponding Databricks internal ID and metadata. The Get method + * may trigger an idempotent sync from the customer's IdP to provision or refresh the user's data in + * Databricks. + */ +@Generated +public class ExternalUser { + /** The parent account ID, from Databricks. */ + @JsonProperty("account_id") + private String accountId; + + /** The activity status of the user in the Databricks account. */ + @JsonProperty("account_user_status") + private State accountUserStatus; + + /** Display name of the user from the customer's IdP. */ + @JsonProperty("display_name") + private String displayName; + + /** The external ID of the user in the customer's IdP. */ + @JsonProperty("external_user_id") + private String externalUserId; + + /** The full name of the user, from the customer's IdP. */ + @JsonProperty("full_name") + private FullName fullName; + + /** Internal userId of the user in Databricks. */ + @JsonProperty("internal_id") + private String internalId; + + /** + * The resource name of the external user. The format depends on the API that returned it: - + * Account-scoped: accounts/{account_id}/external-users/{external_user_id} - Workspace-scoped: + * external-users/{external_user_id} + */ + @JsonProperty("name") + private String name; + + /** Username/email of the user, from Databricks. */ + @JsonProperty("username") + private String username; + + public ExternalUser setAccountId(String accountId) { + this.accountId = accountId; + return this; + } + + public String getAccountId() { + return accountId; + } + + public ExternalUser setAccountUserStatus(State accountUserStatus) { + this.accountUserStatus = accountUserStatus; + return this; + } + + public State getAccountUserStatus() { + return accountUserStatus; + } + + public ExternalUser setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + public String getDisplayName() { + return displayName; + } + + public ExternalUser setExternalUserId(String externalUserId) { + this.externalUserId = externalUserId; + return this; + } + + public String getExternalUserId() { + return externalUserId; + } + + public ExternalUser setFullName(FullName fullName) { + this.fullName = fullName; + return this; + } + + public FullName getFullName() { + return fullName; + } + + public ExternalUser setInternalId(String internalId) { + this.internalId = internalId; + return this; + } + + public String getInternalId() { + return internalId; + } + + public ExternalUser setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public ExternalUser setUsername(String username) { + this.username = username; + return this; + } + + public String getUsername() { + return username; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ExternalUser that = (ExternalUser) o; + return Objects.equals(accountId, that.accountId) + && Objects.equals(accountUserStatus, that.accountUserStatus) + && Objects.equals(displayName, that.displayName) + && Objects.equals(externalUserId, that.externalUserId) + && Objects.equals(fullName, that.fullName) + && Objects.equals(internalId, that.internalId) + && Objects.equals(name, that.name) + && Objects.equals(username, that.username); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + accountUserStatus, + displayName, + externalUserId, + fullName, + internalId, + name, + username); + } + + @Override + public String toString() { + return new ToStringer(ExternalUser.class) + .add("accountId", accountId) + .add("accountUserStatus", accountUserStatus) + .add("displayName", displayName) + .add("externalUserId", externalUserId) + .add("fullName", fullName) + .add("internalId", internalId) + .add("name", name) + .add("username", username) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java new file mode 100644 index 000000000..8fc137b7e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/FullName.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** The full name of a user. */ +@Generated +public class FullName { + /** The family (last) name of the user, from the customer's IdP. */ + @JsonProperty("family_name") + private String familyName; + + /** The given (first) name of the user, from the customer's IdP. */ + @JsonProperty("given_name") + private String givenName; + + public FullName setFamilyName(String familyName) { + this.familyName = familyName; + return this; + } + + public String getFamilyName() { + return familyName; + } + + public FullName setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + public String getGivenName() { + return givenName; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FullName that = (FullName) o; + return Objects.equals(familyName, that.familyName) && Objects.equals(givenName, that.givenName); + } + + @Override + public int hashCode() { + return Objects.hash(familyName, givenName); + } + + @Override + public String toString() { + return new ToStringer(FullName.class) + .add("familyName", familyName) + .add("givenName", givenName) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java new file mode 100644 index 000000000..719ccfcc7 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupProxyRequest.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +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 GetExternalGroupProxyRequest { + /** + * Required. The resource name of the external group. Format: external-groups/{external_group_id} + */ + @JsonIgnore private String name; + + public GetExternalGroupProxyRequest 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; + GetExternalGroupProxyRequest that = (GetExternalGroupProxyRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetExternalGroupProxyRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java new file mode 100644 index 000000000..9ae1a5244 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalGroupRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +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 GetExternalGroupRequest { + /** + * Required. The resource name of the external group. Format: + * accounts/{account_id}/external-groups/{external_group_id} + */ + @JsonIgnore private String name; + + public GetExternalGroupRequest 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; + GetExternalGroupRequest that = (GetExternalGroupRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetExternalGroupRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java new file mode 100644 index 000000000..3c3c996bd --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalProxyRequest.java @@ -0,0 +1,46 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +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 GetExternalServicePrincipalProxyRequest { + /** + * Required. The resource name of the external service principal. Format: + * external-service-principals/{external_service_principal_id} + */ + @JsonIgnore private String name; + + public GetExternalServicePrincipalProxyRequest 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; + GetExternalServicePrincipalProxyRequest that = (GetExternalServicePrincipalProxyRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetExternalServicePrincipalProxyRequest.class) + .add("name", name) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java new file mode 100644 index 000000000..c9f8f1d3c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalServicePrincipalRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +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 GetExternalServicePrincipalRequest { + /** + * Required. The resource name of the external service principal. Format: + * accounts/{account_id}/external-service-principals/{external_service_principal_id} + */ + @JsonIgnore private String name; + + public GetExternalServicePrincipalRequest 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; + GetExternalServicePrincipalRequest that = (GetExternalServicePrincipalRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetExternalServicePrincipalRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java new file mode 100644 index 000000000..fd3035fe2 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserProxyRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +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 GetExternalUserProxyRequest { + /** Required. The resource name of the external user. Format: external-users/{external_user_id} */ + @JsonIgnore private String name; + + public GetExternalUserProxyRequest 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; + GetExternalUserProxyRequest that = (GetExternalUserProxyRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetExternalUserProxyRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java new file mode 100644 index 000000000..0fc51e6d4 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/GetExternalUserRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iamv2; + +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 GetExternalUserRequest { + /** + * Required. The resource name of the external user. Format: + * accounts/{account_id}/external-users/{external_user_id} + */ + @JsonIgnore private String name; + + public GetExternalUserRequest 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; + GetExternalUserRequest that = (GetExternalUserRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetExternalUserRequest.class).add("name", name).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 f9074b7a9..d84c55584 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 @@ -15,7 +15,8 @@ public class ListDirectGroupMembersProxyRequest { /** * The maximum number of members to return. The service may return fewer than this value. If not - * provided, defaults to 1000 (also the maximum allowed). + * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") 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 fa5225eaa..2af37ceef 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 @@ -15,7 +15,8 @@ public class ListDirectGroupMembersRequest { /** * The maximum number of members to return. The service may return fewer than this value. If not - * provided, defaults to 1000 (also the maximum allowed). + * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") 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 866f437ee..548073ae4 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 @@ -15,7 +15,11 @@ public class ListGroupsProxyRequest { @QueryParam("filter") private String filter; - /** The maximum number of groups to return. The service may return fewer than this value. */ + /** + * The maximum number of groups to return. The service may return fewer than this value. If not + * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. + */ @JsonIgnore @QueryParam("page_size") private Long pageSize; 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 ea347f965..ba9400064 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 @@ -15,7 +15,11 @@ public class ListGroupsRequest { @QueryParam("filter") private String filter; - /** The maximum number of groups to return. The service may return fewer than this value. */ + /** + * The maximum number of groups to return. The service may return fewer than this value. If not + * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. + */ @JsonIgnore @QueryParam("page_size") private Long pageSize; 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 cee72d702..5d115bf99 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 @@ -15,7 +15,11 @@ public class ListServicePrincipalsProxyRequest { @QueryParam("filter") private String filter; - /** The maximum number of SPs to return. The service may return fewer than this value. */ + /** + * The maximum number of SPs to return. The service may return fewer than this value. If not + * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. + */ @JsonIgnore @QueryParam("page_size") private Long pageSize; 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 cfb2695a9..bea69db71 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 @@ -17,7 +17,8 @@ public class ListServicePrincipalsRequest { /** * The maximum number of service principals to return. The service may return fewer than this - * value. + * value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more + * than the maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") 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 d1736b8fc..63f59f713 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 @@ -12,7 +12,8 @@ public class ListTransitiveParentGroupsProxyRequest { /** * The maximum number of parent groups to return. The service may return fewer than this value. If - * not provided, defaults to 1000 (also the maximum allowed). + * not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") 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 676656545..1391fce38 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 @@ -12,7 +12,8 @@ public class ListTransitiveParentGroupsRequest { /** * The maximum number of parent groups to return. The service may return fewer than this value. If - * not provided, defaults to 1000 (also the maximum allowed). + * not provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") 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 62db974ba..e7c2489b7 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 @@ -15,7 +15,11 @@ public class ListUsersProxyRequest { @QueryParam("filter") private String filter; - /** The maximum number of users to return. The service may return fewer than this value. */ + /** + * The maximum number of users to return. The service may return fewer than this value. If not + * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. + */ @JsonIgnore @QueryParam("page_size") private Long pageSize; 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 c89bad6ed..3e4cc8314 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 @@ -15,7 +15,11 @@ public class ListUsersRequest { @QueryParam("filter") private String filter; - /** The maximum number of users to return. The service may return fewer than this value. */ + /** + * The maximum number of users to return. The service may return fewer than this value. If not + * provided, defaults to 1000, which is also the maximum allowed. Requests for more than the + * maximum are clamped to 1000. + */ @JsonIgnore @QueryParam("page_size") private Long pageSize; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentDetailsProxyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentDetailsProxyRequest.java index 2c1978f2e..c828af108 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentDetailsProxyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentDetailsProxyRequest.java @@ -12,7 +12,8 @@ public class ListWorkspaceAssignmentDetailsProxyRequest { /** * The maximum number of workspace assignment details to return. The service may return fewer than - * this value. + * this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for + * more than the maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentDetailsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentDetailsRequest.java index ce6e67681..374d5f96f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentDetailsRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/ListWorkspaceAssignmentDetailsRequest.java @@ -12,7 +12,8 @@ public class ListWorkspaceAssignmentDetailsRequest { /** * The maximum number of workspace assignment details to return. The service may return fewer than - * this value. + * this value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for + * more than the maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") 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 4906af9ce..837368142 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 @@ -12,7 +12,8 @@ public class ListWorkspaceAssignmentsProxyRequest { /** * The maximum number of workspace assignments to return. The service may return fewer than this - * value. + * value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more + * than the maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") 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 440a26e45..590924e2b 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 @@ -12,7 +12,8 @@ public class ListWorkspaceAssignmentsRequest { /** * The maximum number of workspace assignments to return. The service may return fewer than this - * value. + * value. If not provided, defaults to 1000, which is also the maximum allowed. Requests for more + * than the maximum are clamped to 1000. */ @JsonIgnore @QueryParam("page_size") 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 f71f98b35..aff51c3d1 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 @@ -73,12 +73,7 @@ public User createUserProxy(CreateUserProxyRequest request) { return impl.createUserProxy(request); } - /** - * Creates a workspace assignment detail for a principal in the calling workspace. Entitlements - * are granted one at a time rather than atomically. If the request fails partway through, the - * principal stays assigned to the workspace with only some of the requested entitlements. Get the - * assignment detail afterwards to confirm which entitlements were granted. - */ + /** Creates a workspace assignment detail for a principal in the calling workspace. */ public WorkspaceAssignmentDetail createWorkspaceAssignmentDetailProxy( CreateWorkspaceAssignmentDetailProxyRequest request) { return impl.createWorkspaceAssignmentDetailProxy(request); @@ -183,6 +178,50 @@ public DirectGroupMember getDirectGroupMemberProxy(GetDirectGroupMemberProxyRequ return impl.getDirectGroupMemberProxy(request); } + public ExternalGroup getExternalGroupProxy(String name) { + return getExternalGroupProxy(new GetExternalGroupProxyRequest().setName(name)); + } + + /** + * Retrieves an external group with the given external ID from the customer's IdP. If the group + * does not exist, it will be created in the account. If the customer is not onboarded onto + * Automatic Identity Management (AIM), this will return an error. Workspace-scoped variant for + * workspace-authenticated callers. + */ + public ExternalGroup getExternalGroupProxy(GetExternalGroupProxyRequest request) { + return impl.getExternalGroupProxy(request); + } + + public ExternalServicePrincipal getExternalServicePrincipalProxy(String name) { + return getExternalServicePrincipalProxy( + new GetExternalServicePrincipalProxyRequest().setName(name)); + } + + /** + * Retrieves an external service principal with the given external ID from the customer's IdP. If + * the service principal does not exist, it will be created. If the customer is not onboarded onto + * Automatic Identity Management (AIM), this will return an error. Workspace-scoped variant for + * workspace-authenticated callers. + */ + public ExternalServicePrincipal getExternalServicePrincipalProxy( + GetExternalServicePrincipalProxyRequest request) { + return impl.getExternalServicePrincipalProxy(request); + } + + public ExternalUser getExternalUserProxy(String name) { + return getExternalUserProxy(new GetExternalUserProxyRequest().setName(name)); + } + + /** + * Retrieves an external user with the given external ID from the customer's IdP. If the user does + * not exist, it will be created. If the customer is not onboarded onto Automatic Identity + * Management (AIM), this will return an error. Workspace-scoped variant for + * workspace-authenticated callers. + */ + public ExternalUser getExternalUserProxy(GetExternalUserProxyRequest request) { + return impl.getExternalUserProxy(request); + } + public Group getGroupProxy(String groupId) { return getGroupProxy(new GetGroupProxyRequest().setGroupId(groupId)); } 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 047dcc1ee..43ab6672e 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 @@ -259,6 +259,58 @@ public DirectGroupMember getDirectGroupMemberProxy(GetDirectGroupMemberProxyRequ } } + @Override + public ExternalGroup getExternalGroupProxy(GetExternalGroupProxyRequest request) { + String path = String.format("/api/2.0/identity/%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, ExternalGroup.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ExternalServicePrincipal getExternalServicePrincipalProxy( + GetExternalServicePrincipalProxyRequest request) { + String path = String.format("/api/2.0/identity/%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, ExternalServicePrincipal.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public ExternalUser getExternalUserProxy(GetExternalUserProxyRequest request) { + String path = String.format("/api/2.0/identity/%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, ExternalUser.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Group getGroupProxy(GetGroupProxyRequest request) { String path = String.format("/api/2.0/identity/groups/%s", request.getGroupId()); 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 a8f9e2232..d61b80c7d 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 @@ -52,12 +52,7 @@ ServicePrincipal createServicePrincipalProxy( */ User createUserProxy(CreateUserProxyRequest createUserProxyRequest); - /** - * Creates a workspace assignment detail for a principal in the calling workspace. Entitlements - * are granted one at a time rather than atomically. If the request fails partway through, the - * principal stays assigned to the workspace with only some of the requested entitlements. Get the - * assignment detail afterwards to confirm which entitlements were granted. - */ + /** Creates a workspace assignment detail for a principal in the calling workspace. */ WorkspaceAssignmentDetail createWorkspaceAssignmentDetailProxy( CreateWorkspaceAssignmentDetailProxyRequest createWorkspaceAssignmentDetailProxyRequest); @@ -115,6 +110,31 @@ void deleteWorkspaceAssignmentProxy( DirectGroupMember getDirectGroupMemberProxy( GetDirectGroupMemberProxyRequest getDirectGroupMemberProxyRequest); + /** + * Retrieves an external group with the given external ID from the customer's IdP. If the group + * does not exist, it will be created in the account. If the customer is not onboarded onto + * Automatic Identity Management (AIM), this will return an error. Workspace-scoped variant for + * workspace-authenticated callers. + */ + ExternalGroup getExternalGroupProxy(GetExternalGroupProxyRequest getExternalGroupProxyRequest); + + /** + * Retrieves an external service principal with the given external ID from the customer's IdP. If + * the service principal does not exist, it will be created. If the customer is not onboarded onto + * Automatic Identity Management (AIM), this will return an error. Workspace-scoped variant for + * workspace-authenticated callers. + */ + ExternalServicePrincipal getExternalServicePrincipalProxy( + GetExternalServicePrincipalProxyRequest getExternalServicePrincipalProxyRequest); + + /** + * Retrieves an external user with the given external ID from the customer's IdP. If the user does + * not exist, it will be created. If the customer is not onboarded onto Automatic Identity + * Management (AIM), this will return an error. Workspace-scoped variant for + * workspace-authenticated callers. + */ + ExternalUser getExternalUserProxy(GetExternalUserProxyRequest getExternalUserProxyRequest); + /** * Fetches a group by its internal ID from the Databricks account that parents the calling * workspace. diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/AlertTask.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/AlertTask.java index 207c06f9a..1e25bec93 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/AlertTask.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/AlertTask.java @@ -6,6 +6,7 @@ import com.databricks.sdk.support.ToStringer; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Collection; +import java.util.Map; import java.util.Objects; @Generated @@ -14,6 +15,17 @@ public class AlertTask { @JsonProperty("alert_id") private String alertId; + /** + * Per-run parameter overrides, keyed by parameter name, applied onto the alert's stored query + * parameters before the query is executed. Only scalar values are supported. Values may reference + * job parameters with `{{job.parameters.*}}`, which are resolved before the task runs. An + * override whose key does not match a stored parameter fails the task run. Limited to 10000 + * characters when serialized as JSON; keys must be 1-100 characters and contain only letters, + * digits, underscores, dashes, and periods. + */ + @JsonProperty("parameters") + private Map parameters; + /** * The subscribers receive alert evaluation result notifications after the alert task is * completed. The number of subscriptions is limited to 100. @@ -42,6 +54,15 @@ public String getAlertId() { return alertId; } + public AlertTask setParameters(Map parameters) { + this.parameters = parameters; + return this; + } + + public Map getParameters() { + return parameters; + } + public AlertTask setSubscribers(Collection subscribers) { this.subscribers = subscribers; return this; @@ -75,6 +96,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; AlertTask that = (AlertTask) o; return Objects.equals(alertId, that.alertId) + && Objects.equals(parameters, that.parameters) && Objects.equals(subscribers, that.subscribers) && Objects.equals(warehouseId, that.warehouseId) && Objects.equals(workspacePath, that.workspacePath); @@ -82,13 +104,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(alertId, subscribers, warehouseId, workspacePath); + return Objects.hash(alertId, parameters, subscribers, warehouseId, workspacePath); } @Override public String toString() { return new ToStringer(AlertTask.class) .add("alertId", alertId) + .add("parameters", parameters) .add("subscribers", subscribers) .add("warehouseId", warehouseId) .add("workspacePath", workspacePath) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Continuous.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Continuous.java index 5ffd9ac15..eaf5b4f03 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Continuous.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Continuous.java @@ -9,6 +9,13 @@ @Generated public class Continuous { + /** + * Defines when platform-initiated maintenance may run for this job. If unspecified, maintenance + * may run at any time. + */ + @JsonProperty("maintenance_window") + private MaintenanceWindow maintenanceWindow; + /** * Indicate whether the continuous execution of the job is paused or not. Defaults to UNPAUSED. */ @@ -21,6 +28,15 @@ public class Continuous { @JsonProperty("task_retry_mode") private TaskRetryMode taskRetryMode; + public Continuous setMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + public MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow; + } + public Continuous setPauseStatus(PauseStatus pauseStatus) { this.pauseStatus = pauseStatus; return this; @@ -44,18 +60,20 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Continuous that = (Continuous) o; - return Objects.equals(pauseStatus, that.pauseStatus) + return Objects.equals(maintenanceWindow, that.maintenanceWindow) + && Objects.equals(pauseStatus, that.pauseStatus) && Objects.equals(taskRetryMode, that.taskRetryMode); } @Override public int hashCode() { - return Objects.hash(pauseStatus, taskRetryMode); + return Objects.hash(maintenanceWindow, pauseStatus, taskRetryMode); } @Override public String toString() { return new ToStringer(Continuous.class) + .add("maintenanceWindow", maintenanceWindow) .add("pauseStatus", pauseStatus) .add("taskRetryMode", taskRetryMode) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ContinuousTriggerConfiguration.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ContinuousTriggerConfiguration.java index 0bc932a35..75d8fc498 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ContinuousTriggerConfiguration.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ContinuousTriggerConfiguration.java @@ -13,10 +13,26 @@ */ @Generated public class ContinuousTriggerConfiguration { + /** + * Defines when platform-initiated maintenance may run for this trigger. If unspecified, + * maintenance may run at any time. + */ + @JsonProperty("maintenance_window") + private MaintenanceWindow maintenanceWindow; + /** Whether the continuous job applies task-level retries. Defaults to NEVER. */ @JsonProperty("task_retry_mode") private TaskRetryMode taskRetryMode; + public ContinuousTriggerConfiguration setMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + public MaintenanceWindow getMaintenanceWindow() { + return maintenanceWindow; + } + public ContinuousTriggerConfiguration setTaskRetryMode(TaskRetryMode taskRetryMode) { this.taskRetryMode = taskRetryMode; return this; @@ -31,17 +47,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ContinuousTriggerConfiguration that = (ContinuousTriggerConfiguration) o; - return Objects.equals(taskRetryMode, that.taskRetryMode); + return Objects.equals(maintenanceWindow, that.maintenanceWindow) + && Objects.equals(taskRetryMode, that.taskRetryMode); } @Override public int hashCode() { - return Objects.hash(taskRetryMode); + return Objects.hash(maintenanceWindow, taskRetryMode); } @Override public String toString() { return new ToStringer(ContinuousTriggerConfiguration.class) + .add("maintenanceWindow", maintenanceWindow) .add("taskRetryMode", taskRetryMode) .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 2a79da278..dd125abf3 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 @@ -26,6 +26,9 @@ public class CreateJob { /** * An optional continuous property for this job. The continuous property will ensure that there is * always one run executing. Only one of `schedule` and `continuous` can be used. + * + *

Pipelines started by a continuous job also run continuously, regardless of their own + * pipeline mode setting. */ @JsonProperty("continuous") private Continuous continuous; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DayOfWeek.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DayOfWeek.java new file mode 100644 index 000000000..3a4829b98 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/DayOfWeek.java @@ -0,0 +1,17 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +import com.databricks.sdk.support.Generated; + +/** Days of week that can be referenced by Jobs scheduling settings. */ +@Generated +public enum DayOfWeek { + FRIDAY, + MONDAY, + SATURDAY, + SUNDAY, + THURSDAY, + TUESDAY, + WEDNESDAY, +} 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 a23cbdd03..099fec021 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 @@ -22,6 +22,9 @@ public class JobSettings { /** * An optional continuous property for this job. The continuous property will ensure that there is * always one run executing. Only one of `schedule` and `continuous` can be used. + * + *

Pipelines started by a continuous job also run continuously, regardless of their own + * pipeline mode setting. */ @JsonProperty("continuous") private Continuous continuous; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/MaintenanceWindow.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/MaintenanceWindow.java new file mode 100644 index 000000000..03d015755 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/MaintenanceWindow.java @@ -0,0 +1,87 @@ +// 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; + +/** + * A recurring weekly time window during which platform-initiated maintenance is allowed to run for + * a continuous job. + */ +@Generated +public class MaintenanceWindow { + /** The day of week on which maintenance is allowed to happen. This field is required. */ + @JsonProperty("day_of_week") + private DayOfWeek dayOfWeek; + + /** + * An integer between 0 and 23 denoting the start hour for the maintenance window in the 24-hour + * day. Platform-initiated maintenance is triggered only within a one-hour window starting at this + * hour. This field is required. + */ + @JsonProperty("start_hour") + private Long startHour; + + /** + * A Java timezone ID. The maintenance window is resolved with respect to this timezone. See [Java + * TimeZone] for details. This field is required. + * + *

[Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html + */ + @JsonProperty("timezone_id") + private String timezoneId; + + public MaintenanceWindow setDayOfWeek(DayOfWeek dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + public DayOfWeek getDayOfWeek() { + return dayOfWeek; + } + + public MaintenanceWindow setStartHour(Long startHour) { + this.startHour = startHour; + return this; + } + + public Long getStartHour() { + return startHour; + } + + public MaintenanceWindow setTimezoneId(String timezoneId) { + this.timezoneId = timezoneId; + return this; + } + + public String getTimezoneId() { + return timezoneId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MaintenanceWindow that = (MaintenanceWindow) o; + return Objects.equals(dayOfWeek, that.dayOfWeek) + && Objects.equals(startHour, that.startHour) + && Objects.equals(timezoneId, that.timezoneId); + } + + @Override + public int hashCode() { + return Objects.hash(dayOfWeek, startHour, timezoneId); + } + + @Override + public String toString() { + return new ToStringer(MaintenanceWindow.class) + .add("dayOfWeek", dayOfWeek) + .add("startHour", startHour) + .add("timezoneId", timezoneId) + .toString(); + } +} 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 be52f5eac..932102147 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 @@ -9,9 +9,10 @@ /** * A single trigger attached to a job via `JobSettings.triggers`. Exactly one of the trigger-type - * fields (`periodic`, `schedule`, `continuous`, `file_arrival`, `table_update`, `model`) must be - * set; mutual exclusivity is enforced in the API handler rather than via `oneof` so that codegen, - * validation, and JSON serialization across SDKs and Terraform behave consistently. + * fields (`periodic`, `schedule`, `continuous`, `file_arrival`, `table_update`, `model`, + * `job_completion`) must be set; mutual exclusivity is enforced in the API handler rather than via + * `oneof` so that codegen, validation, and JSON serialization across SDKs and Terraform behave + * consistently. */ @Generated public class TriggerConfiguration { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnIdentifier.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnIdentifier.java deleted file mode 100644 index a8454c82e..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnIdentifier.java +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.ml; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -@Generated -public class ColumnIdentifier { - /** - * String representation of the column name using dot-prefixed path notation. For nested fields, - * the leaf value is what will be present in materialized tables and expected to match at query - * time. For example, the leaf node of value.trip_details.location_details.pickup_zip is - * pickup_zip. - */ - @JsonProperty("variant_expr_path") - private String variantExprPath; - - public ColumnIdentifier setVariantExprPath(String variantExprPath) { - this.variantExprPath = variantExprPath; - return this; - } - - public String getVariantExprPath() { - return variantExprPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - ColumnIdentifier that = (ColumnIdentifier) o; - return Objects.equals(variantExprPath, that.variantExprPath); - } - - @Override - public int hashCode() { - return Objects.hash(variantExprPath); - } - - @Override - public String toString() { - return new ToStringer(ColumnIdentifier.class) - .add("variantExprPath", variantExprPath) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnSelection.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnSelection.java index 5d132a1d2..102da9db8 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnSelection.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ColumnSelection.java @@ -8,8 +8,7 @@ import java.util.Objects; /** - * A ColumnSelection function, equivalent to the LAST() record of an entity over a lifetime - * ContinuousWindow + * A ColumnSelection function, equivalent to the LAST() record of an entity over a lifetime window */ @Generated public class ColumnSelection { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ContinuousWindow.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ContinuousWindow.java deleted file mode 100644 index cbb2b6c33..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ContinuousWindow.java +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.ml; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -/** Deprecated: use RollingWindow with `delay` instead. */ -@Generated -public class ContinuousWindow { - /** The offset of the continuous window (must be non-positive). */ - @JsonProperty("offset") - private String offset; - - /** The duration of the continuous window (must be positive). */ - @JsonProperty("window_duration") - private String windowDuration; - - public ContinuousWindow setOffset(String offset) { - this.offset = offset; - return this; - } - - public String getOffset() { - return offset; - } - - public ContinuousWindow setWindowDuration(String windowDuration) { - this.windowDuration = windowDuration; - return this; - } - - public String getWindowDuration() { - return windowDuration; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - ContinuousWindow that = (ContinuousWindow) o; - return Objects.equals(offset, that.offset) - && Objects.equals(windowDuration, that.windowDuration); - } - - @Override - public int hashCode() { - return Objects.hash(offset, windowDuration); - } - - @Override - public String toString() { - return new ToStringer(ContinuousWindow.class) - .add("offset", offset) - .add("windowDuration", windowDuration) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/DataSource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/DataSource.java index b440aba12..b1c35c151 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/DataSource.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/DataSource.java @@ -18,6 +18,13 @@ public class DataSource { @JsonProperty("kafka_source") private KafkaSource kafkaSource; + /** + * Completeness timing for this Feature's use of the source. This configuration is part of the + * Feature definition; it does not modify the underlying table or stream. + */ + @JsonProperty("lateness") + private SourceLateness lateness; + /** A request-time data source. */ @JsonProperty("request_source") private RequestSource requestSource; @@ -44,6 +51,15 @@ public KafkaSource getKafkaSource() { return kafkaSource; } + public DataSource setLateness(SourceLateness lateness) { + this.lateness = lateness; + return this; + } + + public SourceLateness getLateness() { + return lateness; + } + public DataSource setRequestSource(RequestSource requestSource) { this.requestSource = requestSource; return this; @@ -69,13 +85,14 @@ public boolean equals(Object o) { DataSource that = (DataSource) o; return Objects.equals(deltaTableSource, that.deltaTableSource) && Objects.equals(kafkaSource, that.kafkaSource) + && Objects.equals(lateness, that.lateness) && Objects.equals(requestSource, that.requestSource) && Objects.equals(streamSource, that.streamSource); } @Override public int hashCode() { - return Objects.hash(deltaTableSource, kafkaSource, requestSource, streamSource); + return Objects.hash(deltaTableSource, kafkaSource, lateness, requestSource, streamSource); } @Override @@ -83,6 +100,7 @@ public String toString() { return new ToStringer(DataSource.class) .add("deltaTableSource", deltaTableSource) .add("kafkaSource", kafkaSource) + .add("lateness", lateness) .add("requestSource", requestSource) .add("streamSource", streamSource) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/DeltaTableSource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/DeltaTableSource.java index 4b095a4dc..e0c86b2ea 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/DeltaTableSource.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/DeltaTableSource.java @@ -5,7 +5,6 @@ import com.databricks.sdk.support.Generated; import com.databricks.sdk.support.ToStringer; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Collection; import java.util.Objects; @Generated @@ -18,13 +17,6 @@ public class DeltaTableSource { @JsonProperty("dataframe_schema") private String dataframeSchema; - /** - * Deprecated: Use Feature.entity instead. Kept for backwards compatibility. The entity columns of - * the Delta table. - */ - @JsonProperty("entity_columns") - private Collection entityColumns; - /** * Single WHERE clause to filter delta table before applying transformations. Will be row-wise * evaluated, so should only include conditionals and projections. @@ -36,13 +28,6 @@ public class DeltaTableSource { @JsonProperty("full_name") private String fullName; - /** - * Deprecated: Use Feature.timeseries_column instead. Kept for backwards compatibility. The - * timeseries column of the Delta table. - */ - @JsonProperty("timeseries_column") - private String timeseriesColumn; - /** * A single SQL SELECT expression applied after filter_condition. Should contains all the columns * needed (eg. "SELECT *, col_a + col_b AS col_c FROM x.y.z WHERE col_a > 0" would have @@ -61,15 +46,6 @@ public String getDataframeSchema() { return dataframeSchema; } - public DeltaTableSource setEntityColumns(Collection entityColumns) { - this.entityColumns = entityColumns; - return this; - } - - public Collection getEntityColumns() { - return entityColumns; - } - public DeltaTableSource setFilterCondition(String filterCondition) { this.filterCondition = filterCondition; return this; @@ -88,15 +64,6 @@ public String getFullName() { return fullName; } - public DeltaTableSource setTimeseriesColumn(String timeseriesColumn) { - this.timeseriesColumn = timeseriesColumn; - return this; - } - - public String getTimeseriesColumn() { - return timeseriesColumn; - } - public DeltaTableSource setTransformationSql(String transformationSql) { this.transformationSql = transformationSql; return this; @@ -112,32 +79,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; DeltaTableSource that = (DeltaTableSource) o; return Objects.equals(dataframeSchema, that.dataframeSchema) - && Objects.equals(entityColumns, that.entityColumns) && Objects.equals(filterCondition, that.filterCondition) && Objects.equals(fullName, that.fullName) - && Objects.equals(timeseriesColumn, that.timeseriesColumn) && Objects.equals(transformationSql, that.transformationSql); } @Override public int hashCode() { - return Objects.hash( - dataframeSchema, - entityColumns, - filterCondition, - fullName, - timeseriesColumn, - transformationSql); + return Objects.hash(dataframeSchema, filterCondition, fullName, transformationSql); } @Override public String toString() { return new ToStringer(DeltaTableSource.class) .add("dataframeSchema", dataframeSchema) - .add("entityColumns", entityColumns) .add("filterCondition", filterCondition) .add("fullName", fullName) - .add("timeseriesColumn", timeseriesColumn) .add("transformationSql", transformationSql) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Feature.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Feature.java index b04eee6cb..8079694a1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Feature.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Feature.java @@ -31,14 +31,6 @@ public class Feature { @JsonProperty("entities") private Collection entities; - /** - * Deprecated: Use DeltaTableSource.filter_condition or KafkaSource.filter_condition instead. Kept - * for backwards compatibility. The filter condition applied to the source data before - * aggregation. - */ - @JsonProperty("filter_condition") - private String filterCondition; - /** * The full three-part name (catalog, schema, name) of the feature. This is the feature's resource * identifier; the catalog_name, schema_name, and name fields below are OUTPUT_ONLY decomposed @@ -51,13 +43,6 @@ public class Feature { @JsonProperty("function") private Function function; - /** - * Deprecated: Use AggregationFunction.inputs instead. Kept for backwards compatibility. The input - * columns from which the feature is computed. - */ - @JsonProperty("inputs") - private Collection inputs; - /** * Lineage context information for this feature. WARNING: This field is primarily intended for * internal use by Databricks systems and is automatically populated when features are created @@ -80,13 +65,6 @@ public class Feature { @JsonProperty("source") private DataSource source; - /** - * Deprecated: Use Function.aggregation_function.time_window instead. Kept for backwards - * compatibility. The time window in which the feature is computed. - */ - @JsonProperty("time_window") - private TimeWindow timeWindow; - /** Column recording time, used for point-in-time joins, backfills, and aggregations. */ @JsonProperty("timeseries_column") private TimeseriesColumn timeseriesColumn; @@ -136,15 +114,6 @@ public Collection getEntities() { return entities; } - public Feature setFilterCondition(String filterCondition) { - this.filterCondition = filterCondition; - return this; - } - - public String getFilterCondition() { - return filterCondition; - } - public Feature setFullName(String fullName) { this.fullName = fullName; return this; @@ -163,15 +132,6 @@ public Function getFunction() { return function; } - public Feature setInputs(Collection inputs) { - this.inputs = inputs; - return this; - } - - public Collection getInputs() { - return inputs; - } - public Feature setLineageContext(LineageContext lineageContext) { this.lineageContext = lineageContext; return this; @@ -208,15 +168,6 @@ public DataSource getSource() { return source; } - public Feature setTimeWindow(TimeWindow timeWindow) { - this.timeWindow = timeWindow; - return this; - } - - public TimeWindow getTimeWindow() { - return timeWindow; - } - public Feature setTimeseriesColumn(TimeseriesColumn timeseriesColumn) { this.timeseriesColumn = timeseriesColumn; return this; @@ -236,15 +187,12 @@ public boolean equals(Object o) { && Objects.equals(createdBy, that.createdBy) && Objects.equals(description, that.description) && Objects.equals(entities, that.entities) - && Objects.equals(filterCondition, that.filterCondition) && Objects.equals(fullName, that.fullName) && Objects.equals(function, that.function) - && Objects.equals(inputs, that.inputs) && Objects.equals(lineageContext, that.lineageContext) && Objects.equals(name, that.name) && Objects.equals(schemaName, that.schemaName) && Objects.equals(source, that.source) - && Objects.equals(timeWindow, that.timeWindow) && Objects.equals(timeseriesColumn, that.timeseriesColumn); } @@ -256,15 +204,12 @@ public int hashCode() { createdBy, description, entities, - filterCondition, fullName, function, - inputs, lineageContext, name, schemaName, source, - timeWindow, timeseriesColumn); } @@ -276,15 +221,12 @@ public String toString() { .add("createdBy", createdBy) .add("description", description) .add("entities", entities) - .add("filterCondition", filterCondition) .add("fullName", fullName) .add("function", function) - .add("inputs", inputs) .add("lineageContext", lineageContext) .add("name", name) .add("schemaName", schemaName) .add("source", source) - .add("timeWindow", timeWindow) .add("timeseriesColumn", timeseriesColumn) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Function.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Function.java index 2ae3bd490..972b75360 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Function.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/Function.java @@ -5,7 +5,6 @@ import com.databricks.sdk.support.Generated; import com.databricks.sdk.support.ToStringer; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Collection; import java.util.Objects; @Generated @@ -22,20 +21,6 @@ public class Function { @JsonProperty("custom_udf") private CustomUdf customUdf; - /** - * Deprecated: Use the function oneof with AggregationFunction instead. Kept for backwards - * compatibility. Extra parameters for parameterized functions. - */ - @JsonProperty("extra_parameters") - private Collection extraParameters; - - /** - * Deprecated: Use the function oneof with AggregationFunction instead. Kept for backwards - * compatibility. The type of the function. - */ - @JsonProperty("function_type") - private FunctionFunctionType functionType; - public Function setAggregationFunction(AggregationFunction aggregationFunction) { this.aggregationFunction = aggregationFunction; return this; @@ -63,24 +48,6 @@ public CustomUdf getCustomUdf() { return customUdf; } - public Function setExtraParameters(Collection extraParameters) { - this.extraParameters = extraParameters; - return this; - } - - public Collection getExtraParameters() { - return extraParameters; - } - - public Function setFunctionType(FunctionFunctionType functionType) { - this.functionType = functionType; - return this; - } - - public FunctionFunctionType getFunctionType() { - return functionType; - } - @Override public boolean equals(Object o) { if (this == o) return true; @@ -88,15 +55,12 @@ public boolean equals(Object o) { Function that = (Function) o; return Objects.equals(aggregationFunction, that.aggregationFunction) && Objects.equals(columnSelection, that.columnSelection) - && Objects.equals(customUdf, that.customUdf) - && Objects.equals(extraParameters, that.extraParameters) - && Objects.equals(functionType, that.functionType); + && Objects.equals(customUdf, that.customUdf); } @Override public int hashCode() { - return Objects.hash( - aggregationFunction, columnSelection, customUdf, extraParameters, functionType); + return Objects.hash(aggregationFunction, columnSelection, customUdf); } @Override @@ -105,8 +69,6 @@ public String toString() { .add("aggregationFunction", aggregationFunction) .add("columnSelection", columnSelection) .add("customUdf", customUdf) - .add("extraParameters", extraParameters) - .add("functionType", functionType) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionExtraParameter.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionExtraParameter.java deleted file mode 100644 index bb13d2365..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionExtraParameter.java +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.ml; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -/** - * Deprecated: Use typed fields on function-specific messages (e.g. - * ApproxPercentileFunction.percentile) or AggregationFunction.ExtraParameter instead. Kept for - * backwards compatibility. - */ -@Generated -public class FunctionExtraParameter { - /** The name of the parameter. */ - @JsonProperty("key") - private String key; - - /** The value of the parameter. */ - @JsonProperty("value") - private String value; - - public FunctionExtraParameter setKey(String key) { - this.key = key; - return this; - } - - public String getKey() { - return key; - } - - public FunctionExtraParameter setValue(String value) { - this.value = value; - return this; - } - - public String getValue() { - return value; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - FunctionExtraParameter that = (FunctionExtraParameter) o; - return Objects.equals(key, that.key) && Objects.equals(value, that.value); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } - - @Override - public String toString() { - return new ToStringer(FunctionExtraParameter.class) - .add("key", key) - .add("value", value) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionFunctionType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionFunctionType.java deleted file mode 100644 index edf0921ed..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FunctionFunctionType.java +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.ml; - -import com.databricks.sdk.support.Generated; - -/** - * Deprecated: Use the function-specific messages in AggregationFunction.function_type oneof - * instead. Kept for backwards compatibility. - */ -@Generated -public enum FunctionFunctionType { - APPROX_COUNT_DISTINCT, - APPROX_PERCENTILE, - AVG, - COUNT, - FIRST, - LAST, - MAX, - MIN, - STDDEV_POP, - STDDEV_SAMP, - SUM, - VAR_POP, - VAR_SAMP, -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/KafkaSource.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/KafkaSource.java index 20d3a3c75..0efd764ca 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/KafkaSource.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/KafkaSource.java @@ -5,18 +5,10 @@ import com.databricks.sdk.support.Generated; import com.databricks.sdk.support.ToStringer; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Collection; import java.util.Objects; @Generated public class KafkaSource { - /** - * Deprecated: Use Feature.entity instead. Kept for backwards compatibility. The entity column - * identifiers of the Kafka source. - */ - @JsonProperty("entity_column_identifiers") - private Collection entityColumnIdentifiers; - /** The filter condition applied to the source data before aggregation. */ @JsonProperty("filter_condition") private String filterCondition; @@ -28,23 +20,6 @@ public class KafkaSource { @JsonProperty("name") private String name; - /** - * Deprecated: Use Feature.timeseries_column instead. Kept for backwards compatibility. The - * timeseries column identifier of the Kafka source. - */ - @JsonProperty("timeseries_column_identifier") - private ColumnIdentifier timeseriesColumnIdentifier; - - public KafkaSource setEntityColumnIdentifiers( - Collection entityColumnIdentifiers) { - this.entityColumnIdentifiers = entityColumnIdentifiers; - return this; - } - - public Collection getEntityColumnIdentifiers() { - return entityColumnIdentifiers; - } - public KafkaSource setFilterCondition(String filterCondition) { this.filterCondition = filterCondition; return this; @@ -63,38 +38,24 @@ public String getName() { return name; } - public KafkaSource setTimeseriesColumnIdentifier(ColumnIdentifier timeseriesColumnIdentifier) { - this.timeseriesColumnIdentifier = timeseriesColumnIdentifier; - return this; - } - - public ColumnIdentifier getTimeseriesColumnIdentifier() { - return timeseriesColumnIdentifier; - } - @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; KafkaSource that = (KafkaSource) o; - return Objects.equals(entityColumnIdentifiers, that.entityColumnIdentifiers) - && Objects.equals(filterCondition, that.filterCondition) - && Objects.equals(name, that.name) - && Objects.equals(timeseriesColumnIdentifier, that.timeseriesColumnIdentifier); + return Objects.equals(filterCondition, that.filterCondition) && Objects.equals(name, that.name); } @Override public int hashCode() { - return Objects.hash(entityColumnIdentifiers, filterCondition, name, timeseriesColumnIdentifier); + return Objects.hash(filterCondition, name); } @Override public String toString() { return new ToStringer(KafkaSource.class) - .add("entityColumnIdentifiers", entityColumnIdentifiers) .add("filterCondition", filterCondition) .add("name", name) - .add("timeseriesColumnIdentifier", timeseriesColumnIdentifier) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java index a07ab91d3..3e5162c78 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 @@ -10,14 +10,6 @@ /** A materialized feature represents a feature that is continuously computed and stored. */ @Generated public class MaterializedFeature { - /** - * The quartz cron expression that defines the schedule of the materialization pipeline. The - * schedule is evaluated in the UTC timezone. Hidden from GraphQL: superseded by the `trigger` - * oneof (cron_schedule_trigger), so not exposed to Catalog Explorer. - */ - @JsonProperty("cron_schedule") - private String cronSchedule; - /** A cron-based schedule trigger for the materialization pipeline. */ @JsonProperty("cron_schedule_trigger") private CronSchedule cronScheduleTrigger; @@ -77,15 +69,6 @@ public class MaterializedFeature { @JsonProperty("table_trigger") private TableTrigger tableTrigger; - public MaterializedFeature setCronSchedule(String cronSchedule) { - this.cronSchedule = cronSchedule; - return this; - } - - public String getCronSchedule() { - return cronSchedule; - } - public MaterializedFeature setCronScheduleTrigger(CronSchedule cronScheduleTrigger) { this.cronScheduleTrigger = cronScheduleTrigger; return this; @@ -191,8 +174,7 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MaterializedFeature that = (MaterializedFeature) o; - return Objects.equals(cronSchedule, that.cronSchedule) - && Objects.equals(cronScheduleTrigger, that.cronScheduleTrigger) + return Objects.equals(cronScheduleTrigger, that.cronScheduleTrigger) && Objects.equals(featureName, that.featureName) && Objects.equals(isOnline, that.isOnline) && Objects.equals(lastMaterializationTime, that.lastMaterializationTime) @@ -208,7 +190,6 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - cronSchedule, cronScheduleTrigger, featureName, isOnline, @@ -225,7 +206,6 @@ public int hashCode() { @Override public String toString() { return new ToStringer(MaterializedFeature.class) - .add("cronSchedule", cronSchedule) .add("cronScheduleTrigger", cronScheduleTrigger) .add("featureName", featureName) .add("isOnline", isOnline) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/RollingWindow.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/RollingWindow.java index 26b3718be..37f5170de 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/RollingWindow.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/RollingWindow.java @@ -8,11 +8,7 @@ import com.google.protobuf.Duration; import java.util.Objects; -/** - * A rolling time window with an optional delay. This is the SQL-spec-aligned replacement for - * ContinuousWindow: `delay` is the non-negative counterpart of the legacy non-positive - * `ContinuousWindow.offset`. - */ +/** A rolling time window with an optional non-negative delay. */ @Generated public class RollingWindow { /** diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SlidingWindow.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SlidingWindow.java index a12c829d3..acd95e1b7 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SlidingWindow.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SlidingWindow.java @@ -5,10 +5,28 @@ import com.databricks.sdk.support.Generated; import com.databricks.sdk.support.ToStringer; import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Duration; import java.util.Objects; @Generated public class SlidingWindow { + /** + * Non-negative analytic lag that evaluates the window this far in the past. Use this for timing + * variations unrelated to source lateness, such as a 30-day count as of one week ago. If unset, + * the analytic lag is zero. It composes with source.lateness when both are set. + */ + @JsonProperty("delay") + private Duration delay; + + /** + * Non-negative phase shift from the default midnight UTC alignment. For example, offset=22h on a + * 24h slide produces boundaries at 22:00 UTC (17:00 New York in standard time) instead of + * midnight UTC. If unset, the offset is zero. Must be shorter than slide_duration (and therefore + * window_duration). + */ + @JsonProperty("offset") + private Duration offset; + /** * The slide duration (interval by which windows advance, must be positive and less than * duration). @@ -23,6 +41,24 @@ public class SlidingWindow { @JsonProperty("window_duration") private String windowDuration; + public SlidingWindow setDelay(Duration delay) { + this.delay = delay; + return this; + } + + public Duration getDelay() { + return delay; + } + + public SlidingWindow setOffset(Duration offset) { + this.offset = offset; + return this; + } + + public Duration getOffset() { + return offset; + } + public SlidingWindow setSlideDuration(String slideDuration) { this.slideDuration = slideDuration; return this; @@ -46,18 +82,22 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SlidingWindow that = (SlidingWindow) o; - return Objects.equals(slideDuration, that.slideDuration) + return Objects.equals(delay, that.delay) + && Objects.equals(offset, that.offset) + && Objects.equals(slideDuration, that.slideDuration) && Objects.equals(windowDuration, that.windowDuration); } @Override public int hashCode() { - return Objects.hash(slideDuration, windowDuration); + return Objects.hash(delay, offset, slideDuration, windowDuration); } @Override public String toString() { return new ToStringer(SlidingWindow.class) + .add("delay", delay) + .add("offset", offset) .add("slideDuration", slideDuration) .add("windowDuration", windowDuration) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SourceLateness.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SourceLateness.java new file mode 100644 index 000000000..64c93c297 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SourceLateness.java @@ -0,0 +1,49 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.ml; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Duration; +import java.util.Objects; + +/** Configures when event-time data from this source is considered complete for a Feature. */ +@Generated +public class SourceLateness { + /** + * Non-negative time to wait after a window ends before treating its source data as complete. + * Training shifts the eligible evaluation time backwards by this duration so it does not join + * data that would still have been settling online. Materialization waits for the duration to + * elapse before publishing the window. If unset, source data is considered settled immediately. + */ + @JsonProperty("settling_delay") + private Duration settlingDelay; + + public SourceLateness setSettlingDelay(Duration settlingDelay) { + this.settlingDelay = settlingDelay; + return this; + } + + public Duration getSettlingDelay() { + return settlingDelay; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SourceLateness that = (SourceLateness) o; + return Objects.equals(settlingDelay, that.settlingDelay); + } + + @Override + public int hashCode() { + return Objects.hash(settlingDelay); + } + + @Override + public String toString() { + return new ToStringer(SourceLateness.class).add("settlingDelay", settlingDelay).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TimeWindow.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TimeWindow.java index 7233eef5a..88303be69 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TimeWindow.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TimeWindow.java @@ -5,14 +5,11 @@ 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 TimeWindow { - /** */ - @JsonProperty("continuous") - private ContinuousWindow continuous; - /** */ @JsonProperty("rolling") private RollingWindow rolling; @@ -25,19 +22,22 @@ public class TimeWindow { @JsonProperty("sliding") private SlidingWindow sliding; + /** + * Earliest event-time boundary at which the Feature may emit an output. This gates outputs, not + * the historical inputs read by a window. For example, a 365-day window with + * start_time=2026-01-01 begins emitting partial-window values on that date instead of waiting for + * 365 days of data; a lifetime window produces no output before start_time. If unset, tumbling + * and fixed-duration sliding windows first emit at an offset-aligned boundary after a full window + * can be formed. If unset, lifetime sliding windows and rolling windows emit as soon as eligible + * source data exists. + */ + @JsonProperty("start_time") + private Timestamp startTime; + /** */ @JsonProperty("tumbling") private TumblingWindow tumbling; - public TimeWindow setContinuous(ContinuousWindow continuous) { - this.continuous = continuous; - return this; - } - - public ContinuousWindow getContinuous() { - return continuous; - } - public TimeWindow setRolling(RollingWindow rolling) { this.rolling = rolling; return this; @@ -65,6 +65,15 @@ public SlidingWindow getSliding() { return sliding; } + public TimeWindow setStartTime(Timestamp startTime) { + this.startTime = startTime; + return this; + } + + public Timestamp getStartTime() { + return startTime; + } + public TimeWindow setTumbling(TumblingWindow tumbling) { this.tumbling = tumbling; return this; @@ -79,25 +88,25 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TimeWindow that = (TimeWindow) o; - return Objects.equals(continuous, that.continuous) - && Objects.equals(rolling, that.rolling) + return Objects.equals(rolling, that.rolling) && Objects.equals(sawtooth, that.sawtooth) && Objects.equals(sliding, that.sliding) + && Objects.equals(startTime, that.startTime) && Objects.equals(tumbling, that.tumbling); } @Override public int hashCode() { - return Objects.hash(continuous, rolling, sawtooth, sliding, tumbling); + return Objects.hash(rolling, sawtooth, sliding, startTime, tumbling); } @Override public String toString() { return new ToStringer(TimeWindow.class) - .add("continuous", continuous) .add("rolling", rolling) .add("sawtooth", sawtooth) .add("sliding", sliding) + .add("startTime", startTime) .add("tumbling", tumbling) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TumblingWindow.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TumblingWindow.java index a69d5ae25..1d588b0f1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TumblingWindow.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TumblingWindow.java @@ -5,14 +5,49 @@ import com.databricks.sdk.support.Generated; import com.databricks.sdk.support.ToStringer; import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Duration; import java.util.Objects; @Generated public class TumblingWindow { + /** + * Non-negative analytic lag that evaluates the window this far in the past. Use this for timing + * variations unrelated to source lateness, such as a 30-day count as of one week ago. If unset, + * the analytic lag is zero. It composes with source.lateness when both are set. + */ + @JsonProperty("delay") + private Duration delay; + + /** + * Non-negative phase shift from the default midnight UTC alignment. For example, offset=22h on a + * 24h window produces boundaries at 22:00 UTC (17:00 New York in standard time) instead of + * midnight UTC. If unset, the offset is zero. Must be shorter than window_duration. + */ + @JsonProperty("offset") + private Duration offset; + /** The duration of each tumbling window (non-overlapping, fixed-duration windows). */ @JsonProperty("window_duration") private String windowDuration; + public TumblingWindow setDelay(Duration delay) { + this.delay = delay; + return this; + } + + public Duration getDelay() { + return delay; + } + + public TumblingWindow setOffset(Duration offset) { + this.offset = offset; + return this; + } + + public Duration getOffset() { + return offset; + } + public TumblingWindow setWindowDuration(String windowDuration) { this.windowDuration = windowDuration; return this; @@ -27,16 +62,22 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TumblingWindow that = (TumblingWindow) o; - return Objects.equals(windowDuration, that.windowDuration); + return Objects.equals(delay, that.delay) + && Objects.equals(offset, that.offset) + && Objects.equals(windowDuration, that.windowDuration); } @Override public int hashCode() { - return Objects.hash(windowDuration); + return Objects.hash(delay, offset, windowDuration); } @Override public String toString() { - return new ToStringer(TumblingWindow.class).add("windowDuration", windowDuration).toString(); + return new ToStringer(TumblingWindow.class) + .add("delay", delay) + .add("offset", offset) + .add("windowDuration", windowDuration) + .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ClonePipelineRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ClonePipelineRequest.java index 141c44268..7460e626e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ClonePipelineRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ClonePipelineRequest.java @@ -45,7 +45,13 @@ public class ClonePipelineRequest { @JsonProperty("configuration") private Map configuration; - /** Whether the pipeline is continuous or triggered. This replaces `trigger`. */ + /** + * Whether the pipeline is continuous or triggered. This replaces `trigger`. + * + *

Deprecated: wrap the pipeline in a continuous job instead, which also lets you take + * advantage of job-level settings such as performance mode. When the pipeline is started by a + * continuous job, the job's setting takes precedence and this field is ignored. + */ @JsonProperty("continuous") private Boolean continuous; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ConnectorOptions.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ConnectorOptions.java index 48b4cffde..2f0781271 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ConnectorOptions.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ConnectorOptions.java @@ -50,6 +50,10 @@ public class ConnectorOptions { @JsonProperty("outlook_options") private OutlookOptions outlookOptions; + /** */ + @JsonProperty("rabbitmq_options") + private RabbitmqOptions rabbitmqOptions; + /** */ @JsonProperty("reddit_ads_options") private RedditAdsOptions redditAdsOptions; @@ -161,6 +165,15 @@ public OutlookOptions getOutlookOptions() { return outlookOptions; } + public ConnectorOptions setRabbitmqOptions(RabbitmqOptions rabbitmqOptions) { + this.rabbitmqOptions = rabbitmqOptions; + return this; + } + + public RabbitmqOptions getRabbitmqOptions() { + return rabbitmqOptions; + } + public ConnectorOptions setRedditAdsOptions(RedditAdsOptions redditAdsOptions) { this.redditAdsOptions = redditAdsOptions; return this; @@ -221,6 +234,7 @@ public boolean equals(Object o) { && Objects.equals(marketoOptions, that.marketoOptions) && Objects.equals(metaAdsOptions, that.metaAdsOptions) && Objects.equals(outlookOptions, that.outlookOptions) + && Objects.equals(rabbitmqOptions, that.rabbitmqOptions) && Objects.equals(redditAdsOptions, that.redditAdsOptions) && Objects.equals(sharepointOptions, that.sharepointOptions) && Objects.equals(smartsheetOptions, that.smartsheetOptions) @@ -241,6 +255,7 @@ public int hashCode() { marketoOptions, metaAdsOptions, outlookOptions, + rabbitmqOptions, redditAdsOptions, sharepointOptions, smartsheetOptions, @@ -261,6 +276,7 @@ public String toString() { .add("marketoOptions", marketoOptions) .add("metaAdsOptions", metaAdsOptions) .add("outlookOptions", outlookOptions) + .add("rabbitmqOptions", rabbitmqOptions) .add("redditAdsOptions", redditAdsOptions) .add("sharepointOptions", sharepointOptions) .add("smartsheetOptions", smartsheetOptions) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/CreatePipeline.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/CreatePipeline.java index 42b2a23b3..d78fe8967 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/CreatePipeline.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/CreatePipeline.java @@ -40,7 +40,13 @@ public class CreatePipeline { @JsonProperty("configuration") private Map configuration; - /** Whether the pipeline is continuous or triggered. This replaces `trigger`. */ + /** + * Whether the pipeline is continuous or triggered. This replaces `trigger`. + * + *

Deprecated: wrap the pipeline in a continuous job instead, which also lets you take + * advantage of job-level settings such as performance mode. When the pipeline is started by a + * continuous job, the job's setting takes precedence and this field is ignored. + */ @JsonProperty("continuous") private Boolean continuous; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/EditPipeline.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/EditPipeline.java index 65916fafe..ab684e467 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/EditPipeline.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/EditPipeline.java @@ -43,7 +43,13 @@ public class EditPipeline { @JsonProperty("configuration") private Map configuration; - /** Whether the pipeline is continuous or triggered. This replaces `trigger`. */ + /** + * Whether the pipeline is continuous or triggered. This replaces `trigger`. + * + *

Deprecated: wrap the pipeline in a continuous job instead, which also lets you take + * advantage of job-level settings such as performance mode. When the pipeline is started by a + * continuous job, the job's setting takes precedence and this field is ignored. + */ @JsonProperty("continuous") private Boolean continuous; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/IngestionSourceType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/IngestionSourceType.java index 5e0b47625..e314ce506 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/IngestionSourceType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/IngestionSourceType.java @@ -19,6 +19,7 @@ public enum IngestionSourceType { NETSUITE, ORACLE, POSTGRESQL, + RABBITMQ, SALESFORCE, SERVICENOW, SHAREPOINT, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineCluster.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineCluster.java index 2eb27a477..0b694a95e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineCluster.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineCluster.java @@ -96,9 +96,10 @@ public class PipelineCluster { private String instancePoolId; /** - * A label for the cluster specification, either `default` to configure the default cluster, or - * `maintenance` to configure the maintenance cluster. This field is optional. The default value - * is `default`. + * A label for the cluster specification, either `default` to configure the default cluster + * settings applied to both the update and maintenance clusters, `updates` to configure the update + * cluster, or `maintenance` to configure the maintenance cluster. This field is optional. The + * default value is `default`. */ @JsonProperty("label") private String label; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineSpec.java index 5d17bb66d..a3cc82a41 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineSpec.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineSpec.java @@ -36,7 +36,13 @@ public class PipelineSpec { @JsonProperty("configuration") private Map configuration; - /** Whether the pipeline is continuous or triggered. This replaces `trigger`. */ + /** + * Whether the pipeline is continuous or triggered. This replaces `trigger`. + * + *

Deprecated: wrap the pipeline in a continuous job instead, which also lets you take + * advantage of job-level settings such as performance mode. When the pipeline is started by a + * continuous job, the job's setting takes precedence and this field is ignored. + */ @JsonProperty("continuous") private Boolean continuous; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/RabbitmqOptions.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/RabbitmqOptions.java new file mode 100644 index 000000000..5713b6705 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/RabbitmqOptions.java @@ -0,0 +1,47 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.pipelines; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * RabbitMQ specific options for ingestion. Performance tuning options (consumers_per_task, + * max_messages_per_fetch, etc.) are intentionally not exposed in the public API. The managed + * connector uses sensible defaults internally. These can be added later if user demand arises. + */ +@Generated +public class RabbitmqOptions { + /** (Required) RabbitMQ queue name to consume from. */ + @JsonProperty("queue") + private String queue; + + public RabbitmqOptions setQueue(String queue) { + this.queue = queue; + return this; + } + + public String getQueue() { + return queue; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RabbitmqOptions that = (RabbitmqOptions) o; + return Objects.equals(queue, that.queue); + } + + @Override + public int hashCode() { + return Objects.hash(queue); + } + + @Override + public String toString() { + return new ToStringer(RabbitmqOptions.class).add("queue", queue).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/SchemaSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/SchemaSpec.java index 9e2dceb4a..d0d6eefbc 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/SchemaSpec.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/SchemaSpec.java @@ -38,11 +38,9 @@ public class SchemaSpec { private String sourceCatalog; /** - * Schema name in the source database. Currently required; this field will become optional in an - * upcoming release, since some source types (for example streaming / message-bus connectors) do - * not use it. When that change ships, this field's type in the generated SDKs and CLI will change - * from required to optional (nullable); clients that assume it is always present should handle - * its absence. + * Schema name in the source database. Optional: some source types (for example streaming or + * message-bus connectors) do not use it, so it may be absent from a pipeline's definition. + * Clients that assume it is always present should handle its absence. */ @JsonProperty("source_schema") private String sourceSchema; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/TableSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/TableSpec.java index c4eee40d1..607b218ba 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/TableSpec.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/TableSpec.java @@ -37,11 +37,9 @@ public class TableSpec { private String sourceSchema; /** - * Table name in the source database. Currently required; this field will become optional in an - * upcoming release, since some source types (for example streaming / message-bus connectors) do - * not use it. When that change ships, this field's type in the generated SDKs and CLI will change - * from required to optional (nullable); clients that assume it is always present should handle - * its absence. + * Table name in the source database. Optional: some source types (for example streaming or + * message-bus connectors) do not use it, so it may be absent from a pipeline's definition. + * Clients that assume it is always present should handle its absence. */ @JsonProperty("source_table") private String sourceTable; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchSpec.java index f571ba0ee..accfa38ba 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchSpec.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchSpec.java @@ -49,6 +49,15 @@ public class BranchSpec { @JsonProperty("source_branch_time") private Timestamp sourceBranchTime; + /** + * The snapshot this branch was created from. When set, the branch's data comes from the snapshot + * rather than a source branch, so source_branch, source_branch_lsn, and source_branch_time must + * be empty. The snapshot must be AVAILABLE and belong to this branch's project. Format: + * projects/{project_id}/snapshots/{snapshot_id} + */ + @JsonProperty("source_snapshot") + private String sourceSnapshot; + /** * Relative time-to-live duration. When set, the branch will expire at creation_time + ttl. * Mutually exclusive with `expire_time` and `no_expiry`. When updating, use `spec.expiration` in @@ -111,6 +120,15 @@ public Timestamp getSourceBranchTime() { return sourceBranchTime; } + public BranchSpec setSourceSnapshot(String sourceSnapshot) { + this.sourceSnapshot = sourceSnapshot; + return this; + } + + public String getSourceSnapshot() { + return sourceSnapshot; + } + public BranchSpec setTtl(Duration ttl) { this.ttl = ttl; return this; @@ -131,13 +149,21 @@ public boolean equals(Object o) { && Objects.equals(sourceBranch, that.sourceBranch) && Objects.equals(sourceBranchLsn, that.sourceBranchLsn) && Objects.equals(sourceBranchTime, that.sourceBranchTime) + && Objects.equals(sourceSnapshot, that.sourceSnapshot) && Objects.equals(ttl, that.ttl); } @Override public int hashCode() { return Objects.hash( - expireTime, isProtected, noExpiry, sourceBranch, sourceBranchLsn, sourceBranchTime, ttl); + expireTime, + isProtected, + noExpiry, + sourceBranch, + sourceBranchLsn, + sourceBranchTime, + sourceSnapshot, + ttl); } @Override @@ -149,6 +175,7 @@ public String toString() { .add("sourceBranch", sourceBranch) .add("sourceBranchLsn", sourceBranchLsn) .add("sourceBranchTime", sourceBranchTime) + .add("sourceSnapshot", sourceSnapshot) .add("ttl", ttl) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchStatus.java index 16604dab6..a9a14086d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchStatus.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchStatus.java @@ -64,6 +64,13 @@ public class BranchStatus { @JsonProperty("source_branch_time") private Timestamp sourceBranchTime; + /** + * The snapshot this branch was restored from. Set only for branches created by restoring a + * snapshot; unset for all other branches. Format: projects/{project_id}/snapshots/{snapshot_id} + */ + @JsonProperty("source_snapshot") + private String sourceSnapshot; + /** A timestamp indicating when the `current_state` began. */ @JsonProperty("state_change_time") private Timestamp stateChangeTime; @@ -176,6 +183,15 @@ public Timestamp getSourceBranchTime() { return sourceBranchTime; } + public BranchStatus setSourceSnapshot(String sourceSnapshot) { + this.sourceSnapshot = sourceSnapshot; + return this; + } + + public String getSourceSnapshot() { + return sourceSnapshot; + } + public BranchStatus setStateChangeTime(Timestamp stateChangeTime) { this.stateChangeTime = stateChangeTime; return this; @@ -202,6 +218,7 @@ public boolean equals(Object o) { && Objects.equals(sourceBranch, that.sourceBranch) && Objects.equals(sourceBranchLsn, that.sourceBranchLsn) && Objects.equals(sourceBranchTime, that.sourceBranchTime) + && Objects.equals(sourceSnapshot, that.sourceSnapshot) && Objects.equals(stateChangeTime, that.stateChangeTime); } @@ -220,6 +237,7 @@ public int hashCode() { sourceBranch, sourceBranchLsn, sourceBranchTime, + sourceSnapshot, stateChangeTime); } @@ -238,6 +256,7 @@ public String toString() { .add("sourceBranch", sourceBranch) .add("sourceBranchLsn", sourceBranchLsn) .add("sourceBranchTime", sourceBranchTime) + .add("sourceSnapshot", sourceSnapshot) .add("stateChangeTime", stateChangeTime) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotOperation.java new file mode 100644 index 000000000..06093b230 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotOperation.java @@ -0,0 +1,162 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running createSnapshot operation. Provides methods to wait + * for completion, check status, cancel, and access metadata. + */ +@Generated +public class CreateSnapshotOperation { + private static final Logger LOG = LoggerFactory.getLogger(CreateSnapshotOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public CreateSnapshotOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting Snapshot. Waits indefinitely if no + * timeout is specified. + * + * @return the created Snapshot + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public Snapshot waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting Snapshot. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created Snapshot + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public Snapshot waitForCompletion(Optional options) throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, Snapshot.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal snapshot response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public SnapshotOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, SnapshotOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotRequest.java new file mode 100644 index 000000000..1cb28410f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/CreateSnapshotRequest.java @@ -0,0 +1,79 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class CreateSnapshotRequest { + /** The project in which to create the snapshot. Format: projects/{project_id} */ + @JsonIgnore private String parent; + + /** The snapshot to create. */ + @JsonProperty("snapshot") + private Snapshot snapshot; + + /** + * Client-chosen ID for the snapshot. It becomes the final segment of the snapshot resource name + * and cannot be changed after creation. + */ + @JsonIgnore + @QueryParam("snapshot_id") + private String snapshotId; + + public CreateSnapshotRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + public CreateSnapshotRequest setSnapshot(Snapshot snapshot) { + this.snapshot = snapshot; + return this; + } + + public Snapshot getSnapshot() { + return snapshot; + } + + public CreateSnapshotRequest setSnapshotId(String snapshotId) { + this.snapshotId = snapshotId; + return this; + } + + public String getSnapshotId() { + return snapshotId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreateSnapshotRequest that = (CreateSnapshotRequest) o; + return Objects.equals(parent, that.parent) + && Objects.equals(snapshot, that.snapshot) + && Objects.equals(snapshotId, that.snapshotId); + } + + @Override + public int hashCode() { + return Objects.hash(parent, snapshot, snapshotId); + } + + @Override + public String toString() { + return new ToStringer(CreateSnapshotRequest.class) + .add("parent", parent) + .add("snapshot", snapshot) + .add("snapshotId", snapshotId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DailySchedule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DailySchedule.java new file mode 100644 index 000000000..3c9c97c3e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DailySchedule.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Take a snapshot once per day, at the configured hour. */ +@Generated +public class DailySchedule { + /** The hour of the day, in UTC, at which to take the snapshot, in [0, 23]. */ + @JsonProperty("hour") + private Long hour; + + public DailySchedule setHour(Long hour) { + this.hour = hour; + return this; + } + + public Long getHour() { + return hour; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DailySchedule that = (DailySchedule) o; + return Objects.equals(hour, that.hour); + } + + @Override + public int hashCode() { + return Objects.hash(hour); + } + + @Override + public String toString() { + return new ToStringer(DailySchedule.class).add("hour", hour).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DayOfWeek.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DayOfWeek.java new file mode 100644 index 000000000..362a56985 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DayOfWeek.java @@ -0,0 +1,17 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; + +/** The day of the week on which a weekly snapshot is taken. */ +@Generated +public enum DayOfWeek { + FRIDAY, + MONDAY, + SATURDAY, + SUNDAY, + THURSDAY, + TUESDAY, + WEDNESDAY, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotOperation.java new file mode 100644 index 000000000..b36591ca5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotOperation.java @@ -0,0 +1,162 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running deleteSnapshot operation. Provides methods to wait + * for completion, check status, cancel, and access metadata. + */ +@Generated +public class DeleteSnapshotOperation { + private static final Logger LOG = LoggerFactory.getLogger(DeleteSnapshotOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public DeleteSnapshotOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting . Waits indefinitely if no timeout + * is specified. + * + * @return the created + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public void waitForCompletion() throws TimeoutException { + waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting . + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public void waitForCompletion(Optional options) throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + objectMapper.treeToValue(responseJson, Void.class); + return; + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public SnapshotOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, SnapshotOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotRequest.java new file mode 100644 index 000000000..ad8459a7a --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSnapshotRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class DeleteSnapshotRequest { + /** + * The resource name of the snapshot to delete. Format: + * projects/{project_id}/snapshots/{snapshot_id} + */ + @JsonIgnore private String name; + + public DeleteSnapshotRequest 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; + DeleteSnapshotRequest that = (DeleteSnapshotRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(DeleteSnapshotRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotRequest.java new file mode 100644 index 000000000..4517ac3e4 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class GetSnapshotRequest { + /** + * The resource name of the snapshot to retrieve. Format: + * projects/{project_id}/snapshots/{snapshot_id} + */ + @JsonIgnore private String name; + + public GetSnapshotRequest 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; + GetSnapshotRequest that = (GetSnapshotRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetSnapshotRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotScheduleRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotScheduleRequest.java new file mode 100644 index 000000000..307c08e81 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/GetSnapshotScheduleRequest.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class GetSnapshotScheduleRequest { + /** + * The resource name of the branch's snapshot schedule. Format: + * projects/{project_id}/branches/{branch_id}/snapshot-schedule + */ + @JsonIgnore private String name; + + public GetSnapshotScheduleRequest 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; + GetSnapshotScheduleRequest that = (GetSnapshotScheduleRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetSnapshotScheduleRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsRequest.java new file mode 100644 index 000000000..991a10404 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsRequest.java @@ -0,0 +1,76 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class ListSnapshotsRequest { + /** Maximum number of snapshots to return per page. */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** Page token from a previous response; omit for the first page. */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** The project that owns the snapshots. Format: projects/{project_id} */ + @JsonIgnore private String parent; + + public ListSnapshotsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListSnapshotsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListSnapshotsRequest 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; + ListSnapshotsRequest that = (ListSnapshotsRequest) o; + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken, parent); + } + + @Override + public String toString() { + return new ToStringer(ListSnapshotsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsResponse.java new file mode 100644 index 000000000..e1baef4a6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ListSnapshotsResponse.java @@ -0,0 +1,60 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Collection; +import java.util.Objects; + +@Generated +public class ListSnapshotsResponse { + /** Token to retrieve the next page; empty if there are no more pages. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + /** The snapshots in the project. */ + @JsonProperty("snapshots") + private Collection snapshots; + + public ListSnapshotsResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public ListSnapshotsResponse setSnapshots(Collection snapshots) { + this.snapshots = snapshots; + return this; + } + + public Collection getSnapshots() { + return snapshots; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListSnapshotsResponse that = (ListSnapshotsResponse) o; + return Objects.equals(nextPageToken, that.nextPageToken) + && Objects.equals(snapshots, that.snapshots); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, snapshots); + } + + @Override + public String toString() { + return new ToStringer(ListSnapshotsResponse.class) + .add("nextPageToken", nextPageToken) + .add("snapshots", snapshots) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MonthlySchedule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MonthlySchedule.java new file mode 100644 index 000000000..5017a4986 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/MonthlySchedule.java @@ -0,0 +1,60 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Take a snapshot once per month, on the configured day at the configured hour. */ +@Generated +public class MonthlySchedule { + /** + * The day of the month on which to take the snapshot, in [1, 31]. In shorter months the snapshot + * is taken on the last day instead (day 31 runs on Feb 28 or 29, and on Apr 30), so every month + * gets exactly one snapshot. + */ + @JsonProperty("day") + private Long day; + + /** The hour of the day, in UTC, at which to take the snapshot, in [0, 23]. */ + @JsonProperty("hour") + private Long hour; + + public MonthlySchedule setDay(Long day) { + this.day = day; + return this; + } + + public Long getDay() { + return day; + } + + public MonthlySchedule setHour(Long hour) { + this.hour = hour; + return this; + } + + public Long getHour() { + return hour; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MonthlySchedule that = (MonthlySchedule) o; + return Objects.equals(day, that.day) && Objects.equals(hour, that.hour); + } + + @Override + public int hashCode() { + return Objects.hash(day, hour); + } + + @Override + public String toString() { + return new ToStringer(MonthlySchedule.class).add("day", day).add("hour", hour).toString(); + } +} 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 ff96fcf4e..bafd715ac 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 @@ -96,6 +96,12 @@ public CreateRoleOperation createRole(CreateRoleRequest request) { return new CreateRoleOperation(impl, operation); } + /** Creates a snapshot, an immutable point-in-time copy of a branch's data, within the project. */ + public CreateSnapshotOperation createSnapshot(CreateSnapshotRequest request) { + Operation operation = impl.createSnapshot(request); + return new CreateSnapshotOperation(impl, operation); + } + /** Create a Synced Table. */ public CreateSyncedTableOperation createSyncedTable(CreateSyncedTableRequest request) { Operation operation = impl.createSyncedTable(request); @@ -186,6 +192,16 @@ public DeleteRoleOperation deleteRole(DeleteRoleRequest request) { return new DeleteRoleOperation(impl, operation); } + public DeleteSnapshotOperation deleteSnapshot(String name) { + return deleteSnapshot(new DeleteSnapshotRequest().setName(name)); + } + + /** Deletes the specified snapshot. */ + public DeleteSnapshotOperation deleteSnapshot(DeleteSnapshotRequest request) { + Operation operation = impl.deleteSnapshot(request); + return new DeleteSnapshotOperation(impl, operation); + } + public DeleteSyncedTableOperation deleteSyncedTable(String name) { return deleteSyncedTable(new DeleteSyncedTableRequest().setName(name)); } @@ -303,6 +319,27 @@ public Role getRole(GetRoleRequest request) { return impl.getRole(request); } + public Snapshot getSnapshot(String name) { + return getSnapshot(new GetSnapshotRequest().setName(name)); + } + + /** Retrieves information about the specified snapshot. */ + public Snapshot getSnapshot(GetSnapshotRequest request) { + return impl.getSnapshot(request); + } + + public SnapshotSchedule getSnapshotSchedule(String name) { + return getSnapshotSchedule(new GetSnapshotScheduleRequest().setName(name)); + } + + /** + * Retrieves the snapshot schedule for a branch. A branch with no configured schedule returns an + * empty schedule (not NOT_FOUND). + */ + public SnapshotSchedule getSnapshotSchedule(GetSnapshotScheduleRequest request) { + return impl.getSnapshotSchedule(request); + } + public SyncedTable getSyncedTable(String name) { return getSyncedTable(new GetSyncedTableRequest().setName(name)); } @@ -450,6 +487,25 @@ public Iterable listRoles(ListRolesRequest request) { }); } + public Iterable listSnapshots(String parent) { + return listSnapshots(new ListSnapshotsRequest().setParent(parent)); + } + + /** Returns a paginated list of snapshots in the project. */ + public Iterable listSnapshots(ListSnapshotsRequest request) { + return Paginator.newTokenPagination( + request, + impl::listSnapshots, + ListSnapshotsResponse::getSnapshots, + response -> { + String token = response.getNextPageToken(); + if (token == null || token.isEmpty()) { + return null; + } + return request.setPageToken(token); + }); + } + /** Undeletes the specified database branch. */ public UndeleteBranchOperation undeleteBranch(UndeleteBranchRequest request) { Operation operation = impl.undeleteBranch(request); @@ -504,6 +560,16 @@ public UpdateRoleOperation updateRole(UpdateRoleRequest request) { return new UpdateRoleOperation(impl, operation); } + /** + * Sets the snapshot schedule for a branch. The `schedule` field is replaced wholesale; an empty + * schedule disables automatic snapshots. + */ + public UpdateSnapshotScheduleOperation updateSnapshotSchedule( + UpdateSnapshotScheduleRequest request) { + Operation operation = impl.updateSnapshotSchedule(request); + return new UpdateSnapshotScheduleOperation(impl, operation); + } + public PostgresService impl() { return impl; } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresImpl.java index fba95be29..25a458fc9 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/PostgresImpl.java @@ -160,6 +160,24 @@ public Operation createRole(CreateRoleRequest request) { } } + @Override + public Operation createSnapshot(CreateSnapshotRequest request) { + String path = String.format("/api/2.0/postgres/%s/snapshots", request.getParent()); + try { + Request req = new Request("POST", path, apiClient.serialize(request.getSnapshot())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation createSyncedTable(CreateSyncedTableRequest request) { String path = "/api/2.0/postgres/synced_tables"; @@ -314,6 +332,23 @@ public Operation deleteRole(DeleteRoleRequest request) { } } + @Override + public Operation deleteSnapshot(DeleteSnapshotRequest request) { + String path = String.format("/api/2.0/postgres/%s", request.getName()); + try { + Request req = new Request("DELETE", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation deleteSyncedTable(DeleteSyncedTableRequest request) { String path = String.format("/api/2.0/postgres/%s", request.getName()); @@ -519,6 +554,40 @@ public Role getRole(GetRoleRequest request) { } } + @Override + public Snapshot getSnapshot(GetSnapshotRequest request) { + String path = String.format("/api/2.0/postgres/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Snapshot.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + + @Override + public SnapshotSchedule getSnapshotSchedule(GetSnapshotScheduleRequest request) { + String path = String.format("/api/2.0/postgres/%s", request.getName()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, SnapshotSchedule.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public SyncedTable getSyncedTable(GetSyncedTableRequest request) { String path = String.format("/api/2.0/postgres/%s", request.getName()); @@ -655,6 +724,23 @@ public ListRolesResponse listRoles(ListRolesRequest request) { } } + @Override + public ListSnapshotsResponse listSnapshots(ListSnapshotsRequest request) { + String path = String.format("/api/2.0/postgres/%s/snapshots", request.getParent()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListSnapshotsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public Operation undeleteBranch(UndeleteBranchRequest request) { String path = String.format("/api/2.0/postgres/%s/undelete", request.getName()); @@ -798,4 +884,22 @@ public Operation updateRole(UpdateRoleRequest request) { throw new DatabricksException("IO error: " + e.getMessage(), e); } } + + @Override + public Operation updateSnapshotSchedule(UpdateSnapshotScheduleRequest request) { + String path = String.format("/api/2.0/postgres/%s", request.getName()); + try { + Request req = new Request("PATCH", path, apiClient.serialize(request.getSnapshotSchedule())); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, Operation.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } } 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 29399356b..522f83252 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 @@ -58,6 +58,9 @@ public interface PostgresService { /** Creates a new Postgres role in the branch. */ Operation createRole(CreateRoleRequest createRoleRequest); + /** Creates a snapshot, an immutable point-in-time copy of a branch's data, within the project. */ + Operation createSnapshot(CreateSnapshotRequest createSnapshotRequest); + /** Create a Synced Table. */ Operation createSyncedTable(CreateSyncedTableRequest createSyncedTableRequest); @@ -89,6 +92,9 @@ public interface PostgresService { /** Deletes the specified Postgres role. */ Operation deleteRole(DeleteRoleRequest deleteRoleRequest); + /** Deletes the specified snapshot. */ + Operation deleteSnapshot(DeleteSnapshotRequest deleteSnapshotRequest); + /** Delete a Synced Table. */ Operation deleteSyncedTable(DeleteSyncedTableRequest deleteSyncedTableRequest); @@ -138,6 +144,15 @@ DatabaseCredential generateDatabaseCredential( */ Role getRole(GetRoleRequest getRoleRequest); + /** Retrieves information about the specified snapshot. */ + Snapshot getSnapshot(GetSnapshotRequest getSnapshotRequest); + + /** + * Retrieves the snapshot schedule for a branch. A branch with no configured schedule returns an + * empty schedule (not NOT_FOUND). + */ + SnapshotSchedule getSnapshotSchedule(GetSnapshotScheduleRequest getSnapshotScheduleRequest); + /** Get a Synced Table. */ SyncedTable getSyncedTable(GetSyncedTableRequest getSyncedTableRequest); @@ -171,6 +186,9 @@ DatabaseCredential generateDatabaseCredential( /** Returns a paginated list of Postgres roles in the branch. */ ListRolesResponse listRoles(ListRolesRequest listRolesRequest); + /** Returns a paginated list of snapshots in the project. */ + ListSnapshotsResponse listSnapshots(ListSnapshotsRequest listSnapshotsRequest); + /** Undeletes the specified database branch. */ Operation undeleteBranch(UndeleteBranchRequest undeleteBranchRequest); @@ -200,4 +218,10 @@ DatabaseCredential generateDatabaseCredential( /** Update a role for a branch. */ Operation updateRole(UpdateRoleRequest updateRoleRequest); + + /** + * Sets the snapshot schedule for a branch. The `schedule` field is replaced wholesale; an empty + * schedule disables automatic snapshots. + */ + Operation updateSnapshotSchedule(UpdateSnapshotScheduleRequest updateSnapshotScheduleRequest); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ScheduleCadence.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ScheduleCadence.java new file mode 100644 index 000000000..3de1e8a79 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/ScheduleCadence.java @@ -0,0 +1,95 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Duration; +import java.util.Objects; + +/** One cadence at which automatic snapshots are taken. */ +@Generated +public class ScheduleCadence { + /** Take a snapshot once per day. */ + @JsonProperty("daily_schedule") + private DailySchedule dailySchedule; + + /** Take a snapshot once per month. */ + @JsonProperty("monthly_schedule") + private MonthlySchedule monthlySchedule; + + /** + * How long snapshots from this cadence are kept before automatic deletion. Must be at least 1 + * hour. Applied when a snapshot is taken; not retroactive, so changing it affects only later + * snapshots. + */ + @JsonProperty("retention") + private Duration retention; + + /** Take a snapshot once per week. */ + @JsonProperty("weekly_schedule") + private WeeklySchedule weeklySchedule; + + public ScheduleCadence setDailySchedule(DailySchedule dailySchedule) { + this.dailySchedule = dailySchedule; + return this; + } + + public DailySchedule getDailySchedule() { + return dailySchedule; + } + + public ScheduleCadence setMonthlySchedule(MonthlySchedule monthlySchedule) { + this.monthlySchedule = monthlySchedule; + return this; + } + + public MonthlySchedule getMonthlySchedule() { + return monthlySchedule; + } + + public ScheduleCadence setRetention(Duration retention) { + this.retention = retention; + return this; + } + + public Duration getRetention() { + return retention; + } + + public ScheduleCadence setWeeklySchedule(WeeklySchedule weeklySchedule) { + this.weeklySchedule = weeklySchedule; + return this; + } + + public WeeklySchedule getWeeklySchedule() { + return weeklySchedule; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ScheduleCadence that = (ScheduleCadence) o; + return Objects.equals(dailySchedule, that.dailySchedule) + && Objects.equals(monthlySchedule, that.monthlySchedule) + && Objects.equals(retention, that.retention) + && Objects.equals(weeklySchedule, that.weeklySchedule); + } + + @Override + public int hashCode() { + return Objects.hash(dailySchedule, monthlySchedule, retention, weeklySchedule); + } + + @Override + public String toString() { + return new ToStringer(ScheduleCadence.class) + .add("dailySchedule", dailySchedule) + .add("monthlySchedule", monthlySchedule) + .add("retention", retention) + .add("weeklySchedule", weeklySchedule) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Snapshot.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Snapshot.java new file mode 100644 index 000000000..b5eda006e --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Snapshot.java @@ -0,0 +1,124 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Timestamp; +import java.util.Objects; + +/** + * An immutable, point-in-time copy of a branch's data within a project. It remains available after + * the source branch is deleted. + */ +@Generated +public class Snapshot { + /** When the snapshot was created. */ + @JsonProperty("create_time") + private Timestamp createTime; + + /** The resource name of the snapshot. Format: projects/{project_id}/snapshots/{snapshot_id} */ + @JsonProperty("name") + private String name; + + /** The user-chosen ID; the final segment of `name`. */ + @JsonProperty("snapshot_id") + private String snapshotId; + + /** Client-provided configuration of the snapshot. */ + @JsonProperty("spec") + private SnapshotSpec spec; + + /** Server-observed state of the snapshot. */ + @JsonProperty("status") + private SnapshotStatus status; + + /** Unique system-generated ID for the snapshot. */ + @JsonProperty("uid") + private String uid; + + public Snapshot setCreateTime(Timestamp createTime) { + this.createTime = createTime; + return this; + } + + public Timestamp getCreateTime() { + return createTime; + } + + public Snapshot setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public Snapshot setSnapshotId(String snapshotId) { + this.snapshotId = snapshotId; + return this; + } + + public String getSnapshotId() { + return snapshotId; + } + + public Snapshot setSpec(SnapshotSpec spec) { + this.spec = spec; + return this; + } + + public SnapshotSpec getSpec() { + return spec; + } + + public Snapshot setStatus(SnapshotStatus status) { + this.status = status; + return this; + } + + public SnapshotStatus getStatus() { + return status; + } + + public Snapshot setUid(String uid) { + this.uid = uid; + return this; + } + + public String getUid() { + return uid; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Snapshot that = (Snapshot) o; + return Objects.equals(createTime, that.createTime) + && Objects.equals(name, that.name) + && Objects.equals(snapshotId, that.snapshotId) + && Objects.equals(spec, that.spec) + && Objects.equals(status, that.status) + && Objects.equals(uid, that.uid); + } + + @Override + public int hashCode() { + return Objects.hash(createTime, name, snapshotId, spec, status, uid); + } + + @Override + public String toString() { + return new ToStringer(Snapshot.class) + .add("createTime", createTime) + .add("name", name) + .add("snapshotId", snapshotId) + .add("spec", spec) + .add("status", status) + .add("uid", uid) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotOperationMetadata.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotOperationMetadata.java new file mode 100644 index 000000000..4caa9a89f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotOperationMetadata.java @@ -0,0 +1,29 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Metadata for the long-running snapshot Create and Delete operations. */ +@Generated +public class SnapshotOperationMetadata { + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + return new ToStringer(SnapshotOperationMetadata.class).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSchedule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSchedule.java new file mode 100644 index 000000000..5dbc473a3 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSchedule.java @@ -0,0 +1,72 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Collection; +import java.util.Objects; + +/** + * The automatic snapshot cadences for a branch. There is exactly one schedule per branch + * (singleton); it is configured in place, not created or deleted. + * + *

Name: projects/{project_id}/branches/{branch_id}/snapshot-schedule + */ +@Generated +public class SnapshotSchedule { + /** + * The resource name of the branch's snapshot schedule. Format: + * projects/{project_id}/branches/{branch_id}/snapshot-schedule + */ + @JsonProperty("name") + private String name; + + /** + * The cadences at which automatic snapshots are taken. Update replaces the whole set; an empty + * set disables automatic snapshots. Order is not significant. When several cadences fire + * together, one snapshot is taken, retained for the longest of their retentions. + */ + @JsonProperty("schedule") + private Collection schedule; + + public SnapshotSchedule setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public SnapshotSchedule setSchedule(Collection schedule) { + this.schedule = schedule; + return this; + } + + public Collection getSchedule() { + return schedule; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SnapshotSchedule that = (SnapshotSchedule) o; + return Objects.equals(name, that.name) && Objects.equals(schedule, that.schedule); + } + + @Override + public int hashCode() { + return Objects.hash(name, schedule); + } + + @Override + public String toString() { + return new ToStringer(SnapshotSchedule.class) + .add("name", name) + .add("schedule", schedule) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotScheduleOperationMetadata.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotScheduleOperationMetadata.java new file mode 100644 index 000000000..bdc28423a --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotScheduleOperationMetadata.java @@ -0,0 +1,29 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Metadata for the long-running snapshot schedule Update operation. */ +@Generated +public class SnapshotScheduleOperationMetadata { + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + return true; + } + + @Override + public int hashCode() { + return Objects.hash(); + } + + @Override + public String toString() { + return new ToStringer(SnapshotScheduleOperationMetadata.class).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSpec.java new file mode 100644 index 000000000..5df886006 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotSpec.java @@ -0,0 +1,127 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; +import java.util.Objects; + +/** Client-provided configuration of the snapshot. */ +@Generated +public class SnapshotSpec { + /** + * Absolute time at which the snapshot is deleted. Mutually exclusive with `ttl` and `no_expiry`. + */ + @JsonProperty("expire_time") + private Timestamp expireTime; + + /** If true, the snapshot never expires. Mutually exclusive with `ttl` and `expire_time`. */ + @JsonProperty("no_expiry") + private Boolean noExpiry; + + /** The source branch to snapshot. Format: projects/{project_id}/branches/{branch_id} */ + @JsonProperty("source_branch") + private String sourceBranch; + + /** LSN to snapshot from, e.g. `16/B374D848`. Mutually exclusive with `source_branch_time`. */ + @JsonProperty("source_branch_lsn") + private String sourceBranchLsn; + + /** Timestamp to snapshot from. Mutually exclusive with `source_branch_lsn`. */ + @JsonProperty("source_branch_time") + private Timestamp sourceBranchTime; + + /** + * Time-to-live. The snapshot expires this long after it is created. Mutually exclusive with + * `expire_time` and `no_expiry`. Reads report the resolved absolute `expire_time` instead. + */ + @JsonProperty("ttl") + private Duration ttl; + + public SnapshotSpec setExpireTime(Timestamp expireTime) { + this.expireTime = expireTime; + return this; + } + + public Timestamp getExpireTime() { + return expireTime; + } + + public SnapshotSpec setNoExpiry(Boolean noExpiry) { + this.noExpiry = noExpiry; + return this; + } + + public Boolean getNoExpiry() { + return noExpiry; + } + + public SnapshotSpec setSourceBranch(String sourceBranch) { + this.sourceBranch = sourceBranch; + return this; + } + + public String getSourceBranch() { + return sourceBranch; + } + + public SnapshotSpec setSourceBranchLsn(String sourceBranchLsn) { + this.sourceBranchLsn = sourceBranchLsn; + return this; + } + + public String getSourceBranchLsn() { + return sourceBranchLsn; + } + + public SnapshotSpec setSourceBranchTime(Timestamp sourceBranchTime) { + this.sourceBranchTime = sourceBranchTime; + return this; + } + + public Timestamp getSourceBranchTime() { + return sourceBranchTime; + } + + public SnapshotSpec setTtl(Duration ttl) { + this.ttl = ttl; + return this; + } + + public Duration getTtl() { + return ttl; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SnapshotSpec that = (SnapshotSpec) o; + return Objects.equals(expireTime, that.expireTime) + && Objects.equals(noExpiry, that.noExpiry) + && Objects.equals(sourceBranch, that.sourceBranch) + && Objects.equals(sourceBranchLsn, that.sourceBranchLsn) + && Objects.equals(sourceBranchTime, that.sourceBranchTime) + && Objects.equals(ttl, that.ttl); + } + + @Override + public int hashCode() { + return Objects.hash(expireTime, noExpiry, sourceBranch, sourceBranchLsn, sourceBranchTime, ttl); + } + + @Override + public String toString() { + return new ToStringer(SnapshotSpec.class) + .add("expireTime", expireTime) + .add("noExpiry", noExpiry) + .add("sourceBranch", sourceBranch) + .add("sourceBranchLsn", sourceBranchLsn) + .add("sourceBranchTime", sourceBranchTime) + .add("ttl", ttl) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotStatus.java new file mode 100644 index 000000000..9eb0f871c --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SnapshotStatus.java @@ -0,0 +1,112 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.Timestamp; +import java.util.Objects; + +/** Server-observed state of a snapshot. */ +@Generated +public class SnapshotStatus { + /** + * Incremental storage size in bytes since the previous snapshot. Unset when the snapshot is not + * billed on incremental usage. + */ + @JsonProperty("diff_size_bytes") + private Long diffSizeBytes; + + /** Absolute time at which the snapshot is deleted. */ + @JsonProperty("expire_time") + private Timestamp expireTime; + + /** Full logical size of the snapshot, in bytes. */ + @JsonProperty("full_size_bytes") + private Long fullSizeBytes; + + /** True if the snapshot never expires. */ + @JsonProperty("no_expiry") + private Boolean noExpiry; + + /** + * The source branch the snapshot was taken from. Format: + * projects/{project_id}/branches/{branch_id} + */ + @JsonProperty("source_branch") + private String sourceBranch; + + public SnapshotStatus setDiffSizeBytes(Long diffSizeBytes) { + this.diffSizeBytes = diffSizeBytes; + return this; + } + + public Long getDiffSizeBytes() { + return diffSizeBytes; + } + + public SnapshotStatus setExpireTime(Timestamp expireTime) { + this.expireTime = expireTime; + return this; + } + + public Timestamp getExpireTime() { + return expireTime; + } + + public SnapshotStatus setFullSizeBytes(Long fullSizeBytes) { + this.fullSizeBytes = fullSizeBytes; + return this; + } + + public Long getFullSizeBytes() { + return fullSizeBytes; + } + + public SnapshotStatus setNoExpiry(Boolean noExpiry) { + this.noExpiry = noExpiry; + return this; + } + + public Boolean getNoExpiry() { + return noExpiry; + } + + public SnapshotStatus setSourceBranch(String sourceBranch) { + this.sourceBranch = sourceBranch; + return this; + } + + public String getSourceBranch() { + return sourceBranch; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SnapshotStatus that = (SnapshotStatus) o; + return Objects.equals(diffSizeBytes, that.diffSizeBytes) + && Objects.equals(expireTime, that.expireTime) + && Objects.equals(fullSizeBytes, that.fullSizeBytes) + && Objects.equals(noExpiry, that.noExpiry) + && Objects.equals(sourceBranch, that.sourceBranch); + } + + @Override + public int hashCode() { + return Objects.hash(diffSizeBytes, expireTime, fullSizeBytes, noExpiry, sourceBranch); + } + + @Override + public String toString() { + return new ToStringer(SnapshotStatus.class) + .add("diffSizeBytes", diffSizeBytes) + .add("expireTime", expireTime) + .add("fullSizeBytes", fullSizeBytes) + .add("noExpiry", noExpiry) + .add("sourceBranch", sourceBranch) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleOperation.java new file mode 100644 index 000000000..c35ede84a --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleOperation.java @@ -0,0 +1,162 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.core.DatabricksException; +import com.databricks.sdk.core.logging.Logger; +import com.databricks.sdk.core.logging.LoggerFactory; +import com.databricks.sdk.core.utils.SerDeUtils; +import com.databricks.sdk.service.common.lro.LroOptions; +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * Wrapper for interacting with a long-running updateSnapshotSchedule operation. Provides methods to + * wait for completion, check status, cancel, and access metadata. + */ +@Generated +public class UpdateSnapshotScheduleOperation { + private static final Logger LOG = LoggerFactory.getLogger(UpdateSnapshotScheduleOperation.class); + + private final PostgresService impl; + private Operation operation; + private final ObjectMapper objectMapper; + + public UpdateSnapshotScheduleOperation(PostgresService impl, Operation operation) { + this.impl = impl; + this.operation = operation; + this.objectMapper = SerDeUtils.createMapper(); + } + + /** + * Wait for the operation to complete and return the resulting SnapshotSchedule. Waits + * indefinitely if no timeout is specified. + * + * @return the created SnapshotSchedule + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public SnapshotSchedule waitForCompletion() throws TimeoutException { + return waitForCompletion(Optional.empty()); + } + + /** + * Wait for the operation to complete and return the resulting SnapshotSchedule. + * + * @param options the options for configuring the wait behavior, can be empty for defaults + * @return the created SnapshotSchedule + * @throws TimeoutException if the operation doesn't complete within the timeout + * @throws DatabricksException if the operation fails + */ + public SnapshotSchedule waitForCompletion(Optional options) throws TimeoutException { + Optional timeout = options.flatMap(LroOptions::getTimeout); + long deadline = + timeout.isPresent() + ? System.currentTimeMillis() + timeout.get().toMillis() + : Long.MAX_VALUE; + String statusMessage = "polling operation..."; + int attempt = 1; + + while (System.currentTimeMillis() < deadline) { + // Refresh the operation state + refreshOperation(); + + if (operation.getDone() != null && operation.getDone()) { + // Operation completed, check for success or failure + if (operation.getError() != null) { + String errorMsg = "unknown error"; + if (operation.getError().getMessage() != null + && !operation.getError().getMessage().isEmpty()) { + errorMsg = operation.getError().getMessage(); + } + + if (operation.getError().getErrorCode() != null) { + errorMsg = String.format("[%s] %s", operation.getError().getErrorCode(), errorMsg); + } + + throw new DatabricksException("Operation failed: " + errorMsg); + } + + // Operation completed successfully, unmarshal response + if (operation.getResponse() == null) { + throw new DatabricksException("Operation completed but no response available"); + } + + try { + JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); + return objectMapper.treeToValue(responseJson, SnapshotSchedule.class); + } catch (JsonProcessingException e) { + throw new DatabricksException( + "Failed to unmarshal snapshotSchedule response: " + e.getMessage(), e); + } + } + + // Operation still in progress, wait before polling again + String prefix = String.format("operation=%s", operation.getName()); + int sleep = Math.min(attempt, 10); // sleep 10s max per attempt + LOG.info("{}: operation in progress (sleeping ~{}s)", prefix, sleep); + + try { + Thread.sleep((long) (sleep * 1000L + Math.random() * 1000)); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new DatabricksException("Current thread was interrupted", e); + } + attempt++; + } + + String timeoutMessage = + timeout.isPresent() + ? String.format("Operation timed out after %s: %s", timeout.get(), statusMessage) + : String.format("Operation timed out: %s", statusMessage); + throw new TimeoutException(timeoutMessage); + } + + /** + * Get the operation name. + * + * @return the operation name + */ + public String getName() { + return operation.getName(); + } + + /** + * Get the operation metadata. + * + * @return the operation metadata, or null if not available + * @throws DatabricksException if the metadata cannot be deserialized + */ + public SnapshotScheduleOperationMetadata getMetadata() { + if (operation.getMetadata() == null) { + return null; + } + + try { + JsonNode metadataJson = objectMapper.valueToTree(operation.getMetadata()); + return objectMapper.treeToValue(metadataJson, SnapshotScheduleOperationMetadata.class); + } catch (JsonProcessingException e) { + throw new DatabricksException("Failed to unmarshal operation metadata: " + e.getMessage(), e); + } + } + + /** + * Check if the operation is done. This method refreshes the operation state before checking. + * + * @return true if the operation is complete, false otherwise + * @throws DatabricksException if the status check fails + */ + public boolean isDone() { + refreshOperation(); + return operation.getDone() != null && operation.getDone(); + } + + /** Refresh the operation state by polling the server. */ + private void refreshOperation() { + operation = impl.getOperation(new GetOperationRequest().setName(operation.getName())); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleRequest.java new file mode 100644 index 000000000..ea4d5e1d0 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UpdateSnapshotScheduleRequest.java @@ -0,0 +1,86 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.protobuf.FieldMask; +import java.util.Objects; + +@Generated +public class UpdateSnapshotScheduleRequest { + /** + * The resource name of the branch's snapshot schedule. Format: + * projects/{project_id}/branches/{branch_id}/snapshot-schedule + */ + @JsonIgnore private String name; + + /** + * The snapshot schedule to set. Its `name` identifies the branch. Format: + * projects/{project_id}/branches/{branch_id}/snapshot-schedule + */ + @JsonProperty("snapshot_schedule") + private SnapshotSchedule snapshotSchedule; + + /** + * Fields to update. The only updatable path is `schedule`, which replaces the entire set of + * cadences. + */ + @JsonIgnore + @QueryParam("update_mask") + private FieldMask updateMask; + + public UpdateSnapshotScheduleRequest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public UpdateSnapshotScheduleRequest setSnapshotSchedule(SnapshotSchedule snapshotSchedule) { + this.snapshotSchedule = snapshotSchedule; + return this; + } + + public SnapshotSchedule getSnapshotSchedule() { + return snapshotSchedule; + } + + public UpdateSnapshotScheduleRequest 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; + UpdateSnapshotScheduleRequest that = (UpdateSnapshotScheduleRequest) o; + return Objects.equals(name, that.name) + && Objects.equals(snapshotSchedule, that.snapshotSchedule) + && Objects.equals(updateMask, that.updateMask); + } + + @Override + public int hashCode() { + return Objects.hash(name, snapshotSchedule, updateMask); + } + + @Override + public String toString() { + return new ToStringer(UpdateSnapshotScheduleRequest.class) + .add("name", name) + .add("snapshotSchedule", snapshotSchedule) + .add("updateMask", updateMask) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/WeeklySchedule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/WeeklySchedule.java new file mode 100644 index 000000000..c16c5b008 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/WeeklySchedule.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.postgres; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Take a snapshot once per week, on the configured day at the configured hour. */ +@Generated +public class WeeklySchedule { + /** The day of the week on which to take the snapshot. */ + @JsonProperty("day_of_week") + private DayOfWeek dayOfWeek; + + /** The hour of the day, in UTC, at which to take the snapshot, in [0, 23]. */ + @JsonProperty("hour") + private Long hour; + + public WeeklySchedule setDayOfWeek(DayOfWeek dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + public DayOfWeek getDayOfWeek() { + return dayOfWeek; + } + + public WeeklySchedule setHour(Long hour) { + this.hour = hour; + return this; + } + + public Long getHour() { + return hour; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WeeklySchedule that = (WeeklySchedule) o; + return Objects.equals(dayOfWeek, that.dayOfWeek) && Objects.equals(hour, that.hour); + } + + @Override + public int hashCode() { + return Objects.hash(dayOfWeek, hour); + } + + @Override + public String toString() { + return new ToStringer(WeeklySchedule.class) + .add("dayOfWeek", dayOfWeek) + .add("hour", hour) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertStatementParameter.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertStatementParameter.java index 33163b83c..50ed20c1d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertStatementParameter.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertStatementParameter.java @@ -8,29 +8,29 @@ import java.util.Objects; /** - * Redash-owned copy of the internal StatementParameter for the external AlertV2 API. The internal - * `ordinal` and `args` fields are intentionally omitted: the public API supports only flat, named - * scalar parameters; complex types (ARRAY, MAP, STRUCT) are not supported. This mirrors SEA's - * public StatementParameter schema, see: - * cmdexec/sql-exec-api/proto/sql_exec_api_service.proto:763-779 + * A named parameter bound to the alert query. Only flat, named scalar parameters are supported; + * complex types such as ARRAY, MAP, and STRUCT are not. */ @Generated public class AlertStatementParameter { - /** The name of the parameter, referenced in the query as `:name`. */ + /** + * The name of the parameter. Reference it in the query text as `:name`. Required, must be + * non-empty, and must be unique across the alert's parameters. + */ @JsonProperty("name") private String name; /** - * The SQL data type of the parameter, e.g. STRING, INT, or DATE. Defaults to STRING. This is a - * string rather than an enum because scalar subtypes such as DECIMAL(10, 4) cannot be enumerated. - * Complex types such as ARRAY, MAP, and STRUCT are not supported. + * The SQL data type of the parameter, for example `STRING`, `INT`, or `DECIMAL(10, 2)`. If no + * type is given the type is assumed to be `STRING`. Complex types such as `ARRAY`, `MAP`, and + * `STRUCT` are not supported. */ @JsonProperty("type") private String typeValue; /** - * The bound value for the parameter, given as a string. If omitted, the value is interpreted as - * NULL. + * The value bound to the parameter, represented as a string. If omitted, the value is interpreted + * as NULL. */ @JsonProperty("value") private String value; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertV2.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertV2.java index 1d523de96..8fa63ade1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertV2.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/AlertV2.java @@ -37,7 +37,7 @@ public class AlertV2 { @JsonProperty("evaluation") private AlertV2Evaluation evaluation; - /** UUID identifying the alert. */ + /** The canonical identifier of the alert to retrieve information about. */ @JsonProperty("id") private String id; @@ -50,8 +50,20 @@ public class AlertV2 { private String ownerUserName; /** - * Query parameters bound when executing the alert query, referenced in the query text with - * `:name` syntax. Static values only. + * A list of parameters to pass into the alert SQL query statement containing parameter markers. + * Static values only. + * + *

Reference a parameter in the query text as `:name`. Each parameter must have a unique, + * non-empty name. Each parameter consists of a name, a value, and optionally a type. To represent + * a NULL value, the `value` field may be omitted or set to `null` explicitly. If the `type` field + * is omitted, the value is interpreted as a string. + * + *

If the type is given, parameters will be checked for type correctness according to the given + * type. A value is correct if the provided string can be converted to the requested type using + * the `cast` function. The exact semantics are described in the section [`cast` function] of the + * SQL language reference. + * + *

[`cast` function]: https://docs.databricks.com/sql/language-manual/functions/cast.html */ @JsonProperty("parameters") private Collection parameters; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/UpdateAlertV2Request.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/UpdateAlertV2Request.java index 414bf3131..1f2503445 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/UpdateAlertV2Request.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/UpdateAlertV2Request.java @@ -15,7 +15,7 @@ public class UpdateAlertV2Request { @JsonProperty("alert") private AlertV2 alert; - /** UUID identifying the alert. */ + /** The canonical identifier of the alert to retrieve information about. */ @JsonIgnore private String id; /**