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

commonMain.aws.sdk.kotlin.services.firehose.model.AuthenticationConfiguration.kt Maven / Gradle / Ivy

There is a newer version: 1.3.78
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.firehose.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The authentication configuration of the Amazon MSK cluster.
 */
public class AuthenticationConfiguration private constructor(builder: Builder) {
    /**
     * The type of connectivity used to access the Amazon MSK cluster.
     */
    public val connectivity: aws.sdk.kotlin.services.firehose.model.Connectivity = requireNotNull(builder.connectivity) { "A non-null value must be provided for connectivity" }
    /**
     * The ARN of the role used to access the Amazon MSK cluster.
     */
    public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }

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

    override fun toString(): kotlin.String = buildString {
        append("AuthenticationConfiguration(")
        append("connectivity=$connectivity,")
        append("roleArn=$roleArn")
        append(")")
    }

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

        if (connectivity != other.connectivity) return false
        if (roleArn != other.roleArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The type of connectivity used to access the Amazon MSK cluster.
         */
        public var connectivity: aws.sdk.kotlin.services.firehose.model.Connectivity? = null
        /**
         * The ARN of the role used to access the Amazon MSK cluster.
         */
        public var roleArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.firehose.model.AuthenticationConfiguration) : this() {
            this.connectivity = x.connectivity
            this.roleArn = x.roleArn
        }

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

        internal fun correctErrors(): Builder {
            if (connectivity == null) connectivity = Connectivity.SdkUnknown("no value provided")
            if (roleArn == null) roleArn = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy