// *** 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.azure.cdn.inputs;

import com.pulumi.azure.cdn.inputs.FrontdoorRuleActionsArgs;
import com.pulumi.azure.cdn.inputs.FrontdoorRuleConditionsArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class FrontdoorRuleState extends com.pulumi.resources.ResourceArgs {

    public static final FrontdoorRuleState Empty = new FrontdoorRuleState();

    /**
     * An `actions` block as defined below.
     * 
     */
    @Import(name="actions")
    private @Nullable Output<FrontdoorRuleActionsArgs> actions;

    /**
     * @return An `actions` block as defined below.
     * 
     */
    public Optional<Output<FrontdoorRuleActionsArgs>> actions() {
        return Optional.ofNullable(this.actions);
    }

    /**
     * If this rule is a match should the rules engine continue processing the remaining rules or stop? Possible values are `Continue` and `Stop`. Defaults to `Continue`.
     * 
     */
    @Import(name="behaviorOnMatch")
    private @Nullable Output<String> behaviorOnMatch;

    /**
     * @return If this rule is a match should the rules engine continue processing the remaining rules or stop? Possible values are `Continue` and `Stop`. Defaults to `Continue`.
     * 
     */
    public Optional<Output<String>> behaviorOnMatch() {
        return Optional.ofNullable(this.behaviorOnMatch);
    }

    /**
     * The resource ID of the Front Door Rule Set for this Front Door Rule. Changing this forces a new Front Door Rule to be created.
     * 
     */
    @Import(name="cdnFrontdoorRuleSetId")
    private @Nullable Output<String> cdnFrontdoorRuleSetId;

    /**
     * @return The resource ID of the Front Door Rule Set for this Front Door Rule. Changing this forces a new Front Door Rule to be created.
     * 
     */
    public Optional<Output<String>> cdnFrontdoorRuleSetId() {
        return Optional.ofNullable(this.cdnFrontdoorRuleSetId);
    }

    /**
     * The name of the Front Door Rule Set containing this Front Door Rule.
     * 
     */
    @Import(name="cdnFrontdoorRuleSetName")
    private @Nullable Output<String> cdnFrontdoorRuleSetName;

    /**
     * @return The name of the Front Door Rule Set containing this Front Door Rule.
     * 
     */
    public Optional<Output<String>> cdnFrontdoorRuleSetName() {
        return Optional.ofNullable(this.cdnFrontdoorRuleSetName);
    }

    /**
     * A `conditions` block as defined below.
     * 
     */
    @Import(name="conditions")
    private @Nullable Output<FrontdoorRuleConditionsArgs> conditions;

    /**
     * @return A `conditions` block as defined below.
     * 
     */
    public Optional<Output<FrontdoorRuleConditionsArgs>> conditions() {
        return Optional.ofNullable(this.conditions);
    }

    /**
     * The name which should be used for this Front Door Rule. Possible values must be between 1 and 260 characters in length, begin with a letter and may contain only letters and numbers. Changing this forces a new Front Door Rule to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name which should be used for this Front Door Rule. Possible values must be between 1 and 260 characters in length, begin with a letter and may contain only letters and numbers. Changing this forces a new Front Door Rule to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The order in which the rules will be applied for the Front Door Endpoint. The order value should be sequential and begin at `1`(e.g. `1`, `2`, `3`...). A Front Door Rule with a lesser order value will be applied before a rule with a greater order value.
     * 
     * -&gt;**NOTE:** If the Front Door Rule has an order value of `0` they do not require any conditions and the actions will always be applied.
     * 
     */
    @Import(name="order")
    private @Nullable Output<Integer> order;

    /**
     * @return The order in which the rules will be applied for the Front Door Endpoint. The order value should be sequential and begin at `1`(e.g. `1`, `2`, `3`...). A Front Door Rule with a lesser order value will be applied before a rule with a greater order value.
     * 
     * -&gt;**NOTE:** If the Front Door Rule has an order value of `0` they do not require any conditions and the actions will always be applied.
     * 
     */
    public Optional<Output<Integer>> order() {
        return Optional.ofNullable(this.order);
    }

    private FrontdoorRuleState() {}

    private FrontdoorRuleState(FrontdoorRuleState $) {
        this.actions = $.actions;
        this.behaviorOnMatch = $.behaviorOnMatch;
        this.cdnFrontdoorRuleSetId = $.cdnFrontdoorRuleSetId;
        this.cdnFrontdoorRuleSetName = $.cdnFrontdoorRuleSetName;
        this.conditions = $.conditions;
        this.name = $.name;
        this.order = $.order;
    }

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

    public static final class Builder {
        private FrontdoorRuleState $;

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

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

        /**
         * @param actions An `actions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder actions(@Nullable Output<FrontdoorRuleActionsArgs> actions) {
            $.actions = actions;
            return this;
        }

        /**
         * @param actions An `actions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder actions(FrontdoorRuleActionsArgs actions) {
            return actions(Output.of(actions));
        }

        /**
         * @param behaviorOnMatch If this rule is a match should the rules engine continue processing the remaining rules or stop? Possible values are `Continue` and `Stop`. Defaults to `Continue`.
         * 
         * @return builder
         * 
         */
        public Builder behaviorOnMatch(@Nullable Output<String> behaviorOnMatch) {
            $.behaviorOnMatch = behaviorOnMatch;
            return this;
        }

        /**
         * @param behaviorOnMatch If this rule is a match should the rules engine continue processing the remaining rules or stop? Possible values are `Continue` and `Stop`. Defaults to `Continue`.
         * 
         * @return builder
         * 
         */
        public Builder behaviorOnMatch(String behaviorOnMatch) {
            return behaviorOnMatch(Output.of(behaviorOnMatch));
        }

        /**
         * @param cdnFrontdoorRuleSetId The resource ID of the Front Door Rule Set for this Front Door Rule. Changing this forces a new Front Door Rule to be created.
         * 
         * @return builder
         * 
         */
        public Builder cdnFrontdoorRuleSetId(@Nullable Output<String> cdnFrontdoorRuleSetId) {
            $.cdnFrontdoorRuleSetId = cdnFrontdoorRuleSetId;
            return this;
        }

        /**
         * @param cdnFrontdoorRuleSetId The resource ID of the Front Door Rule Set for this Front Door Rule. Changing this forces a new Front Door Rule to be created.
         * 
         * @return builder
         * 
         */
        public Builder cdnFrontdoorRuleSetId(String cdnFrontdoorRuleSetId) {
            return cdnFrontdoorRuleSetId(Output.of(cdnFrontdoorRuleSetId));
        }

        /**
         * @param cdnFrontdoorRuleSetName The name of the Front Door Rule Set containing this Front Door Rule.
         * 
         * @return builder
         * 
         */
        public Builder cdnFrontdoorRuleSetName(@Nullable Output<String> cdnFrontdoorRuleSetName) {
            $.cdnFrontdoorRuleSetName = cdnFrontdoorRuleSetName;
            return this;
        }

        /**
         * @param cdnFrontdoorRuleSetName The name of the Front Door Rule Set containing this Front Door Rule.
         * 
         * @return builder
         * 
         */
        public Builder cdnFrontdoorRuleSetName(String cdnFrontdoorRuleSetName) {
            return cdnFrontdoorRuleSetName(Output.of(cdnFrontdoorRuleSetName));
        }

        /**
         * @param conditions A `conditions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder conditions(@Nullable Output<FrontdoorRuleConditionsArgs> conditions) {
            $.conditions = conditions;
            return this;
        }

        /**
         * @param conditions A `conditions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder conditions(FrontdoorRuleConditionsArgs conditions) {
            return conditions(Output.of(conditions));
        }

        /**
         * @param name The name which should be used for this Front Door Rule. Possible values must be between 1 and 260 characters in length, begin with a letter and may contain only letters and numbers. Changing this forces a new Front Door Rule to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name which should be used for this Front Door Rule. Possible values must be between 1 and 260 characters in length, begin with a letter and may contain only letters and numbers. Changing this forces a new Front Door Rule to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param order The order in which the rules will be applied for the Front Door Endpoint. The order value should be sequential and begin at `1`(e.g. `1`, `2`, `3`...). A Front Door Rule with a lesser order value will be applied before a rule with a greater order value.
         * 
         * -&gt;**NOTE:** If the Front Door Rule has an order value of `0` they do not require any conditions and the actions will always be applied.
         * 
         * @return builder
         * 
         */
        public Builder order(@Nullable Output<Integer> order) {
            $.order = order;
            return this;
        }

        /**
         * @param order The order in which the rules will be applied for the Front Door Endpoint. The order value should be sequential and begin at `1`(e.g. `1`, `2`, `3`...). A Front Door Rule with a lesser order value will be applied before a rule with a greater order value.
         * 
         * -&gt;**NOTE:** If the Front Door Rule has an order value of `0` they do not require any conditions and the actions will always be applied.
         * 
         * @return builder
         * 
         */
        public Builder order(Integer order) {
            return order(Output.of(order));
        }

        public FrontdoorRuleState build() {
            return $;
        }
    }

}
