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

commonMain.aws.sdk.kotlin.services.backup.model.CancelLegalHoldRequest.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

public class CancelLegalHoldRequest private constructor(builder: Builder) {
    /**
     * String describing the reason for removing the legal hold.
     */
    public val cancelDescription: kotlin.String? = builder.cancelDescription
    /**
     * Legal hold ID required to remove the specified legal hold on a recovery point.
     */
    public val legalHoldId: kotlin.String? = builder.legalHoldId
    /**
     * The integer amount in days specifying amount of days after this API operation to remove legal hold.
     */
    public val retainRecordInDays: kotlin.Long? = builder.retainRecordInDays

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

    override fun toString(): kotlin.String = buildString {
        append("CancelLegalHoldRequest(")
        append("cancelDescription=$cancelDescription,")
        append("legalHoldId=$legalHoldId,")
        append("retainRecordInDays=$retainRecordInDays")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = cancelDescription?.hashCode() ?: 0
        result = 31 * result + (legalHoldId?.hashCode() ?: 0)
        result = 31 * result + (retainRecordInDays?.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 CancelLegalHoldRequest

        if (cancelDescription != other.cancelDescription) return false
        if (legalHoldId != other.legalHoldId) return false
        if (retainRecordInDays != other.retainRecordInDays) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * String describing the reason for removing the legal hold.
         */
        public var cancelDescription: kotlin.String? = null
        /**
         * Legal hold ID required to remove the specified legal hold on a recovery point.
         */
        public var legalHoldId: kotlin.String? = null
        /**
         * The integer amount in days specifying amount of days after this API operation to remove legal hold.
         */
        public var retainRecordInDays: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.CancelLegalHoldRequest) : this() {
            this.cancelDescription = x.cancelDescription
            this.legalHoldId = x.legalHoldId
            this.retainRecordInDays = x.retainRecordInDays
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy