
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iottwinmaker.model
import aws.smithy.kotlin.runtime.time.Instant
public class UpdateEntityResponse private constructor(builder: Builder) {
/**
* The current state of the entity update.
*/
public val state: aws.sdk.kotlin.services.iottwinmaker.model.State = requireNotNull(builder.state) { "A non-null value must be provided for state" }
/**
* The date and time when the entity was last updated.
*/
public val updateDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateDateTime) { "A non-null value must be provided for updateDateTime" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateEntityResponse(")
append("state=$state,")
append("updateDateTime=$updateDateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = state.hashCode()
result = 31 * result + (updateDateTime.hashCode())
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 UpdateEntityResponse
if (state != other.state) return false
if (updateDateTime != other.updateDateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The current state of the entity update.
*/
public var state: aws.sdk.kotlin.services.iottwinmaker.model.State? = null
/**
* The date and time when the entity was last updated.
*/
public var updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityResponse) : this() {
this.state = x.state
this.updateDateTime = x.updateDateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityResponse = UpdateEntityResponse(this)
internal fun correctErrors(): Builder {
if (state == null) state = State.SdkUnknown("no value provided")
if (updateDateTime == null) updateDateTime = Instant.fromEpochSeconds(0)
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy