commonMain.aws.sdk.kotlin.services.firehose.model.SecretsManagerConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of firehose-jvm Show documentation
Show all versions of firehose-jvm Show documentation
The AWS SDK for Kotlin client for Firehose
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.firehose.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The structure that defines how Firehose accesses the secret.
*/
public class SecretsManagerConfiguration private constructor(builder: Builder) {
/**
* Specifies whether you want to use the the secrets manager feature. When set as `True` the secrets manager configuration overwrites the existing secrets in the destination configuration. When it's set to `False` Firehose falls back to the credentials in the destination configuration.
*/
public val enabled: kotlin.Boolean = requireNotNull(builder.enabled) { "A non-null value must be provided for enabled" }
/**
* Specifies the role that Firehose assumes when calling the Secrets Manager API operation. When you provide the role, it overrides any destination specific role defined in the destination configuration. If you do not provide the then we use the destination specific role. This parameter is required for Splunk.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* The ARN of the secret that stores your credentials. It must be in the same region as the Firehose stream and the role. The secret ARN can reside in a different account than the delivery stream and role as Firehose supports cross-account secret access. This parameter is required when **Enabled** is set to `True`.
*/
public val secretArn: kotlin.String? = builder.secretArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.firehose.model.SecretsManagerConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SecretsManagerConfiguration(")
append("enabled=$enabled,")
append("roleArn=$roleArn,")
append("secretArn=$secretArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enabled.hashCode()
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (secretArn?.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 SecretsManagerConfiguration
if (enabled != other.enabled) return false
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.firehose.model.SecretsManagerConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies whether you want to use the the secrets manager feature. When set as `True` the secrets manager configuration overwrites the existing secrets in the destination configuration. When it's set to `False` Firehose falls back to the credentials in the destination configuration.
*/
public var enabled: kotlin.Boolean? = null
/**
* Specifies the role that Firehose assumes when calling the Secrets Manager API operation. When you provide the role, it overrides any destination specific role defined in the destination configuration. If you do not provide the then we use the destination specific role. This parameter is required for Splunk.
*/
public var roleArn: kotlin.String? = null
/**
* The ARN of the secret that stores your credentials. It must be in the same region as the Firehose stream and the role. The secret ARN can reside in a different account than the delivery stream and role as Firehose supports cross-account secret access. This parameter is required when **Enabled** is set to `True`.
*/
public var secretArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.firehose.model.SecretsManagerConfiguration) : this() {
this.enabled = x.enabled
this.roleArn = x.roleArn
this.secretArn = x.secretArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.firehose.model.SecretsManagerConfiguration = SecretsManagerConfiguration(this)
internal fun correctErrors(): Builder {
if (enabled == null) enabled = false
return this
}
}
}