commonMain.aws.sdk.kotlin.services.appsync.model.AdditionalAuthenticationProvider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appsync-jvm Show documentation
Show all versions of appsync-jvm Show documentation
The AWS SDK for Kotlin client for AppSync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appsync.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes an additional authentication provider.
*/
public class AdditionalAuthenticationProvider private constructor(builder: Builder) {
/**
* The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.
*/
public val authenticationType: aws.sdk.kotlin.services.appsync.model.AuthenticationType? = builder.authenticationType
/**
* Configuration for Lambda function authorization.
*/
public val lambdaAuthorizerConfig: aws.sdk.kotlin.services.appsync.model.LambdaAuthorizerConfig? = builder.lambdaAuthorizerConfig
/**
* The OIDC configuration.
*/
public val openIdConnectConfig: aws.sdk.kotlin.services.appsync.model.OpenIdConnectConfig? = builder.openIdConnectConfig
/**
* The Amazon Cognito user pool configuration.
*/
public val userPoolConfig: aws.sdk.kotlin.services.appsync.model.CognitoUserPoolConfig? = builder.userPoolConfig
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appsync.model.AdditionalAuthenticationProvider = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AdditionalAuthenticationProvider(")
append("authenticationType=$authenticationType,")
append("lambdaAuthorizerConfig=$lambdaAuthorizerConfig,")
append("openIdConnectConfig=$openIdConnectConfig,")
append("userPoolConfig=$userPoolConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authenticationType?.hashCode() ?: 0
result = 31 * result + (lambdaAuthorizerConfig?.hashCode() ?: 0)
result = 31 * result + (openIdConnectConfig?.hashCode() ?: 0)
result = 31 * result + (userPoolConfig?.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 AdditionalAuthenticationProvider
if (authenticationType != other.authenticationType) return false
if (lambdaAuthorizerConfig != other.lambdaAuthorizerConfig) return false
if (openIdConnectConfig != other.openIdConnectConfig) return false
if (userPoolConfig != other.userPoolConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appsync.model.AdditionalAuthenticationProvider = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.
*/
public var authenticationType: aws.sdk.kotlin.services.appsync.model.AuthenticationType? = null
/**
* Configuration for Lambda function authorization.
*/
public var lambdaAuthorizerConfig: aws.sdk.kotlin.services.appsync.model.LambdaAuthorizerConfig? = null
/**
* The OIDC configuration.
*/
public var openIdConnectConfig: aws.sdk.kotlin.services.appsync.model.OpenIdConnectConfig? = null
/**
* The Amazon Cognito user pool configuration.
*/
public var userPoolConfig: aws.sdk.kotlin.services.appsync.model.CognitoUserPoolConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appsync.model.AdditionalAuthenticationProvider) : this() {
this.authenticationType = x.authenticationType
this.lambdaAuthorizerConfig = x.lambdaAuthorizerConfig
this.openIdConnectConfig = x.openIdConnectConfig
this.userPoolConfig = x.userPoolConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appsync.model.AdditionalAuthenticationProvider = AdditionalAuthenticationProvider(this)
/**
* construct an [aws.sdk.kotlin.services.appsync.model.LambdaAuthorizerConfig] inside the given [block]
*/
public fun lambdaAuthorizerConfig(block: aws.sdk.kotlin.services.appsync.model.LambdaAuthorizerConfig.Builder.() -> kotlin.Unit) {
this.lambdaAuthorizerConfig = aws.sdk.kotlin.services.appsync.model.LambdaAuthorizerConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.appsync.model.OpenIdConnectConfig] inside the given [block]
*/
public fun openIdConnectConfig(block: aws.sdk.kotlin.services.appsync.model.OpenIdConnectConfig.Builder.() -> kotlin.Unit) {
this.openIdConnectConfig = aws.sdk.kotlin.services.appsync.model.OpenIdConnectConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.appsync.model.CognitoUserPoolConfig] inside the given [block]
*/
public fun userPoolConfig(block: aws.sdk.kotlin.services.appsync.model.CognitoUserPoolConfig.Builder.() -> kotlin.Unit) {
this.userPoolConfig = aws.sdk.kotlin.services.appsync.model.CognitoUserPoolConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}