Skip to content

Commit b778de3

Browse files
Update SDK API to b5283a925ecf8929263b63f41b182246745d81a0 (#600)
This PR updates the SDK to the latest API changes. NO_CHANGELOG=true Co-authored-by: databricks-ci-ghec-1[bot] <184311507+databricks-ci-ghec-1[bot]@users.noreply.github.com>
1 parent 7511a35 commit b778de3

File tree

9 files changed

+206
-16
lines changed

9 files changed

+206
-16
lines changed

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7cf7251e4fc7e33a2153e5ed9641be1c06d72549
1+
b5283a925ecf8929263b63f41b182246745d81a0

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
/home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/CustomTemplate.java linguist-generated=true
7979
/home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/DeleteAppRequest.java linguist-generated=true
8080
/home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/DeleteCustomTemplateRequest.java linguist-generated=true
81+
/home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/EnvVar.java linguist-generated=true
8182
/home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/GetAppDeploymentRequest.java linguist-generated=true
8283
/home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/GetAppPermissionLevelsRequest.java linguist-generated=true
8384
/home/ubuntu/workspace/databricks-sdk-java/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/GetAppPermissionLevelsResponse.java linguist-generated=true

NEXT_CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@
3535
* Add `createRole()`, `deleteRole()`, `getRole()` and `listRoles()` methods for `workspaceClient.postgres()` service.
3636
* Add `destinationSourceSecurable` field for `com.databricks.sdk.service.catalog.AccessRequestDestinations`.
3737
* Add `accessModes` and `storageLocation` fields for `com.databricks.sdk.service.sharing.Table`.
38+
* Add `command` and `envVars` fields for `com.databricks.sdk.service.apps.AppDeployment`.
39+
* Add `fullName` and `securableType` fields for `com.databricks.sdk.service.catalog.AccessRequestDestinations`.
40+
* [Breaking] Change `deleteKafkaConfig()` method for `workspaceClient.featureEngineering()` service . Method path has changed.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/AppDeployment.java

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@
55
import com.databricks.sdk.support.Generated;
66
import com.databricks.sdk.support.ToStringer;
77
import com.fasterxml.jackson.annotation.JsonProperty;
8+
import java.util.Collection;
89
import java.util.Objects;
910

1011
@Generated
1112
public class AppDeployment {
13+
/**
14+
* The command with which to run the app. This will override the command specified in the app.yaml
15+
* file.
16+
*/
17+
@JsonProperty("command")
18+
private Collection<String> command;
19+
1220
/** The creation time of the deployment. Formatted timestamp in ISO 6801. */
1321
@JsonProperty("create_time")
1422
private String createTime;
@@ -25,6 +33,13 @@ public class AppDeployment {
2533
@JsonProperty("deployment_id")
2634
private String deploymentId;
2735

36+
/**
37+
* The environment variables to set in the app runtime environment. This will override the
38+
* environment variables specified in the app.yaml file.
39+
*/
40+
@JsonProperty("env_vars")
41+
private Collection<EnvVar> envVars;
42+
2843
/** Git repository to use as the source for the app deployment. */
2944
@JsonProperty("git_source")
3045
private GitSource gitSource;
@@ -51,6 +66,15 @@ public class AppDeployment {
5166
@JsonProperty("update_time")
5267
private String updateTime;
5368

69+
public AppDeployment setCommand(Collection<String> command) {
70+
this.command = command;
71+
return this;
72+
}
73+
74+
public Collection<String> getCommand() {
75+
return command;
76+
}
77+
5478
public AppDeployment setCreateTime(String createTime) {
5579
this.createTime = createTime;
5680
return this;
@@ -87,6 +111,15 @@ public String getDeploymentId() {
87111
return deploymentId;
88112
}
89113

114+
public AppDeployment setEnvVars(Collection<EnvVar> envVars) {
115+
this.envVars = envVars;
116+
return this;
117+
}
118+
119+
public Collection<EnvVar> getEnvVars() {
120+
return envVars;
121+
}
122+
90123
public AppDeployment setGitSource(GitSource gitSource) {
91124
this.gitSource = gitSource;
92125
return this;
@@ -137,10 +170,12 @@ public boolean equals(Object o) {
137170
if (this == o) return true;
138171
if (o == null || getClass() != o.getClass()) return false;
139172
AppDeployment that = (AppDeployment) o;
140-
return Objects.equals(createTime, that.createTime)
173+
return Objects.equals(command, that.command)
174+
&& Objects.equals(createTime, that.createTime)
141175
&& Objects.equals(creator, that.creator)
142176
&& Objects.equals(deploymentArtifacts, that.deploymentArtifacts)
143177
&& Objects.equals(deploymentId, that.deploymentId)
178+
&& Objects.equals(envVars, that.envVars)
144179
&& Objects.equals(gitSource, that.gitSource)
145180
&& Objects.equals(mode, that.mode)
146181
&& Objects.equals(sourceCodePath, that.sourceCodePath)
@@ -151,10 +186,12 @@ public boolean equals(Object o) {
151186
@Override
152187
public int hashCode() {
153188
return Objects.hash(
189+
command,
154190
createTime,
155191
creator,
156192
deploymentArtifacts,
157193
deploymentId,
194+
envVars,
158195
gitSource,
159196
mode,
160197
sourceCodePath,
@@ -165,10 +202,12 @@ public int hashCode() {
165202
@Override
166203
public String toString() {
167204
return new ToStringer(AppDeployment.class)
205+
.add("command", command)
168206
.add("createTime", createTime)
169207
.add("creator", creator)
170208
.add("deploymentArtifacts", deploymentArtifacts)
171209
.add("deploymentId", deploymentId)
210+
.add("envVars", envVars)
172211
.add("gitSource", gitSource)
173212
.add("mode", mode)
174213
.add("sourceCodePath", sourceCodePath)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
2+
3+
package com.databricks.sdk.service.apps;
4+
5+
import com.databricks.sdk.support.Generated;
6+
import com.databricks.sdk.support.ToStringer;
7+
import com.fasterxml.jackson.annotation.JsonProperty;
8+
import java.util.Objects;
9+
10+
@Generated
11+
public class EnvVar {
12+
/** The name of the environment variable. */
13+
@JsonProperty("name")
14+
private String name;
15+
16+
/** The value for the environment variable. */
17+
@JsonProperty("value")
18+
private String value;
19+
20+
/**
21+
* The name of an external Databricks resource that contains the value, such as a secret or a
22+
* database table.
23+
*/
24+
@JsonProperty("value_from")
25+
private String valueFrom;
26+
27+
public EnvVar setName(String name) {
28+
this.name = name;
29+
return this;
30+
}
31+
32+
public String getName() {
33+
return name;
34+
}
35+
36+
public EnvVar setValue(String value) {
37+
this.value = value;
38+
return this;
39+
}
40+
41+
public String getValue() {
42+
return value;
43+
}
44+
45+
public EnvVar setValueFrom(String valueFrom) {
46+
this.valueFrom = valueFrom;
47+
return this;
48+
}
49+
50+
public String getValueFrom() {
51+
return valueFrom;
52+
}
53+
54+
@Override
55+
public boolean equals(Object o) {
56+
if (this == o) return true;
57+
if (o == null || getClass() != o.getClass()) return false;
58+
EnvVar that = (EnvVar) o;
59+
return Objects.equals(name, that.name)
60+
&& Objects.equals(value, that.value)
61+
&& Objects.equals(valueFrom, that.valueFrom);
62+
}
63+
64+
@Override
65+
public int hashCode() {
66+
return Objects.hash(name, value, valueFrom);
67+
}
68+
69+
@Override
70+
public String toString() {
71+
return new ToStringer(EnvVar.class)
72+
.add("name", name)
73+
.add("value", value)
74+
.add("valueFrom", valueFrom)
75+
.toString();
76+
}
77+
}

databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccessRequestDestinations.java

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,24 @@ public class AccessRequestDestinations {
2929
@JsonProperty("destinations")
3030
private Collection<NotificationDestination> destinations;
3131

32+
/**
33+
* The full name of the securable. Redundant with the name in the securable object, but necessary
34+
* for Terraform integration
35+
*/
36+
@JsonProperty("full_name")
37+
private String fullName;
38+
3239
/** The securable for which the access request destinations are being modified or read. */
3340
@JsonProperty("securable")
3441
private Securable securable;
3542

43+
/**
44+
* The type of the securable. Redundant with the type in the securable object, but necessary for
45+
* Terraform integration
46+
*/
47+
@JsonProperty("securable_type")
48+
private String securableType;
49+
3650
public AccessRequestDestinations setAreAnyDestinationsHidden(Boolean areAnyDestinationsHidden) {
3751
this.areAnyDestinationsHidden = areAnyDestinationsHidden;
3852
return this;
@@ -62,6 +76,15 @@ public Collection<NotificationDestination> getDestinations() {
6276
return destinations;
6377
}
6478

79+
public AccessRequestDestinations setFullName(String fullName) {
80+
this.fullName = fullName;
81+
return this;
82+
}
83+
84+
public String getFullName() {
85+
return fullName;
86+
}
87+
6588
public AccessRequestDestinations setSecurable(Securable securable) {
6689
this.securable = securable;
6790
return this;
@@ -71,6 +94,15 @@ public Securable getSecurable() {
7194
return securable;
7295
}
7396

97+
public AccessRequestDestinations setSecurableType(String securableType) {
98+
this.securableType = securableType;
99+
return this;
100+
}
101+
102+
public String getSecurableType() {
103+
return securableType;
104+
}
105+
74106
@Override
75107
public boolean equals(Object o) {
76108
if (this == o) return true;
@@ -79,13 +111,20 @@ public boolean equals(Object o) {
79111
return Objects.equals(areAnyDestinationsHidden, that.areAnyDestinationsHidden)
80112
&& Objects.equals(destinationSourceSecurable, that.destinationSourceSecurable)
81113
&& Objects.equals(destinations, that.destinations)
82-
&& Objects.equals(securable, that.securable);
114+
&& Objects.equals(fullName, that.fullName)
115+
&& Objects.equals(securable, that.securable)
116+
&& Objects.equals(securableType, that.securableType);
83117
}
84118

85119
@Override
86120
public int hashCode() {
87121
return Objects.hash(
88-
areAnyDestinationsHidden, destinationSourceSecurable, destinations, securable);
122+
areAnyDestinationsHidden,
123+
destinationSourceSecurable,
124+
destinations,
125+
fullName,
126+
securable,
127+
securableType);
89128
}
90129

91130
@Override
@@ -94,7 +133,9 @@ public String toString() {
94133
.add("areAnyDestinationsHidden", areAnyDestinationsHidden)
95134
.add("destinationSourceSecurable", destinationSourceSecurable)
96135
.add("destinations", destinations)
136+
.add("fullName", fullName)
97137
.add("securable", securable)
138+
.add("securableType", securableType)
98139
.toString();
99140
}
100141
}

databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringAPI.java

100755100644
Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ public Feature createFeature(CreateFeatureRequest request) {
3535
return impl.createFeature(request);
3636
}
3737

38-
/** Create a Kafka config. */
38+
/**
39+
* Create a Kafka config. During PrPr, Kafka configs can be read and used when creating features
40+
* under the entire metastore. Only the creator of the Kafka config can delete it.
41+
*/
3942
public KafkaConfig createKafkaConfig(CreateKafkaConfigRequest request) {
4043
return impl.createKafkaConfig(request);
4144
}
@@ -58,7 +61,10 @@ public void deleteKafkaConfig(String name) {
5861
deleteKafkaConfig(new DeleteKafkaConfigRequest().setName(name));
5962
}
6063

61-
/** Delete a Kafka config. */
64+
/**
65+
* Delete a Kafka config. During PrPr, Kafka configs can be read and used when creating features
66+
* under the entire metastore. Only the creator of the Kafka config can delete it.
67+
*/
6268
public void deleteKafkaConfig(DeleteKafkaConfigRequest request) {
6369
impl.deleteKafkaConfig(request);
6470
}
@@ -86,7 +92,10 @@ public KafkaConfig getKafkaConfig(String name) {
8692
return getKafkaConfig(new GetKafkaConfigRequest().setName(name));
8793
}
8894

89-
/** Get a Kafka config. */
95+
/**
96+
* Get a Kafka config. During PrPr, Kafka configs can be read and used when creating features
97+
* under the entire metastore. Only the creator of the Kafka config can delete it.
98+
*/
9099
public KafkaConfig getKafkaConfig(GetKafkaConfigRequest request) {
91100
return impl.getKafkaConfig(request);
92101
}
@@ -116,7 +125,10 @@ public Iterable<Feature> listFeatures(ListFeaturesRequest request) {
116125
});
117126
}
118127

119-
/** List Kafka configs. */
128+
/**
129+
* List Kafka configs. During PrPr, Kafka configs can be read and used when creating features
130+
* under the entire metastore. Only the creator of the Kafka config can delete it.
131+
*/
120132
public Iterable<KafkaConfig> listKafkaConfigs(ListKafkaConfigsRequest request) {
121133
return new Paginator<>(
122134
request,
@@ -152,7 +164,10 @@ public Feature updateFeature(UpdateFeatureRequest request) {
152164
return impl.updateFeature(request);
153165
}
154166

155-
/** Update a Kafka config. */
167+
/**
168+
* Update a Kafka config. During PrPr, Kafka configs can be read and used when creating features
169+
* under the entire metastore. Only the creator of the Kafka config can delete it.
170+
*/
156171
public KafkaConfig updateKafkaConfig(UpdateKafkaConfigRequest request) {
157172
return impl.updateKafkaConfig(request);
158173
}

databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/FeatureEngineeringImpl.java

100755100644
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ public void deleteFeature(DeleteFeatureRequest request) {
9595
@Override
9696
public void deleteKafkaConfig(DeleteKafkaConfigRequest request) {
9797
String path =
98-
String.format(
99-
"/api/2.0/feature-engineering/features/kafka-configs/kafka/%s", request.getName());
98+
String.format("/api/2.0/feature-engineering/features/kafka-configs/%s", request.getName());
10099
try {
101100
Request req = new Request("DELETE", path);
102101

0 commit comments

Comments
 (0)