org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsAnalyzersTokenizer Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* Tokenizer that you want to use to create tokens.
*
* Tokens determine how Atlas Search splits up text into discrete chunks for indexing.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.857Z")
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.ApiAtlasFtsAnalyzersTokenizer")
@software.amazon.jsii.Jsii.Proxy(ApiAtlasFtsAnalyzersTokenizer.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface ApiAtlasFtsAnalyzersTokenizer extends software.amazon.jsii.JsiiSerializable {
/**
* Index of the character group within the matching expression to extract into tokens.
*
* Use 0
to extract all character groups.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getGroup() {
return null;
}
/**
* Characters to include in the longest token that Atlas Search creates.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getMaxGram() {
return null;
}
/**
* Maximum number of characters in a single token.
*
* Tokens greater than this length are split at this length into multiple tokens.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getMaxTokenLength() {
return null;
}
/**
* Characters to include in the shortest token that Atlas Search creates.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getMinGram() {
return null;
}
/**
* Regular expression to match against.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getPattern() {
return null;
}
/**
* Human-readable label that identifies this tokenizer type.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getType() {
return null;
}
/**
* @return a {@link Builder} of {@link ApiAtlasFtsAnalyzersTokenizer}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ApiAtlasFtsAnalyzersTokenizer}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Number group;
java.lang.Number maxGram;
java.lang.Number maxTokenLength;
java.lang.Number minGram;
java.lang.String pattern;
java.lang.String type;
/**
* Sets the value of {@link ApiAtlasFtsAnalyzersTokenizer#getGroup}
* @param group Index of the character group within the matching expression to extract into tokens.
* Use 0
to extract all character groups.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder group(java.lang.Number group) {
this.group = group;
return this;
}
/**
* Sets the value of {@link ApiAtlasFtsAnalyzersTokenizer#getMaxGram}
* @param maxGram Characters to include in the longest token that Atlas Search creates.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder maxGram(java.lang.Number maxGram) {
this.maxGram = maxGram;
return this;
}
/**
* Sets the value of {@link ApiAtlasFtsAnalyzersTokenizer#getMaxTokenLength}
* @param maxTokenLength Maximum number of characters in a single token.
* Tokens greater than this length are split at this length into multiple tokens.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder maxTokenLength(java.lang.Number maxTokenLength) {
this.maxTokenLength = maxTokenLength;
return this;
}
/**
* Sets the value of {@link ApiAtlasFtsAnalyzersTokenizer#getMinGram}
* @param minGram Characters to include in the shortest token that Atlas Search creates.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder minGram(java.lang.Number minGram) {
this.minGram = minGram;
return this;
}
/**
* Sets the value of {@link ApiAtlasFtsAnalyzersTokenizer#getPattern}
* @param pattern Regular expression to match against.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder pattern(java.lang.String pattern) {
this.pattern = pattern;
return this;
}
/**
* Sets the value of {@link ApiAtlasFtsAnalyzersTokenizer#getType}
* @param type Human-readable label that identifies this tokenizer type.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder type(java.lang.String type) {
this.type = type;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ApiAtlasFtsAnalyzersTokenizer}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ApiAtlasFtsAnalyzersTokenizer build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ApiAtlasFtsAnalyzersTokenizer}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ApiAtlasFtsAnalyzersTokenizer {
private final java.lang.Number group;
private final java.lang.Number maxGram;
private final java.lang.Number maxTokenLength;
private final java.lang.Number minGram;
private final java.lang.String pattern;
private final java.lang.String type;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.group = software.amazon.jsii.Kernel.get(this, "group", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.maxGram = software.amazon.jsii.Kernel.get(this, "maxGram", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.maxTokenLength = software.amazon.jsii.Kernel.get(this, "maxTokenLength", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.minGram = software.amazon.jsii.Kernel.get(this, "minGram", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.pattern = software.amazon.jsii.Kernel.get(this, "pattern", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.type = software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.group = builder.group;
this.maxGram = builder.maxGram;
this.maxTokenLength = builder.maxTokenLength;
this.minGram = builder.minGram;
this.pattern = builder.pattern;
this.type = builder.type;
}
@Override
public final java.lang.Number getGroup() {
return this.group;
}
@Override
public final java.lang.Number getMaxGram() {
return this.maxGram;
}
@Override
public final java.lang.Number getMaxTokenLength() {
return this.maxTokenLength;
}
@Override
public final java.lang.Number getMinGram() {
return this.minGram;
}
@Override
public final java.lang.String getPattern() {
return this.pattern;
}
@Override
public final java.lang.String getType() {
return this.type;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getGroup() != null) {
data.set("group", om.valueToTree(this.getGroup()));
}
if (this.getMaxGram() != null) {
data.set("maxGram", om.valueToTree(this.getMaxGram()));
}
if (this.getMaxTokenLength() != null) {
data.set("maxTokenLength", om.valueToTree(this.getMaxTokenLength()));
}
if (this.getMinGram() != null) {
data.set("minGram", om.valueToTree(this.getMinGram()));
}
if (this.getPattern() != null) {
data.set("pattern", om.valueToTree(this.getPattern()));
}
if (this.getType() != null) {
data.set("type", om.valueToTree(this.getType()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("awscdk-resources-mongodbatlas.ApiAtlasFtsAnalyzersTokenizer"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ApiAtlasFtsAnalyzersTokenizer.Jsii$Proxy that = (ApiAtlasFtsAnalyzersTokenizer.Jsii$Proxy) o;
if (this.group != null ? !this.group.equals(that.group) : that.group != null) return false;
if (this.maxGram != null ? !this.maxGram.equals(that.maxGram) : that.maxGram != null) return false;
if (this.maxTokenLength != null ? !this.maxTokenLength.equals(that.maxTokenLength) : that.maxTokenLength != null) return false;
if (this.minGram != null ? !this.minGram.equals(that.minGram) : that.minGram != null) return false;
if (this.pattern != null ? !this.pattern.equals(that.pattern) : that.pattern != null) return false;
return this.type != null ? this.type.equals(that.type) : that.type == null;
}
@Override
public final int hashCode() {
int result = this.group != null ? this.group.hashCode() : 0;
result = 31 * result + (this.maxGram != null ? this.maxGram.hashCode() : 0);
result = 31 * result + (this.maxTokenLength != null ? this.maxTokenLength.hashCode() : 0);
result = 31 * result + (this.minGram != null ? this.minGram.hashCode() : 0);
result = 31 * result + (this.pattern != null ? this.pattern.hashCode() : 0);
result = 31 * result + (this.type != null ? this.type.hashCode() : 0);
return result;
}
}
}