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

com.pulumi.azurenative.cdn.inputs.ManagedRuleOverrideArgs 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.cdn.inputs;

import com.pulumi.azurenative.cdn.enums.ActionType;
import com.pulumi.azurenative.cdn.enums.ManagedRuleEnabledState;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Defines a managed rule group override setting.
 * 
 */
public final class ManagedRuleOverrideArgs extends com.pulumi.resources.ResourceArgs {

    public static final ManagedRuleOverrideArgs Empty = new ManagedRuleOverrideArgs();

    /**
     * Describes the override action to be applied when rule matches.
     * 
     */
    @Import(name="action")
    private @Nullable Output> action;

    /**
     * @return Describes the override action to be applied when rule matches.
     * 
     */
    public Optional>> action() {
        return Optional.ofNullable(this.action);
    }

    /**
     * Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.
     * 
     */
    @Import(name="enabledState")
    private @Nullable Output> enabledState;

    /**
     * @return Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.
     * 
     */
    public Optional>> enabledState() {
        return Optional.ofNullable(this.enabledState);
    }

    /**
     * Identifier for the managed rule.
     * 
     */
    @Import(name="ruleId", required=true)
    private Output ruleId;

    /**
     * @return Identifier for the managed rule.
     * 
     */
    public Output ruleId() {
        return this.ruleId;
    }

    private ManagedRuleOverrideArgs() {}

    private ManagedRuleOverrideArgs(ManagedRuleOverrideArgs $) {
        this.action = $.action;
        this.enabledState = $.enabledState;
        this.ruleId = $.ruleId;
    }

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

    public static final class Builder {
        private ManagedRuleOverrideArgs $;

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

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

        /**
         * @param action Describes the override action to be applied when rule matches.
         * 
         * @return builder
         * 
         */
        public Builder action(@Nullable Output> action) {
            $.action = action;
            return this;
        }

        /**
         * @param action Describes the override action to be applied when rule matches.
         * 
         * @return builder
         * 
         */
        public Builder action(Either action) {
            return action(Output.of(action));
        }

        /**
         * @param action Describes the override action to be applied when rule matches.
         * 
         * @return builder
         * 
         */
        public Builder action(String action) {
            return action(Either.ofLeft(action));
        }

        /**
         * @param action Describes the override action to be applied when rule matches.
         * 
         * @return builder
         * 
         */
        public Builder action(ActionType action) {
            return action(Either.ofRight(action));
        }

        /**
         * @param enabledState Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.
         * 
         * @return builder
         * 
         */
        public Builder enabledState(@Nullable Output> enabledState) {
            $.enabledState = enabledState;
            return this;
        }

        /**
         * @param enabledState Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.
         * 
         * @return builder
         * 
         */
        public Builder enabledState(Either enabledState) {
            return enabledState(Output.of(enabledState));
        }

        /**
         * @param enabledState Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.
         * 
         * @return builder
         * 
         */
        public Builder enabledState(String enabledState) {
            return enabledState(Either.ofLeft(enabledState));
        }

        /**
         * @param enabledState Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.
         * 
         * @return builder
         * 
         */
        public Builder enabledState(ManagedRuleEnabledState enabledState) {
            return enabledState(Either.ofRight(enabledState));
        }

        /**
         * @param ruleId Identifier for the managed rule.
         * 
         * @return builder
         * 
         */
        public Builder ruleId(Output ruleId) {
            $.ruleId = ruleId;
            return this;
        }

        /**
         * @param ruleId Identifier for the managed rule.
         * 
         * @return builder
         * 
         */
        public Builder ruleId(String ruleId) {
            return ruleId(Output.of(ruleId));
        }

        public ManagedRuleOverrideArgs build() {
            if ($.ruleId == null) {
                throw new MissingRequiredPropertyException("ManagedRuleOverrideArgs", "ruleId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy