All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.cognitoidentity.model.GetOpenIdTokenRequest.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cognitoidentity.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Input to the GetOpenIdToken action.
 */
public class GetOpenIdTokenRequest private constructor(builder: Builder) {
    /**
     * A unique identifier in the format REGION:GUID.
     */
    public val identityId: kotlin.String? = builder.identityId
    /**
     * A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito user pool provider, or any other OpenID Connect provider, always include the `id_token`.
     */
    public val logins: Map? = builder.logins

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cognitoidentity.model.GetOpenIdTokenRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetOpenIdTokenRequest(")
        append("identityId=$identityId,")
        append("logins=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = identityId?.hashCode() ?: 0
        result = 31 * result + (logins?.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 GetOpenIdTokenRequest

        if (identityId != other.identityId) return false
        if (logins != other.logins) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cognitoidentity.model.GetOpenIdTokenRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A unique identifier in the format REGION:GUID.
         */
        public var identityId: kotlin.String? = null
        /**
         * A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito user pool provider, or any other OpenID Connect provider, always include the `id_token`.
         */
        public var logins: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cognitoidentity.model.GetOpenIdTokenRequest) : this() {
            this.identityId = x.identityId
            this.logins = x.logins
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.cognitoidentity.model.GetOpenIdTokenRequest = GetOpenIdTokenRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy