aws.sdk.kotlin.services.sagemaker.model.CognitoConfig.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.model
/**
* Use this parameter to configure your Amazon Cognito workforce.
* A single Cognito workforce is created using and corresponds to a single
*
* Amazon Cognito user pool.
*/
class CognitoConfig private constructor(builder: BuilderImpl) {
/**
* The client ID for your Amazon Cognito user pool.
*/
val clientId: String? = builder.clientId
/**
* A
* user pool is a user directory in Amazon Cognito.
* With a user pool, your users can sign in to your web or mobile app through Amazon Cognito.
* Your users can also sign in through social identity providers like
* Google, Facebook, Amazon, or Apple, and through SAML identity providers.
*/
val userPool: String? = builder.userPool
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): CognitoConfig = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CognitoConfig(")
append("clientId=$clientId,")
append("userPool=$userPool)")
}
override fun hashCode(): kotlin.Int {
var result = clientId?.hashCode() ?: 0
result = 31 * result + (userPool?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as CognitoConfig
if (clientId != other.clientId) return false
if (userPool != other.userPool) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): CognitoConfig = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): CognitoConfig
/**
* The client ID for your Amazon Cognito user pool.
*/
fun clientId(clientId: String): FluentBuilder
/**
* A
* user pool is a user directory in Amazon Cognito.
* With a user pool, your users can sign in to your web or mobile app through Amazon Cognito.
* Your users can also sign in through social identity providers like
* Google, Facebook, Amazon, or Apple, and through SAML identity providers.
*/
fun userPool(userPool: String): FluentBuilder
}
interface DslBuilder {
/**
* The client ID for your Amazon Cognito user pool.
*/
var clientId: String?
/**
* A
* user pool is a user directory in Amazon Cognito.
* With a user pool, your users can sign in to your web or mobile app through Amazon Cognito.
* Your users can also sign in through social identity providers like
* Google, Facebook, Amazon, or Apple, and through SAML identity providers.
*/
var userPool: String?
fun build(): CognitoConfig
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var clientId: String? = null
override var userPool: String? = null
constructor(x: CognitoConfig) : this() {
this.clientId = x.clientId
this.userPool = x.userPool
}
override fun build(): CognitoConfig = CognitoConfig(this)
override fun clientId(clientId: String): FluentBuilder = apply { this.clientId = clientId }
override fun userPool(userPool: String): FluentBuilder = apply { this.userPool = userPool }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy