com.pulumi.consul.outputs.ConfigEntryServiceRouterRouteMatchHttpHeader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of consul Show documentation
Show all versions of consul Show documentation
A Pulumi package for creating and managing consul 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.consul.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ConfigEntryServiceRouterRouteMatchHttpHeader {
/**
* @return Specifies that a request matches when the header with the given name is this exact value.
*
*/
private @Nullable String exact;
/**
* @return Specifies that the logic for the HTTP header match should be inverted.
*
*/
private @Nullable Boolean invert;
/**
* @return Specifies the name of the HTTP header to match.
*
*/
private @Nullable String name;
/**
* @return Specifies that a request matches when the header with the given name has this prefix.
*
*/
private @Nullable String prefix;
/**
* @return Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP header.
*
*/
private @Nullable Boolean present;
/**
* @return Specifies that a request matches when the header with the given name matches this regular expression.
*
*/
private @Nullable String regex;
/**
* @return Specifies that a request matches when the header with the given name has this suffix.
*
*/
private @Nullable String suffix;
private ConfigEntryServiceRouterRouteMatchHttpHeader() {}
/**
* @return Specifies that a request matches when the header with the given name is this exact value.
*
*/
public Optional exact() {
return Optional.ofNullable(this.exact);
}
/**
* @return Specifies that the logic for the HTTP header match should be inverted.
*
*/
public Optional invert() {
return Optional.ofNullable(this.invert);
}
/**
* @return Specifies the name of the HTTP header to match.
*
*/
public Optional name() {
return Optional.ofNullable(this.name);
}
/**
* @return Specifies that a request matches when the header with the given name has this prefix.
*
*/
public Optional prefix() {
return Optional.ofNullable(this.prefix);
}
/**
* @return Specifies that a request matches when the value in the `name` argument is present anywhere in the HTTP header.
*
*/
public Optional present() {
return Optional.ofNullable(this.present);
}
/**
* @return Specifies that a request matches when the header with the given name matches this regular expression.
*
*/
public Optional regex() {
return Optional.ofNullable(this.regex);
}
/**
* @return Specifies that a request matches when the header with the given name has this suffix.
*
*/
public Optional suffix() {
return Optional.ofNullable(this.suffix);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ConfigEntryServiceRouterRouteMatchHttpHeader defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String exact;
private @Nullable Boolean invert;
private @Nullable String name;
private @Nullable String prefix;
private @Nullable Boolean present;
private @Nullable String regex;
private @Nullable String suffix;
public Builder() {}
public Builder(ConfigEntryServiceRouterRouteMatchHttpHeader defaults) {
Objects.requireNonNull(defaults);
this.exact = defaults.exact;
this.invert = defaults.invert;
this.name = defaults.name;
this.prefix = defaults.prefix;
this.present = defaults.present;
this.regex = defaults.regex;
this.suffix = defaults.suffix;
}
@CustomType.Setter
public Builder exact(@Nullable String exact) {
this.exact = exact;
return this;
}
@CustomType.Setter
public Builder invert(@Nullable Boolean invert) {
this.invert = invert;
return this;
}
@CustomType.Setter
public Builder name(@Nullable String name) {
this.name = name;
return this;
}
@CustomType.Setter
public Builder prefix(@Nullable String prefix) {
this.prefix = prefix;
return this;
}
@CustomType.Setter
public Builder present(@Nullable Boolean present) {
this.present = present;
return this;
}
@CustomType.Setter
public Builder regex(@Nullable String regex) {
this.regex = regex;
return this;
}
@CustomType.Setter
public Builder suffix(@Nullable String suffix) {
this.suffix = suffix;
return this;
}
public ConfigEntryServiceRouterRouteMatchHttpHeader build() {
final var _resultValue = new ConfigEntryServiceRouterRouteMatchHttpHeader();
_resultValue.exact = exact;
_resultValue.invert = invert;
_resultValue.name = name;
_resultValue.prefix = prefix;
_resultValue.present = present;
_resultValue.regex = regex;
_resultValue.suffix = suffix;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy