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

com.pulumi.azurenative.cdn.inputs.DeliveryRuleArgs 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.cdn.inputs;

import com.pulumi.azurenative.cdn.inputs.DeliveryRuleCacheExpirationActionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleCacheKeyQueryStringActionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleClientPortConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleCookiesConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleHostNameConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleHttpVersionConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleIsDeviceConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRulePostArgsConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleQueryStringConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleRemoteAddressConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleRequestBodyConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleRequestHeaderActionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleRequestHeaderConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleRequestMethodConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleRequestSchemeConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleRequestUriConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleResponseHeaderActionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleRouteConfigurationOverrideActionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleServerPortConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleSocketAddrConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleSslProtocolConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleUrlFileExtensionConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleUrlFileNameConditionArgs;
import com.pulumi.azurenative.cdn.inputs.DeliveryRuleUrlPathConditionArgs;
import com.pulumi.azurenative.cdn.inputs.OriginGroupOverrideActionArgs;
import com.pulumi.azurenative.cdn.inputs.UrlRedirectActionArgs;
import com.pulumi.azurenative.cdn.inputs.UrlRewriteActionArgs;
import com.pulumi.azurenative.cdn.inputs.UrlSigningActionArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * A rule that specifies a set of actions and conditions
 * 
 */
public final class DeliveryRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final DeliveryRuleArgs Empty = new DeliveryRuleArgs();

    /**
     * A list of actions that are executed when all the conditions of a rule are satisfied.
     * 
     */
    @Import(name="actions", required=true)
    private Output> actions;

    /**
     * @return A list of actions that are executed when all the conditions of a rule are satisfied.
     * 
     */
    public Output> actions() {
        return this.actions;
    }

    /**
     * A list of conditions that must be matched for the actions to be executed
     * 
     */
    @Import(name="conditions")
    private @Nullable Output> conditions;

    /**
     * @return A list of conditions that must be matched for the actions to be executed
     * 
     */
    public Optional>> conditions() {
        return Optional.ofNullable(this.conditions);
    }

    /**
     * Name of the rule
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the rule
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
     * 
     */
    @Import(name="order", required=true)
    private Output order;

    /**
     * @return The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
     * 
     */
    public Output order() {
        return this.order;
    }

    private DeliveryRuleArgs() {}

    private DeliveryRuleArgs(DeliveryRuleArgs $) {
        this.actions = $.actions;
        this.conditions = $.conditions;
        this.name = $.name;
        this.order = $.order;
    }

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

    public static final class Builder {
        private DeliveryRuleArgs $;

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

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

        /**
         * @param actions A list of actions that are executed when all the conditions of a rule are satisfied.
         * 
         * @return builder
         * 
         */
        public Builder actions(Output> actions) {
            $.actions = actions;
            return this;
        }

        /**
         * @param actions A list of actions that are executed when all the conditions of a rule are satisfied.
         * 
         * @return builder
         * 
         */
        public Builder actions(List actions) {
            return actions(Output.of(actions));
        }

        /**
         * @param actions A list of actions that are executed when all the conditions of a rule are satisfied.
         * 
         * @return builder
         * 
         */
        public Builder actions(Object... actions) {
            return actions(List.of(actions));
        }

        /**
         * @param conditions A list of conditions that must be matched for the actions to be executed
         * 
         * @return builder
         * 
         */
        public Builder conditions(@Nullable Output> conditions) {
            $.conditions = conditions;
            return this;
        }

        /**
         * @param conditions A list of conditions that must be matched for the actions to be executed
         * 
         * @return builder
         * 
         */
        public Builder conditions(List conditions) {
            return conditions(Output.of(conditions));
        }

        /**
         * @param conditions A list of conditions that must be matched for the actions to be executed
         * 
         * @return builder
         * 
         */
        public Builder conditions(Object... conditions) {
            return conditions(List.of(conditions));
        }

        /**
         * @param name Name of the rule
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the rule
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param order The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
         * 
         * @return builder
         * 
         */
        public Builder order(Output order) {
            $.order = order;
            return this;
        }

        /**
         * @param order The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
         * 
         * @return builder
         * 
         */
        public Builder order(Integer order) {
            return order(Output.of(order));
        }

        public DeliveryRuleArgs build() {
            if ($.actions == null) {
                throw new MissingRequiredPropertyException("DeliveryRuleArgs", "actions");
            }
            if ($.order == null) {
                throw new MissingRequiredPropertyException("DeliveryRuleArgs", "order");
            }
            return $;
        }
    }

}