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

com.pulumi.azurenative.storage.inputs.ManagementPolicyRuleArgs Maven / Gradle / Ivy

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

import com.pulumi.azurenative.storage.enums.RuleType;
import com.pulumi.azurenative.storage.inputs.ManagementPolicyDefinitionArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.
 * 
 */
public final class ManagementPolicyRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final ManagementPolicyRuleArgs Empty = new ManagementPolicyRuleArgs();

    /**
     * An object that defines the Lifecycle rule.
     * 
     */
    @Import(name="definition", required=true)
    private Output definition;

    /**
     * @return An object that defines the Lifecycle rule.
     * 
     */
    public Output definition() {
        return this.definition;
    }

    /**
     * Rule is enabled if set to true.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Rule is enabled if set to true.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * The valid value is Lifecycle
     * 
     */
    @Import(name="type", required=true)
    private Output> type;

    /**
     * @return The valid value is Lifecycle
     * 
     */
    public Output> type() {
        return this.type;
    }

    private ManagementPolicyRuleArgs() {}

    private ManagementPolicyRuleArgs(ManagementPolicyRuleArgs $) {
        this.definition = $.definition;
        this.enabled = $.enabled;
        this.name = $.name;
        this.type = $.type;
    }

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

    public static final class Builder {
        private ManagementPolicyRuleArgs $;

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

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

        /**
         * @param definition An object that defines the Lifecycle rule.
         * 
         * @return builder
         * 
         */
        public Builder definition(Output definition) {
            $.definition = definition;
            return this;
        }

        /**
         * @param definition An object that defines the Lifecycle rule.
         * 
         * @return builder
         * 
         */
        public Builder definition(ManagementPolicyDefinitionArgs definition) {
            return definition(Output.of(definition));
        }

        /**
         * @param enabled Rule is enabled if set to true.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Rule is enabled if set to true.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param name A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param type The valid value is Lifecycle
         * 
         * @return builder
         * 
         */
        public Builder type(Output> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The valid value is Lifecycle
         * 
         * @return builder
         * 
         */
        public Builder type(Either type) {
            return type(Output.of(type));
        }

        /**
         * @param type The valid value is Lifecycle
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Either.ofLeft(type));
        }

        /**
         * @param type The valid value is Lifecycle
         * 
         * @return builder
         * 
         */
        public Builder type(RuleType type) {
            return type(Either.ofRight(type));
        }

        public ManagementPolicyRuleArgs build() {
            if ($.definition == null) {
                throw new MissingRequiredPropertyException("ManagementPolicyRuleArgs", "definition");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("ManagementPolicyRuleArgs", "name");
            }
            if ($.type == null) {
                throw new MissingRequiredPropertyException("ManagementPolicyRuleArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy