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

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

import com.pulumi.azurenative.alertsmanagement.enums.Field;
import com.pulumi.azurenative.alertsmanagement.enums.Operator;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Condition to trigger an alert processing rule.
 * 
 */
public final class ConditionArgs extends com.pulumi.resources.ResourceArgs {

    public static final ConditionArgs Empty = new ConditionArgs();

    /**
     * Field for a given condition.
     * 
     */
    @Import(name="field")
    private @Nullable Output> field;

    /**
     * @return Field for a given condition.
     * 
     */
    public Optional>> field() {
        return Optional.ofNullable(this.field);
    }

    /**
     * Operator for a given condition.
     * 
     */
    @Import(name="operator")
    private @Nullable Output> operator;

    /**
     * @return Operator for a given condition.
     * 
     */
    public Optional>> operator() {
        return Optional.ofNullable(this.operator);
    }

    /**
     * List of values to match for a given condition.
     * 
     */
    @Import(name="values")
    private @Nullable Output> values;

    /**
     * @return List of values to match for a given condition.
     * 
     */
    public Optional>> values() {
        return Optional.ofNullable(this.values);
    }

    private ConditionArgs() {}

    private ConditionArgs(ConditionArgs $) {
        this.field = $.field;
        this.operator = $.operator;
        this.values = $.values;
    }

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

    public static final class Builder {
        private ConditionArgs $;

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

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

        /**
         * @param field Field for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder field(@Nullable Output> field) {
            $.field = field;
            return this;
        }

        /**
         * @param field Field for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder field(Either field) {
            return field(Output.of(field));
        }

        /**
         * @param field Field for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder field(String field) {
            return field(Either.ofLeft(field));
        }

        /**
         * @param field Field for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder field(Field field) {
            return field(Either.ofRight(field));
        }

        /**
         * @param operator Operator for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder operator(@Nullable Output> operator) {
            $.operator = operator;
            return this;
        }

        /**
         * @param operator Operator for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder operator(Either operator) {
            return operator(Output.of(operator));
        }

        /**
         * @param operator Operator for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder operator(String operator) {
            return operator(Either.ofLeft(operator));
        }

        /**
         * @param operator Operator for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder operator(Operator operator) {
            return operator(Either.ofRight(operator));
        }

        /**
         * @param values List of values to match for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder values(@Nullable Output> values) {
            $.values = values;
            return this;
        }

        /**
         * @param values List of values to match for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder values(List values) {
            return values(Output.of(values));
        }

        /**
         * @param values List of values to match for a given condition.
         * 
         * @return builder
         * 
         */
        public Builder values(String... values) {
            return values(List.of(values));
        }

        public ConditionArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy