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

commonMain.aws.sdk.kotlin.services.cloudhsmv2.model.DestinationBackup.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudhsmv2.model

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

/**
 * Contains information about the backup that will be copied and created by the CopyBackupToRegion operation.
 */
public class DestinationBackup private constructor(builder: Builder) {
    /**
     * The date and time when both the source backup was created.
     */
    public val createTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.createTimestamp
    /**
     * The identifier (ID) of the source backup from which the new backup was copied.
     */
    public val sourceBackup: kotlin.String? = builder.sourceBackup
    /**
     * The identifier (ID) of the cluster containing the source backup from which the new backup was copied.
     */
    public val sourceCluster: kotlin.String? = builder.sourceCluster
    /**
     * The AWS region that contains the source backup from which the new backup was copied.
     */
    public val sourceRegion: kotlin.String? = builder.sourceRegion

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

    override fun toString(): kotlin.String = buildString {
        append("DestinationBackup(")
        append("createTimestamp=$createTimestamp,")
        append("sourceBackup=$sourceBackup,")
        append("sourceCluster=$sourceCluster,")
        append("sourceRegion=$sourceRegion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createTimestamp?.hashCode() ?: 0
        result = 31 * result + (sourceBackup?.hashCode() ?: 0)
        result = 31 * result + (sourceCluster?.hashCode() ?: 0)
        result = 31 * result + (sourceRegion?.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 DestinationBackup

        if (createTimestamp != other.createTimestamp) return false
        if (sourceBackup != other.sourceBackup) return false
        if (sourceCluster != other.sourceCluster) return false
        if (sourceRegion != other.sourceRegion) return false

        return true
    }

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

    public class Builder {
        /**
         * The date and time when both the source backup was created.
         */
        public var createTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The identifier (ID) of the source backup from which the new backup was copied.
         */
        public var sourceBackup: kotlin.String? = null
        /**
         * The identifier (ID) of the cluster containing the source backup from which the new backup was copied.
         */
        public var sourceCluster: kotlin.String? = null
        /**
         * The AWS region that contains the source backup from which the new backup was copied.
         */
        public var sourceRegion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudhsmv2.model.DestinationBackup) : this() {
            this.createTimestamp = x.createTimestamp
            this.sourceBackup = x.sourceBackup
            this.sourceCluster = x.sourceCluster
            this.sourceRegion = x.sourceRegion
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.cloudhsmv2.model.DestinationBackup = DestinationBackup(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy