com.pulumi.azure.appservice.outputs.WindowsWebAppBackupSchedule 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.appservice.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class WindowsWebAppBackupSchedule {
/**
* @return How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`).
*
* > **NOTE:** Not all intervals are supported on all Windows Web App SKUs. Please refer to the official documentation for appropriate values.
*
*/
private Integer frequencyInterval;
/**
* @return The unit of time for how often the backup should take place. Possible values include: `Day`, `Hour`
*
*/
private String frequencyUnit;
/**
* @return Should the service keep at least one backup, regardless of age of backup. Defaults to `false`.
*
*/
private @Nullable Boolean keepAtLeastOneBackup;
/**
* @return The time the backup was last attempted.
*
*/
private @Nullable String lastExecutionTime;
/**
* @return After how many days backups should be deleted. Defaults to `30`.
*
*/
private @Nullable Integer retentionPeriodDays;
/**
* @return When the schedule should start working in RFC-3339 format.
*
*/
private @Nullable String startTime;
private WindowsWebAppBackupSchedule() {}
/**
* @return How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`).
*
* > **NOTE:** Not all intervals are supported on all Windows Web App SKUs. Please refer to the official documentation for appropriate values.
*
*/
public Integer frequencyInterval() {
return this.frequencyInterval;
}
/**
* @return The unit of time for how often the backup should take place. Possible values include: `Day`, `Hour`
*
*/
public String frequencyUnit() {
return this.frequencyUnit;
}
/**
* @return Should the service keep at least one backup, regardless of age of backup. Defaults to `false`.
*
*/
public Optional keepAtLeastOneBackup() {
return Optional.ofNullable(this.keepAtLeastOneBackup);
}
/**
* @return The time the backup was last attempted.
*
*/
public Optional lastExecutionTime() {
return Optional.ofNullable(this.lastExecutionTime);
}
/**
* @return After how many days backups should be deleted. Defaults to `30`.
*
*/
public Optional retentionPeriodDays() {
return Optional.ofNullable(this.retentionPeriodDays);
}
/**
* @return When the schedule should start working in RFC-3339 format.
*
*/
public Optional startTime() {
return Optional.ofNullable(this.startTime);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(WindowsWebAppBackupSchedule defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private Integer frequencyInterval;
private String frequencyUnit;
private @Nullable Boolean keepAtLeastOneBackup;
private @Nullable String lastExecutionTime;
private @Nullable Integer retentionPeriodDays;
private @Nullable String startTime;
public Builder() {}
public Builder(WindowsWebAppBackupSchedule defaults) {
Objects.requireNonNull(defaults);
this.frequencyInterval = defaults.frequencyInterval;
this.frequencyUnit = defaults.frequencyUnit;
this.keepAtLeastOneBackup = defaults.keepAtLeastOneBackup;
this.lastExecutionTime = defaults.lastExecutionTime;
this.retentionPeriodDays = defaults.retentionPeriodDays;
this.startTime = defaults.startTime;
}
@CustomType.Setter
public Builder frequencyInterval(Integer frequencyInterval) {
if (frequencyInterval == null) {
throw new MissingRequiredPropertyException("WindowsWebAppBackupSchedule", "frequencyInterval");
}
this.frequencyInterval = frequencyInterval;
return this;
}
@CustomType.Setter
public Builder frequencyUnit(String frequencyUnit) {
if (frequencyUnit == null) {
throw new MissingRequiredPropertyException("WindowsWebAppBackupSchedule", "frequencyUnit");
}
this.frequencyUnit = frequencyUnit;
return this;
}
@CustomType.Setter
public Builder keepAtLeastOneBackup(@Nullable Boolean keepAtLeastOneBackup) {
this.keepAtLeastOneBackup = keepAtLeastOneBackup;
return this;
}
@CustomType.Setter
public Builder lastExecutionTime(@Nullable String lastExecutionTime) {
this.lastExecutionTime = lastExecutionTime;
return this;
}
@CustomType.Setter
public Builder retentionPeriodDays(@Nullable Integer retentionPeriodDays) {
this.retentionPeriodDays = retentionPeriodDays;
return this;
}
@CustomType.Setter
public Builder startTime(@Nullable String startTime) {
this.startTime = startTime;
return this;
}
public WindowsWebAppBackupSchedule build() {
final var _resultValue = new WindowsWebAppBackupSchedule();
_resultValue.frequencyInterval = frequencyInterval;
_resultValue.frequencyUnit = frequencyUnit;
_resultValue.keepAtLeastOneBackup = keepAtLeastOneBackup;
_resultValue.lastExecutionTime = lastExecutionTime;
_resultValue.retentionPeriodDays = retentionPeriodDays;
_resultValue.startTime = startTime;
return _resultValue;
}
}
}