com.pulumi.azurenative.recoveryservices.outputs.LongTermRetentionPolicyResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
The newest version!
// *** 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.azurenative.recoveryservices.outputs;
import com.pulumi.azurenative.recoveryservices.outputs.DailyRetentionScheduleResponse;
import com.pulumi.azurenative.recoveryservices.outputs.MonthlyRetentionScheduleResponse;
import com.pulumi.azurenative.recoveryservices.outputs.WeeklyRetentionScheduleResponse;
import com.pulumi.azurenative.recoveryservices.outputs.YearlyRetentionScheduleResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class LongTermRetentionPolicyResponse {
/**
* @return Daily retention schedule of the protection policy.
*
*/
private @Nullable DailyRetentionScheduleResponse dailySchedule;
/**
* @return Monthly retention schedule of the protection policy.
*
*/
private @Nullable MonthlyRetentionScheduleResponse monthlySchedule;
/**
* @return This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
* Expected value is 'LongTermRetentionPolicy'.
*
*/
private String retentionPolicyType;
/**
* @return Weekly retention schedule of the protection policy.
*
*/
private @Nullable WeeklyRetentionScheduleResponse weeklySchedule;
/**
* @return Yearly retention schedule of the protection policy.
*
*/
private @Nullable YearlyRetentionScheduleResponse yearlySchedule;
private LongTermRetentionPolicyResponse() {}
/**
* @return Daily retention schedule of the protection policy.
*
*/
public Optional dailySchedule() {
return Optional.ofNullable(this.dailySchedule);
}
/**
* @return Monthly retention schedule of the protection policy.
*
*/
public Optional monthlySchedule() {
return Optional.ofNullable(this.monthlySchedule);
}
/**
* @return This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
* Expected value is 'LongTermRetentionPolicy'.
*
*/
public String retentionPolicyType() {
return this.retentionPolicyType;
}
/**
* @return Weekly retention schedule of the protection policy.
*
*/
public Optional weeklySchedule() {
return Optional.ofNullable(this.weeklySchedule);
}
/**
* @return Yearly retention schedule of the protection policy.
*
*/
public Optional yearlySchedule() {
return Optional.ofNullable(this.yearlySchedule);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(LongTermRetentionPolicyResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable DailyRetentionScheduleResponse dailySchedule;
private @Nullable MonthlyRetentionScheduleResponse monthlySchedule;
private String retentionPolicyType;
private @Nullable WeeklyRetentionScheduleResponse weeklySchedule;
private @Nullable YearlyRetentionScheduleResponse yearlySchedule;
public Builder() {}
public Builder(LongTermRetentionPolicyResponse defaults) {
Objects.requireNonNull(defaults);
this.dailySchedule = defaults.dailySchedule;
this.monthlySchedule = defaults.monthlySchedule;
this.retentionPolicyType = defaults.retentionPolicyType;
this.weeklySchedule = defaults.weeklySchedule;
this.yearlySchedule = defaults.yearlySchedule;
}
@CustomType.Setter
public Builder dailySchedule(@Nullable DailyRetentionScheduleResponse dailySchedule) {
this.dailySchedule = dailySchedule;
return this;
}
@CustomType.Setter
public Builder monthlySchedule(@Nullable MonthlyRetentionScheduleResponse monthlySchedule) {
this.monthlySchedule = monthlySchedule;
return this;
}
@CustomType.Setter
public Builder retentionPolicyType(String retentionPolicyType) {
if (retentionPolicyType == null) {
throw new MissingRequiredPropertyException("LongTermRetentionPolicyResponse", "retentionPolicyType");
}
this.retentionPolicyType = retentionPolicyType;
return this;
}
@CustomType.Setter
public Builder weeklySchedule(@Nullable WeeklyRetentionScheduleResponse weeklySchedule) {
this.weeklySchedule = weeklySchedule;
return this;
}
@CustomType.Setter
public Builder yearlySchedule(@Nullable YearlyRetentionScheduleResponse yearlySchedule) {
this.yearlySchedule = yearlySchedule;
return this;
}
public LongTermRetentionPolicyResponse build() {
final var _resultValue = new LongTermRetentionPolicyResponse();
_resultValue.dailySchedule = dailySchedule;
_resultValue.monthlySchedule = monthlySchedule;
_resultValue.retentionPolicyType = retentionPolicyType;
_resultValue.weeklySchedule = weeklySchedule;
_resultValue.yearlySchedule = yearlySchedule;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy