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

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

/**
 * The scope of an `AccessPolicy` that's associated to an `AccessEntry`.
 */
public class AccessScope private constructor(builder: Builder) {
    /**
     * A Kubernetes `namespace` that an access policy is scoped to. A value is required if you specified `namespace` for `Type`.
     */
    public val namespaces: List? = builder.namespaces
    /**
     * The scope type of an access policy.
     */
    public val type: aws.sdk.kotlin.services.eks.model.AccessScopeType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("AccessScope(")
        append("namespaces=$namespaces,")
        append("type=$type")
        append(")")
    }

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

        if (namespaces != other.namespaces) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A Kubernetes `namespace` that an access policy is scoped to. A value is required if you specified `namespace` for `Type`.
         */
        public var namespaces: List? = null
        /**
         * The scope type of an access policy.
         */
        public var type: aws.sdk.kotlin.services.eks.model.AccessScopeType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.AccessScope) : this() {
            this.namespaces = x.namespaces
            this.type = x.type
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy