
commonMain.aws.sdk.kotlin.services.kafka.model.TopicReplication.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
/**
* Details about topic replication.
*/
public class TopicReplication private constructor(builder: Builder) {
/**
* Whether to periodically configure remote topic ACLs to match their corresponding upstream topics.
*/
public val copyAccessControlListsForTopics: kotlin.Boolean? = builder.copyAccessControlListsForTopics
/**
* Whether to periodically configure remote topics to match their corresponding upstream topics.
*/
public val copyTopicConfigurations: kotlin.Boolean? = builder.copyTopicConfigurations
/**
* Whether to periodically check for new topics and partitions.
*/
public val detectAndCopyNewTopics: kotlin.Boolean? = builder.detectAndCopyNewTopics
/**
* Configuration for specifying the position in the topics to start replicating from.
*/
public val startingPosition: aws.sdk.kotlin.services.kafka.model.ReplicationStartingPosition? = builder.startingPosition
/**
* List of regular expression patterns indicating the topics that should not be replicated.
*/
public val topicsToExclude: List? = builder.topicsToExclude
/**
* List of regular expression patterns indicating the topics to copy.
*/
public val topicsToReplicate: List? = builder.topicsToReplicate
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kafka.model.TopicReplication = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TopicReplication(")
append("copyAccessControlListsForTopics=$copyAccessControlListsForTopics,")
append("copyTopicConfigurations=$copyTopicConfigurations,")
append("detectAndCopyNewTopics=$detectAndCopyNewTopics,")
append("startingPosition=$startingPosition,")
append("topicsToExclude=$topicsToExclude,")
append("topicsToReplicate=$topicsToReplicate")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = copyAccessControlListsForTopics?.hashCode() ?: 0
result = 31 * result + (copyTopicConfigurations?.hashCode() ?: 0)
result = 31 * result + (detectAndCopyNewTopics?.hashCode() ?: 0)
result = 31 * result + (startingPosition?.hashCode() ?: 0)
result = 31 * result + (topicsToExclude?.hashCode() ?: 0)
result = 31 * result + (topicsToReplicate?.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 TopicReplication
if (copyAccessControlListsForTopics != other.copyAccessControlListsForTopics) return false
if (copyTopicConfigurations != other.copyTopicConfigurations) return false
if (detectAndCopyNewTopics != other.detectAndCopyNewTopics) return false
if (startingPosition != other.startingPosition) return false
if (topicsToExclude != other.topicsToExclude) return false
if (topicsToReplicate != other.topicsToReplicate) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kafka.model.TopicReplication = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Whether to periodically configure remote topic ACLs to match their corresponding upstream topics.
*/
public var copyAccessControlListsForTopics: kotlin.Boolean? = null
/**
* Whether to periodically configure remote topics to match their corresponding upstream topics.
*/
public var copyTopicConfigurations: kotlin.Boolean? = null
/**
* Whether to periodically check for new topics and partitions.
*/
public var detectAndCopyNewTopics: kotlin.Boolean? = null
/**
* Configuration for specifying the position in the topics to start replicating from.
*/
public var startingPosition: aws.sdk.kotlin.services.kafka.model.ReplicationStartingPosition? = null
/**
* List of regular expression patterns indicating the topics that should not be replicated.
*/
public var topicsToExclude: List? = null
/**
* List of regular expression patterns indicating the topics to copy.
*/
public var topicsToReplicate: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kafka.model.TopicReplication) : this() {
this.copyAccessControlListsForTopics = x.copyAccessControlListsForTopics
this.copyTopicConfigurations = x.copyTopicConfigurations
this.detectAndCopyNewTopics = x.detectAndCopyNewTopics
this.startingPosition = x.startingPosition
this.topicsToExclude = x.topicsToExclude
this.topicsToReplicate = x.topicsToReplicate
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kafka.model.TopicReplication = TopicReplication(this)
/**
* construct an [aws.sdk.kotlin.services.kafka.model.ReplicationStartingPosition] inside the given [block]
*/
public fun startingPosition(block: aws.sdk.kotlin.services.kafka.model.ReplicationStartingPosition.Builder.() -> kotlin.Unit) {
this.startingPosition = aws.sdk.kotlin.services.kafka.model.ReplicationStartingPosition.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy