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

commonMain.aws.sdk.kotlin.services.fis.model.StartExperimentRequest.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

public class StartExperimentRequest private constructor(builder: Builder) {
    /**
     * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The experiment options for running the experiment.
     */
    public val experimentOptions: aws.sdk.kotlin.services.fis.model.StartExperimentExperimentOptionsInput? = builder.experimentOptions
    /**
     * The ID of the experiment template.
     */
    public val experimentTemplateId: kotlin.String? = builder.experimentTemplateId
    /**
     * The tags to apply to the experiment.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("StartExperimentRequest(")
        append("clientToken=$clientToken,")
        append("experimentOptions=$experimentOptions,")
        append("experimentTemplateId=$experimentTemplateId,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (experimentOptions?.hashCode() ?: 0)
        result = 31 * result + (experimentTemplateId?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 StartExperimentRequest

        if (clientToken != other.clientToken) return false
        if (experimentOptions != other.experimentOptions) return false
        if (experimentTemplateId != other.experimentTemplateId) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The experiment options for running the experiment.
         */
        public var experimentOptions: aws.sdk.kotlin.services.fis.model.StartExperimentExperimentOptionsInput? = null
        /**
         * The ID of the experiment template.
         */
        public var experimentTemplateId: kotlin.String? = null
        /**
         * The tags to apply to the experiment.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fis.model.StartExperimentRequest) : this() {
            this.clientToken = x.clientToken
            this.experimentOptions = x.experimentOptions
            this.experimentTemplateId = x.experimentTemplateId
            this.tags = x.tags
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy