// *** 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.aws.backup;

import com.pulumi.aws.backup.inputs.PlanAdvancedBackupSettingArgs;
import com.pulumi.aws.backup.inputs.PlanRuleArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PlanArgs Empty = new PlanArgs();

    /**
     * An object that specifies backup options for each resource type.
     * 
     */
    @Import(name="advancedBackupSettings")
    private @Nullable Output<List<PlanAdvancedBackupSettingArgs>> advancedBackupSettings;

    /**
     * @return An object that specifies backup options for each resource type.
     * 
     */
    public Optional<Output<List<PlanAdvancedBackupSettingArgs>>> advancedBackupSettings() {
        return Optional.ofNullable(this.advancedBackupSettings);
    }

    /**
     * The display name of a backup plan.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The display name of a backup plan.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A rule object that specifies a scheduled task that is used to back up a selection of resources.
     * 
     */
    @Import(name="rules", required=true)
    private Output<List<PlanRuleArgs>> rules;

    /**
     * @return A rule object that specifies a scheduled task that is used to back up a selection of resources.
     * 
     */
    public Output<List<PlanRuleArgs>> rules() {
        return this.rules;
    }

    /**
     * Metadata that you can assign to help organize the plans you create. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return Metadata that you can assign to help organize the plans you create. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private PlanArgs() {}

    private PlanArgs(PlanArgs $) {
        this.advancedBackupSettings = $.advancedBackupSettings;
        this.name = $.name;
        this.rules = $.rules;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private PlanArgs $;

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

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

        /**
         * @param advancedBackupSettings An object that specifies backup options for each resource type.
         * 
         * @return builder
         * 
         */
        public Builder advancedBackupSettings(@Nullable Output<List<PlanAdvancedBackupSettingArgs>> advancedBackupSettings) {
            $.advancedBackupSettings = advancedBackupSettings;
            return this;
        }

        /**
         * @param advancedBackupSettings An object that specifies backup options for each resource type.
         * 
         * @return builder
         * 
         */
        public Builder advancedBackupSettings(List<PlanAdvancedBackupSettingArgs> advancedBackupSettings) {
            return advancedBackupSettings(Output.of(advancedBackupSettings));
        }

        /**
         * @param advancedBackupSettings An object that specifies backup options for each resource type.
         * 
         * @return builder
         * 
         */
        public Builder advancedBackupSettings(PlanAdvancedBackupSettingArgs... advancedBackupSettings) {
            return advancedBackupSettings(List.of(advancedBackupSettings));
        }

        /**
         * @param name The display name of a backup plan.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The display name of a backup plan.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param rules A rule object that specifies a scheduled task that is used to back up a selection of resources.
         * 
         * @return builder
         * 
         */
        public Builder rules(Output<List<PlanRuleArgs>> rules) {
            $.rules = rules;
            return this;
        }

        /**
         * @param rules A rule object that specifies a scheduled task that is used to back up a selection of resources.
         * 
         * @return builder
         * 
         */
        public Builder rules(List<PlanRuleArgs> rules) {
            return rules(Output.of(rules));
        }

        /**
         * @param rules A rule object that specifies a scheduled task that is used to back up a selection of resources.
         * 
         * @return builder
         * 
         */
        public Builder rules(PlanRuleArgs... rules) {
            return rules(List.of(rules));
        }

        /**
         * @param tags Metadata that you can assign to help organize the plans you create. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Metadata that you can assign to help organize the plans you create. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

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

}
