commonMain.aws.sdk.kotlin.services.redshift.model.GetClusterCredentialsWithIamResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
public class GetClusterCredentialsWithIamResponse private constructor(builder: Builder) {
/**
* A temporary password that you provide when you connect to a database.
*/
public val dbPassword: kotlin.String? = builder.dbPassword
/**
* A database user name that you provide when you connect to a database. The database user is mapped 1:1 to the source IAM identity.
*/
public val dbUser: kotlin.String? = builder.dbUser
/**
* The time (UTC) when the temporary password expires. After this timestamp, a log in with the temporary password fails.
*/
public val expiration: aws.smithy.kotlin.runtime.time.Instant? = builder.expiration
/**
* Reserved for future use.
*/
public val nextRefreshTime: aws.smithy.kotlin.runtime.time.Instant? = builder.nextRefreshTime
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.GetClusterCredentialsWithIamResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetClusterCredentialsWithIamResponse(")
append("dbPassword=*** Sensitive Data Redacted ***,")
append("dbUser=$dbUser,")
append("expiration=$expiration,")
append("nextRefreshTime=$nextRefreshTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dbPassword?.hashCode() ?: 0
result = 31 * result + (dbUser?.hashCode() ?: 0)
result = 31 * result + (expiration?.hashCode() ?: 0)
result = 31 * result + (nextRefreshTime?.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 GetClusterCredentialsWithIamResponse
if (dbPassword != other.dbPassword) return false
if (dbUser != other.dbUser) return false
if (expiration != other.expiration) return false
if (nextRefreshTime != other.nextRefreshTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.GetClusterCredentialsWithIamResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A temporary password that you provide when you connect to a database.
*/
public var dbPassword: kotlin.String? = null
/**
* A database user name that you provide when you connect to a database. The database user is mapped 1:1 to the source IAM identity.
*/
public var dbUser: kotlin.String? = null
/**
* The time (UTC) when the temporary password expires. After this timestamp, a log in with the temporary password fails.
*/
public var expiration: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Reserved for future use.
*/
public var nextRefreshTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.GetClusterCredentialsWithIamResponse) : this() {
this.dbPassword = x.dbPassword
this.dbUser = x.dbUser
this.expiration = x.expiration
this.nextRefreshTime = x.nextRefreshTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.GetClusterCredentialsWithIamResponse = GetClusterCredentialsWithIamResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}