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

com.pulumi.azurenative.alertsmanagement.inputs.SuppressionArgs 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.alertsmanagement.inputs;

import com.pulumi.azurenative.alertsmanagement.enums.ActionRuleStatus;
import com.pulumi.azurenative.alertsmanagement.inputs.ConditionsArgs;
import com.pulumi.azurenative.alertsmanagement.inputs.ScopeArgs;
import com.pulumi.azurenative.alertsmanagement.inputs.SuppressionConfigArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Action rule with suppression configuration
 * 
 */
public final class SuppressionArgs extends com.pulumi.resources.ResourceArgs {

    public static final SuppressionArgs Empty = new SuppressionArgs();

    /**
     * conditions on which alerts will be filtered
     * 
     */
    @Import(name="conditions")
    private @Nullable Output conditions;

    /**
     * @return conditions on which alerts will be filtered
     * 
     */
    public Optional> conditions() {
        return Optional.ofNullable(this.conditions);
    }

    /**
     * Description of action rule
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Description of action rule
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * scope on which action rule will apply
     * 
     */
    @Import(name="scope")
    private @Nullable Output scope;

    /**
     * @return scope on which action rule will apply
     * 
     */
    public Optional> scope() {
        return Optional.ofNullable(this.scope);
    }

    /**
     * Indicates if the given action rule is enabled or disabled
     * 
     */
    @Import(name="status")
    private @Nullable Output> status;

    /**
     * @return Indicates if the given action rule is enabled or disabled
     * 
     */
    public Optional>> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * suppression configuration for the action rule
     * 
     */
    @Import(name="suppressionConfig", required=true)
    private Output suppressionConfig;

    /**
     * @return suppression configuration for the action rule
     * 
     */
    public Output suppressionConfig() {
        return this.suppressionConfig;
    }

    /**
     * Indicates type of action rule
     * Expected value is 'Suppression'.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return Indicates type of action rule
     * Expected value is 'Suppression'.
     * 
     */
    public Output type() {
        return this.type;
    }

    private SuppressionArgs() {}

    private SuppressionArgs(SuppressionArgs $) {
        this.conditions = $.conditions;
        this.description = $.description;
        this.scope = $.scope;
        this.status = $.status;
        this.suppressionConfig = $.suppressionConfig;
        this.type = $.type;
    }

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

    public static final class Builder {
        private SuppressionArgs $;

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

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

        /**
         * @param conditions conditions on which alerts will be filtered
         * 
         * @return builder
         * 
         */
        public Builder conditions(@Nullable Output conditions) {
            $.conditions = conditions;
            return this;
        }

        /**
         * @param conditions conditions on which alerts will be filtered
         * 
         * @return builder
         * 
         */
        public Builder conditions(ConditionsArgs conditions) {
            return conditions(Output.of(conditions));
        }

        /**
         * @param description Description of action rule
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Description of action rule
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param scope scope on which action rule will apply
         * 
         * @return builder
         * 
         */
        public Builder scope(@Nullable Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope scope on which action rule will apply
         * 
         * @return builder
         * 
         */
        public Builder scope(ScopeArgs scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param status Indicates if the given action rule is enabled or disabled
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status Indicates if the given action rule is enabled or disabled
         * 
         * @return builder
         * 
         */
        public Builder status(Either status) {
            return status(Output.of(status));
        }

        /**
         * @param status Indicates if the given action rule is enabled or disabled
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Either.ofLeft(status));
        }

        /**
         * @param status Indicates if the given action rule is enabled or disabled
         * 
         * @return builder
         * 
         */
        public Builder status(ActionRuleStatus status) {
            return status(Either.ofRight(status));
        }

        /**
         * @param suppressionConfig suppression configuration for the action rule
         * 
         * @return builder
         * 
         */
        public Builder suppressionConfig(Output suppressionConfig) {
            $.suppressionConfig = suppressionConfig;
            return this;
        }

        /**
         * @param suppressionConfig suppression configuration for the action rule
         * 
         * @return builder
         * 
         */
        public Builder suppressionConfig(SuppressionConfigArgs suppressionConfig) {
            return suppressionConfig(Output.of(suppressionConfig));
        }

        /**
         * @param type Indicates type of action rule
         * Expected value is 'Suppression'.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Indicates type of action rule
         * Expected value is 'Suppression'.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public SuppressionArgs build() {
            if ($.suppressionConfig == null) {
                throw new MissingRequiredPropertyException("SuppressionArgs", "suppressionConfig");
            }
            $.type = Codegen.stringProp("type").output().arg($.type).require();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy