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

commonMain.aws.sdk.kotlin.services.evidently.model.StopExperimentRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.evidently.model

import aws.smithy.kotlin.runtime.SdkDsl

public class StopExperimentRequest private constructor(builder: Builder) {
    /**
     * Specify whether the experiment is to be considered `COMPLETED` or `CANCELLED` after it stops.
     */
    public val desiredState: aws.sdk.kotlin.services.evidently.model.ExperimentStopDesiredState? = builder.desiredState
    /**
     * The name of the experiment to stop.
     */
    public val experiment: kotlin.String = requireNotNull(builder.experiment) { "A non-null value must be provided for experiment" }
    /**
     * The name or ARN of the project that contains the experiment to stop.
     */
    public val project: kotlin.String = requireNotNull(builder.project) { "A non-null value must be provided for project" }
    /**
     * A string that describes why you are stopping the experiment.
     */
    public val reason: kotlin.String? = builder.reason

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

    override fun toString(): kotlin.String = buildString {
        append("StopExperimentRequest(")
        append("desiredState=$desiredState,")
        append("experiment=$experiment,")
        append("project=$project,")
        append("reason=$reason")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = desiredState?.hashCode() ?: 0
        result = 31 * result + (experiment.hashCode())
        result = 31 * result + (project.hashCode())
        result = 31 * result + (reason?.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 StopExperimentRequest

        if (desiredState != other.desiredState) return false
        if (experiment != other.experiment) return false
        if (project != other.project) return false
        if (reason != other.reason) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specify whether the experiment is to be considered `COMPLETED` or `CANCELLED` after it stops.
         */
        public var desiredState: aws.sdk.kotlin.services.evidently.model.ExperimentStopDesiredState? = null
        /**
         * The name of the experiment to stop.
         */
        public var experiment: kotlin.String? = null
        /**
         * The name or ARN of the project that contains the experiment to stop.
         */
        public var project: kotlin.String? = null
        /**
         * A string that describes why you are stopping the experiment.
         */
        public var reason: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.evidently.model.StopExperimentRequest) : this() {
            this.desiredState = x.desiredState
            this.experiment = x.experiment
            this.project = x.project
            this.reason = x.reason
        }

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

        internal fun correctErrors(): Builder {
            if (experiment == null) experiment = ""
            if (project == null) project = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy