All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.dynamodb.model.UpdateTimeToLiveRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.dynamodb.model



/**
 * Represents the input of an `UpdateTimeToLive` operation.
 */
public class UpdateTimeToLiveRequest private constructor(builder: Builder) {
    /**
     * The name of the table to be configured.
     */
    public val tableName: kotlin.String? = builder.tableName
    /**
     * Represents the settings used to enable or disable Time to Live for the specified table.
     */
    public val timeToLiveSpecification: aws.sdk.kotlin.services.dynamodb.model.TimeToLiveSpecification? = builder.timeToLiveSpecification

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dynamodb.model.UpdateTimeToLiveRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateTimeToLiveRequest(")
        append("tableName=$tableName,")
        append("timeToLiveSpecification=$timeToLiveSpecification")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = tableName?.hashCode() ?: 0
        result = 31 * result + (timeToLiveSpecification?.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 UpdateTimeToLiveRequest

        if (tableName != other.tableName) return false
        if (timeToLiveSpecification != other.timeToLiveSpecification) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dynamodb.model.UpdateTimeToLiveRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The name of the table to be configured.
         */
        public var tableName: kotlin.String? = null
        /**
         * Represents the settings used to enable or disable Time to Live for the specified table.
         */
        public var timeToLiveSpecification: aws.sdk.kotlin.services.dynamodb.model.TimeToLiveSpecification? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.UpdateTimeToLiveRequest) : this() {
            this.tableName = x.tableName
            this.timeToLiveSpecification = x.timeToLiveSpecification
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.dynamodb.model.UpdateTimeToLiveRequest = UpdateTimeToLiveRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.dynamodb.model.TimeToLiveSpecification] inside the given [block]
         */
        public fun timeToLiveSpecification(block: aws.sdk.kotlin.services.dynamodb.model.TimeToLiveSpecification.Builder.() -> kotlin.Unit) {
            this.timeToLiveSpecification = aws.sdk.kotlin.services.dynamodb.model.TimeToLiveSpecification.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy