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

commonMain.aws.sdk.kotlin.services.backup.model.GetLegalHoldResponse.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 GetLegalHoldResponse private constructor(builder: Builder) {
    /**
     * String describing the reason for removing the legal hold.
     */
    public val cancelDescription: kotlin.String? = builder.cancelDescription
    /**
     * Time in number when legal hold was cancelled.
     */
    public val cancellationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.cancellationDate
    /**
     * Time in number format when legal hold was created.
     */
    public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
    /**
     * This is the returned string description of the legal hold.
     */
    public val description: kotlin.String? = builder.description
    /**
     * This is the returned framework ARN for the specified legal hold. An Amazon Resource Name (ARN) uniquely identifies a resource. The format of the ARN depends on the resource type.
     */
    public val legalHoldArn: kotlin.String? = builder.legalHoldArn
    /**
     * This is the returned ID associated with a specified legal hold.
     */
    public val legalHoldId: kotlin.String? = builder.legalHoldId
    /**
     * This specifies criteria to assign a set of resources, such as resource types or backup vaults.
     */
    public val recoveryPointSelection: aws.sdk.kotlin.services.backup.model.RecoveryPointSelection? = builder.recoveryPointSelection
    /**
     * This is the date and time until which the legal hold record will be retained.
     */
    public val retainRecordUntil: aws.smithy.kotlin.runtime.time.Instant? = builder.retainRecordUntil
    /**
     * This is the status of the legal hold. Statuses can be `ACTIVE`, `CREATING`, `CANCELED`, and `CANCELING`.
     */
    public val status: aws.sdk.kotlin.services.backup.model.LegalHoldStatus? = builder.status
    /**
     * This is the string title of the legal hold.
     */
    public val title: kotlin.String? = builder.title

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

    override fun toString(): kotlin.String = buildString {
        append("GetLegalHoldResponse(")
        append("cancelDescription=$cancelDescription,")
        append("cancellationDate=$cancellationDate,")
        append("creationDate=$creationDate,")
        append("description=$description,")
        append("legalHoldArn=$legalHoldArn,")
        append("legalHoldId=$legalHoldId,")
        append("recoveryPointSelection=$recoveryPointSelection,")
        append("retainRecordUntil=$retainRecordUntil,")
        append("status=$status,")
        append("title=$title")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = cancelDescription?.hashCode() ?: 0
        result = 31 * result + (cancellationDate?.hashCode() ?: 0)
        result = 31 * result + (creationDate?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (legalHoldArn?.hashCode() ?: 0)
        result = 31 * result + (legalHoldId?.hashCode() ?: 0)
        result = 31 * result + (recoveryPointSelection?.hashCode() ?: 0)
        result = 31 * result + (retainRecordUntil?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (title?.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 GetLegalHoldResponse

        if (cancelDescription != other.cancelDescription) return false
        if (cancellationDate != other.cancellationDate) return false
        if (creationDate != other.creationDate) return false
        if (description != other.description) return false
        if (legalHoldArn != other.legalHoldArn) return false
        if (legalHoldId != other.legalHoldId) return false
        if (recoveryPointSelection != other.recoveryPointSelection) return false
        if (retainRecordUntil != other.retainRecordUntil) return false
        if (status != other.status) return false
        if (title != other.title) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * String describing the reason for removing the legal hold.
         */
        public var cancelDescription: kotlin.String? = null
        /**
         * Time in number when legal hold was cancelled.
         */
        public var cancellationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Time in number format when legal hold was created.
         */
        public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * This is the returned string description of the legal hold.
         */
        public var description: kotlin.String? = null
        /**
         * This is the returned framework ARN for the specified legal hold. An Amazon Resource Name (ARN) uniquely identifies a resource. The format of the ARN depends on the resource type.
         */
        public var legalHoldArn: kotlin.String? = null
        /**
         * This is the returned ID associated with a specified legal hold.
         */
        public var legalHoldId: kotlin.String? = null
        /**
         * This specifies criteria to assign a set of resources, such as resource types or backup vaults.
         */
        public var recoveryPointSelection: aws.sdk.kotlin.services.backup.model.RecoveryPointSelection? = null
        /**
         * This is the date and time until which the legal hold record will be retained.
         */
        public var retainRecordUntil: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * This is the status of the legal hold. Statuses can be `ACTIVE`, `CREATING`, `CANCELED`, and `CANCELING`.
         */
        public var status: aws.sdk.kotlin.services.backup.model.LegalHoldStatus? = null
        /**
         * This is the string title of the legal hold.
         */
        public var title: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.GetLegalHoldResponse) : this() {
            this.cancelDescription = x.cancelDescription
            this.cancellationDate = x.cancellationDate
            this.creationDate = x.creationDate
            this.description = x.description
            this.legalHoldArn = x.legalHoldArn
            this.legalHoldId = x.legalHoldId
            this.recoveryPointSelection = x.recoveryPointSelection
            this.retainRecordUntil = x.retainRecordUntil
            this.status = x.status
            this.title = x.title
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy