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

commonMain.aws.sdk.kotlin.services.dataexchange.model.DataSetEntry.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.dataexchange.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * A data set is an AWS resource with one or more revisions.
 */
public class DataSetEntry private constructor(builder: Builder) {
    /**
     * The ARN for the data set.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The type of asset that is added to a data set.
     */
    public val assetType: aws.sdk.kotlin.services.dataexchange.model.AssetType = requireNotNull(builder.assetType) { "A non-null value must be provided for assetType" }
    /**
     * The date and time that the data set was created, in ISO 8601 format.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
    /**
     * The description for the data set.
     */
    public val description: kotlin.String = requireNotNull(builder.description) { "A non-null value must be provided for description" }
    /**
     * The unique identifier for the data set.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The name of the data set.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).
     */
    public val origin: aws.sdk.kotlin.services.dataexchange.model.Origin = requireNotNull(builder.origin) { "A non-null value must be provided for origin" }
    /**
     * If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
     */
    public val originDetails: aws.sdk.kotlin.services.dataexchange.model.OriginDetails? = builder.originDetails
    /**
     * The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.
     */
    public val sourceId: kotlin.String? = builder.sourceId
    /**
     * The date and time that the data set was last updated, in ISO 8601 format.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updatedAt) { "A non-null value must be provided for updatedAt" }

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

    override fun toString(): kotlin.String = buildString {
        append("DataSetEntry(")
        append("arn=$arn,")
        append("assetType=$assetType,")
        append("createdAt=$createdAt,")
        append("description=$description,")
        append("id=$id,")
        append("name=$name,")
        append("origin=$origin,")
        append("originDetails=$originDetails,")
        append("sourceId=$sourceId,")
        append("updatedAt=$updatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (assetType.hashCode())
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (description.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (origin.hashCode())
        result = 31 * result + (originDetails?.hashCode() ?: 0)
        result = 31 * result + (sourceId?.hashCode() ?: 0)
        result = 31 * result + (updatedAt.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 DataSetEntry

        if (arn != other.arn) return false
        if (assetType != other.assetType) return false
        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (origin != other.origin) return false
        if (originDetails != other.originDetails) return false
        if (sourceId != other.sourceId) return false
        if (updatedAt != other.updatedAt) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN for the data set.
         */
        public var arn: kotlin.String? = null
        /**
         * The type of asset that is added to a data set.
         */
        public var assetType: aws.sdk.kotlin.services.dataexchange.model.AssetType? = null
        /**
         * The date and time that the data set was created, in ISO 8601 format.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The description for the data set.
         */
        public var description: kotlin.String? = null
        /**
         * The unique identifier for the data set.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the data set.
         */
        public var name: kotlin.String? = null
        /**
         * A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).
         */
        public var origin: aws.sdk.kotlin.services.dataexchange.model.Origin? = null
        /**
         * If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.
         */
        public var originDetails: aws.sdk.kotlin.services.dataexchange.model.OriginDetails? = null
        /**
         * The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.
         */
        public var sourceId: kotlin.String? = null
        /**
         * The date and time that the data set was last updated, in ISO 8601 format.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.DataSetEntry) : this() {
            this.arn = x.arn
            this.assetType = x.assetType
            this.createdAt = x.createdAt
            this.description = x.description
            this.id = x.id
            this.name = x.name
            this.origin = x.origin
            this.originDetails = x.originDetails
            this.sourceId = x.sourceId
            this.updatedAt = x.updatedAt
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.dataexchange.model.OriginDetails] inside the given [block]
         */
        public fun originDetails(block: aws.sdk.kotlin.services.dataexchange.model.OriginDetails.Builder.() -> kotlin.Unit) {
            this.originDetails = aws.sdk.kotlin.services.dataexchange.model.OriginDetails.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (assetType == null) assetType = AssetType.SdkUnknown("no value provided")
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (description == null) description = ""
            if (id == null) id = ""
            if (name == null) name = ""
            if (origin == null) origin = Origin.SdkUnknown("no value provided")
            if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy