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

com.pulumi.azurenative.sql.BackupLongTermRetentionPolicyArgs 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.sql;

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


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

    public static final BackupLongTermRetentionPolicyArgs Empty = new BackupLongTermRetentionPolicyArgs();

    /**
     * The name of the database.
     * 
     */
    @Import(name="databaseName", required=true)
    private Output databaseName;

    /**
     * @return The name of the database.
     * 
     */
    public Output databaseName() {
        return this.databaseName;
    }

    /**
     * The monthly retention policy for an LTR backup in an ISO 8601 format.
     * 
     */
    @Import(name="monthlyRetention")
    private @Nullable Output monthlyRetention;

    /**
     * @return The monthly retention policy for an LTR backup in an ISO 8601 format.
     * 
     */
    public Optional> monthlyRetention() {
        return Optional.ofNullable(this.monthlyRetention);
    }

    /**
     * The policy name. Should always be Default.
     * 
     */
    @Import(name="policyName")
    private @Nullable Output policyName;

    /**
     * @return The policy name. Should always be Default.
     * 
     */
    public Optional> policyName() {
        return Optional.ofNullable(this.policyName);
    }

    /**
     * The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The name of the server.
     * 
     */
    @Import(name="serverName", required=true)
    private Output serverName;

    /**
     * @return The name of the server.
     * 
     */
    public Output serverName() {
        return this.serverName;
    }

    /**
     * The week of year to take the yearly backup in an ISO 8601 format.
     * 
     */
    @Import(name="weekOfYear")
    private @Nullable Output weekOfYear;

    /**
     * @return The week of year to take the yearly backup in an ISO 8601 format.
     * 
     */
    public Optional> weekOfYear() {
        return Optional.ofNullable(this.weekOfYear);
    }

    /**
     * The weekly retention policy for an LTR backup in an ISO 8601 format.
     * 
     */
    @Import(name="weeklyRetention")
    private @Nullable Output weeklyRetention;

    /**
     * @return The weekly retention policy for an LTR backup in an ISO 8601 format.
     * 
     */
    public Optional> weeklyRetention() {
        return Optional.ofNullable(this.weeklyRetention);
    }

    /**
     * The yearly retention policy for an LTR backup in an ISO 8601 format.
     * 
     */
    @Import(name="yearlyRetention")
    private @Nullable Output yearlyRetention;

    /**
     * @return The yearly retention policy for an LTR backup in an ISO 8601 format.
     * 
     */
    public Optional> yearlyRetention() {
        return Optional.ofNullable(this.yearlyRetention);
    }

    private BackupLongTermRetentionPolicyArgs() {}

    private BackupLongTermRetentionPolicyArgs(BackupLongTermRetentionPolicyArgs $) {
        this.databaseName = $.databaseName;
        this.monthlyRetention = $.monthlyRetention;
        this.policyName = $.policyName;
        this.resourceGroupName = $.resourceGroupName;
        this.serverName = $.serverName;
        this.weekOfYear = $.weekOfYear;
        this.weeklyRetention = $.weeklyRetention;
        this.yearlyRetention = $.yearlyRetention;
    }

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

    public static final class Builder {
        private BackupLongTermRetentionPolicyArgs $;

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

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

        /**
         * @param databaseName The name of the database.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(Output databaseName) {
            $.databaseName = databaseName;
            return this;
        }

        /**
         * @param databaseName The name of the database.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(String databaseName) {
            return databaseName(Output.of(databaseName));
        }

        /**
         * @param monthlyRetention The monthly retention policy for an LTR backup in an ISO 8601 format.
         * 
         * @return builder
         * 
         */
        public Builder monthlyRetention(@Nullable Output monthlyRetention) {
            $.monthlyRetention = monthlyRetention;
            return this;
        }

        /**
         * @param monthlyRetention The monthly retention policy for an LTR backup in an ISO 8601 format.
         * 
         * @return builder
         * 
         */
        public Builder monthlyRetention(String monthlyRetention) {
            return monthlyRetention(Output.of(monthlyRetention));
        }

        /**
         * @param policyName The policy name. Should always be Default.
         * 
         * @return builder
         * 
         */
        public Builder policyName(@Nullable Output policyName) {
            $.policyName = policyName;
            return this;
        }

        /**
         * @param policyName The policy name. Should always be Default.
         * 
         * @return builder
         * 
         */
        public Builder policyName(String policyName) {
            return policyName(Output.of(policyName));
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param serverName The name of the server.
         * 
         * @return builder
         * 
         */
        public Builder serverName(Output serverName) {
            $.serverName = serverName;
            return this;
        }

        /**
         * @param serverName The name of the server.
         * 
         * @return builder
         * 
         */
        public Builder serverName(String serverName) {
            return serverName(Output.of(serverName));
        }

        /**
         * @param weekOfYear The week of year to take the yearly backup in an ISO 8601 format.
         * 
         * @return builder
         * 
         */
        public Builder weekOfYear(@Nullable Output weekOfYear) {
            $.weekOfYear = weekOfYear;
            return this;
        }

        /**
         * @param weekOfYear The week of year to take the yearly backup in an ISO 8601 format.
         * 
         * @return builder
         * 
         */
        public Builder weekOfYear(Integer weekOfYear) {
            return weekOfYear(Output.of(weekOfYear));
        }

        /**
         * @param weeklyRetention The weekly retention policy for an LTR backup in an ISO 8601 format.
         * 
         * @return builder
         * 
         */
        public Builder weeklyRetention(@Nullable Output weeklyRetention) {
            $.weeklyRetention = weeklyRetention;
            return this;
        }

        /**
         * @param weeklyRetention The weekly retention policy for an LTR backup in an ISO 8601 format.
         * 
         * @return builder
         * 
         */
        public Builder weeklyRetention(String weeklyRetention) {
            return weeklyRetention(Output.of(weeklyRetention));
        }

        /**
         * @param yearlyRetention The yearly retention policy for an LTR backup in an ISO 8601 format.
         * 
         * @return builder
         * 
         */
        public Builder yearlyRetention(@Nullable Output yearlyRetention) {
            $.yearlyRetention = yearlyRetention;
            return this;
        }

        /**
         * @param yearlyRetention The yearly retention policy for an LTR backup in an ISO 8601 format.
         * 
         * @return builder
         * 
         */
        public Builder yearlyRetention(String yearlyRetention) {
            return yearlyRetention(Output.of(yearlyRetention));
        }

        public BackupLongTermRetentionPolicyArgs build() {
            if ($.databaseName == null) {
                throw new MissingRequiredPropertyException("BackupLongTermRetentionPolicyArgs", "databaseName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("BackupLongTermRetentionPolicyArgs", "resourceGroupName");
            }
            if ($.serverName == null) {
                throw new MissingRequiredPropertyException("BackupLongTermRetentionPolicyArgs", "serverName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy