commonMain.aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings.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
/**
* The settings for using the social identity providers for access to your Amplify app.
*/
public class SocialProviderSettings private constructor(builder: Builder) {
/**
* Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
*/
public val facebook: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig? = builder.facebook
/**
* Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
*/
public val google: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig? = builder.google
/**
* Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
*/
public val loginWithAmazon: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig? = builder.loginWithAmazon
/**
* Describes Apple social federation configurations for allowing your app users to sign in using OAuth.
*/
public val signInWithApple: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthAppleProviderConfig? = builder.signInWithApple
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SocialProviderSettings(")
append("facebook=*** Sensitive Data Redacted ***,")
append("google=*** Sensitive Data Redacted ***,")
append("loginWithAmazon=*** Sensitive Data Redacted ***,")
append("signInWithApple=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = facebook?.hashCode() ?: 0
result = 31 * result + (google?.hashCode() ?: 0)
result = 31 * result + (loginWithAmazon?.hashCode() ?: 0)
result = 31 * result + (signInWithApple?.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 SocialProviderSettings
if (facebook != other.facebook) return false
if (google != other.google) return false
if (loginWithAmazon != other.loginWithAmazon) return false
if (signInWithApple != other.signInWithApple) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
*/
public var facebook: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig? = null
/**
* Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
*/
public var google: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig? = null
/**
* Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
*/
public var loginWithAmazon: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig? = null
/**
* Describes Apple social federation configurations for allowing your app users to sign in using OAuth.
*/
public var signInWithApple: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthAppleProviderConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings) : this() {
this.facebook = x.facebook
this.google = x.google
this.loginWithAmazon = x.loginWithAmazon
this.signInWithApple = x.signInWithApple
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.amplifybackend.model.SocialProviderSettings = SocialProviderSettings(this)
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig] inside the given [block]
*/
public fun facebook(block: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig.Builder.() -> kotlin.Unit) {
this.facebook = aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig] inside the given [block]
*/
public fun google(block: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig.Builder.() -> kotlin.Unit) {
this.google = aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig] inside the given [block]
*/
public fun loginWithAmazon(block: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig.Builder.() -> kotlin.Unit) {
this.loginWithAmazon = aws.sdk.kotlin.services.amplifybackend.model.BackendAuthSocialProviderConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.amplifybackend.model.BackendAuthAppleProviderConfig] inside the given [block]
*/
public fun signInWithApple(block: aws.sdk.kotlin.services.amplifybackend.model.BackendAuthAppleProviderConfig.Builder.() -> kotlin.Unit) {
this.signInWithApple = aws.sdk.kotlin.services.amplifybackend.model.BackendAuthAppleProviderConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}