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

com.pulumi.azurenative.cdn.inputs.MatchConditionArgs Maven / Gradle / Ivy

// *** 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.Operator;
import com.pulumi.azurenative.cdn.enums.TransformType;
import com.pulumi.azurenative.cdn.enums.WafMatchVariable;
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();

    /**
     * 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;
    }

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

    /**
     * @return Match variable to compare against.
     * 
     */
    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);
    }

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

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

    /**
     * Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.
     * 
     */
    @Import(name="selector")
    private @Nullable Output selector;

    /**
     * @return Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.
     * 
     */
    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 MatchConditionArgs() {}

    private MatchConditionArgs(MatchConditionArgs $) {
        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(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 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 Match variable to compare against.
         * 
         * @return builder
         * 
         */
        public Builder matchVariable(Output> matchVariable) {
            $.matchVariable = matchVariable;
            return this;
        }

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

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

        /**
         * @param matchVariable Match variable to compare against.
         * 
         * @return builder
         * 
         */
        public Builder matchVariable(WafMatchVariable 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 Describes operator to be matched
         * 
         * @return builder
         * 
         */
        public Builder operator(Output> operator) {
            $.operator = operator;
            return this;
        }

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

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

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

        /**
         * @param selector Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.
         * 
         * @return builder
         * 
         */
        public Builder selector(@Nullable Output selector) {
            $.selector = selector;
            return this;
        }

        /**
         * @param selector Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs.
         * 
         * @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 MatchConditionArgs build() {
            if ($.matchValue == null) {
                throw new MissingRequiredPropertyException("MatchConditionArgs", "matchValue");
            }
            if ($.matchVariable == null) {
                throw new MissingRequiredPropertyException("MatchConditionArgs", "matchVariable");
            }
            if ($.operator == null) {
                throw new MissingRequiredPropertyException("MatchConditionArgs", "operator");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy