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

commonMain.aws.sdk.kotlin.services.datazone.model.AssetScope.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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The asset scope.
 */
public class AssetScope private constructor(builder: Builder) {
    /**
     * The asset ID of the asset scope.
     */
    public val assetId: kotlin.String = requireNotNull(builder.assetId) { "A non-null value must be provided for assetId" }
    /**
     * The error message of the asset scope.
     */
    public val errorMessage: kotlin.String? = builder.errorMessage
    /**
     * The filter IDs of the asset scope.
     */
    public val filterIds: List = requireNotNull(builder.filterIds) { "A non-null value must be provided for filterIds" }
    /**
     * The status of the asset scope.
     */
    public val status: kotlin.String = requireNotNull(builder.status) { "A non-null value must be provided for status" }

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

    override fun toString(): kotlin.String = buildString {
        append("AssetScope(")
        append("assetId=$assetId,")
        append("errorMessage=$errorMessage,")
        append("filterIds=$filterIds,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assetId.hashCode()
        result = 31 * result + (errorMessage?.hashCode() ?: 0)
        result = 31 * result + (filterIds.hashCode())
        result = 31 * result + (status.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 AssetScope

        if (assetId != other.assetId) return false
        if (errorMessage != other.errorMessage) return false
        if (filterIds != other.filterIds) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The asset ID of the asset scope.
         */
        public var assetId: kotlin.String? = null
        /**
         * The error message of the asset scope.
         */
        public var errorMessage: kotlin.String? = null
        /**
         * The filter IDs of the asset scope.
         */
        public var filterIds: List? = null
        /**
         * The status of the asset scope.
         */
        public var status: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.AssetScope) : this() {
            this.assetId = x.assetId
            this.errorMessage = x.errorMessage
            this.filterIds = x.filterIds
            this.status = x.status
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy