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

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

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

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



/**
 * The parameters for task execution.
 */
public class MaintenanceWindowTaskInvocationParameters private constructor(builder: Builder) {
    /**
     * The parameters for an `AUTOMATION` task type.
     */
    public val automation: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowAutomationParameters? = builder.automation
    /**
     * The parameters for a `LAMBDA` task type.
     */
    public val lambda: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowLambdaParameters? = builder.lambda
    /**
     * The parameters for a `RUN_COMMAND` task type.
     */
    public val runCommand: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowRunCommandParameters? = builder.runCommand
    /**
     * The parameters for a `STEP_FUNCTIONS` task type.
     */
    public val stepFunctions: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowStepFunctionsParameters? = builder.stepFunctions

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

    override fun toString(): kotlin.String = buildString {
        append("MaintenanceWindowTaskInvocationParameters(")
        append("automation=$automation,")
        append("lambda=$lambda,")
        append("runCommand=$runCommand,")
        append("stepFunctions=$stepFunctions")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = automation?.hashCode() ?: 0
        result = 31 * result + (lambda?.hashCode() ?: 0)
        result = 31 * result + (runCommand?.hashCode() ?: 0)
        result = 31 * result + (stepFunctions?.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 MaintenanceWindowTaskInvocationParameters

        if (automation != other.automation) return false
        if (lambda != other.lambda) return false
        if (runCommand != other.runCommand) return false
        if (stepFunctions != other.stepFunctions) return false

        return true
    }

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

    public class Builder {
        /**
         * The parameters for an `AUTOMATION` task type.
         */
        public var automation: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowAutomationParameters? = null
        /**
         * The parameters for a `LAMBDA` task type.
         */
        public var lambda: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowLambdaParameters? = null
        /**
         * The parameters for a `RUN_COMMAND` task type.
         */
        public var runCommand: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowRunCommandParameters? = null
        /**
         * The parameters for a `STEP_FUNCTIONS` task type.
         */
        public var stepFunctions: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowStepFunctionsParameters? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowTaskInvocationParameters) : this() {
            this.automation = x.automation
            this.lambda = x.lambda
            this.runCommand = x.runCommand
            this.stepFunctions = x.stepFunctions
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.ssm.model.MaintenanceWindowAutomationParameters] inside the given [block]
         */
        public fun automation(block: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowAutomationParameters.Builder.() -> kotlin.Unit) {
            this.automation = aws.sdk.kotlin.services.ssm.model.MaintenanceWindowAutomationParameters.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.ssm.model.MaintenanceWindowLambdaParameters] inside the given [block]
         */
        public fun lambda(block: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowLambdaParameters.Builder.() -> kotlin.Unit) {
            this.lambda = aws.sdk.kotlin.services.ssm.model.MaintenanceWindowLambdaParameters.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.ssm.model.MaintenanceWindowRunCommandParameters] inside the given [block]
         */
        public fun runCommand(block: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowRunCommandParameters.Builder.() -> kotlin.Unit) {
            this.runCommand = aws.sdk.kotlin.services.ssm.model.MaintenanceWindowRunCommandParameters.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.ssm.model.MaintenanceWindowStepFunctionsParameters] inside the given [block]
         */
        public fun stepFunctions(block: aws.sdk.kotlin.services.ssm.model.MaintenanceWindowStepFunctionsParameters.Builder.() -> kotlin.Unit) {
            this.stepFunctions = aws.sdk.kotlin.services.ssm.model.MaintenanceWindowStepFunctionsParameters.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy