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

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

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

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



public class ModifyBackupAttributesResponse private constructor(builder: Builder) {
    /**
     * Contains information about a backup of an AWS CloudHSM cluster. All backup objects contain the `BackupId`, `BackupState`, `ClusterId`, and `CreateTimestamp` parameters. Backups that were copied into a destination region additionally contain the `CopyTimestamp`, `SourceBackup`, `SourceCluster`, and `SourceRegion` parameters. A backup that is pending deletion will include the `DeleteTimestamp` parameter.
     */
    public val backup: aws.sdk.kotlin.services.cloudhsmv2.model.Backup? = builder.backup

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

    override fun toString(): kotlin.String = buildString {
        append("ModifyBackupAttributesResponse(")
        append("backup=$backup")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = backup?.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 ModifyBackupAttributesResponse

        if (backup != other.backup) return false

        return true
    }

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

    public class Builder {
        /**
         * Contains information about a backup of an AWS CloudHSM cluster. All backup objects contain the `BackupId`, `BackupState`, `ClusterId`, and `CreateTimestamp` parameters. Backups that were copied into a destination region additionally contain the `CopyTimestamp`, `SourceBackup`, `SourceCluster`, and `SourceRegion` parameters. A backup that is pending deletion will include the `DeleteTimestamp` parameter.
         */
        public var backup: aws.sdk.kotlin.services.cloudhsmv2.model.Backup? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudhsmv2.model.ModifyBackupAttributesResponse) : this() {
            this.backup = x.backup
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy