
commonMain.aws.sdk.kotlin.services.kafka.model.CompatibleKafkaVersion.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kafka.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains source Apache Kafka versions and compatible target Apache Kafka versions.
*/
public class CompatibleKafkaVersion private constructor(builder: Builder) {
/**
* An Apache Kafka version.
*/
public val sourceVersion: kotlin.String? = builder.sourceVersion
/**
* A list of Apache Kafka versions.
*/
public val targetVersions: List? = builder.targetVersions
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kafka.model.CompatibleKafkaVersion = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CompatibleKafkaVersion(")
append("sourceVersion=$sourceVersion,")
append("targetVersions=$targetVersions")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = sourceVersion?.hashCode() ?: 0
result = 31 * result + (targetVersions?.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 CompatibleKafkaVersion
if (sourceVersion != other.sourceVersion) return false
if (targetVersions != other.targetVersions) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kafka.model.CompatibleKafkaVersion = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An Apache Kafka version.
*/
public var sourceVersion: kotlin.String? = null
/**
* A list of Apache Kafka versions.
*/
public var targetVersions: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kafka.model.CompatibleKafkaVersion) : this() {
this.sourceVersion = x.sourceVersion
this.targetVersions = x.targetVersions
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kafka.model.CompatibleKafkaVersion = CompatibleKafkaVersion(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy