Skip to content

Commit 21d1730

Browse files
Update SDK to 814778bb58d7b4027343bf0a9bf0d317680b1c0e
1 parent f861edb commit 21d1730

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
27f7ea11e6b9d14b29e0881406a7a64bff9905b3
1+
814778bb58d7b4027343bf0a9bf0d317680b1c0e

NEXT_CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
* [Breaking] Change `projectId` field for `com.databricks.sdk.service.postgres.CreateProjectRequest` to be required.
4545
* [Breaking] Remove `default` field for `com.databricks.sdk.service.postgres.BranchSpec`.
4646
* [Breaking] Remove `settings` field for `com.databricks.sdk.service.postgres.ProjectSpec`.
47-
* [Breaking] Remove `settings` field for `com.databricks.sdk.service.postgres.ProjectStatus`.
47+
* [Breaking] Remove `settings` field for `com.databricks.sdk.service.postgres.ProjectStatus`.
48+
* Add `noExpiry` field for `com.databricks.sdk.service.postgres.BranchSpec`.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchSpec.java

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ public class BranchSpec {
2222
@JsonProperty("is_protected")
2323
private Boolean isProtected;
2424

25+
/**
26+
* Explicitly disable expiration. When set to true, the branch will not expire. If set to false,
27+
* the request is invalid; provide either ttl or expire_time instead.
28+
*/
29+
@JsonProperty("no_expiry")
30+
private Boolean noExpiry;
31+
2532
/**
2633
* The name of the source branch from which this branch was created (data lineage for
2734
* point-in-time recovery). If not specified, defaults to the project's default branch. Format:
@@ -38,10 +45,7 @@ public class BranchSpec {
3845
@JsonProperty("source_branch_time")
3946
private Timestamp sourceBranchTime;
4047

41-
/**
42-
* Relative time-to-live duration. When set, the branch will expire at creation_time + ttl. Set to
43-
* -1 second to explicitly disable expiration.
44-
*/
48+
/** Relative time-to-live duration. When set, the branch will expire at creation_time + ttl. */
4549
@JsonProperty("ttl")
4650
private Duration ttl;
4751

@@ -63,6 +67,15 @@ public Boolean getIsProtected() {
6367
return isProtected;
6468
}
6569

70+
public BranchSpec setNoExpiry(Boolean noExpiry) {
71+
this.noExpiry = noExpiry;
72+
return this;
73+
}
74+
75+
public Boolean getNoExpiry() {
76+
return noExpiry;
77+
}
78+
6679
public BranchSpec setSourceBranch(String sourceBranch) {
6780
this.sourceBranch = sourceBranch;
6881
return this;
@@ -106,6 +119,7 @@ public boolean equals(Object o) {
106119
BranchSpec that = (BranchSpec) o;
107120
return Objects.equals(expireTime, that.expireTime)
108121
&& Objects.equals(isProtected, that.isProtected)
122+
&& Objects.equals(noExpiry, that.noExpiry)
109123
&& Objects.equals(sourceBranch, that.sourceBranch)
110124
&& Objects.equals(sourceBranchLsn, that.sourceBranchLsn)
111125
&& Objects.equals(sourceBranchTime, that.sourceBranchTime)
@@ -115,14 +129,15 @@ public boolean equals(Object o) {
115129
@Override
116130
public int hashCode() {
117131
return Objects.hash(
118-
expireTime, isProtected, sourceBranch, sourceBranchLsn, sourceBranchTime, ttl);
132+
expireTime, isProtected, noExpiry, sourceBranch, sourceBranchLsn, sourceBranchTime, ttl);
119133
}
120134

121135
@Override
122136
public String toString() {
123137
return new ToStringer(BranchSpec.class)
124138
.add("expireTime", expireTime)
125139
.add("isProtected", isProtected)
140+
.add("noExpiry", noExpiry)
126141
.add("sourceBranch", sourceBranch)
127142
.add("sourceBranchLsn", sourceBranchLsn)
128143
.add("sourceBranchTime", sourceBranchTime)

0 commit comments

Comments
 (0)