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

com.pulumi.azurenative.network.inputs.FrontDoorMatchConditionArgs Maven / Gradle / Ivy

The 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.FrontDoorMatchVariable;
import com.pulumi.azurenative.network.enums.Operator;
import com.pulumi.azurenative.network.enums.TransformType;
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 a match condition.
 * 
 */
public final class FrontDoorMatchConditionArgs extends com.pulumi.resources.ResourceArgs {

    public static final FrontDoorMatchConditionArgs Empty = new FrontDoorMatchConditionArgs();

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

    /**
     * @return List of possible match values.
     * 
     */
    public Output> matchValue() {
        return this.matchValue;
    }

    /**
     * Request variable to compare with.
     * 
     */
    @Import(name="matchVariable", required=true)
    private Output> matchVariable;

    /**
     * @return Request variable to compare with.
     * 
     */
    public Output> matchVariable() {
        return this.matchVariable;
    }

    /**
     * Describes if the result of this condition should be negated.
     * 
     */
    @Import(name="negateCondition")
    private @Nullable Output negateCondition;

    /**
     * @return Describes if the result of this condition should be negated.
     * 
     */
    public Optional> negateCondition() {
        return Optional.ofNullable(this.negateCondition);
    }

    /**
     * Comparison type to use for matching with the variable value.
     * 
     */
    @Import(name="operator", required=true)
    private Output> operator;

    /**
     * @return Comparison type to use for matching with the variable value.
     * 
     */
    public Output> operator() {
        return this.operator;
    }

    /**
     * Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies variables. Default is null.
     * 
     */
    @Import(name="selector")
    private @Nullable Output selector;

    /**
     * @return Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies variables. Default is null.
     * 
     */
    public Optional> selector() {
        return Optional.ofNullable(this.selector);
    }

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

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

    private FrontDoorMatchConditionArgs() {}

    private FrontDoorMatchConditionArgs(FrontDoorMatchConditionArgs $) {
        this.matchValue = $.matchValue;
        this.matchVariable = $.matchVariable;
        this.negateCondition = $.negateCondition;
        this.operator = $.operator;
        this.selector = $.selector;
        this.transforms = $.transforms;
    }

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

    public static final class Builder {
        private FrontDoorMatchConditionArgs $;

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

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

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

        /**
         * @param matchValue List of possible match values.
         * 
         * @return builder
         * 
         */
        public Builder matchValue(List matchValue) {
            return matchValue(Output.of(matchValue));
        }

        /**
         * @param matchValue List of possible match values.
         * 
         * @return builder
         * 
         */
        public Builder matchValue(String... matchValue) {
            return matchValue(List.of(matchValue));
        }

        /**
         * @param matchVariable Request variable to compare with.
         * 
         * @return builder
         * 
         */
        public Builder matchVariable(Output> matchVariable) {
            $.matchVariable = matchVariable;
            return this;
        }

        /**
         * @param matchVariable Request variable to compare with.
         * 
         * @return builder
         * 
         */
        public Builder matchVariable(Either matchVariable) {
            return matchVariable(Output.of(matchVariable));
        }

        /**
         * @param matchVariable Request variable to compare with.
         * 
         * @return builder
         * 
         */
        public Builder matchVariable(String matchVariable) {
            return matchVariable(Either.ofLeft(matchVariable));
        }

        /**
         * @param matchVariable Request variable to compare with.
         * 
         * @return builder
         * 
         */
        public Builder matchVariable(FrontDoorMatchVariable matchVariable) {
            return matchVariable(Either.ofRight(matchVariable));
        }

        /**
         * @param negateCondition Describes if the result of this condition should be negated.
         * 
         * @return builder
         * 
         */
        public Builder negateCondition(@Nullable Output negateCondition) {
            $.negateCondition = negateCondition;
            return this;
        }

        /**
         * @param negateCondition Describes if the result of this condition should be negated.
         * 
         * @return builder
         * 
         */
        public Builder negateCondition(Boolean negateCondition) {
            return negateCondition(Output.of(negateCondition));
        }

        /**
         * @param operator Comparison type to use for matching with the variable value.
         * 
         * @return builder
         * 
         */
        public Builder operator(Output> operator) {
            $.operator = operator;
            return this;
        }

        /**
         * @param operator Comparison type to use for matching with the variable value.
         * 
         * @return builder
         * 
         */
        public Builder operator(Either operator) {
            return operator(Output.of(operator));
        }

        /**
         * @param operator Comparison type to use for matching with the variable value.
         * 
         * @return builder
         * 
         */
        public Builder operator(String operator) {
            return operator(Either.ofLeft(operator));
        }

        /**
         * @param operator Comparison type to use for matching with the variable value.
         * 
         * @return builder
         * 
         */
        public Builder operator(Operator operator) {
            return operator(Either.ofRight(operator));
        }

        /**
         * @param selector Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies variables. Default is null.
         * 
         * @return builder
         * 
         */
        public Builder selector(@Nullable Output selector) {
            $.selector = selector;
            return this;
        }

        /**
         * @param selector Match against a specific key from the QueryString, PostArgs, RequestHeader or Cookies variables. Default is null.
         * 
         * @return builder
         * 
         */
        public Builder selector(String selector) {
            return selector(Output.of(selector));
        }

        /**
         * @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 FrontDoorMatchConditionArgs build() {
            if ($.matchValue == null) {
                throw new MissingRequiredPropertyException("FrontDoorMatchConditionArgs", "matchValue");
            }
            if ($.matchVariable == null) {
                throw new MissingRequiredPropertyException("FrontDoorMatchConditionArgs", "matchVariable");
            }
            if ($.operator == null) {
                throw new MissingRequiredPropertyException("FrontDoorMatchConditionArgs", "operator");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy