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

com.pulumi.azurenative.network.inputs.MatchConditionArgs 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.network.inputs;

import com.pulumi.azurenative.network.enums.WebApplicationFirewallOperator;
import com.pulumi.azurenative.network.enums.WebApplicationFirewallTransform;
import com.pulumi.azurenative.network.inputs.MatchVariableArgs;
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.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Define match conditions.
 * 
 */
public final class MatchConditionArgs extends com.pulumi.resources.ResourceArgs {

    public static final MatchConditionArgs Empty = new MatchConditionArgs();

    /**
     * Match value.
     * 
     */
    @Import(name="matchValues", required=true)
    private Output> matchValues;

    /**
     * @return Match value.
     * 
     */
    public Output> matchValues() {
        return this.matchValues;
    }

    /**
     * List of match variables.
     * 
     */
    @Import(name="matchVariables", required=true)
    private Output> matchVariables;

    /**
     * @return List of match variables.
     * 
     */
    public Output> matchVariables() {
        return this.matchVariables;
    }

    /**
     * Whether this is negate condition or not.
     * 
     */
    @Import(name="negationConditon")
    private @Nullable Output negationConditon;

    /**
     * @return Whether this is negate condition or not.
     * 
     */
    public Optional> negationConditon() {
        return Optional.ofNullable(this.negationConditon);
    }

    /**
     * The operator to be matched.
     * 
     */
    @Import(name="operator", required=true)
    private Output> operator;

    /**
     * @return The operator to be matched.
     * 
     */
    public Output> operator() {
        return this.operator;
    }

    /**
     * List of transforms.
     * 
     */
    @Import(name="transforms")
    private @Nullable Output>> transforms;

    /**
     * @return List of transforms.
     * 
     */
    public Optional>>> transforms() {
        return Optional.ofNullable(this.transforms);
    }

    private MatchConditionArgs() {}

    private MatchConditionArgs(MatchConditionArgs $) {
        this.matchValues = $.matchValues;
        this.matchVariables = $.matchVariables;
        this.negationConditon = $.negationConditon;
        this.operator = $.operator;
        this.transforms = $.transforms;
    }

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

    public static final class Builder {
        private MatchConditionArgs $;

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

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

        /**
         * @param matchValues Match value.
         * 
         * @return builder
         * 
         */
        public Builder matchValues(Output> matchValues) {
            $.matchValues = matchValues;
            return this;
        }

        /**
         * @param matchValues Match value.
         * 
         * @return builder
         * 
         */
        public Builder matchValues(List matchValues) {
            return matchValues(Output.of(matchValues));
        }

        /**
         * @param matchValues Match value.
         * 
         * @return builder
         * 
         */
        public Builder matchValues(String... matchValues) {
            return matchValues(List.of(matchValues));
        }

        /**
         * @param matchVariables List of match variables.
         * 
         * @return builder
         * 
         */
        public Builder matchVariables(Output> matchVariables) {
            $.matchVariables = matchVariables;
            return this;
        }

        /**
         * @param matchVariables List of match variables.
         * 
         * @return builder
         * 
         */
        public Builder matchVariables(List matchVariables) {
            return matchVariables(Output.of(matchVariables));
        }

        /**
         * @param matchVariables List of match variables.
         * 
         * @return builder
         * 
         */
        public Builder matchVariables(MatchVariableArgs... matchVariables) {
            return matchVariables(List.of(matchVariables));
        }

        /**
         * @param negationConditon Whether this is negate condition or not.
         * 
         * @return builder
         * 
         */
        public Builder negationConditon(@Nullable Output negationConditon) {
            $.negationConditon = negationConditon;
            return this;
        }

        /**
         * @param negationConditon Whether this is negate condition or not.
         * 
         * @return builder
         * 
         */
        public Builder negationConditon(Boolean negationConditon) {
            return negationConditon(Output.of(negationConditon));
        }

        /**
         * @param operator The operator to be matched.
         * 
         * @return builder
         * 
         */
        public Builder operator(Output> operator) {
            $.operator = operator;
            return this;
        }

        /**
         * @param operator The operator to be matched.
         * 
         * @return builder
         * 
         */
        public Builder operator(Either operator) {
            return operator(Output.of(operator));
        }

        /**
         * @param operator The operator to be matched.
         * 
         * @return builder
         * 
         */
        public Builder operator(String operator) {
            return operator(Either.ofLeft(operator));
        }

        /**
         * @param operator The operator to be matched.
         * 
         * @return builder
         * 
         */
        public Builder operator(WebApplicationFirewallOperator operator) {
            return operator(Either.ofRight(operator));
        }

        /**
         * @param transforms List of transforms.
         * 
         * @return builder
         * 
         */
        public Builder transforms(@Nullable Output>> transforms) {
            $.transforms = transforms;
            return this;
        }

        /**
         * @param transforms List of transforms.
         * 
         * @return builder
         * 
         */
        public Builder transforms(List> transforms) {
            return transforms(Output.of(transforms));
        }

        /**
         * @param transforms List of transforms.
         * 
         * @return builder
         * 
         */
        public Builder transforms(Either... transforms) {
            return transforms(List.of(transforms));
        }

        public MatchConditionArgs build() {
            if ($.matchValues == null) {
                throw new MissingRequiredPropertyException("MatchConditionArgs", "matchValues");
            }
            if ($.matchVariables == null) {
                throw new MissingRequiredPropertyException("MatchConditionArgs", "matchVariables");
            }
            if ($.operator == null) {
                throw new MissingRequiredPropertyException("MatchConditionArgs", "operator");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy