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

commonMain.aws.sdk.kotlin.services.deadline.model.AssignedTaskRunSessionActionDefinition.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.deadline.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The specific task, step, and parameters to include.
 */
public class AssignedTaskRunSessionActionDefinition private constructor(builder: Builder) {
    /**
     * The parameters to include.
     */
    public val parameters: Map = requireNotNull(builder.parameters) { "A non-null value must be provided for parameters" }
    /**
     * The step ID.
     */
    public val stepId: kotlin.String = requireNotNull(builder.stepId) { "A non-null value must be provided for stepId" }
    /**
     * The task ID.
     */
    public val taskId: kotlin.String = requireNotNull(builder.taskId) { "A non-null value must be provided for taskId" }

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

    override fun toString(): kotlin.String = buildString {
        append("AssignedTaskRunSessionActionDefinition(")
        append("parameters=*** Sensitive Data Redacted ***,")
        append("stepId=$stepId,")
        append("taskId=$taskId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = parameters.hashCode()
        result = 31 * result + (stepId.hashCode())
        result = 31 * result + (taskId.hashCode())
        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 AssignedTaskRunSessionActionDefinition

        if (parameters != other.parameters) return false
        if (stepId != other.stepId) return false
        if (taskId != other.taskId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The parameters to include.
         */
        public var parameters: Map? = null
        /**
         * The step ID.
         */
        public var stepId: kotlin.String? = null
        /**
         * The task ID.
         */
        public var taskId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.deadline.model.AssignedTaskRunSessionActionDefinition) : this() {
            this.parameters = x.parameters
            this.stepId = x.stepId
            this.taskId = x.taskId
        }

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

        internal fun correctErrors(): Builder {
            if (parameters == null) parameters = emptyMap()
            if (stepId == null) stepId = ""
            if (taskId == null) taskId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy