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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.SalesforceDataSourceConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.bedrockagent.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The configuration information to connect to Salesforce as your data source.
 */
public class SalesforceDataSourceConfiguration private constructor(builder: Builder) {
    /**
     * The configuration of the Salesforce content. For example, configuring specific types of Salesforce content.
     */
    public val crawlerConfiguration: aws.sdk.kotlin.services.bedrockagent.model.SalesforceCrawlerConfiguration? = builder.crawlerConfiguration
    /**
     * The endpoint information to connect to your Salesforce data source.
     */
    public val sourceConfiguration: aws.sdk.kotlin.services.bedrockagent.model.SalesforceSourceConfiguration? = builder.sourceConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("SalesforceDataSourceConfiguration(")
        append("crawlerConfiguration=$crawlerConfiguration,")
        append("sourceConfiguration=$sourceConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = crawlerConfiguration?.hashCode() ?: 0
        result = 31 * result + (sourceConfiguration?.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 SalesforceDataSourceConfiguration

        if (crawlerConfiguration != other.crawlerConfiguration) return false
        if (sourceConfiguration != other.sourceConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The configuration of the Salesforce content. For example, configuring specific types of Salesforce content.
         */
        public var crawlerConfiguration: aws.sdk.kotlin.services.bedrockagent.model.SalesforceCrawlerConfiguration? = null
        /**
         * The endpoint information to connect to your Salesforce data source.
         */
        public var sourceConfiguration: aws.sdk.kotlin.services.bedrockagent.model.SalesforceSourceConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.SalesforceDataSourceConfiguration) : this() {
            this.crawlerConfiguration = x.crawlerConfiguration
            this.sourceConfiguration = x.sourceConfiguration
        }

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

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy