All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndexProps Maven / Gradle / Ivy

There is a newer version: 3.9.0
Show newest version
package org.mongodb.awscdk.resources.mongodbatlas;

/**
 * Returns, adds, edits, and removes Atlas Search indexes.
 * 

* Also returns and updates user-defined analyzers. */ @javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.978Z") @software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnSearchIndexProps") @software.amazon.jsii.Jsii.Proxy(CfnSearchIndexProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public interface CfnSearchIndexProps extends software.amazon.jsii.JsiiSerializable { /** * Name of the cluster that contains the database and collection with one or more Application Search indexes. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull java.lang.String getClusterName(); /** * Human-readable label that identifies the collection that contains one or more Atlas Search indexes. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull java.lang.String getCollectionName(); /** * Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull java.lang.String getDatabase(); /** * Specific pre-defined method chosen to convert database field text into searchable words. *

* This conversion reduces the text of fields into the smallest units of text. These units are called a term or token. This process, known as tokenization, involves a variety of changes made to the text in fields: *

*

    *
  • extracting words
  • *
  • removing punctuation
  • *
  • removing accents
  • *
  • changing to lowercase
  • *
  • removing common words
  • *
  • reducing words to their root form (stemming)
  • *
  • changing words to their base form (lemmatization) * MongoDB Cloud uses the selected process to build the Atlas Search index.
  • *
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getAnalyzer() { return null; } /** * List of user-defined methods to convert database field text into searchable words. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.List getAnalyzers() { return null; } /** * Array of Fields to configure this vectorSearch index. Stringify json representation of field with types and properties. Required for vector indexes. It must contain at least one vector type field. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getFields() { return null; } /** * Index specifications for the collection's fields. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsMappingsViewManual getMappings() { return null; } /** * Human-readable label that identifies this index. *

* Within each namespace, names of all indexes in the namespace must be unique. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getName() { return null; } /** * The profile is defined in AWS Secret manager. *

* See Secret Manager Profile setup. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getProfile() { return null; } /** * Unique 24-hexadecimal digit string that identifies your project. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getProjectId() { return null; } /** * Method applied to identify words when searching this index. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getSearchAnalyzer() { return null; } /** * Rule sets that map words to their synonyms in this index. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.List getSynonyms() { return null; } /** * Type of index: search or vectorSearch. *

* Default type is search. */ @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 CfnSearchIndexProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link CfnSearchIndexProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String clusterName; java.lang.String collectionName; java.lang.String database; java.lang.String analyzer; java.util.List analyzers; java.lang.String fields; org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsMappingsViewManual mappings; java.lang.String name; java.lang.String profile; java.lang.String projectId; java.lang.String searchAnalyzer; java.util.List synonyms; java.lang.String type; /** * Sets the value of {@link CfnSearchIndexProps#getClusterName} * @param clusterName Name of the cluster that contains the database and collection with one or more Application Search indexes. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder clusterName(java.lang.String clusterName) { this.clusterName = clusterName; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getCollectionName} * @param collectionName Human-readable label that identifies the collection that contains one or more Atlas Search indexes. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder collectionName(java.lang.String collectionName) { this.collectionName = collectionName; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getDatabase} * @param database Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder database(java.lang.String database) { this.database = database; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getAnalyzer} * @param analyzer Specific pre-defined method chosen to convert database field text into searchable words. * This conversion reduces the text of fields into the smallest units of text. These units are called a term or token. This process, known as tokenization, involves a variety of changes made to the text in fields: *

*

    *
  • extracting words
  • *
  • removing punctuation
  • *
  • removing accents
  • *
  • changing to lowercase
  • *
  • removing common words
  • *
  • reducing words to their root form (stemming)
  • *
  • changing words to their base form (lemmatization) * MongoDB Cloud uses the selected process to build the Atlas Search index.
  • *
* @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder analyzer(java.lang.String analyzer) { this.analyzer = analyzer; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getAnalyzers} * @param analyzers List of user-defined methods to convert database field text into searchable words. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @SuppressWarnings("unchecked") public Builder analyzers(java.util.List analyzers) { this.analyzers = (java.util.List)analyzers; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getFields} * @param fields Array of Fields to configure this vectorSearch index. Stringify json representation of field with types and properties. Required for vector indexes. It must contain at least one vector type field. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder fields(java.lang.String fields) { this.fields = fields; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getMappings} * @param mappings Index specifications for the collection's fields. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder mappings(org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsMappingsViewManual mappings) { this.mappings = mappings; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getName} * @param name Human-readable label that identifies this index. * Within each namespace, names of all indexes in the namespace must be unique. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder name(java.lang.String name) { this.name = name; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getProfile} * @param profile The profile is defined in AWS Secret manager. * See Secret Manager Profile setup. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder profile(java.lang.String profile) { this.profile = profile; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getProjectId} * @param projectId Unique 24-hexadecimal digit string that identifies your project. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder projectId(java.lang.String projectId) { this.projectId = projectId; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getSearchAnalyzer} * @param searchAnalyzer Method applied to identify words when searching this index. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder searchAnalyzer(java.lang.String searchAnalyzer) { this.searchAnalyzer = searchAnalyzer; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getSynonyms} * @param synonyms Rule sets that map words to their synonyms in this index. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @SuppressWarnings("unchecked") public Builder synonyms(java.util.List synonyms) { this.synonyms = (java.util.List)synonyms; return this; } /** * Sets the value of {@link CfnSearchIndexProps#getType} * @param type Type of index: search or vectorSearch. * Default type is search. * @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 CfnSearchIndexProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public CfnSearchIndexProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link CfnSearchIndexProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnSearchIndexProps { private final java.lang.String clusterName; private final java.lang.String collectionName; private final java.lang.String database; private final java.lang.String analyzer; private final java.util.List analyzers; private final java.lang.String fields; private final org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsMappingsViewManual mappings; private final java.lang.String name; private final java.lang.String profile; private final java.lang.String projectId; private final java.lang.String searchAnalyzer; private final java.util.List synonyms; 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.clusterName = software.amazon.jsii.Kernel.get(this, "clusterName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.collectionName = software.amazon.jsii.Kernel.get(this, "collectionName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.database = software.amazon.jsii.Kernel.get(this, "database", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.analyzer = software.amazon.jsii.Kernel.get(this, "analyzer", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.analyzers = software.amazon.jsii.Kernel.get(this, "analyzers", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsAnalyzersViewManual.class))); this.fields = software.amazon.jsii.Kernel.get(this, "fields", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mappings = software.amazon.jsii.Kernel.get(this, "mappings", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsMappingsViewManual.class)); this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.profile = software.amazon.jsii.Kernel.get(this, "profile", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.projectId = software.amazon.jsii.Kernel.get(this, "projectId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.searchAnalyzer = software.amazon.jsii.Kernel.get(this, "searchAnalyzer", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.synonyms = software.amazon.jsii.Kernel.get(this, "synonyms", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsSynonymMappingDefinitionView.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}. */ @SuppressWarnings("unchecked") protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.clusterName = java.util.Objects.requireNonNull(builder.clusterName, "clusterName is required"); this.collectionName = java.util.Objects.requireNonNull(builder.collectionName, "collectionName is required"); this.database = java.util.Objects.requireNonNull(builder.database, "database is required"); this.analyzer = builder.analyzer; this.analyzers = (java.util.List)builder.analyzers; this.fields = builder.fields; this.mappings = builder.mappings; this.name = builder.name; this.profile = builder.profile; this.projectId = builder.projectId; this.searchAnalyzer = builder.searchAnalyzer; this.synonyms = (java.util.List)builder.synonyms; this.type = builder.type; } @Override public final java.lang.String getClusterName() { return this.clusterName; } @Override public final java.lang.String getCollectionName() { return this.collectionName; } @Override public final java.lang.String getDatabase() { return this.database; } @Override public final java.lang.String getAnalyzer() { return this.analyzer; } @Override public final java.util.List getAnalyzers() { return this.analyzers; } @Override public final java.lang.String getFields() { return this.fields; } @Override public final org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsMappingsViewManual getMappings() { return this.mappings; } @Override public final java.lang.String getName() { return this.name; } @Override public final java.lang.String getProfile() { return this.profile; } @Override public final java.lang.String getProjectId() { return this.projectId; } @Override public final java.lang.String getSearchAnalyzer() { return this.searchAnalyzer; } @Override public final java.util.List getSynonyms() { return this.synonyms; } @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(); data.set("clusterName", om.valueToTree(this.getClusterName())); data.set("collectionName", om.valueToTree(this.getCollectionName())); data.set("database", om.valueToTree(this.getDatabase())); if (this.getAnalyzer() != null) { data.set("analyzer", om.valueToTree(this.getAnalyzer())); } if (this.getAnalyzers() != null) { data.set("analyzers", om.valueToTree(this.getAnalyzers())); } if (this.getFields() != null) { data.set("fields", om.valueToTree(this.getFields())); } if (this.getMappings() != null) { data.set("mappings", om.valueToTree(this.getMappings())); } if (this.getName() != null) { data.set("name", om.valueToTree(this.getName())); } if (this.getProfile() != null) { data.set("profile", om.valueToTree(this.getProfile())); } if (this.getProjectId() != null) { data.set("projectId", om.valueToTree(this.getProjectId())); } if (this.getSearchAnalyzer() != null) { data.set("searchAnalyzer", om.valueToTree(this.getSearchAnalyzer())); } if (this.getSynonyms() != null) { data.set("synonyms", om.valueToTree(this.getSynonyms())); } 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.CfnSearchIndexProps")); 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; CfnSearchIndexProps.Jsii$Proxy that = (CfnSearchIndexProps.Jsii$Proxy) o; if (!clusterName.equals(that.clusterName)) return false; if (!collectionName.equals(that.collectionName)) return false; if (!database.equals(that.database)) return false; if (this.analyzer != null ? !this.analyzer.equals(that.analyzer) : that.analyzer != null) return false; if (this.analyzers != null ? !this.analyzers.equals(that.analyzers) : that.analyzers != null) return false; if (this.fields != null ? !this.fields.equals(that.fields) : that.fields != null) return false; if (this.mappings != null ? !this.mappings.equals(that.mappings) : that.mappings != null) return false; if (this.name != null ? !this.name.equals(that.name) : that.name != null) return false; if (this.profile != null ? !this.profile.equals(that.profile) : that.profile != null) return false; if (this.projectId != null ? !this.projectId.equals(that.projectId) : that.projectId != null) return false; if (this.searchAnalyzer != null ? !this.searchAnalyzer.equals(that.searchAnalyzer) : that.searchAnalyzer != null) return false; if (this.synonyms != null ? !this.synonyms.equals(that.synonyms) : that.synonyms != null) return false; return this.type != null ? this.type.equals(that.type) : that.type == null; } @Override public final int hashCode() { int result = this.clusterName.hashCode(); result = 31 * result + (this.collectionName.hashCode()); result = 31 * result + (this.database.hashCode()); result = 31 * result + (this.analyzer != null ? this.analyzer.hashCode() : 0); result = 31 * result + (this.analyzers != null ? this.analyzers.hashCode() : 0); result = 31 * result + (this.fields != null ? this.fields.hashCode() : 0); result = 31 * result + (this.mappings != null ? this.mappings.hashCode() : 0); result = 31 * result + (this.name != null ? this.name.hashCode() : 0); result = 31 * result + (this.profile != null ? this.profile.hashCode() : 0); result = 31 * result + (this.projectId != null ? this.projectId.hashCode() : 0); result = 31 * result + (this.searchAnalyzer != null ? this.searchAnalyzer.hashCode() : 0); result = 31 * result + (this.synonyms != null ? this.synonyms.hashCode() : 0); result = 31 * result + (this.type != null ? this.type.hashCode() : 0); return result; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy