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

commonMain.aws.sdk.kotlin.services.pipes.model.PipeSourceSelfManagedKafkaParameters.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 a self-managed Apache Kafka stream as a source.
 */
public class PipeSourceSelfManagedKafkaParameters private constructor(builder: Builder) {
    /**
     * An array of server URLs.
     */
    public val additionalBootstrapServers: List? = builder.additionalBootstrapServers
    /**
     * The maximum number of records to include in each batch.
     */
    public val batchSize: kotlin.Int? = builder.batchSize
    /**
     * The name of the destination queue to consume.
     */
    public val consumerGroupId: kotlin.String? = builder.consumerGroupId
    /**
     * The credentials needed to access the resource.
     */
    public val credentials: aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationCredentials? = builder.credentials
    /**
     * The maximum length of a time to wait for events.
     */
    public val maximumBatchingWindowInSeconds: kotlin.Int? = builder.maximumBatchingWindowInSeconds
    /**
     * The ARN of the Secrets Manager secret used for certification.
     */
    public val serverRootCaCertificate: kotlin.String? = builder.serverRootCaCertificate
    /**
     * (Streams only) The position in a stream from which to start reading.
     */
    public val startingPosition: aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaStartPosition? = builder.startingPosition
    /**
     * The name of the topic that the pipe will read from.
     */
    public val topicName: kotlin.String = requireNotNull(builder.topicName) { "A non-null value must be provided for topicName" }
    /**
     * This structure specifies the VPC subnets and security groups for the stream, and whether a public IP address is to be used.
     */
    public val vpc: aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationVpc? = builder.vpc

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

    override fun toString(): kotlin.String = buildString {
        append("PipeSourceSelfManagedKafkaParameters(")
        append("additionalBootstrapServers=$additionalBootstrapServers,")
        append("batchSize=$batchSize,")
        append("consumerGroupId=*** Sensitive Data Redacted ***,")
        append("credentials=$credentials,")
        append("maximumBatchingWindowInSeconds=$maximumBatchingWindowInSeconds,")
        append("serverRootCaCertificate=$serverRootCaCertificate,")
        append("startingPosition=$startingPosition,")
        append("topicName=*** Sensitive Data Redacted ***,")
        append("vpc=$vpc")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = additionalBootstrapServers?.hashCode() ?: 0
        result = 31 * result + (batchSize ?: 0)
        result = 31 * result + (consumerGroupId?.hashCode() ?: 0)
        result = 31 * result + (credentials?.hashCode() ?: 0)
        result = 31 * result + (maximumBatchingWindowInSeconds ?: 0)
        result = 31 * result + (serverRootCaCertificate?.hashCode() ?: 0)
        result = 31 * result + (startingPosition?.hashCode() ?: 0)
        result = 31 * result + (topicName.hashCode())
        result = 31 * result + (vpc?.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 PipeSourceSelfManagedKafkaParameters

        if (additionalBootstrapServers != other.additionalBootstrapServers) return false
        if (batchSize != other.batchSize) return false
        if (consumerGroupId != other.consumerGroupId) return false
        if (credentials != other.credentials) return false
        if (maximumBatchingWindowInSeconds != other.maximumBatchingWindowInSeconds) return false
        if (serverRootCaCertificate != other.serverRootCaCertificate) return false
        if (startingPosition != other.startingPosition) return false
        if (topicName != other.topicName) return false
        if (vpc != other.vpc) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An array of server URLs.
         */
        public var additionalBootstrapServers: List? = null
        /**
         * The maximum number of records to include in each batch.
         */
        public var batchSize: kotlin.Int? = null
        /**
         * The name of the destination queue to consume.
         */
        public var consumerGroupId: kotlin.String? = null
        /**
         * The credentials needed to access the resource.
         */
        public var credentials: aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationCredentials? = null
        /**
         * The maximum length of a time to wait for events.
         */
        public var maximumBatchingWindowInSeconds: kotlin.Int? = null
        /**
         * The ARN of the Secrets Manager secret used for certification.
         */
        public var serverRootCaCertificate: kotlin.String? = null
        /**
         * (Streams only) The position in a stream from which to start reading.
         */
        public var startingPosition: aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaStartPosition? = null
        /**
         * The name of the topic that the pipe will read from.
         */
        public var topicName: kotlin.String? = null
        /**
         * This structure specifies the VPC subnets and security groups for the stream, and whether a public IP address is to be used.
         */
        public var vpc: aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationVpc? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pipes.model.PipeSourceSelfManagedKafkaParameters) : this() {
            this.additionalBootstrapServers = x.additionalBootstrapServers
            this.batchSize = x.batchSize
            this.consumerGroupId = x.consumerGroupId
            this.credentials = x.credentials
            this.maximumBatchingWindowInSeconds = x.maximumBatchingWindowInSeconds
            this.serverRootCaCertificate = x.serverRootCaCertificate
            this.startingPosition = x.startingPosition
            this.topicName = x.topicName
            this.vpc = x.vpc
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationVpc] inside the given [block]
         */
        public fun vpc(block: aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationVpc.Builder.() -> kotlin.Unit) {
            this.vpc = aws.sdk.kotlin.services.pipes.model.SelfManagedKafkaAccessConfigurationVpc.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy