commonMain.aws.sdk.kotlin.services.firehose.model.AuthenticationConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of firehose-jvm Show documentation
Show all versions of firehose-jvm Show documentation
The AWS SDK for Kotlin client for Firehose
// 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
}
}
}