commonMain.aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig.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
/**
* Creates the OAuth configuration for your Amplify project.
*/
public class CreateBackendAuthOAuthConfig private constructor(builder: Builder) {
/**
* The domain prefix for your Amplify app.
*/
public val domainPrefix: kotlin.String? = builder.domainPrefix
/**
* The OAuth grant type that you use to allow app users to authenticate from your Amplify app.
*/
public val oAuthGrantType: aws.sdk.kotlin.services.amplifybackend.model.OAuthGrantType? = builder.oAuthGrantType
/**
* List of OAuth-related flows used to allow your app users to authenticate from your Amplify app.
*/
public val oAuthScopes: List? = builder.oAuthScopes
/**
* The redirected URI for signing in to your Amplify app.
*/
public val redirectSignInUris: List? = builder.redirectSignInUris
/**
* Redirect URLs that OAuth uses when a user signs out of an Amplify app.
*/
public val redirectSignOutUris: List? = builder.redirectSignOutUris
/**
* The settings for using social providers to access your Amplify app.
*/
public val socialProviderSettings: aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings? = builder.socialProviderSettings
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateBackendAuthOAuthConfig(")
append("domainPrefix=$domainPrefix,")
append("oAuthGrantType=$oAuthGrantType,")
append("oAuthScopes=$oAuthScopes,")
append("redirectSignInUris=$redirectSignInUris,")
append("redirectSignOutUris=$redirectSignOutUris,")
append("socialProviderSettings=$socialProviderSettings")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = domainPrefix?.hashCode() ?: 0
result = 31 * result + (oAuthGrantType?.hashCode() ?: 0)
result = 31 * result + (oAuthScopes?.hashCode() ?: 0)
result = 31 * result + (redirectSignInUris?.hashCode() ?: 0)
result = 31 * result + (redirectSignOutUris?.hashCode() ?: 0)
result = 31 * result + (socialProviderSettings?.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 CreateBackendAuthOAuthConfig
if (domainPrefix != other.domainPrefix) return false
if (oAuthGrantType != other.oAuthGrantType) return false
if (oAuthScopes != other.oAuthScopes) return false
if (redirectSignInUris != other.redirectSignInUris) return false
if (redirectSignOutUris != other.redirectSignOutUris) return false
if (socialProviderSettings != other.socialProviderSettings) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The domain prefix for your Amplify app.
*/
public var domainPrefix: kotlin.String? = null
/**
* The OAuth grant type that you use to allow app users to authenticate from your Amplify app.
*/
public var oAuthGrantType: aws.sdk.kotlin.services.amplifybackend.model.OAuthGrantType? = null
/**
* List of OAuth-related flows used to allow your app users to authenticate from your Amplify app.
*/
public var oAuthScopes: List? = null
/**
* The redirected URI for signing in to your Amplify app.
*/
public var redirectSignInUris: List? = null
/**
* Redirect URLs that OAuth uses when a user signs out of an Amplify app.
*/
public var redirectSignOutUris: List? = null
/**
* The settings for using social providers to access your Amplify app.
*/
public var socialProviderSettings: aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig) : this() {
this.domainPrefix = x.domainPrefix
this.oAuthGrantType = x.oAuthGrantType
this.oAuthScopes = x.oAuthScopes
this.redirectSignInUris = x.redirectSignInUris
this.redirectSignOutUris = x.redirectSignOutUris
this.socialProviderSettings = x.socialProviderSettings
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.amplifybackend.model.CreateBackendAuthOAuthConfig = CreateBackendAuthOAuthConfig(this)
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings] inside the given [block]
*/
public fun socialProviderSettings(block: aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings.Builder.() -> kotlin.Unit) {
this.socialProviderSettings = aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}