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

commonMain.aws.sdk.kotlin.services.eks.model.AssociateAccessPolicyResponse.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 AssociateAccessPolicyResponse private constructor(builder: Builder) {
    /**
     * The `AccessPolicy` and scope associated to the `AccessEntry`.
     */
    public val associatedAccessPolicy: aws.sdk.kotlin.services.eks.model.AssociatedAccessPolicy? = builder.associatedAccessPolicy
    /**
     * The name of your cluster.
     */
    public val clusterName: kotlin.String? = builder.clusterName
    /**
     * The ARN of the IAM principal for the `AccessEntry`.
     */
    public val principalArn: kotlin.String? = builder.principalArn

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

    override fun toString(): kotlin.String = buildString {
        append("AssociateAccessPolicyResponse(")
        append("associatedAccessPolicy=$associatedAccessPolicy,")
        append("clusterName=$clusterName,")
        append("principalArn=$principalArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = associatedAccessPolicy?.hashCode() ?: 0
        result = 31 * result + (clusterName?.hashCode() ?: 0)
        result = 31 * result + (principalArn?.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 AssociateAccessPolicyResponse

        if (associatedAccessPolicy != other.associatedAccessPolicy) return false
        if (clusterName != other.clusterName) return false
        if (principalArn != other.principalArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The `AccessPolicy` and scope associated to the `AccessEntry`.
         */
        public var associatedAccessPolicy: aws.sdk.kotlin.services.eks.model.AssociatedAccessPolicy? = null
        /**
         * The name of your cluster.
         */
        public var clusterName: kotlin.String? = null
        /**
         * The ARN of the IAM principal for the `AccessEntry`.
         */
        public var principalArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.AssociateAccessPolicyResponse) : this() {
            this.associatedAccessPolicy = x.associatedAccessPolicy
            this.clusterName = x.clusterName
            this.principalArn = x.principalArn
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy