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

commonMain.aws.sdk.kotlin.services.ssm.model.CancelCommandRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssm.model



/**
 *
 */
public class CancelCommandRequest private constructor(builder: Builder) {
    /**
     * The ID of the command you want to cancel.
     */
    public val commandId: kotlin.String? = builder.commandId
    /**
     * (Optional) A list of managed node IDs on which you want to cancel the command. If not provided, the command is canceled on every node on which it was requested.
     */
    public val instanceIds: List? = builder.instanceIds

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

    override fun toString(): kotlin.String = buildString {
        append("CancelCommandRequest(")
        append("commandId=$commandId,")
        append("instanceIds=$instanceIds")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = commandId?.hashCode() ?: 0
        result = 31 * result + (instanceIds?.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 CancelCommandRequest

        if (commandId != other.commandId) return false
        if (instanceIds != other.instanceIds) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the command you want to cancel.
         */
        public var commandId: kotlin.String? = null
        /**
         * (Optional) A list of managed node IDs on which you want to cancel the command. If not provided, the command is canceled on every node on which it was requested.
         */
        public var instanceIds: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.CancelCommandRequest) : this() {
            this.commandId = x.commandId
            this.instanceIds = x.instanceIds
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy