Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 3 additions & 0 deletions src/main/java/io/weaviate/client6/v1/api/backup/Backup.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public record Backup(
@SerializedName("completedAt") OffsetDateTime completedAt,
/** Backup size in GiB. */
@SerializedName("size") Float sizeGiB,
/** Prefix for the incremental backup IDs. */
@SerializedName("incremental_base_backup_id") String prefixIncremental,
/**
* This value indicates if a backup is being created or restored from.
* For operations like LIST this value is null.
Expand All @@ -55,6 +57,7 @@ Backup withOperation(Operation operation) {
startedAt,
completedAt,
sizeGiB,
prefixIncremental,
operation);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static record BackupCreate(
@SerializedName("id") String id,
@SerializedName("include") List<String> includeCollections,
@SerializedName("exclude") List<String> excludeCollections,
@SerializedName("incremental_base_backup_id") String prefixIncremental,
@SerializedName("config") Config config) {

private static record Config(
Expand All @@ -48,6 +49,7 @@ public BackupCreate(Builder builder) {
builder.backupId,
builder.includeCollections,
builder.excludeCollections,
builder.prefixIncremental,
new Config(
builder.cpuPercentage,
builder.compressionLevel,
Expand All @@ -58,6 +60,7 @@ public BackupCreate(Builder builder) {
public static class Builder implements ObjectBuilder<BackupCreate> {
private final String backupId;

private String prefixIncremental;
private Integer cpuPercentage;
private CompressionLevel compressionLevel;
private String bucket;
Expand All @@ -69,6 +72,12 @@ public Builder(String backupId) {
this.backupId = backupId;
}

/** Prefix for incremental backup IDs. */
public Builder prefixIncremental(String prefixIncremental) {
this.prefixIncremental = prefixIncremental;
return this;
}

/** Collection that should be included in the backup. */
public Builder includeCollections(String... includeCollections) {
return includeCollections(Arrays.asList(includeCollections));
Expand Down
Loading