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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.ConfluenceSourceConfiguration.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 endpoint information to connect to your Confluence data source.
 */
public class ConfluenceSourceConfiguration private constructor(builder: Builder) {
    /**
     * The supported authentication type to authenticate and connect to your Confluence instance.
     */
    public val authType: aws.sdk.kotlin.services.bedrockagent.model.ConfluenceAuthType = requireNotNull(builder.authType) { "A non-null value must be provided for authType" }
    /**
     * The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see [Confluence connection configuration](https://docs.aws.amazon.com/bedrock/latest/userguide/confluence-data-source-connector.html#configuration-confluence-connector).
     */
    public val credentialsSecretArn: kotlin.String = requireNotNull(builder.credentialsSecretArn) { "A non-null value must be provided for credentialsSecretArn" }
    /**
     * The supported host type, whether online/cloud or server/on-premises.
     */
    public val hostType: aws.sdk.kotlin.services.bedrockagent.model.ConfluenceHostType = requireNotNull(builder.hostType) { "A non-null value must be provided for hostType" }
    /**
     * The Confluence host URL or instance URL.
     */
    public val hostUrl: kotlin.String = requireNotNull(builder.hostUrl) { "A non-null value must be provided for hostUrl" }

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

    override fun toString(): kotlin.String = buildString {
        append("ConfluenceSourceConfiguration(")
        append("authType=$authType,")
        append("credentialsSecretArn=$credentialsSecretArn,")
        append("hostType=$hostType,")
        append("hostUrl=$hostUrl")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = authType.hashCode()
        result = 31 * result + (credentialsSecretArn.hashCode())
        result = 31 * result + (hostType.hashCode())
        result = 31 * result + (hostUrl.hashCode())
        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 ConfluenceSourceConfiguration

        if (authType != other.authType) return false
        if (credentialsSecretArn != other.credentialsSecretArn) return false
        if (hostType != other.hostType) return false
        if (hostUrl != other.hostUrl) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The supported authentication type to authenticate and connect to your Confluence instance.
         */
        public var authType: aws.sdk.kotlin.services.bedrockagent.model.ConfluenceAuthType? = null
        /**
         * The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see [Confluence connection configuration](https://docs.aws.amazon.com/bedrock/latest/userguide/confluence-data-source-connector.html#configuration-confluence-connector).
         */
        public var credentialsSecretArn: kotlin.String? = null
        /**
         * The supported host type, whether online/cloud or server/on-premises.
         */
        public var hostType: aws.sdk.kotlin.services.bedrockagent.model.ConfluenceHostType? = null
        /**
         * The Confluence host URL or instance URL.
         */
        public var hostUrl: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.ConfluenceSourceConfiguration) : this() {
            this.authType = x.authType
            this.credentialsSecretArn = x.credentialsSecretArn
            this.hostType = x.hostType
            this.hostUrl = x.hostUrl
        }

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

        internal fun correctErrors(): Builder {
            if (authType == null) authType = ConfluenceAuthType.SdkUnknown("no value provided")
            if (credentialsSecretArn == null) credentialsSecretArn = ""
            if (hostType == null) hostType = ConfluenceHostType.SdkUnknown("no value provided")
            if (hostUrl == null) hostUrl = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy