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

commonMain.aws.sdk.kotlin.services.autoscaling.model.CompleteLifecycleActionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.autoscaling.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CompleteLifecycleActionRequest private constructor(builder: Builder) {
    /**
     * The name of the Auto Scaling group.
     */
    public val autoScalingGroupName: kotlin.String? = builder.autoScalingGroupName
    /**
     * The ID of the instance.
     */
    public val instanceId: kotlin.String? = builder.instanceId
    /**
     * The action for the group to take. You can specify either `CONTINUE` or `ABANDON`.
     */
    public val lifecycleActionResult: kotlin.String? = builder.lifecycleActionResult
    /**
     * A universally unique identifier (UUID) that identifies a specific lifecycle action associated with an instance. Amazon EC2 Auto Scaling sends this token to the notification target you specified when you created the lifecycle hook.
     */
    public val lifecycleActionToken: kotlin.String? = builder.lifecycleActionToken
    /**
     * The name of the lifecycle hook.
     */
    public val lifecycleHookName: kotlin.String? = builder.lifecycleHookName

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

    override fun toString(): kotlin.String = buildString {
        append("CompleteLifecycleActionRequest(")
        append("autoScalingGroupName=$autoScalingGroupName,")
        append("instanceId=$instanceId,")
        append("lifecycleActionResult=$lifecycleActionResult,")
        append("lifecycleActionToken=$lifecycleActionToken,")
        append("lifecycleHookName=$lifecycleHookName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoScalingGroupName?.hashCode() ?: 0
        result = 31 * result + (instanceId?.hashCode() ?: 0)
        result = 31 * result + (lifecycleActionResult?.hashCode() ?: 0)
        result = 31 * result + (lifecycleActionToken?.hashCode() ?: 0)
        result = 31 * result + (lifecycleHookName?.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 CompleteLifecycleActionRequest

        if (autoScalingGroupName != other.autoScalingGroupName) return false
        if (instanceId != other.instanceId) return false
        if (lifecycleActionResult != other.lifecycleActionResult) return false
        if (lifecycleActionToken != other.lifecycleActionToken) return false
        if (lifecycleHookName != other.lifecycleHookName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the Auto Scaling group.
         */
        public var autoScalingGroupName: kotlin.String? = null
        /**
         * The ID of the instance.
         */
        public var instanceId: kotlin.String? = null
        /**
         * The action for the group to take. You can specify either `CONTINUE` or `ABANDON`.
         */
        public var lifecycleActionResult: kotlin.String? = null
        /**
         * A universally unique identifier (UUID) that identifies a specific lifecycle action associated with an instance. Amazon EC2 Auto Scaling sends this token to the notification target you specified when you created the lifecycle hook.
         */
        public var lifecycleActionToken: kotlin.String? = null
        /**
         * The name of the lifecycle hook.
         */
        public var lifecycleHookName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.autoscaling.model.CompleteLifecycleActionRequest) : this() {
            this.autoScalingGroupName = x.autoScalingGroupName
            this.instanceId = x.instanceId
            this.lifecycleActionResult = x.lifecycleActionResult
            this.lifecycleActionToken = x.lifecycleActionToken
            this.lifecycleHookName = x.lifecycleHookName
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy