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

commonMain.aws.sdk.kotlin.services.personalize.model.CreateDatasetRequest.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.personalize.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateDatasetRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the dataset group to add the dataset to.
     */
    public val datasetGroupArn: kotlin.String? = builder.datasetGroupArn
    /**
     * The type of dataset.
     *
     * One of the following (case insensitive) values:
     * + Interactions
     * + Items
     * + Users
     * + Actions
     * + Action_Interactions
     */
    public val datasetType: kotlin.String? = builder.datasetType
    /**
     * The name for the dataset.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The ARN of the schema to associate with the dataset. The schema defines the dataset fields.
     */
    public val schemaArn: kotlin.String? = builder.schemaArn
    /**
     * A list of [tags](https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html) to apply to the dataset.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateDatasetRequest(")
        append("datasetGroupArn=$datasetGroupArn,")
        append("datasetType=$datasetType,")
        append("name=$name,")
        append("schemaArn=$schemaArn,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = datasetGroupArn?.hashCode() ?: 0
        result = 31 * result + (datasetType?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (schemaArn?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        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 CreateDatasetRequest

        if (datasetGroupArn != other.datasetGroupArn) return false
        if (datasetType != other.datasetType) return false
        if (name != other.name) return false
        if (schemaArn != other.schemaArn) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the dataset group to add the dataset to.
         */
        public var datasetGroupArn: kotlin.String? = null
        /**
         * The type of dataset.
         *
         * One of the following (case insensitive) values:
         * + Interactions
         * + Items
         * + Users
         * + Actions
         * + Action_Interactions
         */
        public var datasetType: kotlin.String? = null
        /**
         * The name for the dataset.
         */
        public var name: kotlin.String? = null
        /**
         * The ARN of the schema to associate with the dataset. The schema defines the dataset fields.
         */
        public var schemaArn: kotlin.String? = null
        /**
         * A list of [tags](https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html) to apply to the dataset.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.personalize.model.CreateDatasetRequest) : this() {
            this.datasetGroupArn = x.datasetGroupArn
            this.datasetType = x.datasetType
            this.name = x.name
            this.schemaArn = x.schemaArn
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy