Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen/_openapi_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27f7ea11e6b9d14b29e0881406a7a64bff9905b3
814778bb58d7b4027343bf0a9bf0d317680b1c0e
3 changes: 2 additions & 1 deletion NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@
* [Breaking] Change `projectId` field for `com.databricks.sdk.service.postgres.CreateProjectRequest` to be required.
* [Breaking] Remove `default` field for `com.databricks.sdk.service.postgres.BranchSpec`.
* [Breaking] Remove `settings` field for `com.databricks.sdk.service.postgres.ProjectSpec`.
* [Breaking] Remove `settings` field for `com.databricks.sdk.service.postgres.ProjectStatus`.
* [Breaking] Remove `settings` field for `com.databricks.sdk.service.postgres.ProjectStatus`.
* Add `noExpiry` field for `com.databricks.sdk.service.postgres.BranchSpec`.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ public class BranchSpec {
@JsonProperty("is_protected")
private Boolean isProtected;

/**
* Explicitly disable expiration. When set to true, the branch will not expire. If set to false,
* the request is invalid; provide either ttl or expire_time instead.
*/
@JsonProperty("no_expiry")
private Boolean noExpiry;

/**
* The name of the source branch from which this branch was created (data lineage for
* point-in-time recovery). If not specified, defaults to the project's default branch. Format:
Expand All @@ -38,10 +45,7 @@ public class BranchSpec {
@JsonProperty("source_branch_time")
private Timestamp sourceBranchTime;

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

Expand All @@ -63,6 +67,15 @@ public Boolean getIsProtected() {
return isProtected;
}

public BranchSpec setNoExpiry(Boolean noExpiry) {
this.noExpiry = noExpiry;
return this;
}

public Boolean getNoExpiry() {
return noExpiry;
}

public BranchSpec setSourceBranch(String sourceBranch) {
this.sourceBranch = sourceBranch;
return this;
Expand Down Expand Up @@ -106,6 +119,7 @@ public boolean equals(Object o) {
BranchSpec that = (BranchSpec) o;
return Objects.equals(expireTime, that.expireTime)
&& Objects.equals(isProtected, that.isProtected)
&& Objects.equals(noExpiry, that.noExpiry)
&& Objects.equals(sourceBranch, that.sourceBranch)
&& Objects.equals(sourceBranchLsn, that.sourceBranchLsn)
&& Objects.equals(sourceBranchTime, that.sourceBranchTime)
Expand All @@ -115,14 +129,15 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
expireTime, isProtected, sourceBranch, sourceBranchLsn, sourceBranchTime, ttl);
expireTime, isProtected, noExpiry, sourceBranch, sourceBranchLsn, sourceBranchTime, ttl);
}

@Override
public String toString() {
return new ToStringer(BranchSpec.class)
.add("expireTime", expireTime)
.add("isProtected", isProtected)
.add("noExpiry", noExpiry)
.add("sourceBranch", sourceBranch)
.add("sourceBranchLsn", sourceBranchLsn)
.add("sourceBranchTime", sourceBranchTime)
Expand Down
Loading