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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.model.ApplyPendingMaintenanceActionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.databasemigrationservice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 *
 */
public class ApplyPendingMaintenanceActionRequest private constructor(builder: Builder) {
    /**
     * The pending maintenance action to apply to this resource.
     *
     * Valid values: `os-upgrade`, `system-update`, `db-upgrade`
     */
    public val applyAction: kotlin.String? = builder.applyAction
    /**
     * A value that specifies the type of opt-in request, or undoes an opt-in request. You can't undo an opt-in request of type `immediate`.
     *
     * Valid values:
     * + `immediate` - Apply the maintenance action immediately.
     * + `next-maintenance` - Apply the maintenance action during the next maintenance window for the resource.
     * + `undo-opt-in` - Cancel any existing `next-maintenance` opt-in requests.
     */
    public val optInType: kotlin.String? = builder.optInType
    /**
     * The Amazon Resource Name (ARN) of the DMS resource that the pending maintenance action applies to.
     */
    public val replicationInstanceArn: kotlin.String? = builder.replicationInstanceArn

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

    override fun toString(): kotlin.String = buildString {
        append("ApplyPendingMaintenanceActionRequest(")
        append("applyAction=$applyAction,")
        append("optInType=$optInType,")
        append("replicationInstanceArn=$replicationInstanceArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = applyAction?.hashCode() ?: 0
        result = 31 * result + (optInType?.hashCode() ?: 0)
        result = 31 * result + (replicationInstanceArn?.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 ApplyPendingMaintenanceActionRequest

        if (applyAction != other.applyAction) return false
        if (optInType != other.optInType) return false
        if (replicationInstanceArn != other.replicationInstanceArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The pending maintenance action to apply to this resource.
         *
         * Valid values: `os-upgrade`, `system-update`, `db-upgrade`
         */
        public var applyAction: kotlin.String? = null
        /**
         * A value that specifies the type of opt-in request, or undoes an opt-in request. You can't undo an opt-in request of type `immediate`.
         *
         * Valid values:
         * + `immediate` - Apply the maintenance action immediately.
         * + `next-maintenance` - Apply the maintenance action during the next maintenance window for the resource.
         * + `undo-opt-in` - Cancel any existing `next-maintenance` opt-in requests.
         */
        public var optInType: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the DMS resource that the pending maintenance action applies to.
         */
        public var replicationInstanceArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databasemigrationservice.model.ApplyPendingMaintenanceActionRequest) : this() {
            this.applyAction = x.applyAction
            this.optInType = x.optInType
            this.replicationInstanceArn = x.replicationInstanceArn
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy