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

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

There is a newer version: 1.3.76
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 ModifyClusterSnapshotRequest private constructor(builder: Builder) {
    /**
     * A Boolean option to override an exception if the retention period has already passed.
     */
    public val force: kotlin.Boolean? = builder.force
    /**
     * The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.
     *
     * If the manual snapshot falls outside of the new retention period, you can specify the force option to immediately delete the snapshot.
     *
     * The value must be either -1 or an integer between 1 and 3,653.
     */
    public val manualSnapshotRetentionPeriod: kotlin.Int? = builder.manualSnapshotRetentionPeriod
    /**
     * The identifier of the snapshot whose setting you want to modify.
     */
    public val snapshotIdentifier: kotlin.String? = builder.snapshotIdentifier

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

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

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

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A Boolean option to override an exception if the retention period has already passed.
         */
        public var force: kotlin.Boolean? = null
        /**
         * The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.
         *
         * If the manual snapshot falls outside of the new retention period, you can specify the force option to immediately delete the snapshot.
         *
         * The value must be either -1 or an integer between 1 and 3,653.
         */
        public var manualSnapshotRetentionPeriod: kotlin.Int? = null
        /**
         * The identifier of the snapshot whose setting you want to modify.
         */
        public var snapshotIdentifier: kotlin.String? = null

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy