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

commonMain.aws.sdk.kotlin.services.backup.model.DescribeProtectedResourceResponse.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 DescribeProtectedResourceResponse private constructor(builder: Builder) {
    /**
     * The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of `LastBackupTime` is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
     */
    public val lastBackupTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastBackupTime
    /**
     * This is the ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point.
     */
    public val lastBackupVaultArn: kotlin.String? = builder.lastBackupVaultArn
    /**
     * This is the ARN (Amazon Resource Name) of the most recent recovery point.
     */
    public val lastRecoveryPointArn: kotlin.String? = builder.lastRecoveryPointArn
    /**
     * This is the time in minutes the most recent restore job took to complete.
     */
    public val latestRestoreExecutionTimeMinutes: kotlin.Long? = builder.latestRestoreExecutionTimeMinutes
    /**
     * This is the creation date of the most recent restore job.
     */
    public val latestRestoreJobCreationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.latestRestoreJobCreationDate
    /**
     * This is the date the most recent recovery point was created.
     */
    public val latestRestoreRecoveryPointCreationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.latestRestoreRecoveryPointCreationDate
    /**
     * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.
     */
    public val resourceArn: kotlin.String? = builder.resourceArn
    /**
     * This is the non-unique name of the resource that belongs to the specified backup.
     */
    public val resourceName: kotlin.String? = builder.resourceName
    /**
     * The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon EBS volume or an Amazon RDS database.
     */
    public val resourceType: kotlin.String? = builder.resourceType

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeProtectedResourceResponse(")
        append("lastBackupTime=$lastBackupTime,")
        append("lastBackupVaultArn=$lastBackupVaultArn,")
        append("lastRecoveryPointArn=$lastRecoveryPointArn,")
        append("latestRestoreExecutionTimeMinutes=$latestRestoreExecutionTimeMinutes,")
        append("latestRestoreJobCreationDate=$latestRestoreJobCreationDate,")
        append("latestRestoreRecoveryPointCreationDate=$latestRestoreRecoveryPointCreationDate,")
        append("resourceArn=$resourceArn,")
        append("resourceName=$resourceName,")
        append("resourceType=$resourceType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lastBackupTime?.hashCode() ?: 0
        result = 31 * result + (lastBackupVaultArn?.hashCode() ?: 0)
        result = 31 * result + (lastRecoveryPointArn?.hashCode() ?: 0)
        result = 31 * result + (latestRestoreExecutionTimeMinutes?.hashCode() ?: 0)
        result = 31 * result + (latestRestoreJobCreationDate?.hashCode() ?: 0)
        result = 31 * result + (latestRestoreRecoveryPointCreationDate?.hashCode() ?: 0)
        result = 31 * result + (resourceArn?.hashCode() ?: 0)
        result = 31 * result + (resourceName?.hashCode() ?: 0)
        result = 31 * result + (resourceType?.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 DescribeProtectedResourceResponse

        if (lastBackupTime != other.lastBackupTime) return false
        if (lastBackupVaultArn != other.lastBackupVaultArn) return false
        if (lastRecoveryPointArn != other.lastRecoveryPointArn) return false
        if (latestRestoreExecutionTimeMinutes != other.latestRestoreExecutionTimeMinutes) return false
        if (latestRestoreJobCreationDate != other.latestRestoreJobCreationDate) return false
        if (latestRestoreRecoveryPointCreationDate != other.latestRestoreRecoveryPointCreationDate) return false
        if (resourceArn != other.resourceArn) return false
        if (resourceName != other.resourceName) return false
        if (resourceType != other.resourceType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of `LastBackupTime` is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
         */
        public var lastBackupTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * This is the ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point.
         */
        public var lastBackupVaultArn: kotlin.String? = null
        /**
         * This is the ARN (Amazon Resource Name) of the most recent recovery point.
         */
        public var lastRecoveryPointArn: kotlin.String? = null
        /**
         * This is the time in minutes the most recent restore job took to complete.
         */
        public var latestRestoreExecutionTimeMinutes: kotlin.Long? = null
        /**
         * This is the creation date of the most recent restore job.
         */
        public var latestRestoreJobCreationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * This is the date the most recent recovery point was created.
         */
        public var latestRestoreRecoveryPointCreationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.
         */
        public var resourceArn: kotlin.String? = null
        /**
         * This is the non-unique name of the resource that belongs to the specified backup.
         */
        public var resourceName: kotlin.String? = null
        /**
         * The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon EBS volume or an Amazon RDS database.
         */
        public var resourceType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.DescribeProtectedResourceResponse) : this() {
            this.lastBackupTime = x.lastBackupTime
            this.lastBackupVaultArn = x.lastBackupVaultArn
            this.lastRecoveryPointArn = x.lastRecoveryPointArn
            this.latestRestoreExecutionTimeMinutes = x.latestRestoreExecutionTimeMinutes
            this.latestRestoreJobCreationDate = x.latestRestoreJobCreationDate
            this.latestRestoreRecoveryPointCreationDate = x.latestRestoreRecoveryPointCreationDate
            this.resourceArn = x.resourceArn
            this.resourceName = x.resourceName
            this.resourceType = x.resourceType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy