com.pulumi.azurenative.network.outputs.WebApplicationFirewallCustomRuleResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
The 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.GroupByUserSessionResponse;
import com.pulumi.azurenative.network.outputs.MatchConditionResponse;
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 WebApplicationFirewallCustomRuleResponse {
/**
* @return Type of Actions.
*
*/
private String action;
/**
* @return A unique read-only string that changes whenever the resource is updated.
*
*/
private String etag;
/**
* @return List of user session identifier group by clauses.
*
*/
private @Nullable List groupByUserSession;
/**
* @return List of match conditions.
*
*/
private List matchConditions;
/**
* @return The name of the resource that is unique within a policy. This name can be used to access the resource.
*
*/
private @Nullable String name;
/**
* @return Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
*
*/
private Integer priority;
/**
* @return Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule.
*
*/
private @Nullable String rateLimitDuration;
/**
* @return Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1
*
*/
private @Nullable Integer rateLimitThreshold;
/**
* @return The rule type.
*
*/
private String ruleType;
/**
* @return Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
*
*/
private @Nullable String state;
private WebApplicationFirewallCustomRuleResponse() {}
/**
* @return Type of Actions.
*
*/
public String action() {
return this.action;
}
/**
* @return A unique read-only string that changes whenever the resource is updated.
*
*/
public String etag() {
return this.etag;
}
/**
* @return List of user session identifier group by clauses.
*
*/
public List groupByUserSession() {
return this.groupByUserSession == null ? List.of() : this.groupByUserSession;
}
/**
* @return List of match conditions.
*
*/
public List matchConditions() {
return this.matchConditions;
}
/**
* @return The name of the resource that is unique within a policy. This name can be used to access the resource.
*
*/
public Optional name() {
return Optional.ofNullable(this.name);
}
/**
* @return Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
*
*/
public Integer priority() {
return this.priority;
}
/**
* @return Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule.
*
*/
public Optional rateLimitDuration() {
return Optional.ofNullable(this.rateLimitDuration);
}
/**
* @return Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1
*
*/
public Optional rateLimitThreshold() {
return Optional.ofNullable(this.rateLimitThreshold);
}
/**
* @return The rule type.
*
*/
public String ruleType() {
return this.ruleType;
}
/**
* @return Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
*
*/
public Optional state() {
return Optional.ofNullable(this.state);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(WebApplicationFirewallCustomRuleResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String action;
private String etag;
private @Nullable List groupByUserSession;
private List matchConditions;
private @Nullable String name;
private Integer priority;
private @Nullable String rateLimitDuration;
private @Nullable Integer rateLimitThreshold;
private String ruleType;
private @Nullable String state;
public Builder() {}
public Builder(WebApplicationFirewallCustomRuleResponse defaults) {
Objects.requireNonNull(defaults);
this.action = defaults.action;
this.etag = defaults.etag;
this.groupByUserSession = defaults.groupByUserSession;
this.matchConditions = defaults.matchConditions;
this.name = defaults.name;
this.priority = defaults.priority;
this.rateLimitDuration = defaults.rateLimitDuration;
this.rateLimitThreshold = defaults.rateLimitThreshold;
this.ruleType = defaults.ruleType;
this.state = defaults.state;
}
@CustomType.Setter
public Builder action(String action) {
if (action == null) {
throw new MissingRequiredPropertyException("WebApplicationFirewallCustomRuleResponse", "action");
}
this.action = action;
return this;
}
@CustomType.Setter
public Builder etag(String etag) {
if (etag == null) {
throw new MissingRequiredPropertyException("WebApplicationFirewallCustomRuleResponse", "etag");
}
this.etag = etag;
return this;
}
@CustomType.Setter
public Builder groupByUserSession(@Nullable List groupByUserSession) {
this.groupByUserSession = groupByUserSession;
return this;
}
public Builder groupByUserSession(GroupByUserSessionResponse... groupByUserSession) {
return groupByUserSession(List.of(groupByUserSession));
}
@CustomType.Setter
public Builder matchConditions(List matchConditions) {
if (matchConditions == null) {
throw new MissingRequiredPropertyException("WebApplicationFirewallCustomRuleResponse", "matchConditions");
}
this.matchConditions = matchConditions;
return this;
}
public Builder matchConditions(MatchConditionResponse... matchConditions) {
return matchConditions(List.of(matchConditions));
}
@CustomType.Setter
public Builder name(@Nullable String name) {
this.name = name;
return this;
}
@CustomType.Setter
public Builder priority(Integer priority) {
if (priority == null) {
throw new MissingRequiredPropertyException("WebApplicationFirewallCustomRuleResponse", "priority");
}
this.priority = priority;
return this;
}
@CustomType.Setter
public Builder rateLimitDuration(@Nullable String rateLimitDuration) {
this.rateLimitDuration = rateLimitDuration;
return this;
}
@CustomType.Setter
public Builder rateLimitThreshold(@Nullable Integer rateLimitThreshold) {
this.rateLimitThreshold = rateLimitThreshold;
return this;
}
@CustomType.Setter
public Builder ruleType(String ruleType) {
if (ruleType == null) {
throw new MissingRequiredPropertyException("WebApplicationFirewallCustomRuleResponse", "ruleType");
}
this.ruleType = ruleType;
return this;
}
@CustomType.Setter
public Builder state(@Nullable String state) {
this.state = state;
return this;
}
public WebApplicationFirewallCustomRuleResponse build() {
final var _resultValue = new WebApplicationFirewallCustomRuleResponse();
_resultValue.action = action;
_resultValue.etag = etag;
_resultValue.groupByUserSession = groupByUserSession;
_resultValue.matchConditions = matchConditions;
_resultValue.name = name;
_resultValue.priority = priority;
_resultValue.rateLimitDuration = rateLimitDuration;
_resultValue.rateLimitThreshold = rateLimitThreshold;
_resultValue.ruleType = ruleType;
_resultValue.state = state;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy