
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.CreateEntityRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iottwinmaker.model
public class CreateEntityRequest private constructor(builder: Builder) {
/**
* 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
/**
* 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 compositeComponents: Map? = builder.compositeComponents
/**
* The description of the entity.
*/
public val description: kotlin.String? = builder.description
/**
* The ID of the entity.
*/
public val entityId: kotlin.String? = builder.entityId
/**
* The name of the entity.
*/
public val entityName: kotlin.String = requireNotNull(builder.entityName) { "A non-null value must be provided for entityName" }
/**
* The ID of the entity's parent entity.
*/
public val parentEntityId: kotlin.String? = builder.parentEntityId
/**
* Metadata that you can use to manage the entity.
*/
public val tags: Map? = builder.tags
/**
* 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.CreateEntityRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateEntityRequest(")
append("components=$components,")
append("compositeComponents=$compositeComponents,")
append("description=$description,")
append("entityId=$entityId,")
append("entityName=$entityName,")
append("parentEntityId=$parentEntityId,")
append("tags=$tags,")
append("workspaceId=$workspaceId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = components?.hashCode() ?: 0
result = 31 * result + (compositeComponents?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (entityId?.hashCode() ?: 0)
result = 31 * result + (entityName.hashCode())
result = 31 * result + (parentEntityId?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateEntityRequest
if (components != other.components) return false
if (compositeComponents != other.compositeComponents) return false
if (description != other.description) return false
if (entityId != other.entityId) return false
if (entityName != other.entityName) return false
if (parentEntityId != other.parentEntityId) return false
if (tags != other.tags) return false
if (workspaceId != other.workspaceId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.CreateEntityRequest = Builder(this).apply(block).build()
public class Builder {
/**
* 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
/**
* 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 compositeComponents: 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
/**
* The ID of the entity's parent entity.
*/
public var parentEntityId: kotlin.String? = null
/**
* Metadata that you can use to manage the entity.
*/
public var tags: Map? = 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.CreateEntityRequest) : this() {
this.components = x.components
this.compositeComponents = x.compositeComponents
this.description = x.description
this.entityId = x.entityId
this.entityName = x.entityName
this.parentEntityId = x.parentEntityId
this.tags = x.tags
this.workspaceId = x.workspaceId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.CreateEntityRequest = CreateEntityRequest(this)
internal fun correctErrors(): Builder {
if (entityName == null) entityName = ""
if (workspaceId == null) workspaceId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy