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

commonMain.aws.sdk.kotlin.services.datazone.model.AssetTargetNameMap.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.datazone.model



/**
 * The name map for assets.
 */
public class AssetTargetNameMap private constructor(builder: Builder) {
    /**
     * The identifier of the inventory asset.
     */
    public val assetId: kotlin.String = requireNotNull(builder.assetId) { "A non-null value must be provided for assetId" }
    /**
     * The target name in the asset target name map.
     */
    public val targetName: kotlin.String = requireNotNull(builder.targetName) { "A non-null value must be provided for targetName" }

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

    override fun toString(): kotlin.String = buildString {
        append("AssetTargetNameMap(")
        append("assetId=$assetId,")
        append("targetName=$targetName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assetId.hashCode()
        result = 31 * result + (targetName.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 AssetTargetNameMap

        if (assetId != other.assetId) return false
        if (targetName != other.targetName) return false

        return true
    }

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

    public class Builder {
        /**
         * The identifier of the inventory asset.
         */
        public var assetId: kotlin.String? = null
        /**
         * The target name in the asset target name map.
         */
        public var targetName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.AssetTargetNameMap) : this() {
            this.assetId = x.assetId
            this.targetName = x.targetName
        }

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

        internal fun correctErrors(): Builder {
            if (assetId == null) assetId = ""
            if (targetName == null) targetName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy