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

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

/**
 * Specifies the EBS volume upgrade information. The broker identifier must be set to the keyword ALL. This means the changes apply to all the brokers in the cluster.
 */
public class BrokerEbsVolumeInfo private constructor(builder: Builder) {
    /**
     * The ID of the broker to update.
     */
    public val kafkaBrokerNodeId: kotlin.String? = builder.kafkaBrokerNodeId
    /**
     * EBS volume provisioned throughput information.
     */
    public val provisionedThroughput: aws.sdk.kotlin.services.kafka.model.ProvisionedThroughput? = builder.provisionedThroughput
    /**
     * Size of the EBS volume to update.
     */
    public val volumeSizeGb: kotlin.Int? = builder.volumeSizeGb

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

    override fun toString(): kotlin.String = buildString {
        append("BrokerEbsVolumeInfo(")
        append("kafkaBrokerNodeId=$kafkaBrokerNodeId,")
        append("provisionedThroughput=$provisionedThroughput,")
        append("volumeSizeGb=$volumeSizeGb")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = kafkaBrokerNodeId?.hashCode() ?: 0
        result = 31 * result + (provisionedThroughput?.hashCode() ?: 0)
        result = 31 * result + (volumeSizeGb ?: 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 BrokerEbsVolumeInfo

        if (kafkaBrokerNodeId != other.kafkaBrokerNodeId) return false
        if (provisionedThroughput != other.provisionedThroughput) return false
        if (volumeSizeGb != other.volumeSizeGb) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the broker to update.
         */
        public var kafkaBrokerNodeId: kotlin.String? = null
        /**
         * EBS volume provisioned throughput information.
         */
        public var provisionedThroughput: aws.sdk.kotlin.services.kafka.model.ProvisionedThroughput? = null
        /**
         * Size of the EBS volume to update.
         */
        public var volumeSizeGb: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafka.model.BrokerEbsVolumeInfo) : this() {
            this.kafkaBrokerNodeId = x.kafkaBrokerNodeId
            this.provisionedThroughput = x.provisionedThroughput
            this.volumeSizeGb = x.volumeSizeGb
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy