com.pulumi.azurenative.cdn.outputs.RateLimitRuleResponse 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.
// *** 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.outputs;
import com.pulumi.azurenative.cdn.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 RateLimitRuleResponse {
/**
* @return Describes what action to be applied when rule matches
*
*/
private String action;
/**
* @return Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
*
*/
private @Nullable String enabledState;
/**
* @return List of match conditions.
*
*/
private List matchConditions;
/**
* @return Defines the name of the custom rule
*
*/
private String name;
/**
* @return Defines in what order this rule be evaluated in the overall list of custom rules
*
*/
private Integer priority;
/**
* @return Defines rate limit duration. Default is 1 minute.
*
*/
private Integer rateLimitDurationInMinutes;
/**
* @return Defines rate limit threshold.
*
*/
private Integer rateLimitThreshold;
private RateLimitRuleResponse() {}
/**
* @return Describes what action to be applied when rule matches
*
*/
public String action() {
return this.action;
}
/**
* @return Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.
*
*/
public Optional enabledState() {
return Optional.ofNullable(this.enabledState);
}
/**
* @return List of match conditions.
*
*/
public List matchConditions() {
return this.matchConditions;
}
/**
* @return Defines the name of the custom rule
*
*/
public String name() {
return this.name;
}
/**
* @return Defines in what order this rule be evaluated in the overall list of custom rules
*
*/
public Integer priority() {
return this.priority;
}
/**
* @return Defines rate limit duration. Default is 1 minute.
*
*/
public Integer rateLimitDurationInMinutes() {
return this.rateLimitDurationInMinutes;
}
/**
* @return Defines rate limit threshold.
*
*/
public Integer rateLimitThreshold() {
return this.rateLimitThreshold;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(RateLimitRuleResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String action;
private @Nullable String enabledState;
private List matchConditions;
private String name;
private Integer priority;
private Integer rateLimitDurationInMinutes;
private Integer rateLimitThreshold;
public Builder() {}
public Builder(RateLimitRuleResponse defaults) {
Objects.requireNonNull(defaults);
this.action = defaults.action;
this.enabledState = defaults.enabledState;
this.matchConditions = defaults.matchConditions;
this.name = defaults.name;
this.priority = defaults.priority;
this.rateLimitDurationInMinutes = defaults.rateLimitDurationInMinutes;
this.rateLimitThreshold = defaults.rateLimitThreshold;
}
@CustomType.Setter
public Builder action(String action) {
if (action == null) {
throw new MissingRequiredPropertyException("RateLimitRuleResponse", "action");
}
this.action = action;
return this;
}
@CustomType.Setter
public Builder enabledState(@Nullable String enabledState) {
this.enabledState = enabledState;
return this;
}
@CustomType.Setter
public Builder matchConditions(List matchConditions) {
if (matchConditions == null) {
throw new MissingRequiredPropertyException("RateLimitRuleResponse", "matchConditions");
}
this.matchConditions = matchConditions;
return this;
}
public Builder matchConditions(MatchConditionResponse... matchConditions) {
return matchConditions(List.of(matchConditions));
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("RateLimitRuleResponse", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder priority(Integer priority) {
if (priority == null) {
throw new MissingRequiredPropertyException("RateLimitRuleResponse", "priority");
}
this.priority = priority;
return this;
}
@CustomType.Setter
public Builder rateLimitDurationInMinutes(Integer rateLimitDurationInMinutes) {
if (rateLimitDurationInMinutes == null) {
throw new MissingRequiredPropertyException("RateLimitRuleResponse", "rateLimitDurationInMinutes");
}
this.rateLimitDurationInMinutes = rateLimitDurationInMinutes;
return this;
}
@CustomType.Setter
public Builder rateLimitThreshold(Integer rateLimitThreshold) {
if (rateLimitThreshold == null) {
throw new MissingRequiredPropertyException("RateLimitRuleResponse", "rateLimitThreshold");
}
this.rateLimitThreshold = rateLimitThreshold;
return this;
}
public RateLimitRuleResponse build() {
final var _resultValue = new RateLimitRuleResponse();
_resultValue.action = action;
_resultValue.enabledState = enabledState;
_resultValue.matchConditions = matchConditions;
_resultValue.name = name;
_resultValue.priority = priority;
_resultValue.rateLimitDurationInMinutes = rateLimitDurationInMinutes;
_resultValue.rateLimitThreshold = rateLimitThreshold;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy