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

commonMain.aws.sdk.kotlin.services.kafkaconnect.model.WorkerConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kafkaconnect.model



/**
 * The configuration of the workers, which are the processes that run the connector logic.
 */
public class WorkerConfiguration private constructor(builder: Builder) {
    /**
     * The revision of the worker configuration.
     */
    public val revision: kotlin.Long = builder.revision
    /**
     * The Amazon Resource Name (ARN) of the worker configuration.
     */
    public val workerConfigurationArn: kotlin.String = requireNotNull(builder.workerConfigurationArn) { "A non-null value must be provided for workerConfigurationArn" }

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

    override fun toString(): kotlin.String = buildString {
        append("WorkerConfiguration(")
        append("revision=$revision,")
        append("workerConfigurationArn=$workerConfigurationArn")
        append(")")
    }

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

        if (revision != other.revision) return false
        if (workerConfigurationArn != other.workerConfigurationArn) return false

        return true
    }

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

    public class Builder {
        /**
         * The revision of the worker configuration.
         */
        public var revision: kotlin.Long = 0L
        /**
         * The Amazon Resource Name (ARN) of the worker configuration.
         */
        public var workerConfigurationArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafkaconnect.model.WorkerConfiguration) : this() {
            this.revision = x.revision
            this.workerConfigurationArn = x.workerConfigurationArn
        }

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

        internal fun correctErrors(): Builder {
            if (workerConfigurationArn == null) workerConfigurationArn = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy