All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iottwinmaker.model



/**
 * The parent entity update request.
 */
public class ParentEntityUpdateRequest private constructor(builder: Builder) {
    /**
     * The ID of the parent entity.
     */
    public val parentEntityId: kotlin.String? = builder.parentEntityId
    /**
     * The type of the update.
     */
    public val updateType: aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateType = requireNotNull(builder.updateType) { "A non-null value must be provided for updateType" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ParentEntityUpdateRequest(")
        append("parentEntityId=$parentEntityId,")
        append("updateType=$updateType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = parentEntityId?.hashCode() ?: 0
        result = 31 * result + (updateType.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 ParentEntityUpdateRequest

        if (parentEntityId != other.parentEntityId) return false
        if (updateType != other.updateType) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The ID of the parent entity.
         */
        public var parentEntityId: kotlin.String? = null
        /**
         * The type of the update.
         */
        public var updateType: aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest) : this() {
            this.parentEntityId = x.parentEntityId
            this.updateType = x.updateType
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.ParentEntityUpdateRequest = ParentEntityUpdateRequest(this)

        internal fun correctErrors(): Builder {
            if (updateType == null) updateType = ParentEntityUpdateType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy