com.pulumi.azure.frontdoor.outputs.FirewallPolicyCustomRuleMatchCondition 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.frontdoor.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class FirewallPolicyCustomRuleMatchCondition {
/**
* @return Up to `600` possible values to match. Limit is in total across all `match_condition` blocks and `match_values` arguments. String value itself can be up to `256` characters long.
*
*/
private List matchValues;
/**
* @return The request variable to compare with. Possible values are `Cookies`, `PostArgs`, `QueryString`, `RemoteAddr`, `RequestBody`, `RequestHeader`, `RequestMethod`, `RequestUri`, or `SocketAddr`.
*
*/
private String matchVariable;
/**
* @return Should the result of the condition be negated.
*
*/
private @Nullable Boolean negationCondition;
/**
* @return Comparison type to use for matching with the variable value. Possible values are `Any`, `BeginsWith`, `Contains`, `EndsWith`, `Equal`, `GeoMatch`, `GreaterThan`, `GreaterThanOrEqual`, `IPMatch`, `LessThan`, `LessThanOrEqual` or `RegEx`.
*
*/
private String operator;
/**
* @return Match against a specific key if the `match_variable` is `QueryString`, `PostArgs`, `RequestHeader` or `Cookies`.
*
*/
private @Nullable String selector;
/**
* @return Up to `5` transforms to apply. Possible values are `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `URLDecode` or`URLEncode`.
*
*/
private @Nullable List transforms;
private FirewallPolicyCustomRuleMatchCondition() {}
/**
* @return Up to `600` possible values to match. Limit is in total across all `match_condition` blocks and `match_values` arguments. String value itself can be up to `256` characters long.
*
*/
public List matchValues() {
return this.matchValues;
}
/**
* @return The request variable to compare with. Possible values are `Cookies`, `PostArgs`, `QueryString`, `RemoteAddr`, `RequestBody`, `RequestHeader`, `RequestMethod`, `RequestUri`, or `SocketAddr`.
*
*/
public String matchVariable() {
return this.matchVariable;
}
/**
* @return Should the result of the condition be negated.
*
*/
public Optional negationCondition() {
return Optional.ofNullable(this.negationCondition);
}
/**
* @return Comparison type to use for matching with the variable value. Possible values are `Any`, `BeginsWith`, `Contains`, `EndsWith`, `Equal`, `GeoMatch`, `GreaterThan`, `GreaterThanOrEqual`, `IPMatch`, `LessThan`, `LessThanOrEqual` or `RegEx`.
*
*/
public String operator() {
return this.operator;
}
/**
* @return Match against a specific key if the `match_variable` is `QueryString`, `PostArgs`, `RequestHeader` or `Cookies`.
*
*/
public Optional selector() {
return Optional.ofNullable(this.selector);
}
/**
* @return Up to `5` transforms to apply. Possible values are `Lowercase`, `RemoveNulls`, `Trim`, `Uppercase`, `URLDecode` or`URLEncode`.
*
*/
public List transforms() {
return this.transforms == null ? List.of() : this.transforms;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(FirewallPolicyCustomRuleMatchCondition defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private List matchValues;
private String matchVariable;
private @Nullable Boolean negationCondition;
private String operator;
private @Nullable String selector;
private @Nullable List transforms;
public Builder() {}
public Builder(FirewallPolicyCustomRuleMatchCondition defaults) {
Objects.requireNonNull(defaults);
this.matchValues = defaults.matchValues;
this.matchVariable = defaults.matchVariable;
this.negationCondition = defaults.negationCondition;
this.operator = defaults.operator;
this.selector = defaults.selector;
this.transforms = defaults.transforms;
}
@CustomType.Setter
public Builder matchValues(List matchValues) {
if (matchValues == null) {
throw new MissingRequiredPropertyException("FirewallPolicyCustomRuleMatchCondition", "matchValues");
}
this.matchValues = matchValues;
return this;
}
public Builder matchValues(String... matchValues) {
return matchValues(List.of(matchValues));
}
@CustomType.Setter
public Builder matchVariable(String matchVariable) {
if (matchVariable == null) {
throw new MissingRequiredPropertyException("FirewallPolicyCustomRuleMatchCondition", "matchVariable");
}
this.matchVariable = matchVariable;
return this;
}
@CustomType.Setter
public Builder negationCondition(@Nullable Boolean negationCondition) {
this.negationCondition = negationCondition;
return this;
}
@CustomType.Setter
public Builder operator(String operator) {
if (operator == null) {
throw new MissingRequiredPropertyException("FirewallPolicyCustomRuleMatchCondition", "operator");
}
this.operator = operator;
return this;
}
@CustomType.Setter
public Builder selector(@Nullable String selector) {
this.selector = selector;
return this;
}
@CustomType.Setter
public Builder transforms(@Nullable List transforms) {
this.transforms = transforms;
return this;
}
public Builder transforms(String... transforms) {
return transforms(List.of(transforms));
}
public FirewallPolicyCustomRuleMatchCondition build() {
final var _resultValue = new FirewallPolicyCustomRuleMatchCondition();
_resultValue.matchValues = matchValues;
_resultValue.matchVariable = matchVariable;
_resultValue.negationCondition = negationCondition;
_resultValue.operator = operator;
_resultValue.selector = selector;
_resultValue.transforms = transforms;
return _resultValue;
}
}
}