commonMain.aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthUserPoolConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amplifybackend-jvm Show documentation
Show all versions of amplifybackend-jvm Show documentation
The AWS SDK for Kotlin client for AmplifyBackend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.amplifybackend.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes the Amazon Cognito user pool configuration for the auth resource to be configured for your Amplify project.
*/
public class CreateBackendAuthUserPoolConfig private constructor(builder: Builder) {
/**
* **(DEPRECATED)** Describes the forgotten password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public val forgotPassword: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthForgotPasswordConfig? = builder.forgotPassword
/**
* Describes whether to apply multi-factor authentication policies for your Amazon Cognito user pool configured as a part of your Amplify project.
*/
public val mfa: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthMfaConfig? = builder.mfa
/**
* Describes the OAuth policy and rules for your Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public val oAuth: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig? = builder.oAuth
/**
* Describes the password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public val passwordPolicy: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthPasswordPolicyConfig? = builder.passwordPolicy
/**
* The required attributes to sign up new users in the user pool.
*/
public val requiredSignUpAttributes: List? = builder.requiredSignUpAttributes
/**
* Describes the sign-in methods that your Amplify app users use to log in using the Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public val signInMethod: aws.sdk.kotlin.services.amplifybackend.model.SignInMethod? = builder.signInMethod
/**
* The Amazon Cognito user pool name.
*/
public val userPoolName: kotlin.String? = builder.userPoolName
/**
* Describes the email or SMS verification message for your Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public val verificationMessage: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthVerificationMessageConfig? = builder.verificationMessage
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthUserPoolConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateBackendAuthUserPoolConfig(")
append("forgotPassword=$forgotPassword,")
append("mfa=$mfa,")
append("oAuth=$oAuth,")
append("passwordPolicy=$passwordPolicy,")
append("requiredSignUpAttributes=$requiredSignUpAttributes,")
append("signInMethod=$signInMethod,")
append("userPoolName=$userPoolName,")
append("verificationMessage=$verificationMessage")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = forgotPassword?.hashCode() ?: 0
result = 31 * result + (mfa?.hashCode() ?: 0)
result = 31 * result + (oAuth?.hashCode() ?: 0)
result = 31 * result + (passwordPolicy?.hashCode() ?: 0)
result = 31 * result + (requiredSignUpAttributes?.hashCode() ?: 0)
result = 31 * result + (signInMethod?.hashCode() ?: 0)
result = 31 * result + (userPoolName?.hashCode() ?: 0)
result = 31 * result + (verificationMessage?.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 CreateBackendAuthUserPoolConfig
if (forgotPassword != other.forgotPassword) return false
if (mfa != other.mfa) return false
if (oAuth != other.oAuth) return false
if (passwordPolicy != other.passwordPolicy) return false
if (requiredSignUpAttributes != other.requiredSignUpAttributes) return false
if (signInMethod != other.signInMethod) return false
if (userPoolName != other.userPoolName) return false
if (verificationMessage != other.verificationMessage) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthUserPoolConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* **(DEPRECATED)** Describes the forgotten password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public var forgotPassword: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthForgotPasswordConfig? = null
/**
* Describes whether to apply multi-factor authentication policies for your Amazon Cognito user pool configured as a part of your Amplify project.
*/
public var mfa: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthMfaConfig? = null
/**
* Describes the OAuth policy and rules for your Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public var oAuth: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig? = null
/**
* Describes the password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public var passwordPolicy: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthPasswordPolicyConfig? = null
/**
* The required attributes to sign up new users in the user pool.
*/
public var requiredSignUpAttributes: List? = null
/**
* Describes the sign-in methods that your Amplify app users use to log in using the Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public var signInMethod: aws.sdk.kotlin.services.amplifybackend.model.SignInMethod? = null
/**
* The Amazon Cognito user pool name.
*/
public var userPoolName: kotlin.String? = null
/**
* Describes the email or SMS verification message for your Amazon Cognito user pool, configured as a part of your Amplify project.
*/
public var verificationMessage: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthVerificationMessageConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthUserPoolConfig) : this() {
this.forgotPassword = x.forgotPassword
this.mfa = x.mfa
this.oAuth = x.oAuth
this.passwordPolicy = x.passwordPolicy
this.requiredSignUpAttributes = x.requiredSignUpAttributes
this.signInMethod = x.signInMethod
this.userPoolName = x.userPoolName
this.verificationMessage = x.verificationMessage
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthUserPoolConfig = CreateBackendAuthUserPoolConfig(this)
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthForgotPasswordConfig] inside the given [block]
*/
public fun forgotPassword(block: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthForgotPasswordConfig.Builder.() -> kotlin.Unit) {
this.forgotPassword = aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthForgotPasswordConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthMfaConfig] inside the given [block]
*/
public fun mfa(block: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthMfaConfig.Builder.() -> kotlin.Unit) {
this.mfa = aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthMfaConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig] inside the given [block]
*/
public fun oAuth(block: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig.Builder.() -> kotlin.Unit) {
this.oAuth = aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthPasswordPolicyConfig] inside the given [block]
*/
public fun passwordPolicy(block: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthPasswordPolicyConfig.Builder.() -> kotlin.Unit) {
this.passwordPolicy = aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthPasswordPolicyConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthVerificationMessageConfig] inside the given [block]
*/
public fun verificationMessage(block: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthVerificationMessageConfig.Builder.() -> kotlin.Unit) {
this.verificationMessage = aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthVerificationMessageConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}