
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.GetEntityResponse.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 GetEntityResponse private constructor(builder: Builder) {
/**
* This flag notes whether all components are returned in the API response. The maximum number of components returned is 30.
*/
public val areAllComponentsReturned: kotlin.Boolean? = builder.areAllComponentsReturned
/**
* The ARN of the entity.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* An object that maps strings to the components in the entity. Each string in the mapping must be unique to this object.
*/
public val components: Map? = builder.components
/**
* 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" }
/**
* A Boolean value that specifies whether the entity has associated child entities.
*/
public val hasChildEntities: kotlin.Boolean = requireNotNull(builder.hasChildEntities) { "A non-null value must be provided for hasChildEntities" }
/**
* The ID of the parent entity for this entity.
*/
public val parentEntityId: kotlin.String = requireNotNull(builder.parentEntityId) { "A non-null value must be provided for parentEntityId" }
/**
* The current status of the entity.
*/
public val status: aws.sdk.kotlin.services.iottwinmaker.model.Status? = builder.status
/**
* The syncSource of the sync job, if this entity was created by a sync job.
*/
public val syncSource: kotlin.String? = builder.syncSource
/**
* 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" }
/**
* The ID of the workspace.
*/
public val workspaceId: kotlin.String = requireNotNull(builder.workspaceId) { "A non-null value must be provided for workspaceId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iottwinmaker.model.GetEntityResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetEntityResponse(")
append("areAllComponentsReturned=$areAllComponentsReturned,")
append("arn=$arn,")
append("components=$components,")
append("creationDateTime=$creationDateTime,")
append("description=$description,")
append("entityId=$entityId,")
append("entityName=$entityName,")
append("hasChildEntities=$hasChildEntities,")
append("parentEntityId=$parentEntityId,")
append("status=$status,")
append("syncSource=$syncSource,")
append("updateDateTime=$updateDateTime,")
append("workspaceId=$workspaceId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = areAllComponentsReturned?.hashCode() ?: 0
result = 31 * result + (arn.hashCode())
result = 31 * result + (components?.hashCode() ?: 0)
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())
result = 31 * result + (parentEntityId.hashCode())
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (syncSource?.hashCode() ?: 0)
result = 31 * result + (updateDateTime.hashCode())
result = 31 * result + (workspaceId.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 GetEntityResponse
if (areAllComponentsReturned != other.areAllComponentsReturned) return false
if (arn != other.arn) return false
if (components != other.components) 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 (syncSource != other.syncSource) return false
if (updateDateTime != other.updateDateTime) return false
if (workspaceId != other.workspaceId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.GetEntityResponse = Builder(this).apply(block).build()
public class Builder {
/**
* This flag notes whether all components are returned in the API response. The maximum number of components returned is 30.
*/
public var areAllComponentsReturned: kotlin.Boolean? = null
/**
* The ARN of the entity.
*/
public var arn: kotlin.String? = null
/**
* An object that maps strings to the components in the entity. Each string in the mapping must be unique to this object.
*/
public var components: Map? = 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
/**
* A Boolean value that specifies whether the entity has associated child entities.
*/
public var hasChildEntities: kotlin.Boolean? = null
/**
* The ID of the parent entity for this 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 syncSource of the sync job, if this entity was created by a sync job.
*/
public var syncSource: kotlin.String? = null
/**
* The date and time when the entity was last updated.
*/
public var updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The ID of the workspace.
*/
public var workspaceId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.GetEntityResponse) : this() {
this.areAllComponentsReturned = x.areAllComponentsReturned
this.arn = x.arn
this.components = x.components
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.syncSource = x.syncSource
this.updateDateTime = x.updateDateTime
this.workspaceId = x.workspaceId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.GetEntityResponse = GetEntityResponse(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 (hasChildEntities == null) hasChildEntities = false
if (parentEntityId == null) parentEntityId = ""
if (updateDateTime == null) updateDateTime = Instant.fromEpochSeconds(0)
if (workspaceId == null) workspaceId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy