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

commonMain.aws.sdk.kotlin.services.kendra.model.FsxConfiguration.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kendra.model



/**
 * Provides the configuration information to connect to Amazon FSx as your data source.
 */
public class FsxConfiguration private constructor(builder: Builder) {
    /**
     * A list of regular expression patterns to exclude certain files in your Amazon FSx file system. Files that match the patterns are excluded from the index. Files that don't match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    public val exclusionPatterns: List? = builder.exclusionPatterns
    /**
     * A list of `DataSourceToIndexFieldMapping` objects that map Amazon FSx data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon FSx fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html). The Amazon FSx data source field names must exist in your Amazon FSx custom metadata.
     */
    public val fieldMappings: List? = builder.fieldMappings
    /**
     * The identifier of the Amazon FSx file system.
     *
     * You can find your file system ID on the file system dashboard in the Amazon FSx console. For information on how to create a file system in Amazon FSx console, using Windows File Server as an example, see [Amazon FSx Getting started guide](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/getting-started-step1.html).
     */
    public val fileSystemId: kotlin.String = requireNotNull(builder.fileSystemId) { "A non-null value must be provided for fileSystemId" }
    /**
     * The Amazon FSx file system type. Windows is currently the only supported type.
     */
    public val fileSystemType: aws.sdk.kotlin.services.kendra.model.FsxFileSystemType = requireNotNull(builder.fileSystemType) { "A non-null value must be provided for fileSystemType" }
    /**
     * A list of regular expression patterns to include certain files in your Amazon FSx file system. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
     */
    public val inclusionPatterns: List? = builder.inclusionPatterns
    /**
     * The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the key-value pairs required to connect to your Amazon FSx file system. Windows is currently the only supported type. The secret must contain a JSON structure with the following keys:
     * + username—The Active Directory user name, along with the Domain Name System (DNS) domain name. For example, *[email protected]*. The Active Directory user account must have read and mounting access to the Amazon FSx file system for Windows.
     * + password—The password of the Active Directory user account with read and mounting access to the Amazon FSx Windows file system.
     */
    public val secretArn: kotlin.String? = builder.secretArn
    /**
     * Configuration information for an Amazon Virtual Private Cloud to connect to your Amazon FSx. Your Amazon FSx instance must reside inside your VPC.
     */
    public val vpcConfiguration: aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration? = builder.vpcConfiguration

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.FsxConfiguration = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("FsxConfiguration(")
        append("exclusionPatterns=$exclusionPatterns,")
        append("fieldMappings=$fieldMappings,")
        append("fileSystemId=$fileSystemId,")
        append("fileSystemType=$fileSystemType,")
        append("inclusionPatterns=$inclusionPatterns,")
        append("secretArn=$secretArn,")
        append("vpcConfiguration=$vpcConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = exclusionPatterns?.hashCode() ?: 0
        result = 31 * result + (fieldMappings?.hashCode() ?: 0)
        result = 31 * result + (fileSystemId.hashCode())
        result = 31 * result + (fileSystemType.hashCode())
        result = 31 * result + (inclusionPatterns?.hashCode() ?: 0)
        result = 31 * result + (secretArn?.hashCode() ?: 0)
        result = 31 * result + (vpcConfiguration?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as FsxConfiguration

        if (exclusionPatterns != other.exclusionPatterns) return false
        if (fieldMappings != other.fieldMappings) return false
        if (fileSystemId != other.fileSystemId) return false
        if (fileSystemType != other.fileSystemType) return false
        if (inclusionPatterns != other.inclusionPatterns) return false
        if (secretArn != other.secretArn) return false
        if (vpcConfiguration != other.vpcConfiguration) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.FsxConfiguration = Builder(this).apply(block).build()

    public class Builder {
        /**
         * A list of regular expression patterns to exclude certain files in your Amazon FSx file system. Files that match the patterns are excluded from the index. Files that don't match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
         */
        public var exclusionPatterns: List? = null
        /**
         * A list of `DataSourceToIndexFieldMapping` objects that map Amazon FSx data source attributes or field names to Amazon Kendra index field names. To create custom fields, use the `UpdateIndex` API before you map to Amazon FSx fields. For more information, see [Mapping data source fields](https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html). The Amazon FSx data source field names must exist in your Amazon FSx custom metadata.
         */
        public var fieldMappings: List? = null
        /**
         * The identifier of the Amazon FSx file system.
         *
         * You can find your file system ID on the file system dashboard in the Amazon FSx console. For information on how to create a file system in Amazon FSx console, using Windows File Server as an example, see [Amazon FSx Getting started guide](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/getting-started-step1.html).
         */
        public var fileSystemId: kotlin.String? = null
        /**
         * The Amazon FSx file system type. Windows is currently the only supported type.
         */
        public var fileSystemType: aws.sdk.kotlin.services.kendra.model.FsxFileSystemType? = null
        /**
         * A list of regular expression patterns to include certain files in your Amazon FSx file system. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.
         */
        public var inclusionPatterns: List? = null
        /**
         * The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the key-value pairs required to connect to your Amazon FSx file system. Windows is currently the only supported type. The secret must contain a JSON structure with the following keys:
         * + username—The Active Directory user name, along with the Domain Name System (DNS) domain name. For example, *[email protected]*. The Active Directory user account must have read and mounting access to the Amazon FSx file system for Windows.
         * + password—The password of the Active Directory user account with read and mounting access to the Amazon FSx Windows file system.
         */
        public var secretArn: kotlin.String? = null
        /**
         * Configuration information for an Amazon Virtual Private Cloud to connect to your Amazon FSx. Your Amazon FSx instance must reside inside your VPC.
         */
        public var vpcConfiguration: aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.FsxConfiguration) : this() {
            this.exclusionPatterns = x.exclusionPatterns
            this.fieldMappings = x.fieldMappings
            this.fileSystemId = x.fileSystemId
            this.fileSystemType = x.fileSystemType
            this.inclusionPatterns = x.inclusionPatterns
            this.secretArn = x.secretArn
            this.vpcConfiguration = x.vpcConfiguration
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.kendra.model.FsxConfiguration = FsxConfiguration(this)

        /**
         * construct an [aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration] inside the given [block]
         */
        public fun vpcConfiguration(block: aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration.Builder.() -> kotlin.Unit) {
            this.vpcConfiguration = aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (fileSystemId == null) fileSystemId = ""
            if (fileSystemType == null) fileSystemType = FsxFileSystemType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy