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

commonMain.aws.sdk.kotlin.services.redshift.model.BatchModifyClusterSnapshotsRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.redshift.model

import aws.smithy.kotlin.runtime.SdkDsl

public class BatchModifyClusterSnapshotsRequest private constructor(builder: Builder) {
    /**
     * A boolean value indicating whether to override an exception if the retention period has passed.
     */
    public val force: kotlin.Boolean? = builder.force
    /**
     * The number of days that a manual snapshot is retained. If you specify the value -1, the manual snapshot is retained indefinitely.
     *
     * The number must be either -1 or an integer between 1 and 3,653.
     *
     * If you decrease the manual snapshot retention period from its current value, existing manual snapshots that fall outside of the new retention period will return an error. If you want to suppress the errors and delete the snapshots, use the force option.
     */
    public val manualSnapshotRetentionPeriod: kotlin.Int? = builder.manualSnapshotRetentionPeriod
    /**
     * A list of snapshot identifiers you want to modify.
     */
    public val snapshotIdentifierList: List? = builder.snapshotIdentifierList

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

    override fun toString(): kotlin.String = buildString {
        append("BatchModifyClusterSnapshotsRequest(")
        append("force=$force,")
        append("manualSnapshotRetentionPeriod=$manualSnapshotRetentionPeriod,")
        append("snapshotIdentifierList=$snapshotIdentifierList")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = force?.hashCode() ?: 0
        result = 31 * result + (manualSnapshotRetentionPeriod ?: 0)
        result = 31 * result + (snapshotIdentifierList?.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 BatchModifyClusterSnapshotsRequest

        if (force != other.force) return false
        if (manualSnapshotRetentionPeriod != other.manualSnapshotRetentionPeriod) return false
        if (snapshotIdentifierList != other.snapshotIdentifierList) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A boolean value indicating whether to override an exception if the retention period has passed.
         */
        public var force: kotlin.Boolean? = null
        /**
         * The number of days that a manual snapshot is retained. If you specify the value -1, the manual snapshot is retained indefinitely.
         *
         * The number must be either -1 or an integer between 1 and 3,653.
         *
         * If you decrease the manual snapshot retention period from its current value, existing manual snapshots that fall outside of the new retention period will return an error. If you want to suppress the errors and delete the snapshots, use the force option.
         */
        public var manualSnapshotRetentionPeriod: kotlin.Int? = null
        /**
         * A list of snapshot identifiers you want to modify.
         */
        public var snapshotIdentifierList: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.BatchModifyClusterSnapshotsRequest) : this() {
            this.force = x.force
            this.manualSnapshotRetentionPeriod = x.manualSnapshotRetentionPeriod
            this.snapshotIdentifierList = x.snapshotIdentifierList
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy