org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndex Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* A CloudFormation MongoDB::Atlas::SearchIndex
.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.976Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnSearchIndex")
public class CfnSearchIndex extends software.amazon.awscdk.CfnResource {
protected CfnSearchIndex(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnSearchIndex(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndex.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new MongoDB::Atlas::SearchIndex
.
*
* @param scope
- scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
* @param props - resource properties.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CfnSearchIndex(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndexProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* The CloudFormation resource type name for this resource class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
* Attribute MongoDB::Atlas::SearchIndex.IndexId
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrIndexId() {
return software.amazon.jsii.Kernel.get(this, "attrIndexId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Attribute MongoDB::Atlas::SearchIndex.Status
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrStatus() {
return software.amazon.jsii.Kernel.get(this, "attrStatus", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Resource props.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndexProps getProps() {
return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndexProps.class));
}
/**
* A fluent builder for {@link org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndex}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndexProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndexProps.Builder();
}
/**
* Name of the cluster that contains the database and collection with one or more Application Search indexes.
*
* @return {@code this}
* @param clusterName Name of the cluster that contains the database and collection with one or more Application Search indexes. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterName(final java.lang.String clusterName) {
this.props.clusterName(clusterName);
return this;
}
/**
* Human-readable label that identifies the collection that contains one or more Atlas Search indexes.
*
* @return {@code this}
* @param collectionName Human-readable label that identifies the collection that contains one or more Atlas Search indexes. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder collectionName(final java.lang.String collectionName) {
this.props.collectionName(collectionName);
return this;
}
/**
* Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes.
*
* @return {@code this}
* @param database Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder database(final java.lang.String database) {
this.props.database(database);
return this;
}
/**
* 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}
* @param analyzer Specific pre-defined method chosen to convert database field text into searchable words. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder analyzer(final java.lang.String analyzer) {
this.props.analyzer(analyzer);
return this;
}
/**
* List of user-defined methods to convert database field text into searchable words.
*
* @return {@code this}
* @param analyzers List of user-defined methods to convert database field text into searchable words. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder analyzers(final java.util.List extends org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsAnalyzersViewManual> analyzers) {
this.props.analyzers(analyzers);
return this;
}
/**
* 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}
* @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. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder fields(final java.lang.String fields) {
this.props.fields(fields);
return this;
}
/**
* Index specifications for the collection's fields.
*
* @return {@code this}
* @param mappings Index specifications for the collection's fields. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder mappings(final org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsMappingsViewManual mappings) {
this.props.mappings(mappings);
return this;
}
/**
* Human-readable label that identifies this index.
*
* Within each namespace, names of all indexes in the namespace must be unique.
*
* @return {@code this}
* @param name Human-readable label that identifies this index. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder name(final java.lang.String name) {
this.props.name(name);
return this;
}
/**
* The profile is defined in AWS Secret manager.
*
* See Secret Manager Profile setup.
*
* @return {@code this}
* @param profile The profile is defined in AWS Secret manager. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profile(final java.lang.String profile) {
this.props.profile(profile);
return this;
}
/**
* Unique 24-hexadecimal digit string that identifies your project.
*
* @return {@code this}
* @param projectId Unique 24-hexadecimal digit string that identifies your project. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder projectId(final java.lang.String projectId) {
this.props.projectId(projectId);
return this;
}
/**
* Method applied to identify words when searching this index.
*
* @return {@code this}
* @param searchAnalyzer Method applied to identify words when searching this index. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder searchAnalyzer(final java.lang.String searchAnalyzer) {
this.props.searchAnalyzer(searchAnalyzer);
return this;
}
/**
* Rule sets that map words to their synonyms in this index.
*
* @return {@code this}
* @param synonyms Rule sets that map words to their synonyms in this index. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder synonyms(final java.util.List extends org.mongodb.awscdk.resources.mongodbatlas.ApiAtlasFtsSynonymMappingDefinitionView> synonyms) {
this.props.synonyms(synonyms);
return this;
}
/**
* Type of index: search or vectorSearch.
*
* Default type is search.
*
* @return {@code this}
* @param type Type of index: search or vectorSearch. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder type(final java.lang.String type) {
this.props.type(type);
return this;
}
/**
* @return a newly built instance of {@link org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndex}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndex build() {
return new org.mongodb.awscdk.resources.mongodbatlas.CfnSearchIndex(
this.scope,
this.id,
this.props.build()
);
}
}
}