commonMain.aws.sdk.kotlin.services.firehose.model.SourceDescription.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
/**
* Details about a Kinesis data stream used as the source for a Firehose delivery stream.
*/
public class SourceDescription private constructor(builder: Builder) {
/**
* The KinesisStreamSourceDescription value for the source Kinesis data stream.
*/
public val kinesisStreamSourceDescription: aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceDescription? = builder.kinesisStreamSourceDescription
/**
* The configuration description for the Amazon MSK cluster to be used as the source for a delivery stream.
*/
public val mskSourceDescription: aws.sdk.kotlin.services.firehose.model.MskSourceDescription? = builder.mskSourceDescription
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.firehose.model.SourceDescription = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SourceDescription(")
append("kinesisStreamSourceDescription=$kinesisStreamSourceDescription,")
append("mskSourceDescription=$mskSourceDescription")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = kinesisStreamSourceDescription?.hashCode() ?: 0
result = 31 * result + (mskSourceDescription?.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 SourceDescription
if (kinesisStreamSourceDescription != other.kinesisStreamSourceDescription) return false
if (mskSourceDescription != other.mskSourceDescription) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.firehose.model.SourceDescription = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The KinesisStreamSourceDescription value for the source Kinesis data stream.
*/
public var kinesisStreamSourceDescription: aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceDescription? = null
/**
* The configuration description for the Amazon MSK cluster to be used as the source for a delivery stream.
*/
public var mskSourceDescription: aws.sdk.kotlin.services.firehose.model.MskSourceDescription? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.firehose.model.SourceDescription) : this() {
this.kinesisStreamSourceDescription = x.kinesisStreamSourceDescription
this.mskSourceDescription = x.mskSourceDescription
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.firehose.model.SourceDescription = SourceDescription(this)
/**
* construct an [aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceDescription] inside the given [block]
*/
public fun kinesisStreamSourceDescription(block: aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceDescription.Builder.() -> kotlin.Unit) {
this.kinesisStreamSourceDescription = aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceDescription.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.MskSourceDescription] inside the given [block]
*/
public fun mskSourceDescription(block: aws.sdk.kotlin.services.firehose.model.MskSourceDescription.Builder.() -> kotlin.Unit) {
this.mskSourceDescription = aws.sdk.kotlin.services.firehose.model.MskSourceDescription.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}