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

commonMain.aws.sdk.kotlin.services.apptest.model.DataSet.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.apptest.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Defines a data set.
 */
public class DataSet private constructor(builder: Builder) {
    /**
     * The CCSID of the data set.
     */
    public val ccsid: kotlin.String = requireNotNull(builder.ccsid) { "A non-null value must be provided for ccsid" }
    /**
     * The format of the data set.
     */
    public val format: aws.sdk.kotlin.services.apptest.model.Format = requireNotNull(builder.format) { "A non-null value must be provided for format" }
    /**
     * The length of the data set.
     */
    public val length: kotlin.Int = requireNotNull(builder.length) { "A non-null value must be provided for length" }
    /**
     * The name of the data set.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The type of the data set.
     */
    public val type: aws.sdk.kotlin.services.apptest.model.DataSetType = requireNotNull(builder.type) { "A non-null value must be provided for type" }

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

    override fun toString(): kotlin.String = buildString {
        append("DataSet(")
        append("ccsid=$ccsid,")
        append("format=$format,")
        append("length=$length,")
        append("name=$name,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ccsid.hashCode()
        result = 31 * result + (format.hashCode())
        result = 31 * result + (length)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (type.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 DataSet

        if (ccsid != other.ccsid) return false
        if (format != other.format) return false
        if (length != other.length) return false
        if (name != other.name) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The CCSID of the data set.
         */
        public var ccsid: kotlin.String? = null
        /**
         * The format of the data set.
         */
        public var format: aws.sdk.kotlin.services.apptest.model.Format? = null
        /**
         * The length of the data set.
         */
        public var length: kotlin.Int? = null
        /**
         * The name of the data set.
         */
        public var name: kotlin.String? = null
        /**
         * The type of the data set.
         */
        public var type: aws.sdk.kotlin.services.apptest.model.DataSetType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.apptest.model.DataSet) : this() {
            this.ccsid = x.ccsid
            this.format = x.format
            this.length = x.length
            this.name = x.name
            this.type = x.type
        }

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

        internal fun correctErrors(): Builder {
            if (ccsid == null) ccsid = ""
            if (format == null) format = Format.SdkUnknown("no value provided")
            if (length == null) length = 0
            if (name == null) name = ""
            if (type == null) type = DataSetType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy