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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

public class SendAutomationSignalRequest private constructor(builder: Builder) {
    /**
     * The unique identifier for an existing Automation execution that you want to send the signal to.
     */
    public val automationExecutionId: kotlin.String? = builder.automationExecutionId
    /**
     * The data sent with the signal. The data schema depends on the type of signal used in the request.
     *
     * For `Approve` and `Reject` signal types, the payload is an optional comment that you can send with the signal type. For example:
     *
     * `Comment="Looks good"`
     *
     * For `StartStep` and `Resume` signal types, you must send the name of the Automation step to start or resume as the payload. For example:
     *
     * `StepName="step1"`
     *
     * For the `StopStep` signal type, you must send the step execution ID as the payload. For example:
     *
     * `StepExecutionId="97fff367-fc5a-4299-aed8-0123456789ab"`
     */
    public val payload: Map>? = builder.payload
    /**
     * The type of signal to send to an Automation execution.
     */
    public val signalType: aws.sdk.kotlin.services.ssm.model.SignalType? = builder.signalType

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

    override fun toString(): kotlin.String = buildString {
        append("SendAutomationSignalRequest(")
        append("automationExecutionId=$automationExecutionId,")
        append("payload=$payload,")
        append("signalType=$signalType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = automationExecutionId?.hashCode() ?: 0
        result = 31 * result + (payload?.hashCode() ?: 0)
        result = 31 * result + (signalType?.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 SendAutomationSignalRequest

        if (automationExecutionId != other.automationExecutionId) return false
        if (payload != other.payload) return false
        if (signalType != other.signalType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The unique identifier for an existing Automation execution that you want to send the signal to.
         */
        public var automationExecutionId: kotlin.String? = null
        /**
         * The data sent with the signal. The data schema depends on the type of signal used in the request.
         *
         * For `Approve` and `Reject` signal types, the payload is an optional comment that you can send with the signal type. For example:
         *
         * `Comment="Looks good"`
         *
         * For `StartStep` and `Resume` signal types, you must send the name of the Automation step to start or resume as the payload. For example:
         *
         * `StepName="step1"`
         *
         * For the `StopStep` signal type, you must send the step execution ID as the payload. For example:
         *
         * `StepExecutionId="97fff367-fc5a-4299-aed8-0123456789ab"`
         */
        public var payload: Map>? = null
        /**
         * The type of signal to send to an Automation execution.
         */
        public var signalType: aws.sdk.kotlin.services.ssm.model.SignalType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.SendAutomationSignalRequest) : this() {
            this.automationExecutionId = x.automationExecutionId
            this.payload = x.payload
            this.signalType = x.signalType
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy