
commonMain.aws.sdk.kotlin.services.ssmsap.model.ApplicationCredential.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmsap.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The credentials of your SAP application.
*/
public class ApplicationCredential private constructor(builder: Builder) {
/**
* The type of the application credentials.
*/
public val credentialType: aws.sdk.kotlin.services.ssmsap.model.CredentialType = requireNotNull(builder.credentialType) { "A non-null value must be provided for credentialType" }
/**
* The name of the SAP HANA database.
*/
public val databaseName: kotlin.String = requireNotNull(builder.databaseName) { "A non-null value must be provided for databaseName" }
/**
* The secret ID created in AWS Secrets Manager to store the credentials of the SAP application.
*/
public val secretId: kotlin.String = requireNotNull(builder.secretId) { "A non-null value must be provided for secretId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmsap.model.ApplicationCredential = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ApplicationCredential(")
append("credentialType=$credentialType,")
append("databaseName=$databaseName,")
append("secretId=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = credentialType.hashCode()
result = 31 * result + (databaseName.hashCode())
result = 31 * result + (secretId.hashCode())
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 ApplicationCredential
if (credentialType != other.credentialType) return false
if (databaseName != other.databaseName) return false
if (secretId != other.secretId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmsap.model.ApplicationCredential = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The type of the application credentials.
*/
public var credentialType: aws.sdk.kotlin.services.ssmsap.model.CredentialType? = null
/**
* The name of the SAP HANA database.
*/
public var databaseName: kotlin.String? = null
/**
* The secret ID created in AWS Secrets Manager to store the credentials of the SAP application.
*/
public var secretId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmsap.model.ApplicationCredential) : this() {
this.credentialType = x.credentialType
this.databaseName = x.databaseName
this.secretId = x.secretId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmsap.model.ApplicationCredential = ApplicationCredential(this)
internal fun correctErrors(): Builder {
if (credentialType == null) credentialType = CredentialType.SdkUnknown("no value provided")
if (databaseName == null) databaseName = ""
if (secretId == null) secretId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy