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

commonMain.aws.sdk.kotlin.services.eks.model.UpdateNodegroupConfigRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.eks.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateNodegroupConfigRequest private constructor(builder: Builder) {
    /**
     * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
     */
    public val clientRequestToken: kotlin.String? = builder.clientRequestToken
    /**
     * The name of your cluster.
     */
    public val clusterName: kotlin.String? = builder.clusterName
    /**
     * The Kubernetes `labels` to apply to the nodes in the node group after the update.
     */
    public val labels: aws.sdk.kotlin.services.eks.model.UpdateLabelsPayload? = builder.labels
    /**
     * The name of the managed node group to update.
     */
    public val nodegroupName: kotlin.String? = builder.nodegroupName
    /**
     * The scaling configuration details for the Auto Scaling group after the update.
     */
    public val scalingConfig: aws.sdk.kotlin.services.eks.model.NodegroupScalingConfig? = builder.scalingConfig
    /**
     * The Kubernetes taints to be applied to the nodes in the node group after the update. For more information, see [Node taints on managed node groups](https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html).
     */
    public val taints: aws.sdk.kotlin.services.eks.model.UpdateTaintsPayload? = builder.taints
    /**
     * The node group update configuration.
     */
    public val updateConfig: aws.sdk.kotlin.services.eks.model.NodegroupUpdateConfig? = builder.updateConfig

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateNodegroupConfigRequest(")
        append("clientRequestToken=$clientRequestToken,")
        append("clusterName=$clusterName,")
        append("labels=$labels,")
        append("nodegroupName=$nodegroupName,")
        append("scalingConfig=$scalingConfig,")
        append("taints=$taints,")
        append("updateConfig=$updateConfig")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientRequestToken?.hashCode() ?: 0
        result = 31 * result + (clusterName?.hashCode() ?: 0)
        result = 31 * result + (labels?.hashCode() ?: 0)
        result = 31 * result + (nodegroupName?.hashCode() ?: 0)
        result = 31 * result + (scalingConfig?.hashCode() ?: 0)
        result = 31 * result + (taints?.hashCode() ?: 0)
        result = 31 * result + (updateConfig?.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 UpdateNodegroupConfigRequest

        if (clientRequestToken != other.clientRequestToken) return false
        if (clusterName != other.clusterName) return false
        if (labels != other.labels) return false
        if (nodegroupName != other.nodegroupName) return false
        if (scalingConfig != other.scalingConfig) return false
        if (taints != other.taints) return false
        if (updateConfig != other.updateConfig) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
         */
        public var clientRequestToken: kotlin.String? = null
        /**
         * The name of your cluster.
         */
        public var clusterName: kotlin.String? = null
        /**
         * The Kubernetes `labels` to apply to the nodes in the node group after the update.
         */
        public var labels: aws.sdk.kotlin.services.eks.model.UpdateLabelsPayload? = null
        /**
         * The name of the managed node group to update.
         */
        public var nodegroupName: kotlin.String? = null
        /**
         * The scaling configuration details for the Auto Scaling group after the update.
         */
        public var scalingConfig: aws.sdk.kotlin.services.eks.model.NodegroupScalingConfig? = null
        /**
         * The Kubernetes taints to be applied to the nodes in the node group after the update. For more information, see [Node taints on managed node groups](https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html).
         */
        public var taints: aws.sdk.kotlin.services.eks.model.UpdateTaintsPayload? = null
        /**
         * The node group update configuration.
         */
        public var updateConfig: aws.sdk.kotlin.services.eks.model.NodegroupUpdateConfig? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.UpdateNodegroupConfigRequest) : this() {
            this.clientRequestToken = x.clientRequestToken
            this.clusterName = x.clusterName
            this.labels = x.labels
            this.nodegroupName = x.nodegroupName
            this.scalingConfig = x.scalingConfig
            this.taints = x.taints
            this.updateConfig = x.updateConfig
        }

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy