
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.EntitySummary.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
/**
* An object that contains information about an entity.
*/
public class EntitySummary 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 description of the entity.
*/
public val description: kotlin.String? = builder.description
/**
* The ID of the entity.
*/
public val entityId: kotlin.String = requireNotNull(builder.entityId) { "A non-null value must be provided for entityId" }
/**
* The name of the entity.
*/
public val entityName: kotlin.String = requireNotNull(builder.entityName) { "A non-null value must be provided for entityName" }
/**
* An **eventual** Boolean value that specifies whether the entity has child entities or not.
*/
public val hasChildEntities: kotlin.Boolean? = builder.hasChildEntities
/**
* The ID of the parent entity.
*/
public val parentEntityId: kotlin.String? = builder.parentEntityId
/**
* The current status of the entity.
*/
public val status: aws.sdk.kotlin.services.iottwinmaker.model.Status? = builder.status
/**
* The last date and time when the entity was 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.EntitySummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EntitySummary(")
append("arn=$arn,")
append("creationDateTime=$creationDateTime,")
append("description=$description,")
append("entityId=$entityId,")
append("entityName=$entityName,")
append("hasChildEntities=$hasChildEntities,")
append("parentEntityId=$parentEntityId,")
append("status=$status,")
append("updateDateTime=$updateDateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (creationDateTime.hashCode())
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (entityId.hashCode())
result = 31 * result + (entityName.hashCode())
result = 31 * result + (hasChildEntities?.hashCode() ?: 0)
result = 31 * result + (parentEntityId?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
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 EntitySummary
if (arn != other.arn) return false
if (creationDateTime != other.creationDateTime) return false
if (description != other.description) return false
if (entityId != other.entityId) return false
if (entityName != other.entityName) return false
if (hasChildEntities != other.hasChildEntities) return false
if (parentEntityId != other.parentEntityId) return false
if (status != other.status) return false
if (updateDateTime != other.updateDateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.EntitySummary = 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 description of the entity.
*/
public var description: kotlin.String? = null
/**
* The ID of the entity.
*/
public var entityId: kotlin.String? = null
/**
* The name of the entity.
*/
public var entityName: kotlin.String? = null
/**
* An **eventual** Boolean value that specifies whether the entity has child entities or not.
*/
public var hasChildEntities: kotlin.Boolean? = null
/**
* The ID of the parent entity.
*/
public var parentEntityId: kotlin.String? = null
/**
* The current status of the entity.
*/
public var status: aws.sdk.kotlin.services.iottwinmaker.model.Status? = null
/**
* The last date and time when the entity was updated.
*/
public var updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.EntitySummary) : this() {
this.arn = x.arn
this.creationDateTime = x.creationDateTime
this.description = x.description
this.entityId = x.entityId
this.entityName = x.entityName
this.hasChildEntities = x.hasChildEntities
this.parentEntityId = x.parentEntityId
this.status = x.status
this.updateDateTime = x.updateDateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.EntitySummary = EntitySummary(this)
/**
* construct an [aws.sdk.kotlin.services.iottwinmaker.model.Status] inside the given [block]
*/
public fun status(block: aws.sdk.kotlin.services.iottwinmaker.model.Status.Builder.() -> kotlin.Unit) {
this.status = aws.sdk.kotlin.services.iottwinmaker.model.Status.invoke(block)
}
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (creationDateTime == null) creationDateTime = Instant.fromEpochSeconds(0)
if (entityId == null) entityId = ""
if (entityName == null) entityName = ""
if (updateDateTime == null) updateDateTime = Instant.fromEpochSeconds(0)
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy