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

commonMain.aws.sdk.kotlin.services.eks.model.ResourceLimitExceededException.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
import aws.smithy.kotlin.runtime.ServiceErrorMetadata

/**
 * You have encountered a service limit on the specified resource.
 */
public class ResourceLimitExceededException private constructor(builder: Builder) : EksException(builder.message) {

    /**
     * The Amazon EKS cluster associated with the exception.
     */
    public val clusterName: kotlin.String? = builder.clusterName
    /**
     * The Amazon EKS managed node group associated with the exception.
     */
    public val nodegroupName: kotlin.String? = builder.nodegroupName
    /**
     * The Amazon EKS subscription ID with the exception.
     */
    public val subscriptionId: kotlin.String? = builder.subscriptionId

    init {
        sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
    }

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

    override fun toString(): kotlin.String = buildString {
        append("ResourceLimitExceededException(")
        append("clusterName=$clusterName,")
        append("message=$message,")
        append("nodegroupName=$nodegroupName,")
        append("subscriptionId=$subscriptionId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clusterName?.hashCode() ?: 0
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (nodegroupName?.hashCode() ?: 0)
        result = 31 * result + (subscriptionId?.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 ResourceLimitExceededException

        if (clusterName != other.clusterName) return false
        if (message != other.message) return false
        if (nodegroupName != other.nodegroupName) return false
        if (subscriptionId != other.subscriptionId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon EKS cluster associated with the exception.
         */
        public var clusterName: kotlin.String? = null
        /**
         * The Amazon EKS message associated with the exception.
         */
        public var message: kotlin.String? = null
        /**
         * The Amazon EKS managed node group associated with the exception.
         */
        public var nodegroupName: kotlin.String? = null
        /**
         * The Amazon EKS subscription ID with the exception.
         */
        public var subscriptionId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.ResourceLimitExceededException) : this() {
            this.clusterName = x.clusterName
            this.message = x.message
            this.nodegroupName = x.nodegroupName
            this.subscriptionId = x.subscriptionId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy