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

com.pulumi.azurenative.recoveryservices.inputs.AzureIaaSVMProtectionPolicyArgs Maven / Gradle / Ivy

There is a newer version: 2.82.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.recoveryservices.inputs;

import com.pulumi.azurenative.recoveryservices.enums.IAASVMPolicyType;
import com.pulumi.azurenative.recoveryservices.inputs.InstantRPAdditionalDetailsArgs;
import com.pulumi.azurenative.recoveryservices.inputs.LogSchedulePolicyArgs;
import com.pulumi.azurenative.recoveryservices.inputs.LongTermRetentionPolicyArgs;
import com.pulumi.azurenative.recoveryservices.inputs.LongTermSchedulePolicyArgs;
import com.pulumi.azurenative.recoveryservices.inputs.SimpleRetentionPolicyArgs;
import com.pulumi.azurenative.recoveryservices.inputs.SimpleSchedulePolicyArgs;
import com.pulumi.azurenative.recoveryservices.inputs.SimpleSchedulePolicyV2Args;
import com.pulumi.azurenative.recoveryservices.inputs.TieringPolicyArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
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;


/**
 * IaaS VM workload-specific backup policy.
 * 
 */
public final class AzureIaaSVMProtectionPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final AzureIaaSVMProtectionPolicyArgs Empty = new AzureIaaSVMProtectionPolicyArgs();

    /**
     * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'AzureIaasVM'.
     * 
     */
    @Import(name="backupManagementType", required=true)
    private Output backupManagementType;

    /**
     * @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 Output backupManagementType() {
        return this.backupManagementType;
    }

    @Import(name="instantRPDetails")
    private @Nullable Output instantRPDetails;

    public Optional> instantRPDetails() {
        return Optional.ofNullable(this.instantRPDetails);
    }

    /**
     * Instant RP retention policy range in days
     * 
     */
    @Import(name="instantRpRetentionRangeInDays")
    private @Nullable Output instantRpRetentionRangeInDays;

    /**
     * @return Instant RP retention policy range in days
     * 
     */
    public Optional> instantRpRetentionRangeInDays() {
        return Optional.ofNullable(this.instantRpRetentionRangeInDays);
    }

    @Import(name="policyType")
    private @Nullable Output> policyType;

    public Optional>> policyType() {
        return Optional.ofNullable(this.policyType);
    }

    /**
     * Number of items associated with this policy.
     * 
     */
    @Import(name="protectedItemsCount")
    private @Nullable Output protectedItemsCount;

    /**
     * @return Number of items associated with this policy.
     * 
     */
    public Optional> protectedItemsCount() {
        return Optional.ofNullable(this.protectedItemsCount);
    }

    /**
     * ResourceGuard Operation Requests
     * 
     */
    @Import(name="resourceGuardOperationRequests")
    private @Nullable Output> resourceGuardOperationRequests;

    /**
     * @return ResourceGuard Operation Requests
     * 
     */
    public Optional>> resourceGuardOperationRequests() {
        return Optional.ofNullable(this.resourceGuardOperationRequests);
    }

    /**
     * Retention policy with the details on backup copy retention ranges.
     * 
     */
    @Import(name="retentionPolicy")
    private @Nullable Output> retentionPolicy;

    /**
     * @return Retention policy with the details on backup copy retention ranges.
     * 
     */
    public Optional>> retentionPolicy() {
        return Optional.ofNullable(this.retentionPolicy);
    }

    /**
     * Backup schedule specified as part of backup policy.
     * 
     */
    @Import(name="schedulePolicy")
    private @Nullable Output schedulePolicy;

    /**
     * @return Backup schedule specified as part of backup policy.
     * 
     */
    public Optional> schedulePolicy() {
        return Optional.ofNullable(this.schedulePolicy);
    }

    /**
     * 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.
     * 
     */
    @Import(name="tieringPolicy")
    private @Nullable Output> tieringPolicy;

    /**
     * @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 Optional>> tieringPolicy() {
        return Optional.ofNullable(this.tieringPolicy);
    }

    /**
     * TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
     * 
     */
    @Import(name="timeZone")
    private @Nullable Output timeZone;

    /**
     * @return TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
     * 
     */
    public Optional> timeZone() {
        return Optional.ofNullable(this.timeZone);
    }

    private AzureIaaSVMProtectionPolicyArgs() {}

    private AzureIaaSVMProtectionPolicyArgs(AzureIaaSVMProtectionPolicyArgs $) {
        this.backupManagementType = $.backupManagementType;
        this.instantRPDetails = $.instantRPDetails;
        this.instantRpRetentionRangeInDays = $.instantRpRetentionRangeInDays;
        this.policyType = $.policyType;
        this.protectedItemsCount = $.protectedItemsCount;
        this.resourceGuardOperationRequests = $.resourceGuardOperationRequests;
        this.retentionPolicy = $.retentionPolicy;
        this.schedulePolicy = $.schedulePolicy;
        this.tieringPolicy = $.tieringPolicy;
        this.timeZone = $.timeZone;
    }

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

    public static final class Builder {
        private AzureIaaSVMProtectionPolicyArgs $;

        public Builder() {
            $ = new AzureIaaSVMProtectionPolicyArgs();
        }

        public Builder(AzureIaaSVMProtectionPolicyArgs defaults) {
            $ = new AzureIaaSVMProtectionPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param backupManagementType This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
         * Expected value is 'AzureIaasVM'.
         * 
         * @return builder
         * 
         */
        public Builder backupManagementType(Output backupManagementType) {
            $.backupManagementType = backupManagementType;
            return this;
        }

        /**
         * @param backupManagementType This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
         * Expected value is 'AzureIaasVM'.
         * 
         * @return builder
         * 
         */
        public Builder backupManagementType(String backupManagementType) {
            return backupManagementType(Output.of(backupManagementType));
        }

        public Builder instantRPDetails(@Nullable Output instantRPDetails) {
            $.instantRPDetails = instantRPDetails;
            return this;
        }

        public Builder instantRPDetails(InstantRPAdditionalDetailsArgs instantRPDetails) {
            return instantRPDetails(Output.of(instantRPDetails));
        }

        /**
         * @param instantRpRetentionRangeInDays Instant RP retention policy range in days
         * 
         * @return builder
         * 
         */
        public Builder instantRpRetentionRangeInDays(@Nullable Output instantRpRetentionRangeInDays) {
            $.instantRpRetentionRangeInDays = instantRpRetentionRangeInDays;
            return this;
        }

        /**
         * @param instantRpRetentionRangeInDays Instant RP retention policy range in days
         * 
         * @return builder
         * 
         */
        public Builder instantRpRetentionRangeInDays(Integer instantRpRetentionRangeInDays) {
            return instantRpRetentionRangeInDays(Output.of(instantRpRetentionRangeInDays));
        }

        public Builder policyType(@Nullable Output> policyType) {
            $.policyType = policyType;
            return this;
        }

        public Builder policyType(Either policyType) {
            return policyType(Output.of(policyType));
        }

        public Builder policyType(String policyType) {
            return policyType(Either.ofLeft(policyType));
        }

        public Builder policyType(IAASVMPolicyType policyType) {
            return policyType(Either.ofRight(policyType));
        }

        /**
         * @param protectedItemsCount Number of items associated with this policy.
         * 
         * @return builder
         * 
         */
        public Builder protectedItemsCount(@Nullable Output protectedItemsCount) {
            $.protectedItemsCount = protectedItemsCount;
            return this;
        }

        /**
         * @param protectedItemsCount Number of items associated with this policy.
         * 
         * @return builder
         * 
         */
        public Builder protectedItemsCount(Integer protectedItemsCount) {
            return protectedItemsCount(Output.of(protectedItemsCount));
        }

        /**
         * @param resourceGuardOperationRequests ResourceGuard Operation Requests
         * 
         * @return builder
         * 
         */
        public Builder resourceGuardOperationRequests(@Nullable Output> resourceGuardOperationRequests) {
            $.resourceGuardOperationRequests = resourceGuardOperationRequests;
            return this;
        }

        /**
         * @param resourceGuardOperationRequests ResourceGuard Operation Requests
         * 
         * @return builder
         * 
         */
        public Builder resourceGuardOperationRequests(List resourceGuardOperationRequests) {
            return resourceGuardOperationRequests(Output.of(resourceGuardOperationRequests));
        }

        /**
         * @param resourceGuardOperationRequests ResourceGuard Operation Requests
         * 
         * @return builder
         * 
         */
        public Builder resourceGuardOperationRequests(String... resourceGuardOperationRequests) {
            return resourceGuardOperationRequests(List.of(resourceGuardOperationRequests));
        }

        /**
         * @param retentionPolicy Retention policy with the details on backup copy retention ranges.
         * 
         * @return builder
         * 
         */
        public Builder retentionPolicy(@Nullable Output> retentionPolicy) {
            $.retentionPolicy = retentionPolicy;
            return this;
        }

        /**
         * @param retentionPolicy Retention policy with the details on backup copy retention ranges.
         * 
         * @return builder
         * 
         */
        public Builder retentionPolicy(Either retentionPolicy) {
            return retentionPolicy(Output.of(retentionPolicy));
        }

        /**
         * @param retentionPolicy Retention policy with the details on backup copy retention ranges.
         * 
         * @return builder
         * 
         */
        public Builder retentionPolicy(LongTermRetentionPolicyArgs retentionPolicy) {
            return retentionPolicy(Either.ofLeft(retentionPolicy));
        }

        /**
         * @param retentionPolicy Retention policy with the details on backup copy retention ranges.
         * 
         * @return builder
         * 
         */
        public Builder retentionPolicy(SimpleRetentionPolicyArgs retentionPolicy) {
            return retentionPolicy(Either.ofRight(retentionPolicy));
        }

        /**
         * @param schedulePolicy Backup schedule specified as part of backup policy.
         * 
         * @return builder
         * 
         */
        public Builder schedulePolicy(@Nullable Output schedulePolicy) {
            $.schedulePolicy = schedulePolicy;
            return this;
        }

        /**
         * @param schedulePolicy Backup schedule specified as part of backup policy.
         * 
         * @return builder
         * 
         */
        public Builder schedulePolicy(Object schedulePolicy) {
            return schedulePolicy(Output.of(schedulePolicy));
        }

        /**
         * @param tieringPolicy 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.
         * 
         * @return builder
         * 
         */
        public Builder tieringPolicy(@Nullable Output> tieringPolicy) {
            $.tieringPolicy = tieringPolicy;
            return this;
        }

        /**
         * @param tieringPolicy 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.
         * 
         * @return builder
         * 
         */
        public Builder tieringPolicy(Map tieringPolicy) {
            return tieringPolicy(Output.of(tieringPolicy));
        }

        /**
         * @param timeZone TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
         * 
         * @return builder
         * 
         */
        public Builder timeZone(@Nullable Output timeZone) {
            $.timeZone = timeZone;
            return this;
        }

        /**
         * @param timeZone TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
         * 
         * @return builder
         * 
         */
        public Builder timeZone(String timeZone) {
            return timeZone(Output.of(timeZone));
        }

        public AzureIaaSVMProtectionPolicyArgs build() {
            $.backupManagementType = Codegen.stringProp("backupManagementType").output().arg($.backupManagementType).require();
            return $;
        }
    }

}