// *** 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.azure.mssql.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class DatabaseShortTermRetentionPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final DatabaseShortTermRetentionPolicyArgs Empty = new DatabaseShortTermRetentionPolicyArgs();

    /**
     * The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
     * 
     */
    @Import(name="backupIntervalInHours")
    private @Nullable Output<Integer> backupIntervalInHours;

    /**
     * @return The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
     * 
     */
    public Optional<Output<Integer>> backupIntervalInHours() {
        return Optional.ofNullable(this.backupIntervalInHours);
    }

    /**
     * Point In Time Restore configuration. Value has to be between `7` and `35`.
     * 
     */
    @Import(name="retentionDays", required=true)
    private Output<Integer> retentionDays;

    /**
     * @return Point In Time Restore configuration. Value has to be between `7` and `35`.
     * 
     */
    public Output<Integer> retentionDays() {
        return this.retentionDays;
    }

    private DatabaseShortTermRetentionPolicyArgs() {}

    private DatabaseShortTermRetentionPolicyArgs(DatabaseShortTermRetentionPolicyArgs $) {
        this.backupIntervalInHours = $.backupIntervalInHours;
        this.retentionDays = $.retentionDays;
    }

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

    public static final class Builder {
        private DatabaseShortTermRetentionPolicyArgs $;

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

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

        /**
         * @param backupIntervalInHours The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
         * 
         * @return builder
         * 
         */
        public Builder backupIntervalInHours(@Nullable Output<Integer> backupIntervalInHours) {
            $.backupIntervalInHours = backupIntervalInHours;
            return this;
        }

        /**
         * @param backupIntervalInHours The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
         * 
         * @return builder
         * 
         */
        public Builder backupIntervalInHours(Integer backupIntervalInHours) {
            return backupIntervalInHours(Output.of(backupIntervalInHours));
        }

        /**
         * @param retentionDays Point In Time Restore configuration. Value has to be between `7` and `35`.
         * 
         * @return builder
         * 
         */
        public Builder retentionDays(Output<Integer> retentionDays) {
            $.retentionDays = retentionDays;
            return this;
        }

        /**
         * @param retentionDays Point In Time Restore configuration. Value has to be between `7` and `35`.
         * 
         * @return builder
         * 
         */
        public Builder retentionDays(Integer retentionDays) {
            return retentionDays(Output.of(retentionDays));
        }

        public DatabaseShortTermRetentionPolicyArgs build() {
            $.retentionDays = Objects.requireNonNull($.retentionDays, "expected parameter 'retentionDays' to be non-null");
            return $;
        }
    }

}
