com.pulumi.azure.network.outputs.RouteMapRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.network.outputs;
import com.pulumi.azure.network.outputs.RouteMapRuleAction;
import com.pulumi.azure.network.outputs.RouteMapRuleMatchCriterion;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class RouteMapRule {
/**
* @return An `action` block as defined below.
*
*/
private @Nullable List actions;
/**
* @return A `match_criterion` block as defined below.
*
*/
private @Nullable List matchCriterions;
/**
* @return The unique name for the rule.
*
*/
private String name;
/**
* @return The next step after the rule is evaluated. Possible values are `Continue`, `Terminate` and `Unknown`. Defaults to `Unknown`.
*
*/
private @Nullable String nextStepIfMatched;
private RouteMapRule() {}
/**
* @return An `action` block as defined below.
*
*/
public List actions() {
return this.actions == null ? List.of() : this.actions;
}
/**
* @return A `match_criterion` block as defined below.
*
*/
public List matchCriterions() {
return this.matchCriterions == null ? List.of() : this.matchCriterions;
}
/**
* @return The unique name for the rule.
*
*/
public String name() {
return this.name;
}
/**
* @return The next step after the rule is evaluated. Possible values are `Continue`, `Terminate` and `Unknown`. Defaults to `Unknown`.
*
*/
public Optional nextStepIfMatched() {
return Optional.ofNullable(this.nextStepIfMatched);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(RouteMapRule defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List actions;
private @Nullable List matchCriterions;
private String name;
private @Nullable String nextStepIfMatched;
public Builder() {}
public Builder(RouteMapRule defaults) {
Objects.requireNonNull(defaults);
this.actions = defaults.actions;
this.matchCriterions = defaults.matchCriterions;
this.name = defaults.name;
this.nextStepIfMatched = defaults.nextStepIfMatched;
}
@CustomType.Setter
public Builder actions(@Nullable List actions) {
this.actions = actions;
return this;
}
public Builder actions(RouteMapRuleAction... actions) {
return actions(List.of(actions));
}
@CustomType.Setter
public Builder matchCriterions(@Nullable List matchCriterions) {
this.matchCriterions = matchCriterions;
return this;
}
public Builder matchCriterions(RouteMapRuleMatchCriterion... matchCriterions) {
return matchCriterions(List.of(matchCriterions));
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("RouteMapRule", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder nextStepIfMatched(@Nullable String nextStepIfMatched) {
this.nextStepIfMatched = nextStepIfMatched;
return this;
}
public RouteMapRule build() {
final var _resultValue = new RouteMapRule();
_resultValue.actions = actions;
_resultValue.matchCriterions = matchCriterions;
_resultValue.name = name;
_resultValue.nextStepIfMatched = nextStepIfMatched;
return _resultValue;
}
}
}