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

com.pulumi.azurenative.web.inputs.BackupScheduleArgs Maven / Gradle / Ivy

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

import com.pulumi.azurenative.web.enums.FrequencyUnit;
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.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Description of a backup schedule. Describes how often should be the backup performed and what should be the retention policy.
 * 
 */
public final class BackupScheduleArgs extends com.pulumi.resources.ResourceArgs {

    public static final BackupScheduleArgs Empty = new BackupScheduleArgs();

    /**
     * How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day)
     * 
     */
    @Import(name="frequencyInterval", required=true)
    private Output frequencyInterval;

    /**
     * @return How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day)
     * 
     */
    public Output frequencyInterval() {
        return this.frequencyInterval;
    }

    /**
     * The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7)
     * 
     */
    @Import(name="frequencyUnit", required=true)
    private Output frequencyUnit;

    /**
     * @return The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7)
     * 
     */
    public Output frequencyUnit() {
        return this.frequencyUnit;
    }

    /**
     * True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
     * 
     */
    @Import(name="keepAtLeastOneBackup", required=true)
    private Output keepAtLeastOneBackup;

    /**
     * @return True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
     * 
     */
    public Output keepAtLeastOneBackup() {
        return this.keepAtLeastOneBackup;
    }

    /**
     * After how many days backups should be deleted.
     * 
     */
    @Import(name="retentionPeriodInDays", required=true)
    private Output retentionPeriodInDays;

    /**
     * @return After how many days backups should be deleted.
     * 
     */
    public Output retentionPeriodInDays() {
        return this.retentionPeriodInDays;
    }

    /**
     * When the schedule should start working.
     * 
     */
    @Import(name="startTime")
    private @Nullable Output startTime;

    /**
     * @return When the schedule should start working.
     * 
     */
    public Optional> startTime() {
        return Optional.ofNullable(this.startTime);
    }

    private BackupScheduleArgs() {}

    private BackupScheduleArgs(BackupScheduleArgs $) {
        this.frequencyInterval = $.frequencyInterval;
        this.frequencyUnit = $.frequencyUnit;
        this.keepAtLeastOneBackup = $.keepAtLeastOneBackup;
        this.retentionPeriodInDays = $.retentionPeriodInDays;
        this.startTime = $.startTime;
    }

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

    public static final class Builder {
        private BackupScheduleArgs $;

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

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

        /**
         * @param frequencyInterval How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day)
         * 
         * @return builder
         * 
         */
        public Builder frequencyInterval(Output frequencyInterval) {
            $.frequencyInterval = frequencyInterval;
            return this;
        }

        /**
         * @param frequencyInterval How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day)
         * 
         * @return builder
         * 
         */
        public Builder frequencyInterval(Integer frequencyInterval) {
            return frequencyInterval(Output.of(frequencyInterval));
        }

        /**
         * @param frequencyUnit The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7)
         * 
         * @return builder
         * 
         */
        public Builder frequencyUnit(Output frequencyUnit) {
            $.frequencyUnit = frequencyUnit;
            return this;
        }

        /**
         * @param frequencyUnit The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7)
         * 
         * @return builder
         * 
         */
        public Builder frequencyUnit(FrequencyUnit frequencyUnit) {
            return frequencyUnit(Output.of(frequencyUnit));
        }

        /**
         * @param keepAtLeastOneBackup True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
         * 
         * @return builder
         * 
         */
        public Builder keepAtLeastOneBackup(Output keepAtLeastOneBackup) {
            $.keepAtLeastOneBackup = keepAtLeastOneBackup;
            return this;
        }

        /**
         * @param keepAtLeastOneBackup True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
         * 
         * @return builder
         * 
         */
        public Builder keepAtLeastOneBackup(Boolean keepAtLeastOneBackup) {
            return keepAtLeastOneBackup(Output.of(keepAtLeastOneBackup));
        }

        /**
         * @param retentionPeriodInDays After how many days backups should be deleted.
         * 
         * @return builder
         * 
         */
        public Builder retentionPeriodInDays(Output retentionPeriodInDays) {
            $.retentionPeriodInDays = retentionPeriodInDays;
            return this;
        }

        /**
         * @param retentionPeriodInDays After how many days backups should be deleted.
         * 
         * @return builder
         * 
         */
        public Builder retentionPeriodInDays(Integer retentionPeriodInDays) {
            return retentionPeriodInDays(Output.of(retentionPeriodInDays));
        }

        /**
         * @param startTime When the schedule should start working.
         * 
         * @return builder
         * 
         */
        public Builder startTime(@Nullable Output startTime) {
            $.startTime = startTime;
            return this;
        }

        /**
         * @param startTime When the schedule should start working.
         * 
         * @return builder
         * 
         */
        public Builder startTime(String startTime) {
            return startTime(Output.of(startTime));
        }

        public BackupScheduleArgs build() {
            $.frequencyInterval = Codegen.integerProp("frequencyInterval").output().arg($.frequencyInterval).def(7).require();
            $.frequencyUnit = Codegen.objectProp("frequencyUnit", FrequencyUnit.class).output().arg($.frequencyUnit).def(FrequencyUnit.Day).require();
            $.keepAtLeastOneBackup = Codegen.booleanProp("keepAtLeastOneBackup").output().arg($.keepAtLeastOneBackup).def(true).require();
            $.retentionPeriodInDays = Codegen.integerProp("retentionPeriodInDays").output().arg($.retentionPeriodInDays).def(30).require();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy