com.pulumi.consul.outputs.PreparedQueryTemplate 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 com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class PreparedQueryTemplate {
/**
* @return The regular expression to match with. When using `name_prefix_match`, this regex is applied against the query name.
*
*/
private String regexp;
/**
* @return If set to true, will cause the tags list inside the service structure to be stripped of any empty strings.
*
*/
private @Nullable Boolean removeEmptyTags;
/**
* @return The type of template matching to perform. Currently only `name_prefix_match` is supported.
*
*/
private String type;
private PreparedQueryTemplate() {}
/**
* @return The regular expression to match with. When using `name_prefix_match`, this regex is applied against the query name.
*
*/
public String regexp() {
return this.regexp;
}
/**
* @return If set to true, will cause the tags list inside the service structure to be stripped of any empty strings.
*
*/
public Optional removeEmptyTags() {
return Optional.ofNullable(this.removeEmptyTags);
}
/**
* @return The type of template matching to perform. Currently only `name_prefix_match` is supported.
*
*/
public String type() {
return this.type;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(PreparedQueryTemplate defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String regexp;
private @Nullable Boolean removeEmptyTags;
private String type;
public Builder() {}
public Builder(PreparedQueryTemplate defaults) {
Objects.requireNonNull(defaults);
this.regexp = defaults.regexp;
this.removeEmptyTags = defaults.removeEmptyTags;
this.type = defaults.type;
}
@CustomType.Setter
public Builder regexp(String regexp) {
if (regexp == null) {
throw new MissingRequiredPropertyException("PreparedQueryTemplate", "regexp");
}
this.regexp = regexp;
return this;
}
@CustomType.Setter
public Builder removeEmptyTags(@Nullable Boolean removeEmptyTags) {
this.removeEmptyTags = removeEmptyTags;
return this;
}
@CustomType.Setter
public Builder type(String type) {
if (type == null) {
throw new MissingRequiredPropertyException("PreparedQueryTemplate", "type");
}
this.type = type;
return this;
}
public PreparedQueryTemplate build() {
final var _resultValue = new PreparedQueryTemplate();
_resultValue.regexp = regexp;
_resultValue.removeEmptyTags = removeEmptyTags;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy