commonMain.aws.sdk.kotlin.services.cognitoidentity.model.Credentials.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cognitoidentity-jvm Show documentation
Show all versions of cognitoidentity-jvm Show documentation
The AWS SDK for Kotlin client for Cognito Identity
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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Credentials for the provided identity ID.
*/
public class Credentials private constructor(builder: Builder) {
/**
* The Access Key portion of the credentials.
*/
public val accessKeyId: kotlin.String? = builder.accessKeyId
/**
* The date at which these credentials will expire.
*/
public val expiration: aws.smithy.kotlin.runtime.time.Instant? = builder.expiration
/**
* The Secret Access Key portion of the credentials
*/
public val secretKey: kotlin.String? = builder.secretKey
/**
* The Session Token portion of the credentials
*/
public val sessionToken: kotlin.String? = builder.sessionToken
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cognitoidentity.model.Credentials = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Credentials(")
append("accessKeyId=$accessKeyId,")
append("expiration=$expiration,")
append("secretKey=*** Sensitive Data Redacted ***,")
append("sessionToken=$sessionToken")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accessKeyId?.hashCode() ?: 0
result = 31 * result + (expiration?.hashCode() ?: 0)
result = 31 * result + (secretKey?.hashCode() ?: 0)
result = 31 * result + (sessionToken?.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 Credentials
if (accessKeyId != other.accessKeyId) return false
if (expiration != other.expiration) return false
if (secretKey != other.secretKey) return false
if (sessionToken != other.sessionToken) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cognitoidentity.model.Credentials = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Access Key portion of the credentials.
*/
public var accessKeyId: kotlin.String? = null
/**
* The date at which these credentials will expire.
*/
public var expiration: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The Secret Access Key portion of the credentials
*/
public var secretKey: kotlin.String? = null
/**
* The Session Token portion of the credentials
*/
public var sessionToken: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cognitoidentity.model.Credentials) : this() {
this.accessKeyId = x.accessKeyId
this.expiration = x.expiration
this.secretKey = x.secretKey
this.sessionToken = x.sessionToken
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cognitoidentity.model.Credentials = Credentials(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy