com.pulumi.azure.mssql.outputs.DatabaseShortTermRetentionPolicy Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.mssql.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class DatabaseShortTermRetentionPolicy {
/**
* @return The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
*
*/
private @Nullable Integer backupIntervalInHours;
/**
* @return Point In Time Restore configuration. Value has to be between `1` and `35`.
*
*/
private Integer retentionDays;
private DatabaseShortTermRetentionPolicy() {}
/**
* @return The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
*
*/
public Optional backupIntervalInHours() {
return Optional.ofNullable(this.backupIntervalInHours);
}
/**
* @return Point In Time Restore configuration. Value has to be between `1` and `35`.
*
*/
public Integer retentionDays() {
return this.retentionDays;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(DatabaseShortTermRetentionPolicy defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer backupIntervalInHours;
private Integer retentionDays;
public Builder() {}
public Builder(DatabaseShortTermRetentionPolicy defaults) {
Objects.requireNonNull(defaults);
this.backupIntervalInHours = defaults.backupIntervalInHours;
this.retentionDays = defaults.retentionDays;
}
@CustomType.Setter
public Builder backupIntervalInHours(@Nullable Integer backupIntervalInHours) {
this.backupIntervalInHours = backupIntervalInHours;
return this;
}
@CustomType.Setter
public Builder retentionDays(Integer retentionDays) {
if (retentionDays == null) {
throw new MissingRequiredPropertyException("DatabaseShortTermRetentionPolicy", "retentionDays");
}
this.retentionDays = retentionDays;
return this;
}
public DatabaseShortTermRetentionPolicy build() {
final var _resultValue = new DatabaseShortTermRetentionPolicy();
_resultValue.backupIntervalInHours = backupIntervalInHours;
_resultValue.retentionDays = retentionDays;
return _resultValue;
}
}
}