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

commonMain.aws.sdk.kotlin.services.eks.model.UpdateLabelsPayload.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

/**
 * An object representing a Kubernetes `label` change for a managed node group.
 */
public class UpdateLabelsPayload private constructor(builder: Builder) {
    /**
     * The Kubernetes `labels` to add or update.
     */
    public val addOrUpdateLabels: Map? = builder.addOrUpdateLabels
    /**
     * The Kubernetes `labels` to remove.
     */
    public val removeLabels: List? = builder.removeLabels

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateLabelsPayload(")
        append("addOrUpdateLabels=$addOrUpdateLabels,")
        append("removeLabels=$removeLabels")
        append(")")
    }

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

        if (addOrUpdateLabels != other.addOrUpdateLabels) return false
        if (removeLabels != other.removeLabels) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Kubernetes `labels` to add or update.
         */
        public var addOrUpdateLabels: Map? = null
        /**
         * The Kubernetes `labels` to remove.
         */
        public var removeLabels: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.UpdateLabelsPayload) : this() {
            this.addOrUpdateLabels = x.addOrUpdateLabels
            this.removeLabels = x.removeLabels
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy