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

commonMain.aws.sdk.kotlin.services.pipes.model.UpdatePipeSourceManagedStreamingKafkaParameters.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.pipes.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The parameters for using an MSK stream as a source.
 */
public class UpdatePipeSourceManagedStreamingKafkaParameters private constructor(builder: Builder) {
    /**
     * The maximum number of records to include in each batch.
     */
    public val batchSize: kotlin.Int? = builder.batchSize
    /**
     * The credentials needed to access the resource.
     */
    public val credentials: aws.sdk.kotlin.services.pipes.model.MskAccessCredentials? = builder.credentials
    /**
     * The maximum length of a time to wait for events.
     */
    public val maximumBatchingWindowInSeconds: kotlin.Int? = builder.maximumBatchingWindowInSeconds

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

    override fun toString(): kotlin.String = buildString {
        append("UpdatePipeSourceManagedStreamingKafkaParameters(")
        append("batchSize=$batchSize,")
        append("credentials=$credentials,")
        append("maximumBatchingWindowInSeconds=$maximumBatchingWindowInSeconds")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = batchSize ?: 0
        result = 31 * result + (credentials?.hashCode() ?: 0)
        result = 31 * result + (maximumBatchingWindowInSeconds ?: 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 UpdatePipeSourceManagedStreamingKafkaParameters

        if (batchSize != other.batchSize) return false
        if (credentials != other.credentials) return false
        if (maximumBatchingWindowInSeconds != other.maximumBatchingWindowInSeconds) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The maximum number of records to include in each batch.
         */
        public var batchSize: kotlin.Int? = null
        /**
         * The credentials needed to access the resource.
         */
        public var credentials: aws.sdk.kotlin.services.pipes.model.MskAccessCredentials? = null
        /**
         * The maximum length of a time to wait for events.
         */
        public var maximumBatchingWindowInSeconds: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pipes.model.UpdatePipeSourceManagedStreamingKafkaParameters) : this() {
            this.batchSize = x.batchSize
            this.credentials = x.credentials
            this.maximumBatchingWindowInSeconds = x.maximumBatchingWindowInSeconds
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy