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

commonMain.aws.sdk.kotlin.services.lightsail.model.StopInstanceRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model



public class StopInstanceRequest private constructor(builder: Builder) {
    /**
     * When set to `True`, forces a Lightsail instance that is stuck in a `stopping` state to stop.
     *
     * Only use the `force` parameter if your instance is stuck in the `stopping` state. In any other state, your instance should stop normally without adding this parameter to your API request.
     */
    public val force: kotlin.Boolean? = builder.force
    /**
     * The name of the instance (a virtual private server) to stop.
     */
    public val instanceName: kotlin.String? = builder.instanceName

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

    override fun toString(): kotlin.String = buildString {
        append("StopInstanceRequest(")
        append("force=$force,")
        append("instanceName=$instanceName)")
    }

    override fun hashCode(): kotlin.Int {
        var result = force?.hashCode() ?: 0
        result = 31 * result + (instanceName?.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 StopInstanceRequest

        if (force != other.force) return false
        if (instanceName != other.instanceName) return false

        return true
    }

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

    public class Builder {
        /**
         * When set to `True`, forces a Lightsail instance that is stuck in a `stopping` state to stop.
         *
         * Only use the `force` parameter if your instance is stuck in the `stopping` state. In any other state, your instance should stop normally without adding this parameter to your API request.
         */
        public var force: kotlin.Boolean? = null
        /**
         * The name of the instance (a virtual private server) to stop.
         */
        public var instanceName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.StopInstanceRequest) : this() {
            this.force = x.force
            this.instanceName = x.instanceName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lightsail.model.StopInstanceRequest = StopInstanceRequest(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy