
commonMain.aws.sdk.kotlin.services.qbusiness.model.OAuth2ClientCredentialConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qbusiness.model
/**
* Information about the OAuth 2.0 authentication credential/token used to configure a plugin.
*/
public class OAuth2ClientCredentialConfiguration private constructor(builder: Builder) {
/**
* The ARN of an IAM role used by Amazon Q Business to access the OAuth 2.0 authentication credentials stored in a Secrets Manager secret.
*/
public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }
/**
* The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token used for plugin configuration.
*/
public val secretArn: kotlin.String = requireNotNull(builder.secretArn) { "A non-null value must be provided for secretArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.OAuth2ClientCredentialConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OAuth2ClientCredentialConfiguration(")
append("roleArn=$roleArn,")
append("secretArn=$secretArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = roleArn.hashCode()
result = 31 * result + (secretArn.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 OAuth2ClientCredentialConfiguration
if (roleArn != other.roleArn) return false
if (secretArn != other.secretArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.OAuth2ClientCredentialConfiguration = Builder(this).apply(block).build()
public class Builder {
/**
* The ARN of an IAM role used by Amazon Q Business to access the OAuth 2.0 authentication credentials stored in a Secrets Manager secret.
*/
public var roleArn: kotlin.String? = null
/**
* The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token used for plugin configuration.
*/
public var secretArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.OAuth2ClientCredentialConfiguration) : this() {
this.roleArn = x.roleArn
this.secretArn = x.secretArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qbusiness.model.OAuth2ClientCredentialConfiguration = OAuth2ClientCredentialConfiguration(this)
internal fun correctErrors(): Builder {
if (roleArn == null) roleArn = ""
if (secretArn == null) secretArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy