All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.workloads.outputs.VMBackupPolicyPropertiesResponse Maven / Gradle / Ivy

There is a newer version: 2.72.0
Show 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.workloads.outputs;

import com.pulumi.azurenative.workloads.outputs.InstantRPAdditionalDetailsResponse;
import com.pulumi.azurenative.workloads.outputs.LogSchedulePolicyResponse;
import com.pulumi.azurenative.workloads.outputs.LongTermRetentionPolicyResponse;
import com.pulumi.azurenative.workloads.outputs.LongTermSchedulePolicyResponse;
import com.pulumi.azurenative.workloads.outputs.SimpleRetentionPolicyResponse;
import com.pulumi.azurenative.workloads.outputs.SimpleSchedulePolicyResponse;
import com.pulumi.azurenative.workloads.outputs.SimpleSchedulePolicyV2Response;
import com.pulumi.azurenative.workloads.outputs.TieringPolicyResponse;
import com.pulumi.core.Either;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class VMBackupPolicyPropertiesResponse {
    /**
     * @return This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'AzureIaasVM'.
     * 
     */
    private String backupManagementType;
    /**
     * @return Instant recovery point additional details.
     * 
     */
    private @Nullable InstantRPAdditionalDetailsResponse instantRPDetails;
    /**
     * @return Instant RP retention policy range in days
     * 
     */
    private @Nullable Integer instantRpRetentionRangeInDays;
    /**
     * @return The name of the VM Backup policy.
     * 
     */
    private String name;
    /**
     * @return The policy type.
     * 
     */
    private @Nullable String policyType;
    /**
     * @return Number of items associated with this policy.
     * 
     */
    private @Nullable Integer protectedItemsCount;
    /**
     * @return ResourceGuard Operation Requests
     * 
     */
    private @Nullable List resourceGuardOperationRequests;
    /**
     * @return Retention policy with the details on backup copy retention ranges.
     * 
     */
    private @Nullable Either retentionPolicy;
    /**
     * @return Backup schedule specified as part of backup policy.
     * 
     */
    private @Nullable Object schedulePolicy;
    /**
     * @return Tiering policy to automatically move RPs to another tier
     * Key is Target Tier, defined in RecoveryPointTierType enum.
     * Tiering policy specifies the criteria to move RP to the target tier.
     * 
     */
    private @Nullable Map tieringPolicy;
    /**
     * @return Time zone optional input as string. For example: "Pacific Standard Time".
     * 
     */
    private @Nullable String timeZone;

    private VMBackupPolicyPropertiesResponse() {}
    /**
     * @return This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'AzureIaasVM'.
     * 
     */
    public String backupManagementType() {
        return this.backupManagementType;
    }
    /**
     * @return Instant recovery point additional details.
     * 
     */
    public Optional instantRPDetails() {
        return Optional.ofNullable(this.instantRPDetails);
    }
    /**
     * @return Instant RP retention policy range in days
     * 
     */
    public Optional instantRpRetentionRangeInDays() {
        return Optional.ofNullable(this.instantRpRetentionRangeInDays);
    }
    /**
     * @return The name of the VM Backup policy.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return The policy type.
     * 
     */
    public Optional policyType() {
        return Optional.ofNullable(this.policyType);
    }
    /**
     * @return Number of items associated with this policy.
     * 
     */
    public Optional protectedItemsCount() {
        return Optional.ofNullable(this.protectedItemsCount);
    }
    /**
     * @return ResourceGuard Operation Requests
     * 
     */
    public List resourceGuardOperationRequests() {
        return this.resourceGuardOperationRequests == null ? List.of() : this.resourceGuardOperationRequests;
    }
    /**
     * @return Retention policy with the details on backup copy retention ranges.
     * 
     */
    public Optional> retentionPolicy() {
        return Optional.ofNullable(this.retentionPolicy);
    }
    /**
     * @return Backup schedule specified as part of backup policy.
     * 
     */
    public Optional schedulePolicy() {
        return Optional.ofNullable(this.schedulePolicy);
    }
    /**
     * @return Tiering policy to automatically move RPs to another tier
     * Key is Target Tier, defined in RecoveryPointTierType enum.
     * Tiering policy specifies the criteria to move RP to the target tier.
     * 
     */
    public Map tieringPolicy() {
        return this.tieringPolicy == null ? Map.of() : this.tieringPolicy;
    }
    /**
     * @return Time zone optional input as string. For example: "Pacific Standard Time".
     * 
     */
    public Optional timeZone() {
        return Optional.ofNullable(this.timeZone);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(VMBackupPolicyPropertiesResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String backupManagementType;
        private @Nullable InstantRPAdditionalDetailsResponse instantRPDetails;
        private @Nullable Integer instantRpRetentionRangeInDays;
        private String name;
        private @Nullable String policyType;
        private @Nullable Integer protectedItemsCount;
        private @Nullable List resourceGuardOperationRequests;
        private @Nullable Either retentionPolicy;
        private @Nullable Object schedulePolicy;
        private @Nullable Map tieringPolicy;
        private @Nullable String timeZone;
        public Builder() {}
        public Builder(VMBackupPolicyPropertiesResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.backupManagementType = defaults.backupManagementType;
    	      this.instantRPDetails = defaults.instantRPDetails;
    	      this.instantRpRetentionRangeInDays = defaults.instantRpRetentionRangeInDays;
    	      this.name = defaults.name;
    	      this.policyType = defaults.policyType;
    	      this.protectedItemsCount = defaults.protectedItemsCount;
    	      this.resourceGuardOperationRequests = defaults.resourceGuardOperationRequests;
    	      this.retentionPolicy = defaults.retentionPolicy;
    	      this.schedulePolicy = defaults.schedulePolicy;
    	      this.tieringPolicy = defaults.tieringPolicy;
    	      this.timeZone = defaults.timeZone;
        }

        @CustomType.Setter
        public Builder backupManagementType(String backupManagementType) {
            if (backupManagementType == null) {
              throw new MissingRequiredPropertyException("VMBackupPolicyPropertiesResponse", "backupManagementType");
            }
            this.backupManagementType = backupManagementType;
            return this;
        }
        @CustomType.Setter
        public Builder instantRPDetails(@Nullable InstantRPAdditionalDetailsResponse instantRPDetails) {

            this.instantRPDetails = instantRPDetails;
            return this;
        }
        @CustomType.Setter
        public Builder instantRpRetentionRangeInDays(@Nullable Integer instantRpRetentionRangeInDays) {

            this.instantRpRetentionRangeInDays = instantRpRetentionRangeInDays;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("VMBackupPolicyPropertiesResponse", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder policyType(@Nullable String policyType) {

            this.policyType = policyType;
            return this;
        }
        @CustomType.Setter
        public Builder protectedItemsCount(@Nullable Integer protectedItemsCount) {

            this.protectedItemsCount = protectedItemsCount;
            return this;
        }
        @CustomType.Setter
        public Builder resourceGuardOperationRequests(@Nullable List resourceGuardOperationRequests) {

            this.resourceGuardOperationRequests = resourceGuardOperationRequests;
            return this;
        }
        public Builder resourceGuardOperationRequests(String... resourceGuardOperationRequests) {
            return resourceGuardOperationRequests(List.of(resourceGuardOperationRequests));
        }
        @CustomType.Setter
        public Builder retentionPolicy(@Nullable Either retentionPolicy) {

            this.retentionPolicy = retentionPolicy;
            return this;
        }
        @CustomType.Setter
        public Builder schedulePolicy(@Nullable Object schedulePolicy) {

            this.schedulePolicy = schedulePolicy;
            return this;
        }
        @CustomType.Setter
        public Builder tieringPolicy(@Nullable Map tieringPolicy) {

            this.tieringPolicy = tieringPolicy;
            return this;
        }
        @CustomType.Setter
        public Builder timeZone(@Nullable String timeZone) {

            this.timeZone = timeZone;
            return this;
        }
        public VMBackupPolicyPropertiesResponse build() {
            final var _resultValue = new VMBackupPolicyPropertiesResponse();
            _resultValue.backupManagementType = backupManagementType;
            _resultValue.instantRPDetails = instantRPDetails;
            _resultValue.instantRpRetentionRangeInDays = instantRpRetentionRangeInDays;
            _resultValue.name = name;
            _resultValue.policyType = policyType;
            _resultValue.protectedItemsCount = protectedItemsCount;
            _resultValue.resourceGuardOperationRequests = resourceGuardOperationRequests;
            _resultValue.retentionPolicy = retentionPolicy;
            _resultValue.schedulePolicy = schedulePolicy;
            _resultValue.tieringPolicy = tieringPolicy;
            _resultValue.timeZone = timeZone;
            return _resultValue;
        }
    }
}