commonMain.aws.sdk.kotlin.services.redshiftserverless.model.GetCredentialsResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshiftserverless-jvm Show documentation
Show all versions of redshiftserverless-jvm Show documentation
The AWS SDK for Kotlin client for Redshift Serverless
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshiftserverless.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
public class GetCredentialsResponse private constructor(builder: Builder) {
/**
* A temporary password that authorizes the user name returned by `DbUser` to log on to the database `DbName`.
*/
public val dbPassword: kotlin.String? = builder.dbPassword
/**
* A database user name that is authorized to log on to the database `DbName` using the password `DbPassword`. If the specified `DbUser` exists in the database, the new user name has the same database privileges as the the user named in `DbUser`. By default, the user is added to PUBLIC.
*/
public val dbUser: kotlin.String? = builder.dbUser
/**
* The date and time the password in `DbPassword` expires.
*/
public val expiration: aws.smithy.kotlin.runtime.time.Instant? = builder.expiration
/**
* The date and time of when the `DbUser` and `DbPassword` authorization refreshes.
*/
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.redshiftserverless.model.GetCredentialsResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetCredentialsResponse(")
append("dbPassword=*** Sensitive Data Redacted ***,")
append("dbUser=*** Sensitive Data Redacted ***,")
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 GetCredentialsResponse
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.redshiftserverless.model.GetCredentialsResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A temporary password that authorizes the user name returned by `DbUser` to log on to the database `DbName`.
*/
public var dbPassword: kotlin.String? = null
/**
* A database user name that is authorized to log on to the database `DbName` using the password `DbPassword`. If the specified `DbUser` exists in the database, the new user name has the same database privileges as the the user named in `DbUser`. By default, the user is added to PUBLIC.
*/
public var dbUser: kotlin.String? = null
/**
* The date and time the password in `DbPassword` expires.
*/
public var expiration: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The date and time of when the `DbUser` and `DbPassword` authorization refreshes.
*/
public var nextRefreshTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshiftserverless.model.GetCredentialsResponse) : 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.redshiftserverless.model.GetCredentialsResponse = GetCredentialsResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}