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

commonMain.aws.sdk.kotlin.services.fis.model.ExperimentTemplateAction.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.fis.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes an action for an experiment template.
 */
public class ExperimentTemplateAction private constructor(builder: Builder) {
    /**
     * The ID of the action.
     */
    public val actionId: kotlin.String? = builder.actionId
    /**
     * A description for the action.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The parameters for the action.
     */
    public val parameters: Map? = builder.parameters
    /**
     * The name of the action that must be completed before the current action starts.
     */
    public val startAfter: List? = builder.startAfter
    /**
     * The targets for the action.
     */
    public val targets: Map? = builder.targets

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

    override fun toString(): kotlin.String = buildString {
        append("ExperimentTemplateAction(")
        append("actionId=$actionId,")
        append("description=$description,")
        append("parameters=$parameters,")
        append("startAfter=$startAfter,")
        append("targets=$targets")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionId?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (parameters?.hashCode() ?: 0)
        result = 31 * result + (startAfter?.hashCode() ?: 0)
        result = 31 * result + (targets?.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 ExperimentTemplateAction

        if (actionId != other.actionId) return false
        if (description != other.description) return false
        if (parameters != other.parameters) return false
        if (startAfter != other.startAfter) return false
        if (targets != other.targets) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the action.
         */
        public var actionId: kotlin.String? = null
        /**
         * A description for the action.
         */
        public var description: kotlin.String? = null
        /**
         * The parameters for the action.
         */
        public var parameters: Map? = null
        /**
         * The name of the action that must be completed before the current action starts.
         */
        public var startAfter: List? = null
        /**
         * The targets for the action.
         */
        public var targets: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fis.model.ExperimentTemplateAction) : this() {
            this.actionId = x.actionId
            this.description = x.description
            this.parameters = x.parameters
            this.startAfter = x.startAfter
            this.targets = x.targets
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy