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

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

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

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

import aws.smithy.kotlin.runtime.time.Instant

public class RestoreTableToPointInTimeRequest private constructor(builder: Builder) {
    /**
     * The billing mode of the restored table.
     */
    public val billingModeOverride: aws.sdk.kotlin.services.dynamodb.model.BillingMode? = builder.billingModeOverride
    /**
     * List of global secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
     */
    public val globalSecondaryIndexOverride: List? = builder.globalSecondaryIndexOverride
    /**
     * List of local secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
     */
    public val localSecondaryIndexOverride: List? = builder.localSecondaryIndexOverride
    /**
     * Provisioned throughput settings for the restored table.
     */
    public val provisionedThroughputOverride: aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughput? = builder.provisionedThroughputOverride
    /**
     * Time in the past to restore the table to.
     */
    public val restoreDateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.restoreDateTime
    /**
     * The DynamoDB table that will be restored. This value is an Amazon Resource Name (ARN).
     */
    public val sourceTableArn: kotlin.String? = builder.sourceTableArn
    /**
     * Name of the source table that is being restored.
     */
    public val sourceTableName: kotlin.String? = builder.sourceTableName
    /**
     * The new server-side encryption settings for the restored table.
     */
    public val sseSpecificationOverride: aws.sdk.kotlin.services.dynamodb.model.SseSpecification? = builder.sseSpecificationOverride
    /**
     * The name of the new table to which it must be restored to.
     */
    public val targetTableName: kotlin.String? = builder.targetTableName
    /**
     * Restore the table to the latest possible time. `LatestRestorableDateTime` is typically 5 minutes before the current time.
     */
    public val useLatestRestorableTime: kotlin.Boolean? = builder.useLatestRestorableTime

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

    override fun toString(): kotlin.String = buildString {
        append("RestoreTableToPointInTimeRequest(")
        append("billingModeOverride=$billingModeOverride,")
        append("globalSecondaryIndexOverride=$globalSecondaryIndexOverride,")
        append("localSecondaryIndexOverride=$localSecondaryIndexOverride,")
        append("provisionedThroughputOverride=$provisionedThroughputOverride,")
        append("restoreDateTime=$restoreDateTime,")
        append("sourceTableArn=$sourceTableArn,")
        append("sourceTableName=$sourceTableName,")
        append("sseSpecificationOverride=$sseSpecificationOverride,")
        append("targetTableName=$targetTableName,")
        append("useLatestRestorableTime=$useLatestRestorableTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = billingModeOverride?.hashCode() ?: 0
        result = 31 * result + (globalSecondaryIndexOverride?.hashCode() ?: 0)
        result = 31 * result + (localSecondaryIndexOverride?.hashCode() ?: 0)
        result = 31 * result + (provisionedThroughputOverride?.hashCode() ?: 0)
        result = 31 * result + (restoreDateTime?.hashCode() ?: 0)
        result = 31 * result + (sourceTableArn?.hashCode() ?: 0)
        result = 31 * result + (sourceTableName?.hashCode() ?: 0)
        result = 31 * result + (sseSpecificationOverride?.hashCode() ?: 0)
        result = 31 * result + (targetTableName?.hashCode() ?: 0)
        result = 31 * result + (useLatestRestorableTime?.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 RestoreTableToPointInTimeRequest

        if (billingModeOverride != other.billingModeOverride) return false
        if (globalSecondaryIndexOverride != other.globalSecondaryIndexOverride) return false
        if (localSecondaryIndexOverride != other.localSecondaryIndexOverride) return false
        if (provisionedThroughputOverride != other.provisionedThroughputOverride) return false
        if (restoreDateTime != other.restoreDateTime) return false
        if (sourceTableArn != other.sourceTableArn) return false
        if (sourceTableName != other.sourceTableName) return false
        if (sseSpecificationOverride != other.sseSpecificationOverride) return false
        if (targetTableName != other.targetTableName) return false
        if (useLatestRestorableTime != other.useLatestRestorableTime) return false

        return true
    }

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

    public class Builder {
        /**
         * The billing mode of the restored table.
         */
        public var billingModeOverride: aws.sdk.kotlin.services.dynamodb.model.BillingMode? = null
        /**
         * List of global secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
         */
        public var globalSecondaryIndexOverride: List? = null
        /**
         * List of local secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
         */
        public var localSecondaryIndexOverride: List? = null
        /**
         * Provisioned throughput settings for the restored table.
         */
        public var provisionedThroughputOverride: aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughput? = null
        /**
         * Time in the past to restore the table to.
         */
        public var restoreDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The DynamoDB table that will be restored. This value is an Amazon Resource Name (ARN).
         */
        public var sourceTableArn: kotlin.String? = null
        /**
         * Name of the source table that is being restored.
         */
        public var sourceTableName: kotlin.String? = null
        /**
         * The new server-side encryption settings for the restored table.
         */
        public var sseSpecificationOverride: aws.sdk.kotlin.services.dynamodb.model.SseSpecification? = null
        /**
         * The name of the new table to which it must be restored to.
         */
        public var targetTableName: kotlin.String? = null
        /**
         * Restore the table to the latest possible time. `LatestRestorableDateTime` is typically 5 minutes before the current time.
         */
        public var useLatestRestorableTime: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.RestoreTableToPointInTimeRequest) : this() {
            this.billingModeOverride = x.billingModeOverride
            this.globalSecondaryIndexOverride = x.globalSecondaryIndexOverride
            this.localSecondaryIndexOverride = x.localSecondaryIndexOverride
            this.provisionedThroughputOverride = x.provisionedThroughputOverride
            this.restoreDateTime = x.restoreDateTime
            this.sourceTableArn = x.sourceTableArn
            this.sourceTableName = x.sourceTableName
            this.sseSpecificationOverride = x.sseSpecificationOverride
            this.targetTableName = x.targetTableName
            this.useLatestRestorableTime = x.useLatestRestorableTime
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy