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

com.pulumi.azurenative.network.outputs.RulesEngineRuleResponse Maven / Gradle / Ivy

There is a newer version: 2.72.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.outputs;

import com.pulumi.azurenative.network.outputs.RulesEngineActionResponse;
import com.pulumi.azurenative.network.outputs.RulesEngineMatchConditionResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class RulesEngineRuleResponse {
    /**
     * @return Actions to perform on the request and response if all of the match conditions are met.
     * 
     */
    private RulesEngineActionResponse action;
    /**
     * @return A list of match conditions that must meet in order for the actions of this rule to run. Having no match conditions means the actions will always run.
     * 
     */
    private @Nullable List matchConditions;
    /**
     * @return If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.
     * 
     */
    private @Nullable String matchProcessingBehavior;
    /**
     * @return A name to refer to this specific rule.
     * 
     */
    private String name;
    /**
     * @return A priority assigned to this rule.
     * 
     */
    private Integer priority;

    private RulesEngineRuleResponse() {}
    /**
     * @return Actions to perform on the request and response if all of the match conditions are met.
     * 
     */
    public RulesEngineActionResponse action() {
        return this.action;
    }
    /**
     * @return A list of match conditions that must meet in order for the actions of this rule to run. Having no match conditions means the actions will always run.
     * 
     */
    public List matchConditions() {
        return this.matchConditions == null ? List.of() : this.matchConditions;
    }
    /**
     * @return If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.
     * 
     */
    public Optional matchProcessingBehavior() {
        return Optional.ofNullable(this.matchProcessingBehavior);
    }
    /**
     * @return A name to refer to this specific rule.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return A priority assigned to this rule.
     * 
     */
    public Integer priority() {
        return this.priority;
    }

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

    public static Builder builder(RulesEngineRuleResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private RulesEngineActionResponse action;
        private @Nullable List matchConditions;
        private @Nullable String matchProcessingBehavior;
        private String name;
        private Integer priority;
        public Builder() {}
        public Builder(RulesEngineRuleResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.action = defaults.action;
    	      this.matchConditions = defaults.matchConditions;
    	      this.matchProcessingBehavior = defaults.matchProcessingBehavior;
    	      this.name = defaults.name;
    	      this.priority = defaults.priority;
        }

        @CustomType.Setter
        public Builder action(RulesEngineActionResponse action) {
            if (action == null) {
              throw new MissingRequiredPropertyException("RulesEngineRuleResponse", "action");
            }
            this.action = action;
            return this;
        }
        @CustomType.Setter
        public Builder matchConditions(@Nullable List matchConditions) {

            this.matchConditions = matchConditions;
            return this;
        }
        public Builder matchConditions(RulesEngineMatchConditionResponse... matchConditions) {
            return matchConditions(List.of(matchConditions));
        }
        @CustomType.Setter
        public Builder matchProcessingBehavior(@Nullable String matchProcessingBehavior) {

            this.matchProcessingBehavior = matchProcessingBehavior;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("RulesEngineRuleResponse", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder priority(Integer priority) {
            if (priority == null) {
              throw new MissingRequiredPropertyException("RulesEngineRuleResponse", "priority");
            }
            this.priority = priority;
            return this;
        }
        public RulesEngineRuleResponse build() {
            final var _resultValue = new RulesEngineRuleResponse();
            _resultValue.action = action;
            _resultValue.matchConditions = matchConditions;
            _resultValue.matchProcessingBehavior = matchProcessingBehavior;
            _resultValue.name = name;
            _resultValue.priority = priority;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy