
com.pulumi.azure.backup.outputs.PolicyVMBackup 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.backup.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class PolicyVMBackup {
/**
* @return Sets the backup frequency. Possible values are `Hourly`, `Daily` and `Weekly`.
*
*/
private String frequency;
/**
* @return Duration of the backup window in hours. Possible values are between `4` and `24` This is used when `frequency` is `Hourly`.
*
* > **NOTE:** `hour_duration` must be multiplier of `hour_interval`
*
*/
private @Nullable Integer hourDuration;
/**
* @return Interval in hour at which backup is triggered. Possible values are `4`, `6`, `8` and `12`. This is used when `frequency` is `Hourly`.
*
*/
private @Nullable Integer hourInterval;
/**
* @return The time of day to perform the backup in 24hour format.
*
*/
private String time;
/**
* @return The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`.
*
*/
private @Nullable List weekdays;
private PolicyVMBackup() {}
/**
* @return Sets the backup frequency. Possible values are `Hourly`, `Daily` and `Weekly`.
*
*/
public String frequency() {
return this.frequency;
}
/**
* @return Duration of the backup window in hours. Possible values are between `4` and `24` This is used when `frequency` is `Hourly`.
*
* > **NOTE:** `hour_duration` must be multiplier of `hour_interval`
*
*/
public Optional hourDuration() {
return Optional.ofNullable(this.hourDuration);
}
/**
* @return Interval in hour at which backup is triggered. Possible values are `4`, `6`, `8` and `12`. This is used when `frequency` is `Hourly`.
*
*/
public Optional hourInterval() {
return Optional.ofNullable(this.hourInterval);
}
/**
* @return The time of day to perform the backup in 24hour format.
*
*/
public String time() {
return this.time;
}
/**
* @return The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`.
*
*/
public List weekdays() {
return this.weekdays == null ? List.of() : this.weekdays;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(PolicyVMBackup defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String frequency;
private @Nullable Integer hourDuration;
private @Nullable Integer hourInterval;
private String time;
private @Nullable List weekdays;
public Builder() {}
public Builder(PolicyVMBackup defaults) {
Objects.requireNonNull(defaults);
this.frequency = defaults.frequency;
this.hourDuration = defaults.hourDuration;
this.hourInterval = defaults.hourInterval;
this.time = defaults.time;
this.weekdays = defaults.weekdays;
}
@CustomType.Setter
public Builder frequency(String frequency) {
if (frequency == null) {
throw new MissingRequiredPropertyException("PolicyVMBackup", "frequency");
}
this.frequency = frequency;
return this;
}
@CustomType.Setter
public Builder hourDuration(@Nullable Integer hourDuration) {
this.hourDuration = hourDuration;
return this;
}
@CustomType.Setter
public Builder hourInterval(@Nullable Integer hourInterval) {
this.hourInterval = hourInterval;
return this;
}
@CustomType.Setter
public Builder time(String time) {
if (time == null) {
throw new MissingRequiredPropertyException("PolicyVMBackup", "time");
}
this.time = time;
return this;
}
@CustomType.Setter
public Builder weekdays(@Nullable List weekdays) {
this.weekdays = weekdays;
return this;
}
public Builder weekdays(String... weekdays) {
return weekdays(List.of(weekdays));
}
public PolicyVMBackup build() {
final var _resultValue = new PolicyVMBackup();
_resultValue.frequency = frequency;
_resultValue.hourDuration = hourDuration;
_resultValue.hourInterval = hourInterval;
_resultValue.time = time;
_resultValue.weekdays = weekdays;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy