commonMain.aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A structure containing the authentication configuration.
*/
public class AuthenticationConfiguration private constructor(builder: Builder) {
/**
* A structure containing the authentication configuration.
*/
public val authenticationType: aws.sdk.kotlin.services.glue.model.AuthenticationType? = builder.authenticationType
/**
* The properties for OAuth2 authentication.
*/
public val oAuth2Properties: aws.sdk.kotlin.services.glue.model.OAuth2Properties? = builder.oAuth2Properties
/**
* The secret manager ARN to store credentials.
*/
public val secretArn: kotlin.String? = builder.secretArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AuthenticationConfiguration(")
append("authenticationType=$authenticationType,")
append("oAuth2Properties=$oAuth2Properties,")
append("secretArn=$secretArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authenticationType?.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 AuthenticationConfiguration
if (authenticationType != other.authenticationType) 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.AuthenticationConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A structure containing the authentication configuration.
*/
public var authenticationType: aws.sdk.kotlin.services.glue.model.AuthenticationType? = null
/**
* The properties for OAuth2 authentication.
*/
public var oAuth2Properties: aws.sdk.kotlin.services.glue.model.OAuth2Properties? = null
/**
* The secret manager ARN to store credentials.
*/
public var secretArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration) : this() {
this.authenticationType = x.authenticationType
this.oAuth2Properties = x.oAuth2Properties
this.secretArn = x.secretArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration = AuthenticationConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.OAuth2Properties] inside the given [block]
*/
public fun oAuth2Properties(block: aws.sdk.kotlin.services.glue.model.OAuth2Properties.Builder.() -> kotlin.Unit) {
this.oAuth2Properties = aws.sdk.kotlin.services.glue.model.OAuth2Properties.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}