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

commonMain.aws.sdk.kotlin.services.eks.model.ConnectorConfigRequest.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 configuration sent to a cluster for configuration.
 */
public class ConnectorConfigRequest private constructor(builder: Builder) {
    /**
     * The cloud provider for the target cluster to connect.
     */
    public val provider: aws.sdk.kotlin.services.eks.model.ConnectorConfigProvider = requireNotNull(builder.provider) { "A non-null value must be provided for provider" }
    /**
     * The Amazon Resource Name (ARN) of the role that is authorized to request the connector configuration.
     */
    public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }

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

    override fun toString(): kotlin.String = buildString {
        append("ConnectorConfigRequest(")
        append("provider=$provider,")
        append("roleArn=$roleArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = provider.hashCode()
        result = 31 * result + (roleArn.hashCode())
        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 ConnectorConfigRequest

        if (provider != other.provider) return false
        if (roleArn != other.roleArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The cloud provider for the target cluster to connect.
         */
        public var provider: aws.sdk.kotlin.services.eks.model.ConnectorConfigProvider? = null
        /**
         * The Amazon Resource Name (ARN) of the role that is authorized to request the connector configuration.
         */
        public var roleArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.ConnectorConfigRequest) : this() {
            this.provider = x.provider
            this.roleArn = x.roleArn
        }

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

        internal fun correctErrors(): Builder {
            if (provider == null) provider = ConnectorConfigProvider.SdkUnknown("no value provided")
            if (roleArn == null) roleArn = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy