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