diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index e36ae5312..23aa44735 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -493a76554afd3afdd15dc858773d01643f80352a \ No newline at end of file +5903bb39137fd76ac384b2044e425f9c56840e00 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index e37601b60..3654f0380 100755 --- a/.gitattributes +++ b/.gitattributes @@ -537,10 +537,12 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetPermissionLe databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetPermissionRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetRuleSetRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetServicePrincipalRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetSortOrder.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetUserRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetWorkspaceAssignmentRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GrantRule.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/Group.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupSchema.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupsService.java linguist-generated=true @@ -549,6 +551,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListAccountServ databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListAccountUsersRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListGroupsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListGroupsResponse.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListResponseSchema.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListServicePrincipalResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListServicePrincipalsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListSortOrder.java linguist-generated=true @@ -584,12 +587,14 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/Role.java lingu databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/RuleSetResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/RuleSetUpdateRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipal.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalSchema.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UpdateRuleSetRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UpdateWorkspaceAssignments.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/User.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UserSchema.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UsersService.java linguist-generated=true @@ -1068,11 +1073,19 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/Worksp databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/WorkspacesService.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppManifest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsAPI.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsImpl.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/BuildLogsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/BuildLogsResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/CreateServingEndpoint.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DataframeSplitInput.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeleteAppRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeleteServingEndpointRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeployAppRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeploymentStatus.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeploymentStatusState.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/EndpointCoreConfigInput.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/EndpointCoreConfigOutput.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/EndpointCoreConfigSummary.java linguist-generated=true @@ -1082,6 +1095,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/EndpointSta databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/EndpointStateReady.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/EndpointTag.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/ExportMetricsRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/GetAppRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/GetServingEndpointPermissionLevelsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/GetServingEndpointPermissionLevelsResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/GetServingEndpointPermissionsRequest.java linguist-generated=true @@ -1115,6 +1129,10 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/TrafficConf databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountIpAccessListsService.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyAPI.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyMessage.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountSettingsService.java linguist-generated=true @@ -1129,6 +1147,8 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/Credential databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/CredentialsManagerService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DefaultNamespaceSetting.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountIpAccessListRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountNetworkPolicyRequest.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountNetworkPolicyResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteDefaultWorkspaceNamespaceRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteDefaultWorkspaceNamespaceResponse.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteIpAccessListRequest.java linguist-generated=true @@ -1159,6 +1179,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/PersonalCo databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/PersonalComputeMessageEnum.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/PersonalComputeSetting.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/PublicTokenInfo.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ReadAccountNetworkPolicyRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ReadDefaultWorkspaceNamespaceRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ReadPersonalComputeSettingRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ReplaceIpAccessList.java linguist-generated=true @@ -1182,6 +1203,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokenType. databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/TokensService.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateAccountNetworkPolicyRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateDefaultWorkspaceNamespaceRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateIpAccessList.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdatePersonalComputeSettingRequest.java linguist-generated=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 83d1da2e7..52b0b024f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Version changelog +## 0.11.0 + +* Adjust token expiry window to 40 seconds because of Azure ([#170](https://github.com/databricks/databricks-sdk-java/pull/170)). + +API Changes: + + * Added `attributes`, `count`, `excludedAttributes`, `filter`, `sortBy`, `sortOrder`, and `startIndex` fields for `com.databricks.sdk.service.iam.GetAccountUserRequest` and `com.databricks.sdk.service.iam.GetUserRequest`. + * Added `schemas` field for `com.databricks.sdk.service.iam.Group`, `com.databricks.sdk.service.iam.ListGroupsResponse`, `com.databricks.sdk.service.iam.ListServicePrincipalResponse`, `com.databricks.sdk.service.iam.ListUsersResponse`, `com.databricks.sdk.service.iam.ServicePrincipal`, and `com.databricks.sdk.service.iam.User`. + * Added `com.databricks.sdk.service.iam.GetSortOrder`, `com.databricks.sdk.service.iam.GroupSchema`, `com.databricks.sdk.service.iam.ListResponseSchema`, `com.databricks.sdk.service.iam.ServicePrincipalSchema`, and `com.databricks.sdk.service.iam.UserSchema` class. + * Added `webhookNotifications` field for `com.databricks.sdk.service.jobs.SubmitTask`. + * Added `workspaceClient.apps()` service and related classes. + * Added `accountClient.networkPolicy()` service and related classes. + +OpenAPI SHA: 5903bb39137fd76ac384b2044e425f9c56840e00, Date: 2023-10-23 + +Dependency updates: + + * Bump org.junit:junit-bom from 5.9.3 to 5.10.0 ([#124](https://github.com/databricks/databricks-sdk-java/pull/124)). + * Bump org.slf4j:slf4j-api from 2.0.7 to 2.0.9 ([#146](https://github.com/databricks/databricks-sdk-java/pull/146)). + * Bump org.slf4j:slf4j-reload4j from 2.0.7 to 2.0.9 ([#147](https://github.com/databricks/databricks-sdk-java/pull/147)). + * Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0 ([#156](https://github.com/databricks/databricks-sdk-java/pull/156)). ## 0.10.0 * Don't fail codegen if the tree was already removed ([#164](https://github.com/databricks/databricks-sdk-java/pull/164)). diff --git a/databricks-sdk-java/pom.xml b/databricks-sdk-java/pom.xml index 73e898b46..e74a1103f 100644 --- a/databricks-sdk-java/pom.xml +++ b/databricks-sdk-java/pom.xml @@ -5,7 +5,7 @@ com.databricks databricks-sdk-parent - 0.10.0 + 0.11.0 databricks-sdk-java diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java index 63f4bc6bd..0efa4e933 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java @@ -53,6 +53,8 @@ import com.databricks.sdk.service.provisioning.WorkspacesService; import com.databricks.sdk.service.settings.AccountIpAccessListsAPI; import com.databricks.sdk.service.settings.AccountIpAccessListsService; +import com.databricks.sdk.service.settings.AccountNetworkPolicyAPI; +import com.databricks.sdk.service.settings.AccountNetworkPolicyService; import com.databricks.sdk.service.settings.AccountSettingsAPI; import com.databricks.sdk.service.settings.AccountSettingsService; import com.databricks.sdk.support.Generated; @@ -74,6 +76,7 @@ public class AccountClient { private LogDeliveryAPI logDeliveryAPI; private AccountMetastoreAssignmentsAPI metastoreAssignmentsAPI; private AccountMetastoresAPI metastoresAPI; + private AccountNetworkPolicyAPI networkPolicyAPI; private NetworksAPI networksAPI; private OAuthEnrollmentAPI oAuthEnrollmentAPI; private OAuthPublishedAppsAPI oAuthPublishedAppsAPI; @@ -108,6 +111,7 @@ public AccountClient(DatabricksConfig config) { logDeliveryAPI = new LogDeliveryAPI(apiClient); metastoreAssignmentsAPI = new AccountMetastoreAssignmentsAPI(apiClient); metastoresAPI = new AccountMetastoresAPI(apiClient); + networkPolicyAPI = new AccountNetworkPolicyAPI(apiClient); networksAPI = new NetworksAPI(apiClient); oAuthEnrollmentAPI = new OAuthEnrollmentAPI(apiClient); oAuthPublishedAppsAPI = new OAuthPublishedAppsAPI(apiClient); @@ -305,6 +309,19 @@ public AccountMetastoresAPI metastores() { return metastoresAPI; } + /** + * Network policy is a set of rules that defines what can be accessed from your Databricks + * network. E.g.: You can choose to block your SQL UDF to access internet from your Databricks + * serverless clusters. + * + *

There is only one instance of this setting per account. Since this setting has a default + * value, this setting is present on all accounts even though it's never set on a given account. + * Deletion reverts the value of the setting back to the default value. + */ + public AccountNetworkPolicyAPI networkPolicy() { + return networkPolicyAPI; + } + /** * These APIs manage network configurations for customer-managed VPCs (optional). Its ID is used * when creating a new workspace if you use customer-managed VPCs. @@ -517,6 +534,12 @@ public AccountClient withMetastoresImpl(AccountMetastoresService accountMetastor return this; } + /** Override AccountNetworkPolicyAPI with mock */ + public AccountClient withNetworkPolicyImpl(AccountNetworkPolicyService accountNetworkPolicy) { + networkPolicyAPI = new AccountNetworkPolicyAPI(accountNetworkPolicy); + return this; + } + /** Override NetworksAPI with mock */ public AccountClient withNetworksImpl(NetworksService networks) { networksAPI = new NetworksAPI(networks); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java index 79cee2a8a..e153dc0ab 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java @@ -78,6 +78,8 @@ import com.databricks.sdk.service.ml.ModelRegistryService; import com.databricks.sdk.service.pipelines.PipelinesAPI; import com.databricks.sdk.service.pipelines.PipelinesService; +import com.databricks.sdk.service.serving.AppsAPI; +import com.databricks.sdk.service.serving.AppsService; import com.databricks.sdk.service.serving.ServingEndpointsAPI; import com.databricks.sdk.service.serving.ServingEndpointsService; import com.databricks.sdk.service.settings.CredentialsManagerAPI; @@ -139,6 +141,7 @@ public class WorkspaceClient { private AccountAccessControlProxyAPI accountAccessControlProxyAPI; private AlertsAPI alertsAPI; + private AppsAPI appsAPI; private ArtifactAllowlistsAPI artifactAllowlistsAPI; private CatalogsAPI catalogsAPI; private CleanRoomsAPI cleanRoomsAPI; @@ -210,6 +213,7 @@ public WorkspaceClient(DatabricksConfig config) { accountAccessControlProxyAPI = new AccountAccessControlProxyAPI(apiClient); alertsAPI = new AlertsAPI(apiClient); + appsAPI = new AppsAPI(apiClient); artifactAllowlistsAPI = new ArtifactAllowlistsAPI(apiClient); catalogsAPI = new CatalogsAPI(apiClient); cleanRoomsAPI = new CleanRoomsAPI(apiClient); @@ -303,6 +307,14 @@ public AlertsAPI alerts() { return alertsAPI; } + /** + * Lakehouse Apps run directly on a customer’s Databricks instance, integrate with their data, use + * and extend Databricks services, and enable users to interact through single sign-on. + */ + public AppsAPI apps() { + return appsAPI; + } + /** * In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the `allowlist` * in UC so that users can leverage these artifacts on compute configured with shared access mode. @@ -714,8 +726,13 @@ public MetastoresAPI metastores() { } /** - * MLflow Model Registry is a centralized model repository and a UI and set of APIs that enable - * you to manage the full lifecycle of MLflow Models. + * Note: This API reference documents APIs for the Workspace Model Registry. Databricks recommends + * using [Models in Unity Catalog](/api/workspace/registeredmodels) instead. Models in Unity + * Catalog provides centralized model governance, cross-workspace access, lineage, and deployment. + * Workspace Model Registry will be deprecated in the future. + * + *

The Workspace Model Registry is a centralized model repository and a UI and set of APIs that + * enable you to manage the full lifecycle of MLflow Models. */ public ModelRegistryAPI modelRegistry() { return modelRegistryAPI; @@ -1252,6 +1269,12 @@ public WorkspaceClient withAlertsImpl(AlertsService alerts) { return this; } + /** Replace AppsAPI implementation with mock */ + public WorkspaceClient withAppsImpl(AppsService apps) { + appsAPI = new AppsAPI(apps); + return this; + } + /** Replace ArtifactAllowlistsAPI implementation with mock */ public WorkspaceClient withArtifactAllowlistsImpl(ArtifactAllowlistsService artifactAllowlists) { artifactAllowlistsAPI = new ArtifactAllowlistsAPI(artifactAllowlists); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java index a66591b34..1f0e229ac 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java @@ -13,7 +13,7 @@ public class UserAgent { // TODO: check if reading from // /META-INF/maven/com.databricks/databrics-sdk-java/pom.properties // or getClass().getPackage().getImplementationVersion() is enough. - private static final String version = "0.10.0"; + private static final String version = "0.11.0"; public static void withProduct(String product, String productVersion) { UserAgent.product = product; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java index df9f00fa1..d76db37fb 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/Privilege.java @@ -13,6 +13,7 @@ public enum Privilege { CREATE_CONNECTION, CREATE_EXTERNAL_LOCATION, CREATE_EXTERNAL_TABLE, + CREATE_EXTERNAL_VOLUME, CREATE_FOREIGN_CATALOG, CREATE_FUNCTION, CREATE_MANAGED_STORAGE, @@ -25,11 +26,13 @@ public enum Privilege { CREATE_STORAGE_CREDENTIAL, CREATE_TABLE, CREATE_VIEW, + CREATE_VOLUME, EXECUTE, MANAGE_ALLOWLIST, MODIFY, READ_FILES, READ_PRIVATE_FILES, + READ_VOLUME, REFRESH, SELECT, SET_SHARE_PERMISSION, @@ -43,4 +46,5 @@ public enum Privilege { USE_SHARE, WRITE_FILES, WRITE_PRIVATE_FILES, + WRITE_VOLUME, } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetAccountUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetAccountUserRequest.java index 6dd6f38a8..1008e6505 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetAccountUserRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetAccountUserRequest.java @@ -3,15 +3,90 @@ package com.databricks.sdk.service.iam; import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; import com.databricks.sdk.support.ToStringer; import java.util.Objects; /** Get user details */ @Generated public class GetAccountUserRequest { + /** Comma-separated list of attributes to return in response. */ + @QueryParam("attributes") + private String attributes; + + /** Desired number of results per page. Default is 10000. */ + @QueryParam("count") + private Long count; + + /** Comma-separated list of attributes to exclude in response. */ + @QueryParam("excludedAttributes") + private String excludedAttributes; + + /** + * Query by which the results have to be filtered. Supported operators are equals(`eq`), + * contains(`co`), starts with(`sw`) and not equals(`ne`). Additionally, simple expressions can be + * formed using logical operators - `and` and `or`. The [SCIM RFC] has more details but we + * currently only support simple expressions. + * + *

[SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + */ + @QueryParam("filter") + private String filter; + /** Unique ID for a user in the Databricks account. */ private String id; + /** + * Attribute to sort the results. Multi-part paths are supported. For example, `userName`, + * `name.givenName`, and `emails`. + */ + @QueryParam("sortBy") + private String sortBy; + + /** The order to sort the results. */ + @QueryParam("sortOrder") + private GetSortOrder sortOrder; + + /** Specifies the index of the first result. First item is number 1. */ + @QueryParam("startIndex") + private Long startIndex; + + public GetAccountUserRequest setAttributes(String attributes) { + this.attributes = attributes; + return this; + } + + public String getAttributes() { + return attributes; + } + + public GetAccountUserRequest setCount(Long count) { + this.count = count; + return this; + } + + public Long getCount() { + return count; + } + + public GetAccountUserRequest setExcludedAttributes(String excludedAttributes) { + this.excludedAttributes = excludedAttributes; + return this; + } + + public String getExcludedAttributes() { + return excludedAttributes; + } + + public GetAccountUserRequest setFilter(String filter) { + this.filter = filter; + return this; + } + + public String getFilter() { + return filter; + } + public GetAccountUserRequest setId(String id) { this.id = id; return this; @@ -21,21 +96,65 @@ public String getId() { return id; } + public GetAccountUserRequest setSortBy(String sortBy) { + this.sortBy = sortBy; + return this; + } + + public String getSortBy() { + return sortBy; + } + + public GetAccountUserRequest setSortOrder(GetSortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + public GetSortOrder getSortOrder() { + return sortOrder; + } + + public GetAccountUserRequest setStartIndex(Long startIndex) { + this.startIndex = startIndex; + return this; + } + + public Long getStartIndex() { + return startIndex; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetAccountUserRequest that = (GetAccountUserRequest) o; - return Objects.equals(id, that.id); + return Objects.equals(attributes, that.attributes) + && Objects.equals(count, that.count) + && Objects.equals(excludedAttributes, that.excludedAttributes) + && Objects.equals(filter, that.filter) + && Objects.equals(id, that.id) + && Objects.equals(sortBy, that.sortBy) + && Objects.equals(sortOrder, that.sortOrder) + && Objects.equals(startIndex, that.startIndex); } @Override public int hashCode() { - return Objects.hash(id); + return Objects.hash( + attributes, count, excludedAttributes, filter, id, sortBy, sortOrder, startIndex); } @Override public String toString() { - return new ToStringer(GetAccountUserRequest.class).add("id", id).toString(); + return new ToStringer(GetAccountUserRequest.class) + .add("attributes", attributes) + .add("count", count) + .add("excludedAttributes", excludedAttributes) + .add("filter", filter) + .add("id", id) + .add("sortBy", sortBy) + .add("sortOrder", sortOrder) + .add("startIndex", startIndex) + .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetSortOrder.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetSortOrder.java new file mode 100755 index 000000000..ace37878f --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetSortOrder.java @@ -0,0 +1,15 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iam; + +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.annotation.JsonProperty; + +@Generated +public enum GetSortOrder { + @JsonProperty("ascending") + ASCENDING, + + @JsonProperty("descending") + DESCENDING, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetUserRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetUserRequest.java index d58887d8e..9efdfd1c5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetUserRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GetUserRequest.java @@ -3,15 +3,90 @@ package com.databricks.sdk.service.iam; import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; import com.databricks.sdk.support.ToStringer; import java.util.Objects; /** Get user details */ @Generated public class GetUserRequest { + /** Comma-separated list of attributes to return in response. */ + @QueryParam("attributes") + private String attributes; + + /** Desired number of results per page. */ + @QueryParam("count") + private Long count; + + /** Comma-separated list of attributes to exclude in response. */ + @QueryParam("excludedAttributes") + private String excludedAttributes; + + /** + * Query by which the results have to be filtered. Supported operators are equals(`eq`), + * contains(`co`), starts with(`sw`) and not equals(`ne`). Additionally, simple expressions can be + * formed using logical operators - `and` and `or`. The [SCIM RFC] has more details but we + * currently only support simple expressions. + * + *

[SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 + */ + @QueryParam("filter") + private String filter; + /** Unique ID for a user in the Databricks workspace. */ private String id; + /** + * Attribute to sort the results. Multi-part paths are supported. For example, `userName`, + * `name.givenName`, and `emails`. + */ + @QueryParam("sortBy") + private String sortBy; + + /** The order to sort the results. */ + @QueryParam("sortOrder") + private GetSortOrder sortOrder; + + /** Specifies the index of the first result. First item is number 1. */ + @QueryParam("startIndex") + private Long startIndex; + + public GetUserRequest setAttributes(String attributes) { + this.attributes = attributes; + return this; + } + + public String getAttributes() { + return attributes; + } + + public GetUserRequest setCount(Long count) { + this.count = count; + return this; + } + + public Long getCount() { + return count; + } + + public GetUserRequest setExcludedAttributes(String excludedAttributes) { + this.excludedAttributes = excludedAttributes; + return this; + } + + public String getExcludedAttributes() { + return excludedAttributes; + } + + public GetUserRequest setFilter(String filter) { + this.filter = filter; + return this; + } + + public String getFilter() { + return filter; + } + public GetUserRequest setId(String id) { this.id = id; return this; @@ -21,21 +96,65 @@ public String getId() { return id; } + public GetUserRequest setSortBy(String sortBy) { + this.sortBy = sortBy; + return this; + } + + public String getSortBy() { + return sortBy; + } + + public GetUserRequest setSortOrder(GetSortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + public GetSortOrder getSortOrder() { + return sortOrder; + } + + public GetUserRequest setStartIndex(Long startIndex) { + this.startIndex = startIndex; + return this; + } + + public Long getStartIndex() { + return startIndex; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GetUserRequest that = (GetUserRequest) o; - return Objects.equals(id, that.id); + return Objects.equals(attributes, that.attributes) + && Objects.equals(count, that.count) + && Objects.equals(excludedAttributes, that.excludedAttributes) + && Objects.equals(filter, that.filter) + && Objects.equals(id, that.id) + && Objects.equals(sortBy, that.sortBy) + && Objects.equals(sortOrder, that.sortOrder) + && Objects.equals(startIndex, that.startIndex); } @Override public int hashCode() { - return Objects.hash(id); + return Objects.hash( + attributes, count, excludedAttributes, filter, id, sortBy, sortOrder, startIndex); } @Override public String toString() { - return new ToStringer(GetUserRequest.class).add("id", id).toString(); + return new ToStringer(GetUserRequest.class) + .add("attributes", attributes) + .add("count", count) + .add("excludedAttributes", excludedAttributes) + .add("filter", filter) + .add("id", id) + .add("sortBy", sortBy) + .add("sortOrder", sortOrder) + .add("startIndex", startIndex) + .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/Group.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/Group.java index 0fc6cbc9d..1b73c7e87 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/Group.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/Group.java @@ -38,10 +38,14 @@ public class Group { @JsonProperty("meta") private ResourceMeta meta; - /** */ + /** Corresponds to AWS instance profile/arn role. */ @JsonProperty("roles") private Collection roles; + /** The schema of the group. */ + @JsonProperty("schemas") + private Collection schemas; + public Group setDisplayName(String displayName) { this.displayName = displayName; return this; @@ -114,6 +118,15 @@ public Collection getRoles() { return roles; } + public Group setSchemas(Collection schemas) { + this.schemas = schemas; + return this; + } + + public Collection getSchemas() { + return schemas; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -126,12 +139,14 @@ public boolean equals(Object o) { && Objects.equals(id, that.id) && Objects.equals(members, that.members) && Objects.equals(meta, that.meta) - && Objects.equals(roles, that.roles); + && Objects.equals(roles, that.roles) + && Objects.equals(schemas, that.schemas); } @Override public int hashCode() { - return Objects.hash(displayName, entitlements, externalId, groups, id, members, meta, roles); + return Objects.hash( + displayName, entitlements, externalId, groups, id, members, meta, roles, schemas); } @Override @@ -145,6 +160,7 @@ public String toString() { .add("members", members) .add("meta", meta) .add("roles", roles) + .add("schemas", schemas) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupSchema.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupSchema.java new file mode 100755 index 000000000..468d177c1 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/GroupSchema.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iam; + +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.annotation.JsonProperty; + +@Generated +public enum GroupSchema { + @JsonProperty("urn:ietf:params:scim:schemas:core:2.0:Group") + URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListGroupsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListGroupsResponse.java index 78157d20e..41877be1d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListGroupsResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListGroupsResponse.java @@ -18,6 +18,10 @@ public class ListGroupsResponse { @JsonProperty("Resources") private Collection resources; + /** The schema of the service principal. */ + @JsonProperty("schemas") + private Collection schemas; + /** Starting index of all the results that matched the request filters. First item is number 1. */ @JsonProperty("startIndex") private Long startIndex; @@ -44,6 +48,15 @@ public Collection getResources() { return resources; } + public ListGroupsResponse setSchemas(Collection schemas) { + this.schemas = schemas; + return this; + } + + public Collection getSchemas() { + return schemas; + } + public ListGroupsResponse setStartIndex(Long startIndex) { this.startIndex = startIndex; return this; @@ -69,13 +82,14 @@ public boolean equals(Object o) { ListGroupsResponse that = (ListGroupsResponse) o; return Objects.equals(itemsPerPage, that.itemsPerPage) && Objects.equals(resources, that.resources) + && Objects.equals(schemas, that.schemas) && Objects.equals(startIndex, that.startIndex) && Objects.equals(totalResults, that.totalResults); } @Override public int hashCode() { - return Objects.hash(itemsPerPage, resources, startIndex, totalResults); + return Objects.hash(itemsPerPage, resources, schemas, startIndex, totalResults); } @Override @@ -83,6 +97,7 @@ public String toString() { return new ToStringer(ListGroupsResponse.class) .add("itemsPerPage", itemsPerPage) .add("resources", resources) + .add("schemas", schemas) .add("startIndex", startIndex) .add("totalResults", totalResults) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListResponseSchema.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListResponseSchema.java new file mode 100755 index 000000000..fa1696281 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListResponseSchema.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iam; + +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.annotation.JsonProperty; + +@Generated +public enum ListResponseSchema { + @JsonProperty("urn:ietf:params:scim:api:messages:2.0:ListResponse") + URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_LIST_RESPONSE, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListServicePrincipalResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListServicePrincipalResponse.java index 690fd7af0..0d8821afd 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListServicePrincipalResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListServicePrincipalResponse.java @@ -18,6 +18,10 @@ public class ListServicePrincipalResponse { @JsonProperty("Resources") private Collection resources; + /** The schema of the List response. */ + @JsonProperty("schemas") + private Collection schemas; + /** Starting index of all the results that matched the request filters. First item is number 1. */ @JsonProperty("startIndex") private Long startIndex; @@ -44,6 +48,15 @@ public Collection getResources() { return resources; } + public ListServicePrincipalResponse setSchemas(Collection schemas) { + this.schemas = schemas; + return this; + } + + public Collection getSchemas() { + return schemas; + } + public ListServicePrincipalResponse setStartIndex(Long startIndex) { this.startIndex = startIndex; return this; @@ -69,13 +82,14 @@ public boolean equals(Object o) { ListServicePrincipalResponse that = (ListServicePrincipalResponse) o; return Objects.equals(itemsPerPage, that.itemsPerPage) && Objects.equals(resources, that.resources) + && Objects.equals(schemas, that.schemas) && Objects.equals(startIndex, that.startIndex) && Objects.equals(totalResults, that.totalResults); } @Override public int hashCode() { - return Objects.hash(itemsPerPage, resources, startIndex, totalResults); + return Objects.hash(itemsPerPage, resources, schemas, startIndex, totalResults); } @Override @@ -83,6 +97,7 @@ public String toString() { return new ToStringer(ListServicePrincipalResponse.class) .add("itemsPerPage", itemsPerPage) .add("resources", resources) + .add("schemas", schemas) .add("startIndex", startIndex) .add("totalResults", totalResults) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListUsersResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListUsersResponse.java index d98b19eaf..9d1a07e9c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListUsersResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ListUsersResponse.java @@ -18,6 +18,10 @@ public class ListUsersResponse { @JsonProperty("Resources") private Collection resources; + /** The schema of the List response. */ + @JsonProperty("schemas") + private Collection schemas; + /** Starting index of all the results that matched the request filters. First item is number 1. */ @JsonProperty("startIndex") private Long startIndex; @@ -44,6 +48,15 @@ public Collection getResources() { return resources; } + public ListUsersResponse setSchemas(Collection schemas) { + this.schemas = schemas; + return this; + } + + public Collection getSchemas() { + return schemas; + } + public ListUsersResponse setStartIndex(Long startIndex) { this.startIndex = startIndex; return this; @@ -69,13 +82,14 @@ public boolean equals(Object o) { ListUsersResponse that = (ListUsersResponse) o; return Objects.equals(itemsPerPage, that.itemsPerPage) && Objects.equals(resources, that.resources) + && Objects.equals(schemas, that.schemas) && Objects.equals(startIndex, that.startIndex) && Objects.equals(totalResults, that.totalResults); } @Override public int hashCode() { - return Objects.hash(itemsPerPage, resources, startIndex, totalResults); + return Objects.hash(itemsPerPage, resources, schemas, startIndex, totalResults); } @Override @@ -83,6 +97,7 @@ public String toString() { return new ToStringer(ListUsersResponse.class) .add("itemsPerPage", itemsPerPage) .add("resources", resources) + .add("schemas", schemas) .add("startIndex", startIndex) .add("totalResults", totalResults) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipal.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipal.java index b4279e49b..28d4b5c92 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipal.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipal.java @@ -38,10 +38,14 @@ public class ServicePrincipal { @JsonProperty("id") private String id; - /** */ + /** Corresponds to AWS instance profile/arn role. */ @JsonProperty("roles") private Collection roles; + /** The schema of the List response. */ + @JsonProperty("schemas") + private Collection schemas; + public ServicePrincipal setActive(Boolean active) { this.active = active; return this; @@ -114,6 +118,15 @@ public Collection getRoles() { return roles; } + public ServicePrincipal setSchemas(Collection schemas) { + this.schemas = schemas; + return this; + } + + public Collection getSchemas() { + return schemas; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -126,13 +139,14 @@ public boolean equals(Object o) { && Objects.equals(externalId, that.externalId) && Objects.equals(groups, that.groups) && Objects.equals(id, that.id) - && Objects.equals(roles, that.roles); + && Objects.equals(roles, that.roles) + && Objects.equals(schemas, that.schemas); } @Override public int hashCode() { return Objects.hash( - active, applicationId, displayName, entitlements, externalId, groups, id, roles); + active, applicationId, displayName, entitlements, externalId, groups, id, roles, schemas); } @Override @@ -146,6 +160,7 @@ public String toString() { .add("groups", groups) .add("id", id) .add("roles", roles) + .add("schemas", schemas) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalSchema.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalSchema.java new file mode 100755 index 000000000..9b25295db --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/ServicePrincipalSchema.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iam; + +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.annotation.JsonProperty; + +@Generated +public enum ServicePrincipalSchema { + @JsonProperty("urn:ietf:params:scim:schemas:core:2.0:ServicePrincipal") + URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_SERVICE_PRINCIPAL, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/User.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/User.java index 75d871f4b..94a477826 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/User.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/User.java @@ -42,10 +42,14 @@ public class User { @JsonProperty("name") private Name name; - /** */ + /** Corresponds to AWS instance profile/arn role. */ @JsonProperty("roles") private Collection roles; + /** The schema of the user. */ + @JsonProperty("schemas") + private Collection schemas; + /** Email address of the Databricks user. */ @JsonProperty("userName") private String userName; @@ -131,6 +135,15 @@ public Collection getRoles() { return roles; } + public User setSchemas(Collection schemas) { + this.schemas = schemas; + return this; + } + + public Collection getSchemas() { + return schemas; + } + public User setUserName(String userName) { this.userName = userName; return this; @@ -154,13 +167,24 @@ public boolean equals(Object o) { && Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(roles, that.roles) + && Objects.equals(schemas, that.schemas) && Objects.equals(userName, that.userName); } @Override public int hashCode() { return Objects.hash( - active, displayName, emails, entitlements, externalId, groups, id, name, roles, userName); + active, + displayName, + emails, + entitlements, + externalId, + groups, + id, + name, + roles, + schemas, + userName); } @Override @@ -175,6 +199,7 @@ public String toString() { .add("id", id) .add("name", name) .add("roles", roles) + .add("schemas", schemas) .add("userName", userName) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UserSchema.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UserSchema.java new file mode 100755 index 000000000..23056e6f6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UserSchema.java @@ -0,0 +1,12 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.iam; + +import com.databricks.sdk.support.Generated; +import com.fasterxml.jackson.annotation.JsonProperty; + +@Generated +public enum UserSchema { + @JsonProperty("urn:ietf:params:scim:schemas:core:2.0:User") + URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_USER, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ListRunsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ListRunsRequest.java index a8a8d41ce..d5db3c5e4 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ListRunsRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ListRunsRequest.java @@ -35,7 +35,7 @@ public class ListRunsRequest { /** * The number of runs to return. This value must be greater than 0 and less than 25. The default - * value is 25. If a request specifies a limit of 0, the service instead uses the maximum limit. + * value is 20. If a request specifies a limit of 0, the service instead uses the maximum limit. */ @QueryParam("limit") private Long limit; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/NotebookTask.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/NotebookTask.java index 8000d43b5..a5d0917f9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/NotebookTask.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/NotebookTask.java @@ -22,6 +22,8 @@ public class NotebookTask { * *

Retrieve these parameters in a notebook using [dbutils.widgets.get]. * + *

The JSON representation of this field cannot exceed 1MB. + * *

[Task parameter variables]: https://docs.databricks.com/jobs.html#parameter-variables * [dbutils.widgets.get]: * https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-widgets diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitTask.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitTask.java index b65af624c..469e2ecf3 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitTask.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitTask.java @@ -122,6 +122,14 @@ public class SubmitTask { @JsonProperty("timeout_seconds") private Long timeoutSeconds; + /** + * A collection of system notification IDs to notify when the run begins or completes. The default + * behavior is to not send any system notifications. Task webhooks respect the task notification + * settings. + */ + @JsonProperty("webhook_notifications") + private WebhookNotifications webhookNotifications; + public SubmitTask setConditionTask(ConditionTask conditionTask) { this.conditionTask = conditionTask; return this; @@ -275,6 +283,15 @@ public Long getTimeoutSeconds() { return timeoutSeconds; } + public SubmitTask setWebhookNotifications(WebhookNotifications webhookNotifications) { + this.webhookNotifications = webhookNotifications; + return this; + } + + public WebhookNotifications getWebhookNotifications() { + return webhookNotifications; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -296,7 +313,8 @@ public boolean equals(Object o) { && Objects.equals(sparkSubmitTask, that.sparkSubmitTask) && Objects.equals(sqlTask, that.sqlTask) && Objects.equals(taskKey, that.taskKey) - && Objects.equals(timeoutSeconds, that.timeoutSeconds); + && Objects.equals(timeoutSeconds, that.timeoutSeconds) + && Objects.equals(webhookNotifications, that.webhookNotifications); } @Override @@ -318,7 +336,8 @@ public int hashCode() { sparkSubmitTask, sqlTask, taskKey, - timeoutSeconds); + timeoutSeconds, + webhookNotifications); } @Override @@ -341,6 +360,7 @@ public String toString() { .add("sqlTask", sqlTask) .add("taskKey", taskKey) .add("timeoutSeconds", timeoutSeconds) + .add("webhookNotifications", webhookNotifications) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryAPI.java index 9859e2ca1..dd47f3d91 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryAPI.java @@ -9,8 +9,13 @@ import org.slf4j.LoggerFactory; /** - * MLflow Model Registry is a centralized model repository and a UI and set of APIs that enable you - * to manage the full lifecycle of MLflow Models. + * Note: This API reference documents APIs for the Workspace Model Registry. Databricks recommends + * using [Models in Unity Catalog](/api/workspace/registeredmodels) instead. Models in Unity Catalog + * provides centralized model governance, cross-workspace access, lineage, and deployment. Workspace + * Model Registry will be deprecated in the future. + * + *

The Workspace Model Registry is a centralized model repository and a UI and set of APIs that + * enable you to manage the full lifecycle of MLflow Models. */ @Generated public class ModelRegistryAPI { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryService.java index cd77d2308..bf3535616 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ModelRegistryService.java @@ -4,8 +4,13 @@ import com.databricks.sdk.support.Generated; /** - * MLflow Model Registry is a centralized model repository and a UI and set of APIs that enable you - * to manage the full lifecycle of MLflow Models. + * Note: This API reference documents APIs for the Workspace Model Registry. Databricks recommends + * using [Models in Unity Catalog](/api/workspace/registeredmodels) instead. Models in Unity Catalog + * provides centralized model governance, cross-workspace access, lineage, and deployment. Workspace + * Model Registry will be deprecated in the future. + * + *

The Workspace Model Registry is a centralized model repository and a UI and set of APIs that + * enable you to manage the full lifecycle of MLflow Models. * *

This is the high-level interface, that contains generated methods. * diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppManifest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppManifest.java new file mode 100755 index 000000000..fd6236df3 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppManifest.java @@ -0,0 +1,135 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.serving; + +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 AppManifest { + /** Workspace dependencies. */ + @JsonProperty("dependencies") + private Collection dependencies; + + /** application description */ + @JsonProperty("description") + private String description; + + /** Ingress rules for app public endpoints */ + @JsonProperty("ingress") + private Object ingress; + + /** Only a-z and dashes (-). Max length of 30. */ + @JsonProperty("name") + private String name; + + /** Container private registry */ + @JsonProperty("registry") + private Object registry; + + /** list of app services. Restricted to one for now. */ + @JsonProperty("services") + private Object services; + + /** The manifest format version. Must be set to 1. */ + @JsonProperty("version") + private Long version; + + public AppManifest setDependencies(Collection dependencies) { + this.dependencies = dependencies; + return this; + } + + public Collection getDependencies() { + return dependencies; + } + + public AppManifest setDescription(String description) { + this.description = description; + return this; + } + + public String getDescription() { + return description; + } + + public AppManifest setIngress(Object ingress) { + this.ingress = ingress; + return this; + } + + public Object getIngress() { + return ingress; + } + + public AppManifest setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public AppManifest setRegistry(Object registry) { + this.registry = registry; + return this; + } + + public Object getRegistry() { + return registry; + } + + public AppManifest setServices(Object services) { + this.services = services; + return this; + } + + public Object getServices() { + return services; + } + + public AppManifest setVersion(Long version) { + this.version = version; + return this; + } + + public Long getVersion() { + return version; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AppManifest that = (AppManifest) o; + return Objects.equals(dependencies, that.dependencies) + && Objects.equals(description, that.description) + && Objects.equals(ingress, that.ingress) + && Objects.equals(name, that.name) + && Objects.equals(registry, that.registry) + && Objects.equals(services, that.services) + && Objects.equals(version, that.version); + } + + @Override + public int hashCode() { + return Objects.hash(dependencies, description, ingress, name, registry, services, version); + } + + @Override + public String toString() { + return new ToStringer(AppManifest.class) + .add("dependencies", dependencies) + .add("description", description) + .add("ingress", ingress) + .add("name", name) + .add("registry", registry) + .add("services", services) + .add("version", version) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsAPI.java new file mode 100755 index 000000000..eee6a59ff --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsAPI.java @@ -0,0 +1,71 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.serving; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Lakehouse Apps run directly on a customer’s Databricks instance, integrate with their data, use + * and extend Databricks services, and enable users to interact through single sign-on. + */ +@Generated +public class AppsAPI { + private static final Logger LOG = LoggerFactory.getLogger(AppsAPI.class); + + private final AppsService impl; + + /** Regular-use constructor */ + public AppsAPI(ApiClient apiClient) { + impl = new AppsImpl(apiClient); + } + + /** Constructor for mocks */ + public AppsAPI(AppsService mock) { + impl = mock; + } + + public DeploymentStatus create(AppManifest manifest) { + return create(new DeployAppRequest().setManifest(manifest)); + } + + /** + * Create and deploy an application. + * + *

Creates and deploys an application. + */ + public DeploymentStatus create(DeployAppRequest request) { + return impl.create(request); + } + + public void delete(String name) { + delete(new DeleteAppRequest().setName(name)); + } + + /** + * Delete an application. + * + *

Delete an application definition + */ + public void delete(DeleteAppRequest request) { + impl.delete(request); + } + + public void get(String name) { + get(new GetAppRequest().setName(name)); + } + + /** + * Get definition for an application. + * + *

Get an application definition + */ + public void get(GetAppRequest request) { + impl.get(request); + } + + public AppsService impl() { + return impl; + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsImpl.java new file mode 100755 index 000000000..3403dc0fa --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsImpl.java @@ -0,0 +1,42 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.serving; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; + +/** Package-local implementation of Apps */ +@Generated +class AppsImpl implements AppsService { + private final ApiClient apiClient; + + public AppsImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public DeploymentStatus create(DeployAppRequest request) { + String path = "/api/2.0/preview/apps/deployments"; + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + return apiClient.POST(path, request, DeploymentStatus.class, headers); + } + + @Override + public void delete(DeleteAppRequest request) { + String path = String.format("/api/2.0/preview/apps/instances/%s", request.getName()); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + apiClient.DELETE(path, request, Void.class, headers); + } + + @Override + public void get(GetAppRequest request) { + String path = String.format("/api/2.0/preview/apps/instances/%s", request.getName()); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + apiClient.GET(path, request, Void.class, headers); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsService.java new file mode 100755 index 000000000..d7923897b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/AppsService.java @@ -0,0 +1,36 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.serving; + +import com.databricks.sdk.support.Generated; + +/** + * Lakehouse Apps run directly on a customer’s Databricks instance, integrate with their data, use + * and extend Databricks services, and enable users to interact through single sign-on. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface AppsService { + /** + * Create and deploy an application. + * + *

Creates and deploys an application. + */ + DeploymentStatus create(DeployAppRequest deployAppRequest); + + /** + * Delete an application. + * + *

Delete an application definition + */ + void delete(DeleteAppRequest deleteAppRequest); + + /** + * Get definition for an application. + * + *

Get an application definition + */ + void get(GetAppRequest getAppRequest); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeleteAppRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeleteAppRequest.java new file mode 100755 index 000000000..2b52ffad0 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeleteAppRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.serving; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Delete an application */ +@Generated +public class DeleteAppRequest { + /** The name of an application. This field is required. */ + private String name; + + public DeleteAppRequest 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; + DeleteAppRequest that = (DeleteAppRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(DeleteAppRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeployAppRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeployAppRequest.java new file mode 100755 index 000000000..e8a8c196b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeployAppRequest.java @@ -0,0 +1,58 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.serving; + +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 DeployAppRequest { + /** Manifest that specifies the application requirements */ + @JsonProperty("manifest") + private AppManifest manifest; + + /** Information passed at app deployment time to fulfill app dependencies */ + @JsonProperty("resources") + private Object resources; + + public DeployAppRequest setManifest(AppManifest manifest) { + this.manifest = manifest; + return this; + } + + public AppManifest getManifest() { + return manifest; + } + + public DeployAppRequest setResources(Object resources) { + this.resources = resources; + return this; + } + + public Object getResources() { + return resources; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeployAppRequest that = (DeployAppRequest) o; + return Objects.equals(manifest, that.manifest) && Objects.equals(resources, that.resources); + } + + @Override + public int hashCode() { + return Objects.hash(manifest, resources); + } + + @Override + public String toString() { + return new ToStringer(DeployAppRequest.class) + .add("manifest", manifest) + .add("resources", resources) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeploymentStatus.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeploymentStatus.java new file mode 100755 index 000000000..1342c05d4 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeploymentStatus.java @@ -0,0 +1,58 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.serving; + +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 DeploymentStatus { + /** description */ + @JsonProperty("deployment_id") + private String deploymentId; + + /** State: one of DEPLOYING,SUCCESS, FAILURE, DEPLOYMENT_STATE_UNSPECIFIED */ + @JsonProperty("state") + private DeploymentStatusState state; + + public DeploymentStatus setDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; + return this; + } + + public String getDeploymentId() { + return deploymentId; + } + + public DeploymentStatus setState(DeploymentStatusState state) { + this.state = state; + return this; + } + + public DeploymentStatusState getState() { + return state; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeploymentStatus that = (DeploymentStatus) o; + return Objects.equals(deploymentId, that.deploymentId) && Objects.equals(state, that.state); + } + + @Override + public int hashCode() { + return Objects.hash(deploymentId, state); + } + + @Override + public String toString() { + return new ToStringer(DeploymentStatus.class) + .add("deploymentId", deploymentId) + .add("state", state) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeploymentStatusState.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeploymentStatusState.java new file mode 100755 index 000000000..831246bac --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/DeploymentStatusState.java @@ -0,0 +1,14 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.serving; + +import com.databricks.sdk.support.Generated; + +/** State: one of DEPLOYING,SUCCESS, FAILURE, DEPLOYMENT_STATE_UNSPECIFIED */ +@Generated +public enum DeploymentStatusState { + DEPLOYING, + DEPLOYMENT_STATE_UNSPECIFIED, + FAILURE, + SUCCESS, +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/GetAppRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/GetAppRequest.java new file mode 100755 index 000000000..9d98fc073 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/serving/GetAppRequest.java @@ -0,0 +1,41 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.serving; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Get definition for an application */ +@Generated +public class GetAppRequest { + /** The name of an application. This field is required. */ + private String name; + + public GetAppRequest 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; + GetAppRequest that = (GetAppRequest) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + return new ToStringer(GetAppRequest.class).add("name", name).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyAPI.java new file mode 100755 index 000000000..d94d0e103 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyAPI.java @@ -0,0 +1,75 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.settings; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Network policy is a set of rules that defines what can be accessed from your Databricks network. + * E.g.: You can choose to block your SQL UDF to access internet from your Databricks serverless + * clusters. + * + *

There is only one instance of this setting per account. Since this setting has a default + * value, this setting is present on all accounts even though it's never set on a given account. + * Deletion reverts the value of the setting back to the default value. + */ +@Generated +public class AccountNetworkPolicyAPI { + private static final Logger LOG = LoggerFactory.getLogger(AccountNetworkPolicyAPI.class); + + private final AccountNetworkPolicyService impl; + + /** Regular-use constructor */ + public AccountNetworkPolicyAPI(ApiClient apiClient) { + impl = new AccountNetworkPolicyImpl(apiClient); + } + + /** Constructor for mocks */ + public AccountNetworkPolicyAPI(AccountNetworkPolicyService mock) { + impl = mock; + } + + public DeleteAccountNetworkPolicyResponse deleteAccountNetworkPolicy(String etag) { + return deleteAccountNetworkPolicy(new DeleteAccountNetworkPolicyRequest().setEtag(etag)); + } + + /** + * Delete Account Network Policy. + * + *

Reverts back all the account network policies back to default. + */ + public DeleteAccountNetworkPolicyResponse deleteAccountNetworkPolicy( + DeleteAccountNetworkPolicyRequest request) { + return impl.deleteAccountNetworkPolicy(request); + } + + public AccountNetworkPolicyMessage readAccountNetworkPolicy(String etag) { + return readAccountNetworkPolicy(new ReadAccountNetworkPolicyRequest().setEtag(etag)); + } + + /** + * Get Account Network Policy. + * + *

Gets the value of Account level Network Policy. + */ + public AccountNetworkPolicyMessage readAccountNetworkPolicy( + ReadAccountNetworkPolicyRequest request) { + return impl.readAccountNetworkPolicy(request); + } + + /** + * Update Account Network Policy. + * + *

Updates the policy content of Account level Network Policy. + */ + public AccountNetworkPolicyMessage updateAccountNetworkPolicy( + UpdateAccountNetworkPolicyRequest request) { + return impl.updateAccountNetworkPolicy(request); + } + + public AccountNetworkPolicyService impl() { + return impl; + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java new file mode 100755 index 000000000..4a8f39d83 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyImpl.java @@ -0,0 +1,54 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.settings; + +import com.databricks.sdk.core.ApiClient; +import com.databricks.sdk.support.Generated; +import java.util.HashMap; +import java.util.Map; + +/** Package-local implementation of AccountNetworkPolicy */ +@Generated +class AccountNetworkPolicyImpl implements AccountNetworkPolicyService { + private final ApiClient apiClient; + + public AccountNetworkPolicyImpl(ApiClient apiClient) { + this.apiClient = apiClient; + } + + @Override + public DeleteAccountNetworkPolicyResponse deleteAccountNetworkPolicy( + DeleteAccountNetworkPolicyRequest request) { + String path = + String.format( + "/api/2.0/accounts/%s/settings/types/network_policy/names/default", + apiClient.configuredAccountID()); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + return apiClient.DELETE(path, request, DeleteAccountNetworkPolicyResponse.class, headers); + } + + @Override + public AccountNetworkPolicyMessage readAccountNetworkPolicy( + ReadAccountNetworkPolicyRequest request) { + String path = + String.format( + "/api/2.0/accounts/%s/settings/types/network_policy/names/default", + apiClient.configuredAccountID()); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + return apiClient.GET(path, request, AccountNetworkPolicyMessage.class, headers); + } + + @Override + public AccountNetworkPolicyMessage updateAccountNetworkPolicy( + UpdateAccountNetworkPolicyRequest request) { + String path = + String.format( + "/api/2.0/accounts/%s/settings/types/network_policy/names/default", + apiClient.configuredAccountID()); + Map headers = new HashMap<>(); + headers.put("Accept", "application/json"); + headers.put("Content-Type", "application/json"); + return apiClient.PATCH(path, request, AccountNetworkPolicyMessage.class, headers); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyMessage.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyMessage.java new file mode 100755 index 000000000..2a4dd5c56 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyMessage.java @@ -0,0 +1,49 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settings; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class AccountNetworkPolicyMessage { + /** + * Whether or not serverless UDF can access the internet. When false, access to the internet will + * be blocked from serverless clusters. Trusted traffic required by clusters for basic + * functionality will not be affected. + */ + @JsonProperty("serverless_internet_access_enabled") + private Boolean serverlessInternetAccessEnabled; + + public AccountNetworkPolicyMessage setServerlessInternetAccessEnabled( + Boolean serverlessInternetAccessEnabled) { + this.serverlessInternetAccessEnabled = serverlessInternetAccessEnabled; + return this; + } + + public Boolean getServerlessInternetAccessEnabled() { + return serverlessInternetAccessEnabled; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AccountNetworkPolicyMessage that = (AccountNetworkPolicyMessage) o; + return Objects.equals(serverlessInternetAccessEnabled, that.serverlessInternetAccessEnabled); + } + + @Override + public int hashCode() { + return Objects.hash(serverlessInternetAccessEnabled); + } + + @Override + public String toString() { + return new ToStringer(AccountNetworkPolicyMessage.class) + .add("serverlessInternetAccessEnabled", serverlessInternetAccessEnabled) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyService.java new file mode 100755 index 000000000..1c5cc813d --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/AccountNetworkPolicyService.java @@ -0,0 +1,44 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. +package com.databricks.sdk.service.settings; + +import com.databricks.sdk.support.Generated; + +/** + * Network policy is a set of rules that defines what can be accessed from your Databricks network. + * E.g.: You can choose to block your SQL UDF to access internet from your Databricks serverless + * clusters. + * + *

There is only one instance of this setting per account. Since this setting has a default + * value, this setting is present on all accounts even though it's never set on a given account. + * Deletion reverts the value of the setting back to the default value. + * + *

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

Evolving: this interface is under development. Method signatures may change. + */ +@Generated +public interface AccountNetworkPolicyService { + /** + * Delete Account Network Policy. + * + *

Reverts back all the account network policies back to default. + */ + DeleteAccountNetworkPolicyResponse deleteAccountNetworkPolicy( + DeleteAccountNetworkPolicyRequest deleteAccountNetworkPolicyRequest); + + /** + * Get Account Network Policy. + * + *

Gets the value of Account level Network Policy. + */ + AccountNetworkPolicyMessage readAccountNetworkPolicy( + ReadAccountNetworkPolicyRequest readAccountNetworkPolicyRequest); + + /** + * Update Account Network Policy. + * + *

Updates the policy content of Account level Network Policy. + */ + AccountNetworkPolicyMessage updateAccountNetworkPolicy( + UpdateAccountNetworkPolicyRequest updateAccountNetworkPolicyRequest); +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountNetworkPolicyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountNetworkPolicyRequest.java new file mode 100755 index 000000000..83f6c285a --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountNetworkPolicyRequest.java @@ -0,0 +1,50 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settings; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Delete Account Network Policy */ +@Generated +public class DeleteAccountNetworkPolicyRequest { + /** + * etag used for versioning. The response is at least as fresh as the eTag provided. This is used + * for optimistic concurrency control as a way to help prevent simultaneous writes of a setting + * overwriting each other. It is strongly suggested that systems make use of the etag in the read + * -> delete pattern to perform setting deletions in order to avoid race conditions. That is, get + * an etag from a GET request, and pass it with the DELETE request to identify the rule set + * version you are deleting. + */ + @QueryParam("etag") + private String etag; + + public DeleteAccountNetworkPolicyRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeleteAccountNetworkPolicyRequest that = (DeleteAccountNetworkPolicyRequest) o; + return Objects.equals(etag, that.etag); + } + + @Override + public int hashCode() { + return Objects.hash(etag); + } + + @Override + public String toString() { + return new ToStringer(DeleteAccountNetworkPolicyRequest.class).add("etag", etag).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountNetworkPolicyResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountNetworkPolicyResponse.java new file mode 100755 index 000000000..3a9a5981b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteAccountNetworkPolicyResponse.java @@ -0,0 +1,49 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settings; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class DeleteAccountNetworkPolicyResponse { + /** + * etag used for versioning. The response is at least as fresh as the eTag provided. This is used + * for optimistic concurrency control as a way to help prevent simultaneous writes of a setting + * overwriting each other. It is strongly suggested that systems make use of the etag in the read + * -> update pattern to perform setting updates in order to avoid race conditions. That is, get an + * etag from a GET request, and pass it with the PATCH request to identify the setting version you + * are updating. + */ + @JsonProperty("etag") + private String etag; + + public DeleteAccountNetworkPolicyResponse setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeleteAccountNetworkPolicyResponse that = (DeleteAccountNetworkPolicyResponse) o; + return Objects.equals(etag, that.etag); + } + + @Override + public int hashCode() { + return Objects.hash(etag); + } + + @Override + public String toString() { + return new ToStringer(DeleteAccountNetworkPolicyResponse.class).add("etag", etag).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ReadAccountNetworkPolicyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ReadAccountNetworkPolicyRequest.java new file mode 100755 index 000000000..f7d9aaf21 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ReadAccountNetworkPolicyRequest.java @@ -0,0 +1,50 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settings; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import java.util.Objects; + +/** Get Account Network Policy */ +@Generated +public class ReadAccountNetworkPolicyRequest { + /** + * etag used for versioning. The response is at least as fresh as the eTag provided. This is used + * for optimistic concurrency control as a way to help prevent simultaneous writes of a setting + * overwriting each other. It is strongly suggested that systems make use of the etag in the read + * -> delete pattern to perform setting deletions in order to avoid race conditions. That is, get + * an etag from a GET request, and pass it with the DELETE request to identify the rule set + * version you are deleting. + */ + @QueryParam("etag") + private String etag; + + public ReadAccountNetworkPolicyRequest setEtag(String etag) { + this.etag = etag; + return this; + } + + public String getEtag() { + return etag; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReadAccountNetworkPolicyRequest that = (ReadAccountNetworkPolicyRequest) o; + return Objects.equals(etag, that.etag); + } + + @Override + public int hashCode() { + return Objects.hash(etag); + } + + @Override + public String toString() { + return new ToStringer(ReadAccountNetworkPolicyRequest.class).add("etag", etag).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateAccountNetworkPolicyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateAccountNetworkPolicyRequest.java new file mode 100755 index 000000000..e1feb9229 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateAccountNetworkPolicyRequest.java @@ -0,0 +1,59 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.settings; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Update Account Network Policy */ +@Generated +public class UpdateAccountNetworkPolicyRequest { + /** This should always be set to true for Settings RPCs. Added for AIP compliance. */ + @JsonProperty("allow_missing") + private Boolean allowMissing; + + /** */ + @JsonProperty("setting") + private AccountNetworkPolicyMessage setting; + + public UpdateAccountNetworkPolicyRequest setAllowMissing(Boolean allowMissing) { + this.allowMissing = allowMissing; + return this; + } + + public Boolean getAllowMissing() { + return allowMissing; + } + + public UpdateAccountNetworkPolicyRequest setSetting(AccountNetworkPolicyMessage setting) { + this.setting = setting; + return this; + } + + public AccountNetworkPolicyMessage getSetting() { + return setting; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UpdateAccountNetworkPolicyRequest that = (UpdateAccountNetworkPolicyRequest) o; + return Objects.equals(allowMissing, that.allowMissing) && Objects.equals(setting, that.setting); + } + + @Override + public int hashCode() { + return Objects.hash(allowMissing, setting); + } + + @Override + public String toString() { + return new ToStringer(UpdateAccountNetworkPolicyRequest.class) + .add("allowMissing", allowMissing) + .add("setting", setting) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CreateRecipient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CreateRecipient.java index 5a7a0ce53..bc313e65e 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CreateRecipient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/CreateRecipient.java @@ -23,7 +23,7 @@ public class CreateRecipient { * __cloud__:__region__:__metastore-uuid__. */ @JsonProperty("data_recipient_global_metastore_id") - private Object dataRecipientGlobalMetastoreId; + private String dataRecipientGlobalMetastoreId; /** IP Access List */ @JsonProperty("ip_access_list") @@ -66,12 +66,12 @@ public String getComment() { return comment; } - public CreateRecipient setDataRecipientGlobalMetastoreId(Object dataRecipientGlobalMetastoreId) { + public CreateRecipient setDataRecipientGlobalMetastoreId(String dataRecipientGlobalMetastoreId) { this.dataRecipientGlobalMetastoreId = dataRecipientGlobalMetastoreId; return this; } - public Object getDataRecipientGlobalMetastoreId() { + public String getDataRecipientGlobalMetastoreId() { return dataRecipientGlobalMetastoreId; } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java index a21aa25d3..b0e9d7f55 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/Privilege.java @@ -13,6 +13,7 @@ public enum Privilege { CREATE_CONNECTION, CREATE_EXTERNAL_LOCATION, CREATE_EXTERNAL_TABLE, + CREATE_EXTERNAL_VOLUME, CREATE_FOREIGN_CATALOG, CREATE_FUNCTION, CREATE_MANAGED_STORAGE, @@ -25,11 +26,13 @@ public enum Privilege { CREATE_STORAGE_CREDENTIAL, CREATE_TABLE, CREATE_VIEW, + CREATE_VOLUME, EXECUTE, MANAGE_ALLOWLIST, MODIFY, READ_FILES, READ_PRIVATE_FILES, + READ_VOLUME, REFRESH, SELECT, SET_SHARE_PERMISSION, @@ -43,4 +46,5 @@ public enum Privilege { USE_SHARE, WRITE_FILES, WRITE_PRIVATE_FILES, + WRITE_VOLUME, } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ChannelName.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ChannelName.java index 3b9d4cbb0..8e0f647a1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ChannelName.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ChannelName.java @@ -4,6 +4,7 @@ import com.databricks.sdk.support.Generated; +/** Name of the channel */ @Generated public enum ChannelName { CHANNEL_NAME_CURRENT, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ExternalLink.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ExternalLink.java index 581ccd347..a7a351564 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ExternalLink.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ExternalLink.java @@ -43,7 +43,7 @@ public class ExternalLink { /** * When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no * more chunks. This link is an absolute `path` to be joined with your `$DATABRICKS_HOST`, and - * should be treated as an opague link. This is an alternative to using `next_chunk_index`. + * should be treated as an opaque link. This is an alternative to using `next_chunk_index`. */ @JsonProperty("next_chunk_internal_link") private String nextChunkInternalLink; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ResultData.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ResultData.java index 8d0ea9424..5e72a9485 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ResultData.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/ResultData.java @@ -47,7 +47,7 @@ public class ResultData { /** * When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no * more chunks. This link is an absolute `path` to be joined with your `$DATABRICKS_HOST`, and - * should be treated as an opague link. This is an alternative to using `next_chunk_index`. + * should be treated as an opaque link. This is an alternative to using `next_chunk_index`. */ @JsonProperty("next_chunk_internal_link") private String nextChunkInternalLink; diff --git a/pom.xml b/pom.xml index 49b24363d..0d4ea7a03 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.databricks databricks-sdk-parent - 0.10.0 + 0.11.0 pom Databricks SDK for Java The Databricks SDK for Java includes functionality to accelerate development with Java for