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

commonMain.aws.sdk.kotlin.services.glue.model.AuthConfiguration.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The authentication configuration for a connection returned by the `DescribeConnectionType` API.
 */
public class AuthConfiguration private constructor(builder: Builder) {
    /**
     * The type of authentication for a connection.
     */
    public val authenticationType: aws.sdk.kotlin.services.glue.model.Property? = builder.authenticationType
    /**
     * A map of key-value pairs for the OAuth2 properties. Each value is a a `Property` object.
     */
    public val basicAuthenticationProperties: Map? = builder.basicAuthenticationProperties
    /**
     * A map of key-value pairs for the custom authentication properties. Each value is a a `Property` object.
     */
    public val customAuthenticationProperties: Map? = builder.customAuthenticationProperties
    /**
     * A map of key-value pairs for the OAuth2 properties. Each value is a a `Property` object.
     */
    public val oAuth2Properties: Map? = builder.oAuth2Properties
    /**
     * The Amazon Resource Name (ARN) for the Secrets Manager.
     */
    public val secretArn: aws.sdk.kotlin.services.glue.model.Property? = builder.secretArn

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

    override fun toString(): kotlin.String = buildString {
        append("AuthConfiguration(")
        append("authenticationType=$authenticationType,")
        append("basicAuthenticationProperties=$basicAuthenticationProperties,")
        append("customAuthenticationProperties=$customAuthenticationProperties,")
        append("oAuth2Properties=$oAuth2Properties,")
        append("secretArn=$secretArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = authenticationType?.hashCode() ?: 0
        result = 31 * result + (basicAuthenticationProperties?.hashCode() ?: 0)
        result = 31 * result + (customAuthenticationProperties?.hashCode() ?: 0)
        result = 31 * result + (oAuth2Properties?.hashCode() ?: 0)
        result = 31 * result + (secretArn?.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 AuthConfiguration

        if (authenticationType != other.authenticationType) return false
        if (basicAuthenticationProperties != other.basicAuthenticationProperties) return false
        if (customAuthenticationProperties != other.customAuthenticationProperties) return false
        if (oAuth2Properties != other.oAuth2Properties) return false
        if (secretArn != other.secretArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The type of authentication for a connection.
         */
        public var authenticationType: aws.sdk.kotlin.services.glue.model.Property? = null
        /**
         * A map of key-value pairs for the OAuth2 properties. Each value is a a `Property` object.
         */
        public var basicAuthenticationProperties: Map? = null
        /**
         * A map of key-value pairs for the custom authentication properties. Each value is a a `Property` object.
         */
        public var customAuthenticationProperties: Map? = null
        /**
         * A map of key-value pairs for the OAuth2 properties. Each value is a a `Property` object.
         */
        public var oAuth2Properties: Map? = null
        /**
         * The Amazon Resource Name (ARN) for the Secrets Manager.
         */
        public var secretArn: aws.sdk.kotlin.services.glue.model.Property? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.AuthConfiguration) : this() {
            this.authenticationType = x.authenticationType
            this.basicAuthenticationProperties = x.basicAuthenticationProperties
            this.customAuthenticationProperties = x.customAuthenticationProperties
            this.oAuth2Properties = x.oAuth2Properties
            this.secretArn = x.secretArn
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy