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

commonMain.aws.sdk.kotlin.services.eks.model.FargateProfileSelector.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 an Fargate profile selector.
 */
public class FargateProfileSelector private constructor(builder: Builder) {
    /**
     * The Kubernetes labels that the selector should match. A pod must contain all of the labels that are specified in the selector for it to be considered a match.
     */
    public val labels: Map? = builder.labels
    /**
     * The Kubernetes `namespace` that the selector should match.
     */
    public val namespace: kotlin.String? = builder.namespace

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

    override fun toString(): kotlin.String = buildString {
        append("FargateProfileSelector(")
        append("labels=$labels,")
        append("namespace=$namespace")
        append(")")
    }

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

        if (labels != other.labels) return false
        if (namespace != other.namespace) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Kubernetes labels that the selector should match. A pod must contain all of the labels that are specified in the selector for it to be considered a match.
         */
        public var labels: Map? = null
        /**
         * The Kubernetes `namespace` that the selector should match.
         */
        public var namespace: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.FargateProfileSelector) : this() {
            this.labels = x.labels
            this.namespace = x.namespace
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy