commonMain.aws.sdk.kotlin.services.glue.model.AuthenticationConfigurationInput.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 in the CreateConnection request.
*/
public class AuthenticationConfigurationInput private constructor(builder: Builder) {
/**
* A structure containing the authentication configuration in the CreateConnection request.
*/
public val authenticationType: aws.sdk.kotlin.services.glue.model.AuthenticationType? = builder.authenticationType
/**
* The properties for OAuth2 authentication in the CreateConnection request.
*/
public val oAuth2Properties: aws.sdk.kotlin.services.glue.model.OAuth2PropertiesInput? = builder.oAuth2Properties
/**
* The secret manager ARN to store credentials in the CreateConnection request.
*/
public val secretArn: kotlin.String? = builder.secretArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.AuthenticationConfigurationInput = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AuthenticationConfigurationInput(")
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 AuthenticationConfigurationInput
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.AuthenticationConfigurationInput = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A structure containing the authentication configuration in the CreateConnection request.
*/
public var authenticationType: aws.sdk.kotlin.services.glue.model.AuthenticationType? = null
/**
* The properties for OAuth2 authentication in the CreateConnection request.
*/
public var oAuth2Properties: aws.sdk.kotlin.services.glue.model.OAuth2PropertiesInput? = null
/**
* The secret manager ARN to store credentials in the CreateConnection request.
*/
public var secretArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.AuthenticationConfigurationInput) : this() {
this.authenticationType = x.authenticationType
this.oAuth2Properties = x.oAuth2Properties
this.secretArn = x.secretArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.AuthenticationConfigurationInput = AuthenticationConfigurationInput(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.OAuth2PropertiesInput] inside the given [block]
*/
public fun oAuth2Properties(block: aws.sdk.kotlin.services.glue.model.OAuth2PropertiesInput.Builder.() -> kotlin.Unit) {
this.oAuth2Properties = aws.sdk.kotlin.services.glue.model.OAuth2PropertiesInput.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}