
commonMain.aws.sdk.kotlin.services.quicksight.model.CredentialPair.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.quicksight.model
/**
* The combination of user name and password that are used as credentials.
*/
class CredentialPair private constructor(builder: Builder) {
/**
* A set of alternate data source parameters that you want to share for these credentials. The credentials are applied in tandem with the data source parameters when you copy a data source by using a create or update request. The API operation compares the `DataSourceParameters` structure that's in the request with the structures in the `AlternateDataSourceParameters` allow list. If the structures are an exact match, the request is allowed to use the new data source with the existing credentials. If the `AlternateDataSourceParameters` list is null, the `DataSourceParameters` originally used with these `Credentials` is automatically allowed.
*/
val alternateDataSourceParameters: List? = builder.alternateDataSourceParameters
/**
* Password.
*/
val password: kotlin.String? = builder.password
/**
* User name.
*/
val username: kotlin.String? = builder.username
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.quicksight.model.CredentialPair = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CredentialPair(")
append("alternateDataSourceParameters=$alternateDataSourceParameters,")
append("password=$password,")
append("username=$username)")
}
override fun hashCode(): kotlin.Int {
var result = alternateDataSourceParameters?.hashCode() ?: 0
result = 31 * result + (password?.hashCode() ?: 0)
result = 31 * result + (username?.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 CredentialPair
if (alternateDataSourceParameters != other.alternateDataSourceParameters) return false
if (password != other.password) return false
if (username != other.username) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.quicksight.model.CredentialPair = Builder(this).apply(block).build()
class Builder {
/**
* A set of alternate data source parameters that you want to share for these credentials. The credentials are applied in tandem with the data source parameters when you copy a data source by using a create or update request. The API operation compares the `DataSourceParameters` structure that's in the request with the structures in the `AlternateDataSourceParameters` allow list. If the structures are an exact match, the request is allowed to use the new data source with the existing credentials. If the `AlternateDataSourceParameters` list is null, the `DataSourceParameters` originally used with these `Credentials` is automatically allowed.
*/
var alternateDataSourceParameters: List? = null
/**
* Password.
*/
var password: kotlin.String? = null
/**
* User name.
*/
var username: kotlin.String? = null
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.quicksight.model.CredentialPair) : this() {
this.alternateDataSourceParameters = x.alternateDataSourceParameters
this.password = x.password
this.username = x.username
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.quicksight.model.CredentialPair = CredentialPair(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy