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

commonMain.aws.sdk.kotlin.services.kafka.model.EncryptionInTransit.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

/**
 * The settings for encrypting data in transit.
 */
public class EncryptionInTransit private constructor(builder: Builder) {
    /**
     * Indicates the encryption setting for data in transit between clients and brokers. The following are the possible values.
     *
     *  TLS means that client-broker communication is enabled with TLS only.
     *
     *  TLS_PLAINTEXT means that client-broker communication is enabled for both TLS-encrypted, as well as plaintext data.
     *
     *  PLAINTEXT means that client-broker communication is enabled in plaintext only.
     *
     * The default value is TLS_PLAINTEXT.
     */
    public val clientBroker: aws.sdk.kotlin.services.kafka.model.ClientBroker? = builder.clientBroker
    /**
     * When set to true, it indicates that data communication among the broker nodes of the cluster is encrypted. When set to false, the communication happens in plaintext.
     *
     * The default value is true.
     */
    public val inCluster: kotlin.Boolean? = builder.inCluster

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

    override fun toString(): kotlin.String = buildString {
        append("EncryptionInTransit(")
        append("clientBroker=$clientBroker,")
        append("inCluster=$inCluster")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientBroker?.hashCode() ?: 0
        result = 31 * result + (inCluster?.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 EncryptionInTransit

        if (clientBroker != other.clientBroker) return false
        if (inCluster != other.inCluster) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Indicates the encryption setting for data in transit between clients and brokers. The following are the possible values.
         *
         *  TLS means that client-broker communication is enabled with TLS only.
         *
         *  TLS_PLAINTEXT means that client-broker communication is enabled for both TLS-encrypted, as well as plaintext data.
         *
         *  PLAINTEXT means that client-broker communication is enabled in plaintext only.
         *
         * The default value is TLS_PLAINTEXT.
         */
        public var clientBroker: aws.sdk.kotlin.services.kafka.model.ClientBroker? = null
        /**
         * When set to true, it indicates that data communication among the broker nodes of the cluster is encrypted. When set to false, the communication happens in plaintext.
         *
         * The default value is true.
         */
        public var inCluster: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafka.model.EncryptionInTransit) : this() {
            this.clientBroker = x.clientBroker
            this.inCluster = x.inCluster
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy