
commonMain.aws.sdk.kotlin.services.configservice.model.RetentionConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.model
/**
* An object with the name of the retention configuration and the retention period in days. The object stores the configuration for data retention in Config.
*/
class RetentionConfiguration private constructor(builder: Builder) {
/**
* The name of the retention configuration object.
*/
val name: kotlin.String? = builder.name
/**
* Number of days Config stores your historical information.
*
* Currently, only applicable to the configuration item history.
*/
val retentionPeriodInDays: kotlin.Int = builder.retentionPeriodInDays
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.RetentionConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RetentionConfiguration(")
append("name=$name,")
append("retentionPeriodInDays=$retentionPeriodInDays)")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (retentionPeriodInDays)
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 RetentionConfiguration
if (name != other.name) return false
if (retentionPeriodInDays != other.retentionPeriodInDays) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.RetentionConfiguration = Builder(this).apply(block).build()
class Builder {
/**
* The name of the retention configuration object.
*/
var name: kotlin.String? = null
/**
* Number of days Config stores your historical information.
*
* Currently, only applicable to the configuration item history.
*/
var retentionPeriodInDays: kotlin.Int = 0
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.RetentionConfiguration) : this() {
this.name = x.name
this.retentionPeriodInDays = x.retentionPeriodInDays
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.RetentionConfiguration = RetentionConfiguration(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy