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

commonMain.aws.sdk.kotlin.services.backup.model.GetBackupPlanResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.backup.model

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

public class GetBackupPlanResponse private constructor(builder: Builder) {
    /**
     * Contains a list of `BackupOptions` for each resource type. The list is populated only if the advanced option is set for the backup plan.
     */
    public val advancedBackupSettings: List? = builder.advancedBackupSettings
    /**
     * Specifies the body of a backup plan. Includes a `BackupPlanName` and one or more sets of `Rules`.
     */
    public val backupPlan: aws.sdk.kotlin.services.backup.model.BackupPlan? = builder.backupPlan
    /**
     * An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, `arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50`.
     */
    public val backupPlanArn: kotlin.String? = builder.backupPlanArn
    /**
     * Uniquely identifies a backup plan.
     */
    public val backupPlanId: kotlin.String? = builder.backupPlanId
    /**
     * The date and time that a backup plan is created, in Unix format and Coordinated Universal Time (UTC). The value of `CreationDate` is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
     */
    public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
    /**
     * A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.
     */
    public val creatorRequestId: kotlin.String? = builder.creatorRequestId
    /**
     * The date and time that a backup plan is deleted, in Unix format and Coordinated Universal Time (UTC). The value of `DeletionDate` is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
     */
    public val deletionDate: aws.smithy.kotlin.runtime.time.Instant? = builder.deletionDate
    /**
     * The last time a job to back up resources was run with this backup plan. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of `LastExecutionDate` is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
     */
    public val lastExecutionDate: aws.smithy.kotlin.runtime.time.Instant? = builder.lastExecutionDate
    /**
     * Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.
     */
    public val versionId: kotlin.String? = builder.versionId

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

    override fun toString(): kotlin.String = buildString {
        append("GetBackupPlanResponse(")
        append("advancedBackupSettings=$advancedBackupSettings,")
        append("backupPlan=$backupPlan,")
        append("backupPlanArn=$backupPlanArn,")
        append("backupPlanId=$backupPlanId,")
        append("creationDate=$creationDate,")
        append("creatorRequestId=$creatorRequestId,")
        append("deletionDate=$deletionDate,")
        append("lastExecutionDate=$lastExecutionDate,")
        append("versionId=$versionId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = advancedBackupSettings?.hashCode() ?: 0
        result = 31 * result + (backupPlan?.hashCode() ?: 0)
        result = 31 * result + (backupPlanArn?.hashCode() ?: 0)
        result = 31 * result + (backupPlanId?.hashCode() ?: 0)
        result = 31 * result + (creationDate?.hashCode() ?: 0)
        result = 31 * result + (creatorRequestId?.hashCode() ?: 0)
        result = 31 * result + (deletionDate?.hashCode() ?: 0)
        result = 31 * result + (lastExecutionDate?.hashCode() ?: 0)
        result = 31 * result + (versionId?.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 GetBackupPlanResponse

        if (advancedBackupSettings != other.advancedBackupSettings) return false
        if (backupPlan != other.backupPlan) return false
        if (backupPlanArn != other.backupPlanArn) return false
        if (backupPlanId != other.backupPlanId) return false
        if (creationDate != other.creationDate) return false
        if (creatorRequestId != other.creatorRequestId) return false
        if (deletionDate != other.deletionDate) return false
        if (lastExecutionDate != other.lastExecutionDate) return false
        if (versionId != other.versionId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Contains a list of `BackupOptions` for each resource type. The list is populated only if the advanced option is set for the backup plan.
         */
        public var advancedBackupSettings: List? = null
        /**
         * Specifies the body of a backup plan. Includes a `BackupPlanName` and one or more sets of `Rules`.
         */
        public var backupPlan: aws.sdk.kotlin.services.backup.model.BackupPlan? = null
        /**
         * An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, `arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50`.
         */
        public var backupPlanArn: kotlin.String? = null
        /**
         * Uniquely identifies a backup plan.
         */
        public var backupPlanId: kotlin.String? = null
        /**
         * The date and time that a backup plan is created, in Unix format and Coordinated Universal Time (UTC). The value of `CreationDate` is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
         */
        public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.
         */
        public var creatorRequestId: kotlin.String? = null
        /**
         * The date and time that a backup plan is deleted, in Unix format and Coordinated Universal Time (UTC). The value of `DeletionDate` is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
         */
        public var deletionDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The last time a job to back up resources was run with this backup plan. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of `LastExecutionDate` is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
         */
        public var lastExecutionDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.
         */
        public var versionId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.GetBackupPlanResponse) : this() {
            this.advancedBackupSettings = x.advancedBackupSettings
            this.backupPlan = x.backupPlan
            this.backupPlanArn = x.backupPlanArn
            this.backupPlanId = x.backupPlanId
            this.creationDate = x.creationDate
            this.creatorRequestId = x.creatorRequestId
            this.deletionDate = x.deletionDate
            this.lastExecutionDate = x.lastExecutionDate
            this.versionId = x.versionId
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy