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

com.pulumi.azurenative.recoveryservices.inputs.AzureFileShareProtectionPolicyArgs 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.azurenative.recoveryservices.inputs;

import com.pulumi.azurenative.recoveryservices.enums.WorkloadType;
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.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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * AzureStorage backup policy.
 * 
 */
public final class AzureFileShareProtectionPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final AzureFileShareProtectionPolicyArgs Empty = new AzureFileShareProtectionPolicyArgs();

    /**
     * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'AzureStorage'.
     * 
     */
    @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 'AzureStorage'.
     * 
     */
    public Output backupManagementType() {
        return this.backupManagementType;
    }

    /**
     * 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);
    }

    /**
     * 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);
    }

    /**
     * Type of workload for the backup management
     * 
     */
    @Import(name="workLoadType")
    private @Nullable Output> workLoadType;

    /**
     * @return Type of workload for the backup management
     * 
     */
    public Optional>> workLoadType() {
        return Optional.ofNullable(this.workLoadType);
    }

    private AzureFileShareProtectionPolicyArgs() {}

    private AzureFileShareProtectionPolicyArgs(AzureFileShareProtectionPolicyArgs $) {
        this.backupManagementType = $.backupManagementType;
        this.protectedItemsCount = $.protectedItemsCount;
        this.resourceGuardOperationRequests = $.resourceGuardOperationRequests;
        this.retentionPolicy = $.retentionPolicy;
        this.schedulePolicy = $.schedulePolicy;
        this.timeZone = $.timeZone;
        this.workLoadType = $.workLoadType;
    }

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

    public static final class Builder {
        private AzureFileShareProtectionPolicyArgs $;

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

        public Builder(AzureFileShareProtectionPolicyArgs defaults) {
            $ = new AzureFileShareProtectionPolicyArgs(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 'AzureStorage'.
         * 
         * @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 'AzureStorage'.
         * 
         * @return builder
         * 
         */
        public Builder backupManagementType(String backupManagementType) {
            return backupManagementType(Output.of(backupManagementType));
        }

        /**
         * @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 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));
        }

        /**
         * @param workLoadType Type of workload for the backup management
         * 
         * @return builder
         * 
         */
        public Builder workLoadType(@Nullable Output> workLoadType) {
            $.workLoadType = workLoadType;
            return this;
        }

        /**
         * @param workLoadType Type of workload for the backup management
         * 
         * @return builder
         * 
         */
        public Builder workLoadType(Either workLoadType) {
            return workLoadType(Output.of(workLoadType));
        }

        /**
         * @param workLoadType Type of workload for the backup management
         * 
         * @return builder
         * 
         */
        public Builder workLoadType(String workLoadType) {
            return workLoadType(Either.ofLeft(workLoadType));
        }

        /**
         * @param workLoadType Type of workload for the backup management
         * 
         * @return builder
         * 
         */
        public Builder workLoadType(WorkloadType workLoadType) {
            return workLoadType(Either.ofRight(workLoadType));
        }

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

}