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

commonMain.aws.sdk.kotlin.services.kendra.model.SaaSConfiguration.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 GitHub Enterprise Cloud (SaaS).
 */
public class SaaSConfiguration private constructor(builder: Builder) {
    /**
     * The GitHub host URL or API endpoint URL. For example, *https://api.github.com*.
     */
    public val hostUrl: kotlin.String = requireNotNull(builder.hostUrl) { "A non-null value must be provided for hostUrl" }
    /**
     * The name of the organization of the GitHub Enterprise Cloud (SaaS) account you want to connect to. You can find your organization name by logging into GitHub desktop and selecting **Your organizations** under your profile picture dropdown.
     */
    public val organizationName: kotlin.String = requireNotNull(builder.organizationName) { "A non-null value must be provided for organizationName" }

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

    override fun toString(): kotlin.String = buildString {
        append("SaaSConfiguration(")
        append("hostUrl=$hostUrl,")
        append("organizationName=$organizationName")
        append(")")
    }

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

        if (hostUrl != other.hostUrl) return false
        if (organizationName != other.organizationName) return false

        return true
    }

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

    public class Builder {
        /**
         * The GitHub host URL or API endpoint URL. For example, *https://api.github.com*.
         */
        public var hostUrl: kotlin.String? = null
        /**
         * The name of the organization of the GitHub Enterprise Cloud (SaaS) account you want to connect to. You can find your organization name by logging into GitHub desktop and selecting **Your organizations** under your profile picture dropdown.
         */
        public var organizationName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.SaaSConfiguration) : this() {
            this.hostUrl = x.hostUrl
            this.organizationName = x.organizationName
        }

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

        internal fun correctErrors(): Builder {
            if (hostUrl == null) hostUrl = ""
            if (organizationName == null) organizationName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy