diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index e80d241f7..647e6ad82 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -7cf7251e4fc7e33a2153e5ed9641be1c06d72549 \ No newline at end of file +b5283a925ecf8929263b63f41b182246745d81a0 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 5aa4da763..ef3a43d21 100644 --- a/.gitattributes +++ b/.gitattributes @@ -78,6 +78,7 @@ /home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/CustomTemplate.java linguist-generated=true /home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/DeleteAppRequest.java linguist-generated=true /home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/DeleteCustomTemplateRequest.java linguist-generated=true +/home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/EnvVar.java linguist-generated=true /home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/GetAppDeploymentRequest.java linguist-generated=true /home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/GetAppPermissionLevelsRequest.java linguist-generated=true /home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/GetAppPermissionLevelsResponse.java linguist-generated=true diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 9ae933334..fb1e3184d 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -35,3 +35,6 @@ * Add `createRole()`, `deleteRole()`, `getRole()` and `listRoles()` methods for `workspaceClient.postgres()` service. * Add `destinationSourceSecurable` field for `com.databricks.sdk.service.catalog.AccessRequestDestinations`. * Add `accessModes` and `storageLocation` fields for `com.databricks.sdk.service.sharing.Table`. +* Add `command` and `envVars` fields for `com.databricks.sdk.service.apps.AppDeployment`. +* Add `fullName` and `securableType` fields for `com.databricks.sdk.service.catalog.AccessRequestDestinations`. +* [Breaking] Change `deleteKafkaConfig()` method for `workspaceClient.featureEngineering()` service . Method path has changed. \ No newline at end of file diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/AppDeployment.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/AppDeployment.java index f127a9538..bf9640846 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/AppDeployment.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/AppDeployment.java @@ -5,10 +5,18 @@ 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 AppDeployment { + /** + * The command with which to run the app. This will override the command specified in the app.yaml + * file. + */ + @JsonProperty("command") + private Collection command; + /** The creation time of the deployment. Formatted timestamp in ISO 6801. */ @JsonProperty("create_time") private String createTime; @@ -25,6 +33,13 @@ public class AppDeployment { @JsonProperty("deployment_id") private String deploymentId; + /** + * The environment variables to set in the app runtime environment. This will override the + * environment variables specified in the app.yaml file. + */ + @JsonProperty("env_vars") + private Collection envVars; + /** Git repository to use as the source for the app deployment. */ @JsonProperty("git_source") private GitSource gitSource; @@ -51,6 +66,15 @@ public class AppDeployment { @JsonProperty("update_time") private String updateTime; + public AppDeployment setCommand(Collection command) { + this.command = command; + return this; + } + + public Collection getCommand() { + return command; + } + public AppDeployment setCreateTime(String createTime) { this.createTime = createTime; return this; @@ -87,6 +111,15 @@ public String getDeploymentId() { return deploymentId; } + public AppDeployment setEnvVars(Collection envVars) { + this.envVars = envVars; + return this; + } + + public Collection getEnvVars() { + return envVars; + } + public AppDeployment setGitSource(GitSource gitSource) { this.gitSource = gitSource; return this; @@ -137,10 +170,12 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AppDeployment that = (AppDeployment) o; - return Objects.equals(createTime, that.createTime) + return Objects.equals(command, that.command) + && Objects.equals(createTime, that.createTime) && Objects.equals(creator, that.creator) && Objects.equals(deploymentArtifacts, that.deploymentArtifacts) && Objects.equals(deploymentId, that.deploymentId) + && Objects.equals(envVars, that.envVars) && Objects.equals(gitSource, that.gitSource) && Objects.equals(mode, that.mode) && Objects.equals(sourceCodePath, that.sourceCodePath) @@ -151,10 +186,12 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + command, createTime, creator, deploymentArtifacts, deploymentId, + envVars, gitSource, mode, sourceCodePath, @@ -165,10 +202,12 @@ public int hashCode() { @Override public String toString() { return new ToStringer(AppDeployment.class) + .add("command", command) .add("createTime", createTime) .add("creator", creator) .add("deploymentArtifacts", deploymentArtifacts) .add("deploymentId", deploymentId) + .add("envVars", envVars) .add("gitSource", gitSource) .add("mode", mode) .add("sourceCodePath", sourceCodePath) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/EnvVar.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/EnvVar.java new file mode 100644 index 000000000..87ea4d481 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/EnvVar.java @@ -0,0 +1,77 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.apps; + +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 EnvVar { + /** The name of the environment variable. */ + @JsonProperty("name") + private String name; + + /** The value for the environment variable. */ + @JsonProperty("value") + private String value; + + /** + * The name of an external Databricks resource that contains the value, such as a secret or a + * database table. + */ + @JsonProperty("value_from") + private String valueFrom; + + public EnvVar setName(String name) { + this.name = name; + return this; + } + + public String getName() { + return name; + } + + public EnvVar setValue(String value) { + this.value = value; + return this; + } + + public String getValue() { + return value; + } + + public EnvVar setValueFrom(String valueFrom) { + this.valueFrom = valueFrom; + return this; + } + + public String getValueFrom() { + return valueFrom; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EnvVar that = (EnvVar) o; + return Objects.equals(name, that.name) + && Objects.equals(value, that.value) + && Objects.equals(valueFrom, that.valueFrom); + } + + @Override + public int hashCode() { + return Objects.hash(name, value, valueFrom); + } + + @Override + public String toString() { + return new ToStringer(EnvVar.class) + .add("name", name) + .add("value", value) + .add("valueFrom", valueFrom) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccessRequestDestinations.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccessRequestDestinations.java index f018c8b78..bb3858506 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccessRequestDestinations.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccessRequestDestinations.java @@ -29,10 +29,24 @@ public class AccessRequestDestinations { @JsonProperty("destinations") private Collection destinations; + /** + * The full name of the securable. Redundant with the name in the securable object, but necessary + * for Terraform integration + */ + @JsonProperty("full_name") + private String fullName; + /** The securable for which the access request destinations are being modified or read. */ @JsonProperty("securable") private Securable securable; + /** + * The type of the securable. Redundant with the type in the securable object, but necessary for + * Terraform integration + */ + @JsonProperty("securable_type") + private String securableType; + public AccessRequestDestinations setAreAnyDestinationsHidden(Boolean areAnyDestinationsHidden) { this.areAnyDestinationsHidden = areAnyDestinationsHidden; return this; @@ -62,6 +76,15 @@ public Collection getDestinations() { return destinations; } + public AccessRequestDestinations setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + public String getFullName() { + return fullName; + } + public AccessRequestDestinations setSecurable(Securable securable) { this.securable = securable; return this; @@ -71,6 +94,15 @@ public Securable getSecurable() { return securable; } + public AccessRequestDestinations setSecurableType(String securableType) { + this.securableType = securableType; + return this; + } + + public String getSecurableType() { + return securableType; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -79,13 +111,20 @@ public boolean equals(Object o) { return Objects.equals(areAnyDestinationsHidden, that.areAnyDestinationsHidden) && Objects.equals(destinationSourceSecurable, that.destinationSourceSecurable) && Objects.equals(destinations, that.destinations) - && Objects.equals(securable, that.securable); + && Objects.equals(fullName, that.fullName) + && Objects.equals(securable, that.securable) + && Objects.equals(securableType, that.securableType); } @Override public int hashCode() { return Objects.hash( - areAnyDestinationsHidden, destinationSourceSecurable, destinations, securable); + areAnyDestinationsHidden, + destinationSourceSecurable, + destinations, + fullName, + securable, + securableType); } @Override @@ -94,7 +133,9 @@ public String toString() { .add("areAnyDestinationsHidden", areAnyDestinationsHidden) .add("destinationSourceSecurable", destinationSourceSecurable) .add("destinations", destinations) + .add("fullName", fullName) .add("securable", securable) + .add("securableType", securableType) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java old mode 100755 new mode 100644 index 14ebda0b2..64b85bd5d --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java @@ -35,7 +35,10 @@ public Feature createFeature(CreateFeatureRequest request) { return impl.createFeature(request); } - /** Create a Kafka config. */ + /** + * Create a Kafka config. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ public KafkaConfig createKafkaConfig(CreateKafkaConfigRequest request) { return impl.createKafkaConfig(request); } @@ -58,7 +61,10 @@ public void deleteKafkaConfig(String name) { deleteKafkaConfig(new DeleteKafkaConfigRequest().setName(name)); } - /** Delete a Kafka config. */ + /** + * Delete a Kafka config. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ public void deleteKafkaConfig(DeleteKafkaConfigRequest request) { impl.deleteKafkaConfig(request); } @@ -86,7 +92,10 @@ public KafkaConfig getKafkaConfig(String name) { return getKafkaConfig(new GetKafkaConfigRequest().setName(name)); } - /** Get a Kafka config. */ + /** + * Get a Kafka config. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ public KafkaConfig getKafkaConfig(GetKafkaConfigRequest request) { return impl.getKafkaConfig(request); } @@ -116,7 +125,10 @@ public Iterable listFeatures(ListFeaturesRequest request) { }); } - /** List Kafka configs. */ + /** + * List Kafka configs. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ public Iterable listKafkaConfigs(ListKafkaConfigsRequest request) { return new Paginator<>( request, @@ -152,7 +164,10 @@ public Feature updateFeature(UpdateFeatureRequest request) { return impl.updateFeature(request); } - /** Update a Kafka config. */ + /** + * Update a Kafka config. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ public KafkaConfig updateKafkaConfig(UpdateKafkaConfigRequest request) { return impl.updateKafkaConfig(request); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java old mode 100755 new mode 100644 index 4b26f4703..5a8cf37e7 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java @@ -95,8 +95,7 @@ public void deleteFeature(DeleteFeatureRequest request) { @Override public void deleteKafkaConfig(DeleteKafkaConfigRequest request) { String path = - String.format( - "/api/2.0/feature-engineering/features/kafka-configs/kafka/%s", request.getName()); + String.format("/api/2.0/feature-engineering/features/kafka-configs/%s", request.getName()); try { Request req = new Request("DELETE", path); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringService.java old mode 100755 new mode 100644 index 5a6d11387..e99d67822 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringService.java @@ -19,7 +19,10 @@ BatchCreateMaterializedFeaturesResponse batchCreateMaterializedFeatures( /** Create a Feature. */ Feature createFeature(CreateFeatureRequest createFeatureRequest); - /** Create a Kafka config. */ + /** + * Create a Kafka config. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ KafkaConfig createKafkaConfig(CreateKafkaConfigRequest createKafkaConfigRequest); /** Create a materialized feature. */ @@ -29,7 +32,10 @@ MaterializedFeature createMaterializedFeature( /** Delete a Feature. */ void deleteFeature(DeleteFeatureRequest deleteFeatureRequest); - /** Delete a Kafka config. */ + /** + * Delete a Kafka config. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ void deleteKafkaConfig(DeleteKafkaConfigRequest deleteKafkaConfigRequest); /** Delete a materialized feature. */ @@ -38,7 +44,10 @@ MaterializedFeature createMaterializedFeature( /** Get a Feature. */ Feature getFeature(GetFeatureRequest getFeatureRequest); - /** Get a Kafka config. */ + /** + * Get a Kafka config. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ KafkaConfig getKafkaConfig(GetKafkaConfigRequest getKafkaConfigRequest); /** Get a materialized feature. */ @@ -48,7 +57,10 @@ MaterializedFeature getMaterializedFeature( /** List Features. */ ListFeaturesResponse listFeatures(ListFeaturesRequest listFeaturesRequest); - /** List Kafka configs. */ + /** + * List Kafka configs. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ ListKafkaConfigsResponse listKafkaConfigs(ListKafkaConfigsRequest listKafkaConfigsRequest); /** List materialized features. */ @@ -58,7 +70,10 @@ ListMaterializedFeaturesResponse listMaterializedFeatures( /** Update a Feature. */ Feature updateFeature(UpdateFeatureRequest updateFeatureRequest); - /** Update a Kafka config. */ + /** + * Update a Kafka config. During PrPr, Kafka configs can be read and used when creating features + * under the entire metastore. Only the creator of the Kafka config can delete it. + */ KafkaConfig updateKafkaConfig(UpdateKafkaConfigRequest updateKafkaConfigRequest); /** Update a materialized feature (pause/resume). */