
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iottwinmaker.model
public class UpdateEntityRequest private constructor(builder: Builder) {
/**
* An object that maps strings to the component updates in the request. Each string in the mapping must be unique to this object.
*/
public val componentUpdates: Map? = builder.componentUpdates
/**
* This is an object that maps strings to `compositeComponent` updates in the request. Each key of the map represents the `componentPath` of the `compositeComponent`.
*/
public val compositeComponentUpdates: Map? = builder.compositeComponentUpdates
/**
* 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? = builder.entityName
/**
* An object that describes the update request for a parent entity.
*/
public val parentEntityUpdate: aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest? = builder.parentEntityUpdate
/**
* The ID of the workspace that contains the entity.
*/
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.UpdateEntityRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateEntityRequest(")
append("componentUpdates=$componentUpdates,")
append("compositeComponentUpdates=$compositeComponentUpdates,")
append("description=$description,")
append("entityId=$entityId,")
append("entityName=$entityName,")
append("parentEntityUpdate=$parentEntityUpdate,")
append("workspaceId=$workspaceId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = componentUpdates?.hashCode() ?: 0
result = 31 * result + (compositeComponentUpdates?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (entityId.hashCode())
result = 31 * result + (entityName?.hashCode() ?: 0)
result = 31 * result + (parentEntityUpdate?.hashCode() ?: 0)
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 UpdateEntityRequest
if (componentUpdates != other.componentUpdates) return false
if (compositeComponentUpdates != other.compositeComponentUpdates) return false
if (description != other.description) return false
if (entityId != other.entityId) return false
if (entityName != other.entityName) return false
if (parentEntityUpdate != other.parentEntityUpdate) return false
if (workspaceId != other.workspaceId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityRequest = Builder(this).apply(block).build()
public class Builder {
/**
* An object that maps strings to the component updates in the request. Each string in the mapping must be unique to this object.
*/
public var componentUpdates: Map? = null
/**
* This is an object that maps strings to `compositeComponent` updates in the request. Each key of the map represents the `componentPath` of the `compositeComponent`.
*/
public var compositeComponentUpdates: Map? = 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 object that describes the update request for a parent entity.
*/
public var parentEntityUpdate: aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest? = null
/**
* The ID of the workspace that contains the entity.
*/
public var workspaceId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityRequest) : this() {
this.componentUpdates = x.componentUpdates
this.compositeComponentUpdates = x.compositeComponentUpdates
this.description = x.description
this.entityId = x.entityId
this.entityName = x.entityName
this.parentEntityUpdate = x.parentEntityUpdate
this.workspaceId = x.workspaceId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.UpdateEntityRequest = UpdateEntityRequest(this)
/**
* construct an [aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest] inside the given [block]
*/
public fun parentEntityUpdate(block: aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest.Builder.() -> kotlin.Unit) {
this.parentEntityUpdate = aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest.invoke(block)
}
internal fun correctErrors(): Builder {
if (entityId == null) entityId = ""
if (workspaceId == null) workspaceId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy