
commonMain.aws.sdk.kotlin.services.lightsail.model.InstanceState.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes the virtual private server (or *instance*) status.
*/
public class InstanceState private constructor(builder: Builder) {
/**
* The status code for the instance.
*/
public val code: kotlin.Int? = builder.code
/**
* The state of the instance (`running` or `pending`).
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.InstanceState = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InstanceState(")
append("code=$code,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code ?: 0
result = 31 * result + (name?.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 InstanceState
if (code != other.code) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.InstanceState = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The status code for the instance.
*/
public var code: kotlin.Int? = null
/**
* The state of the instance (`running` or `pending`).
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.InstanceState) : this() {
this.code = x.code
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.InstanceState = InstanceState(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy