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

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

There is a newer version: 1.3.77
Show newest version
// 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 SharePoint data source.
 */
public class SharePointSourceConfiguration private constructor(builder: Builder) {
    /**
     * The supported authentication type to authenticate and connect to your SharePoint site/sites.
     */
    public val authType: aws.sdk.kotlin.services.bedrockagent.model.SharePointAuthType = 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 SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see [SharePoint connection configuration](https://docs.aws.amazon.com/bedrock/latest/userguide/sharepoint-data-source-connector.html#configuration-sharepoint-connector).
     */
    public val credentialsSecretArn: kotlin.String = requireNotNull(builder.credentialsSecretArn) { "A non-null value must be provided for credentialsSecretArn" }
    /**
     * The domain of your SharePoint instance or site URL/URLs.
     */
    public val domain: kotlin.String = requireNotNull(builder.domain) { "A non-null value must be provided for domain" }
    /**
     * The supported host type, whether online/cloud or server/on-premises.
     */
    public val hostType: aws.sdk.kotlin.services.bedrockagent.model.SharePointHostType = requireNotNull(builder.hostType) { "A non-null value must be provided for hostType" }
    /**
     * A list of one or more SharePoint site URLs.
     */
    public val siteUrls: List = requireNotNull(builder.siteUrls) { "A non-null value must be provided for siteUrls" }
    /**
     * The identifier of your Microsoft 365 tenant.
     */
    public val tenantId: kotlin.String? = builder.tenantId

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

    override fun toString(): kotlin.String = buildString {
        append("SharePointSourceConfiguration(")
        append("authType=$authType,")
        append("credentialsSecretArn=$credentialsSecretArn,")
        append("domain=$domain,")
        append("hostType=$hostType,")
        append("siteUrls=$siteUrls,")
        append("tenantId=$tenantId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = authType.hashCode()
        result = 31 * result + (credentialsSecretArn.hashCode())
        result = 31 * result + (domain.hashCode())
        result = 31 * result + (hostType.hashCode())
        result = 31 * result + (siteUrls.hashCode())
        result = 31 * result + (tenantId?.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 SharePointSourceConfiguration

        if (authType != other.authType) return false
        if (credentialsSecretArn != other.credentialsSecretArn) return false
        if (domain != other.domain) return false
        if (hostType != other.hostType) return false
        if (siteUrls != other.siteUrls) return false
        if (tenantId != other.tenantId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The supported authentication type to authenticate and connect to your SharePoint site/sites.
         */
        public var authType: aws.sdk.kotlin.services.bedrockagent.model.SharePointAuthType? = null
        /**
         * The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see [SharePoint connection configuration](https://docs.aws.amazon.com/bedrock/latest/userguide/sharepoint-data-source-connector.html#configuration-sharepoint-connector).
         */
        public var credentialsSecretArn: kotlin.String? = null
        /**
         * The domain of your SharePoint instance or site URL/URLs.
         */
        public var domain: kotlin.String? = null
        /**
         * The supported host type, whether online/cloud or server/on-premises.
         */
        public var hostType: aws.sdk.kotlin.services.bedrockagent.model.SharePointHostType? = null
        /**
         * A list of one or more SharePoint site URLs.
         */
        public var siteUrls: List? = null
        /**
         * The identifier of your Microsoft 365 tenant.
         */
        public var tenantId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.SharePointSourceConfiguration) : this() {
            this.authType = x.authType
            this.credentialsSecretArn = x.credentialsSecretArn
            this.domain = x.domain
            this.hostType = x.hostType
            this.siteUrls = x.siteUrls
            this.tenantId = x.tenantId
        }

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

        internal fun correctErrors(): Builder {
            if (authType == null) authType = SharePointAuthType.SdkUnknown("no value provided")
            if (credentialsSecretArn == null) credentialsSecretArn = ""
            if (domain == null) domain = ""
            if (hostType == null) hostType = SharePointHostType.SdkUnknown("no value provided")
            if (siteUrls == null) siteUrls = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy